download_tv 2.5.5 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/bin/tv +7 -0
- data/lib/download_tv/configuration.rb +5 -0
- data/lib/download_tv/linkgrabber.rb +1 -1
- data/lib/download_tv/version.rb +1 -1
- data/test/downloader_test.rb +10 -21
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cdd3f78afeabc9f480b3c8ec5aa31029706328b175c8c65b0ab886982eecb71b
|
4
|
+
data.tar.gz: b94540fc9e5a49193a8dea70abbe1b91f83e767bb06e11a181dd81a9c2d558a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5b267c3a9502dbb034e31d4805d5aa6312d2d47adbace34c3b309281533f1831fb38834c0e2b957cc5ba56c72e0ef06e6a67d333d86731deb318756e4461743
|
7
|
+
data.tar.gz: ab7d015822c32df0a62e2e367cf246b28fa6e26d6d0e81a59e6c78131419d1b96d631c62157c5aece13e69b02c450afbed785aaf99e498e3711c3bbe867a6fe7
|
data/README.md
CHANGED
@@ -32,6 +32,7 @@ Specific options:
|
|
32
32
|
--show-grabbers List available grabbers
|
33
33
|
-p, --pending Show list of pending downloads
|
34
34
|
--clear-pending Clear list of pending downloads
|
35
|
+
-q, --queue Add show episode to pending downloads list
|
35
36
|
-v, --version Print version
|
36
37
|
-h, --help Show this message
|
37
38
|
```
|
@@ -72,6 +73,8 @@ I usually publish a patch update to the gem when I detect one of them isn't work
|
|
72
73
|
|
73
74
|
download_tv version 2.5.0 persists the list of shows it can't find on a given execution (when connecting to MyEpisodes, not for single show or file downloads) and it will try to find them again on following executions. This list can be viewed by passing the -p flag to the tv binary. The list can be cleared with the --clear-pending option.
|
74
75
|
|
76
|
+
Version 2.6.0 adds functionality to queue an episode by running `tv --queue "show name"`. The --queue parameter cannot be used in conjunction with any other parameters. On the plus side, it doesn't need the show name to be quoted or the spaces escaped.
|
77
|
+
|
75
78
|
### Filters
|
76
79
|
|
77
80
|
download_tv version 2.5.5 adds the possibility of setting include/exclude filters for the automatic download of shows.
|
data/bin/tv
CHANGED
@@ -76,6 +76,11 @@ opt_parser = OptionParser.new do |opts|
|
|
76
76
|
options[:cmd] = 'clearpending'
|
77
77
|
end
|
78
78
|
|
79
|
+
opts.on('-q', '--queue SHOW', 'Add show episode to pending downloads list') do |s|
|
80
|
+
options[:cmd] = 'queue'
|
81
|
+
options[:arg] = s
|
82
|
+
end
|
83
|
+
|
79
84
|
opts.on('-v', '--version', 'Print version') do
|
80
85
|
puts DownloadTV::VERSION
|
81
86
|
exit
|
@@ -115,6 +120,8 @@ begin
|
|
115
120
|
DownloadTV::Configuration.new(config).print_attr(:pending)
|
116
121
|
when 'clearpending'
|
117
122
|
DownloadTV::Configuration.new(config).clear_pending
|
123
|
+
when 'queue'
|
124
|
+
DownloadTV::Configuration.new(config).queue_pending(options[:arg])
|
118
125
|
end
|
119
126
|
rescue Interrupt
|
120
127
|
puts 'Interrupt signal detected. Exiting...'
|
data/lib/download_tv/version.rb
CHANGED
data/test/downloader_test.rb
CHANGED
@@ -62,37 +62,26 @@ describe DownloadTV::Downloader do
|
|
62
62
|
end
|
63
63
|
|
64
64
|
describe 'the filter_shows method' do
|
65
|
-
it 'removes names with
|
66
|
-
|
65
|
+
it 'removes names with exclude words in them' do
|
66
|
+
f = {:excludes => ["2160P"], :includes => []}
|
67
|
+
dl = DownloadTV::Downloader.new(path: config_path, filters: f)
|
67
68
|
links = [['Link 1', ''], ['Link 2 2160p', ''], ['Link 3', '']]
|
68
69
|
res = [['Link 1', ''], ['Link 3', '']]
|
69
70
|
dl.filter_shows(links).must_equal res
|
70
71
|
end
|
71
72
|
|
72
|
-
it 'removes names
|
73
|
-
|
74
|
-
|
75
|
-
res = [['Link 3', '']]
|
76
|
-
dl.filter_shows(links).must_equal res
|
77
|
-
end
|
78
|
-
|
79
|
-
it 'removes names with 720p in them' do
|
80
|
-
dl = DownloadTV::Downloader.new(path: config_path)
|
81
|
-
links = [['Link 1', ''], ['Link 2 720p', ''], ['Link.720p.rip', '']]
|
82
|
-
res = [['Link 1', '']]
|
83
|
-
dl.filter_shows(links).must_equal res
|
84
|
-
end
|
85
|
-
|
86
|
-
it 'removes names without PROPER or REPACK in them' do
|
87
|
-
dl = DownloadTV::Downloader.new(path: config_path)
|
73
|
+
it 'removes names without include words in them' do
|
74
|
+
f = {:excludes => [], :includes => %w[REPACK]}
|
75
|
+
dl = DownloadTV::Downloader.new(path: config_path, filters: f)
|
88
76
|
links = [['Link 1', ''], ['Link 2 2160p', ''], ['Link 3', ''],
|
89
|
-
['Link
|
90
|
-
res = [['Link
|
77
|
+
['Link REPACK 5', '']]
|
78
|
+
res = [['Link REPACK 5', '']]
|
91
79
|
dl.filter_shows(links).must_equal res
|
92
80
|
end
|
93
81
|
|
94
82
|
it "doesn't apply a filter if it would reject every option" do
|
95
|
-
|
83
|
+
f = {:excludes => %w[2160P 720P], :includes => []}
|
84
|
+
dl = DownloadTV::Downloader.new(path: config_path, filters: f)
|
96
85
|
links = [['Link 1 720p', ''], ['Link 2 2160p', ''], ['Link 720p 3', '']]
|
97
86
|
res = [['Link 1 720p', ''], ['Link 720p 3', '']]
|
98
87
|
dl.filter_shows(links).must_equal res
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: download_tv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- guille
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|