download_tv 2.0.0 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cd6399aa4f4c7b47b11bfef2797f874a009e9336
4
- data.tar.gz: 6db536e4abc9ff2e58090ca782a29d2dc28149d1
3
+ metadata.gz: 702cf29038f2dad7d30eef5326704806832616bf
4
+ data.tar.gz: f5c6cec787ca02c1d1706bddb69d5a08efcf91a3
5
5
  SHA512:
6
- metadata.gz: 88d2844361b6213fe0eea64d0e14cbdcacd42a9f8ce75e29c5136c9fc4a9c748ebc6fb60226d186eee17080c7b5ae40953b8af304f52daaba09bd4d359a00eb6
7
- data.tar.gz: ed7969953514c6e45be2ee25c808426c4ae3e66482a1e79bd11c632e801cc5f60e941675105a236d9bc652d306f13ed8b3133a4293f08f4d5e46f4b21f0426e4
6
+ metadata.gz: 56feb46d072fddfc7fa4ca6863a4da349f27ad52eccf7a0d72a127a850d06f767e95fb82cd33b4b13519771f000dc24cb1ce9cf335f82630f42f967c1d69f141
7
+ data.tar.gz: 61e9b93ae94eb22fa1782b9d32a9f5cfdd8f2e132c0377f18cf899a8967bc1c2aa6f7822c48a8c0926d232778c005a8487313c0231a4e0c7b295d74001d082f0
data/bin/tv CHANGED
@@ -55,7 +55,7 @@ end
55
55
  opt_parser.parse!(ARGV)
56
56
 
57
57
  begin
58
- dl = DownloadTV::Downloader.new(options[:offset])
58
+ dl = DownloadTV::Downloader.new(options[:offset], options[:auto], options[:subs])
59
59
  case options[:cmd]
60
60
  when "run"
61
61
  dl.run(options[:dry])
@@ -64,7 +64,7 @@ begin
64
64
  when "file"
65
65
  dl.download_from_file(options[:arg])
66
66
  when "config"
67
- DownloadTV::Configuration.new.change_configuration
67
+ DownloadTV::Configuration.new true
68
68
  end
69
69
  rescue Interrupt
70
70
  puts "Interrupt signal detected. Exiting..."
@@ -2,9 +2,10 @@ module DownloadTV
2
2
  class Configuration
3
3
  attr_reader :content
4
4
 
5
- def initialize
6
- if File.exists? "config.rb"
5
+ def initialize(force_change=false)
6
+ if File.exists? "config"
7
7
  @content = File.open("config", "rb") {|f| Marshal.load(f)}
8
+ change_configuration if force_change
8
9
  else
9
10
  @content = {}
10
11
  change_configuration
@@ -16,18 +17,21 @@ module DownloadTV
16
17
  if @content[:myepisodes_user]
17
18
  print "Enter your MyEpisodes username (#{@content[:myepisodes_user]}) : "
18
19
  else
19
- print "Enter your MyEpisodes username : "
20
+ print "Enter your MyEpisodes username: "
20
21
  end
21
22
  @content[:myepisodes_user] = STDIN.gets.chomp
22
- puts
23
23
 
24
24
  print "Save cookie? (y)/n: "
25
25
  @content[:cookie] = STDIN.gets.chomp.downcase != "n"
26
- puts
27
26
 
28
- puts "Enter a comma-separated list of shows to ignore: (#{@content[:ignored]})"
29
- @content[:ignored] = STDIN.gets.chomp
30
- puts
27
+ if @content[:ignored]
28
+ puts "Enter a comma-separated list of shows to ignore: (#{@content[:ignored]})"
29
+ else
30
+ puts "Enter a comma-separated list of shows to ignore: "
31
+ end
32
+
33
+ @content[:ignored] = STDIN.gets.chomp.split(",").map(&:strip)
34
+ STDOUT.flush
31
35
 
32
36
  serialize()
33
37
  end
@@ -1,3 +1,3 @@
1
1
  module DownloadTV
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: download_tv
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - guille