peerflixrb 6.0.0 → 6.0.1
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 +4 -4
- data/lib/peerflixrb/commands.rb +19 -2
- data/lib/peerflixrb/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: 6609b3543f679e2b495b514a61823b05537e5e81
|
|
4
|
+
data.tar.gz: a30b2b6ecd00c63fc94e005aea77f6db952a8241
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 853e0f3035a30d34bb598d5c1043b50b8580cc5239cc2a63db7c05273631fd42699effdb4db510d48d3a037ac89e11c9760886101fe39eea2ea53cc281ba2009
|
|
7
|
+
data.tar.gz: b923418b0ab8dc175cbf461130c0ab89a18f99699912ed1cb00f3884872b4f903f52227f7d90dea50f2942cfd55e4e0b88d2551660c495008b1acd6e34154a3f
|
data/lib/peerflixrb/commands.rb
CHANGED
|
@@ -84,9 +84,26 @@ module Peerflixrb
|
|
|
84
84
|
YifySubtitles.download(link.imdb_id, 'english')
|
|
85
85
|
when :show
|
|
86
86
|
filename = link.filename || link.title
|
|
87
|
-
search = Addic7edDownloader::Search.by_filename(filename, lang: options[:language])
|
|
88
87
|
|
|
89
|
-
|
|
88
|
+
# Try to download by filename
|
|
89
|
+
if link.filename
|
|
90
|
+
search = Addic7edDownloader::Search.by_filename(link.filename, lang: options[:language])
|
|
91
|
+
|
|
92
|
+
unless options[:choose_subtitles]
|
|
93
|
+
return search.download_best if search.download_best
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Try to download by title (Archer has problems with this because it usually
|
|
98
|
+
# appears as "Archer 2009 - 02x03", which gives Addic7ed API problems)
|
|
99
|
+
if search.nil? || search.results.empty?
|
|
100
|
+
search = Addic7edDownloader::Search.by_filename(link.title, lang: options[:language])
|
|
101
|
+
search.extract_tags(link.filename) if link.filename
|
|
102
|
+
|
|
103
|
+
unless options[:choose_subtitles]
|
|
104
|
+
return search.download_best if search.download_best
|
|
105
|
+
end
|
|
106
|
+
end
|
|
90
107
|
|
|
91
108
|
# Choose subtitle
|
|
92
109
|
say "Choose subtitles for #{filename.blue}:".yellow
|
data/lib/peerflixrb/version.rb
CHANGED