addic7ed 0.1.1 → 0.1.2
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.
- data/Gemfile.lock +1 -1
- data/README.md +2 -1
- data/lib/addic7ed/episode.rb +1 -2
- data/lib/addic7ed/version.rb +1 -1
- metadata +3 -3
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Ruby command-line script to fetch subtitles on Addic7ed
|
|
4
4
|
|
|
5
|
-
Current version: **0.1.
|
|
5
|
+
Current version: **0.1.2**
|
|
6
6
|
|
|
7
7
|
### Is it working ?
|
|
8
8
|
|
|
@@ -66,6 +66,7 @@ There's some work remaining:
|
|
|
66
66
|
|
|
67
67
|
### Changelog
|
|
68
68
|
|
|
69
|
+
* 0.1.2: Fixed how the daily download limit reach is detected
|
|
69
70
|
* 0.1.1: This is now a _working_ gem
|
|
70
71
|
* 0.1.0: This is now a gem
|
|
71
72
|
* 0.0.1: Added ability to actually download a subtitle
|
data/lib/addic7ed/episode.rb
CHANGED
|
@@ -60,8 +60,6 @@ module Addic7ed
|
|
|
60
60
|
request['User-Agent'] = USER_AGENTS.sample
|
|
61
61
|
http.request(request)
|
|
62
62
|
end
|
|
63
|
-
rescue Errno::ECONNREFUSED
|
|
64
|
-
raise DownloadLimitReached
|
|
65
63
|
rescue
|
|
66
64
|
raise DownloadError
|
|
67
65
|
end
|
|
@@ -69,6 +67,7 @@ module Addic7ed
|
|
|
69
67
|
# Addic7ed is serving redirection URL not-encoded.
|
|
70
68
|
# Ruby does not support it yet (see http://bugs.ruby-lang.org/issues/7396)
|
|
71
69
|
best_subtitle(lang).url = URI.escape(response['location'])
|
|
70
|
+
raise DownloadLimitReached if /^\/downloadexceeded.php/.match best_subtitle(lang).url
|
|
72
71
|
download_best_subtitle!(lang, redirect_limit - 1)
|
|
73
72
|
else
|
|
74
73
|
begin
|
data/lib/addic7ed/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: addic7ed
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -97,7 +97,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
97
97
|
version: '0'
|
|
98
98
|
segments:
|
|
99
99
|
- 0
|
|
100
|
-
hash:
|
|
100
|
+
hash: -1188396796560563585
|
|
101
101
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
102
|
none: false
|
|
103
103
|
requirements:
|
|
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
106
106
|
version: '0'
|
|
107
107
|
segments:
|
|
108
108
|
- 0
|
|
109
|
-
hash:
|
|
109
|
+
hash: -1188396796560563585
|
|
110
110
|
requirements: []
|
|
111
111
|
rubyforge_project:
|
|
112
112
|
rubygems_version: 1.8.25
|