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 +4 -4
- data/bin/tv +2 -2
- data/lib/download_tv/configuration.rb +12 -8
- data/lib/download_tv/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 702cf29038f2dad7d30eef5326704806832616bf
|
4
|
+
data.tar.gz: f5c6cec787ca02c1d1706bddb69d5a08efcf91a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
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
|
-
|
29
|
-
|
30
|
-
|
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
|
data/lib/download_tv/version.rb
CHANGED