viddl 0.0.7 → 0.0.8

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: affcaf293c945b5477ebc9f744076b4c5486045e
4
- data.tar.gz: 9d76fb34d7753d40a946c4270da37cd1ccbbcacd
3
+ metadata.gz: cd33b2c5bcff4b999a13d30cd1977df8a7f31899
4
+ data.tar.gz: dfa1b3f7b6754937e04161f5c7e4724dd77e588f
5
5
  SHA512:
6
- metadata.gz: 3d848ff07b6999ad231bfd95cac4253d4d35d306274123b2961a60e11eaf64807d678581c2be2a9b8dc0cfa42e8b18dacabdee857a497e1d6cde9deb1e59f4b1
7
- data.tar.gz: a51ca3083636af978521ba5d975bf0ae2c74e4c6ca2445f8b3045b1d304d00d8224c6d0128cdd45071f07be04e36d63d08af3d9d8850f2340fe0937ba2527ef8
6
+ metadata.gz: 851f28475638e1648ea05bf6060afe1f7a6a2adf6ce7d1733c2767e2ef39cb9f7d702a96daead7067fcc09ce024b4b7f5b2ef6b90f0b4c76fc7816c4a726cae6
7
+ data.tar.gz: 8a08108deac82d0f7f958764d94ad200173ec4712921e21ac3dc84322e66fde4e9434583555e654de184ed06f70e19742e919bce58b7838e4ed84d7040f56b5f
data/lib/viddl.rb CHANGED
@@ -17,6 +17,6 @@ module Viddl
17
17
 
18
18
  extend self
19
19
 
20
- VERSION = "0.0.7"
20
+ VERSION = "0.0.8"
21
21
 
22
22
  end
@@ -14,6 +14,7 @@ module Viddl
14
14
  # Download the given video
15
15
  # @param [Video::Instance] video
16
16
  # @param [Hash] options
17
+ # @option options [String] :flags Flags to pass to youtube-dl
17
18
  # @return [Download]
18
19
  def self.process(video, options = {})
19
20
  download = new(video)
@@ -29,9 +30,11 @@ module Viddl
29
30
 
30
31
  # Download the video file
31
32
  # @param [Hash] options
33
+ # @option options [String] :flags Flags to pass to youtube-dl
32
34
  # @return [Boolean]
33
35
  def process(options = {})
34
- result = Kernel.system(command_line)
36
+ cmd = command_line(options)
37
+ result = Kernel.system(cmd)
35
38
  raise(result.to_s) unless result
36
39
  true
37
40
  end
@@ -39,9 +42,11 @@ module Viddl
39
42
  private
40
43
 
41
44
  # Command line to download the video file
45
+ # @param [Hash] options
46
+ # @option options [String] :flags Flags to pass to youtube-dl
42
47
  # @return [String]
43
- def command_line
44
- "youtube-dl #{@video.source_url} #{FORMAT_ARG} -o '#{TEMPDIR}/#{@video.id}s.%(ext)s'"
48
+ def command_line(options = {})
49
+ "youtube-dl #{@video.source_url} #{FORMAT_ARG} #{options[:flags]} -o '#{TEMPDIR}/#{@video.id}s.%(ext)s'"
45
50
  end
46
51
 
47
52
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: viddl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ari Russo