viddl-rb 0.63 → 0.64

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/plugins/youtube.rb +5 -4
  2. metadata +3 -3
@@ -1,3 +1,4 @@
1
+
1
2
  class Youtube < PluginBase
2
3
  #this will be called by the main app to check whether this plugin is responsible for the url passed
3
4
  def self.matches_provider?(url)
@@ -9,7 +10,7 @@ class Youtube < PluginBase
9
10
  #http://www.youtube.com/watch?v=9WEP5nCxkEY&videos=jKY836_WMhE&playnext_from=TL&playnext=1
10
11
  #http://www.youtube.com/watch?v=Tk78sr5JMIU&videos=jKY836_WMhE
11
12
 
12
- playlist_ID = url[/p=(\w{16})&?/,1]
13
+ playlist_ID = url[/(?:list=PL|p=)(\w{16})&?/,1]
13
14
  puts "[YOUTUBE] Playlist ID: #{playlist_ID}"
14
15
  url_array = Array.new
15
16
  video_info = Nokogiri::HTML(open("http://gdata.youtube.com/feeds/api/playlists/#{playlist_ID}?v=2"))
@@ -24,16 +25,16 @@ class Youtube < PluginBase
24
25
 
25
26
  def self.get_urls_and_filenames(url)
26
27
  return_values = []
27
- if url.include?("view_play_list")
28
+ if url.include?("view_play_list") || url.include?("playlist?list=")
28
29
  puts "[YOUTUBE] playlist found! analyzing..."
29
30
  files = self.parse_playlist(url)
30
31
  puts "[YOUTUBE] Starting playlist download"
31
32
  files.each do |file|
32
33
  puts "[YOUTUBE] Downloading next movie on the playlist (#{file})"
33
- return_values << self.grab_single_url_filename(url)
34
+ return_values << self.grab_single_url_filename(file)
34
35
  end
35
36
  else
36
- return_values << self.grab_single_url_filename(url)
37
+ return_values << self.grab_single_url_filename(url)
37
38
  end
38
39
  return_values
39
40
  end
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: viddl-rb
3
3
  version: !ruby/object:Gem::Version
4
- hash: 117
4
+ hash: 139
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 63
9
- version: "0.63"
8
+ - 64
9
+ version: "0.64"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Marc Seeger