ydj 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/lib/ydj.rb +5 -1
  2. data/lib/ydj/version.rb +1 -1
  3. metadata +2 -2
data/lib/ydj.rb CHANGED
@@ -5,10 +5,14 @@ module Ydj
5
5
  client = YouTubeIt::Client.new
6
6
  puts "Downloading #{channel}..."
7
7
  page = 1
8
+ array = []
8
9
  while urls = client.videos_by(:user => channel, :per_page => 50, :page => page).videos.collect{|v| v.player_url} and urls.any?
9
10
  puts "Page #{page}, found #{urls.count} videos"
10
- system("youtube-dl --audio-quality 320k --max-quality 22 -o '%(title)s.%(ext)s' -x --audio-format mp3 \"#{urls.join(' ')}\"")
11
+ urls.each do |url|
12
+ array << url
13
+ end
11
14
  page = page + 1
12
15
  end
16
+ File.open('list', 'w') {|f| f.write(array.join("\n"))}
13
17
  end
14
18
  end
@@ -1,3 +1,3 @@
1
1
  module Ydj
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ydj
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-07 00:00:00.000000000 Z
12
+ date: 2013-03-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: youtube_it