Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SickRage-1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
SickRage-1
Commits
2c05a0e8
Commit
2c05a0e8
authored
9 years ago
by
Dustyn Gibson
Browse files
Options
Downloads
Patches
Plain Diff
Hack around failing TokyoToshoKan - Should fix SiCKRAGETV/sickrage-issues#2081
parent
3836726c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sickbeard/providers/generic.py
+10
-1
10 additions, 1 deletion
sickbeard/providers/generic.py
with
10 additions
and
1 deletion
sickbeard/providers/generic.py
+
10
−
1
View file @
2c05a0e8
...
@@ -156,7 +156,11 @@ class GenericProvider:
...
@@ -156,7 +156,11 @@ class GenericProvider:
if
result
.
url
.
startswith
(
'
magnet
'
):
if
result
.
url
.
startswith
(
'
magnet
'
):
try
:
try
:
torrent_hash
=
re
.
findall
(
'
urn:btih:([\w]{32,40})
'
,
result
.
url
)[
0
].
upper
()
torrent_hash
=
re
.
findall
(
'
urn:btih:([\w]{32,40})
'
,
result
.
url
)[
0
].
upper
()
try
:
torrent_name
=
re
.
findall
(
'
dn=([^&]+)
'
,
result
.
url
)[
0
]
torrent_name
=
re
.
findall
(
'
dn=([^&]+)
'
,
result
.
url
)[
0
]
except
:
torrent_name
=
'
NO_DOWNLOAD_NAME
'
if
len
(
torrent_hash
)
==
32
:
if
len
(
torrent_hash
)
==
32
:
torrent_hash
=
b16encode
(
b32decode
(
torrent_hash
)).
upper
()
torrent_hash
=
b16encode
(
b32decode
(
torrent_hash
)).
upper
()
...
@@ -203,6 +207,8 @@ class GenericProvider:
...
@@ -203,6 +207,8 @@ class GenericProvider:
self
.
proxyGlypeProxySSLwarning
=
None
self
.
proxyGlypeProxySSLwarning
=
None
for
url
in
urls
:
for
url
in
urls
:
if
'
NO_DOWNLOAD_NAME
'
in
url
:
continue
if
helpers
.
headURL
(
self
.
proxy
.
_buildURL
(
url
),
session
=
self
.
session
,
headers
=
self
.
headers
,
if
helpers
.
headURL
(
self
.
proxy
.
_buildURL
(
url
),
session
=
self
.
session
,
headers
=
self
.
headers
,
proxyGlypeProxySSLwarning
=
self
.
proxyGlypeProxySSLwarning
):
proxyGlypeProxySSLwarning
=
self
.
proxyGlypeProxySSLwarning
):
return
url
return
url
...
@@ -226,6 +232,9 @@ class GenericProvider:
...
@@ -226,6 +232,9 @@ class GenericProvider:
self
.
headers
.
pop
(
'
Referer
'
)
self
.
headers
.
pop
(
'
Referer
'
)
for
url
in
urls
:
for
url
in
urls
:
if
'
NO_DOWNLOAD_NAME
'
in
url
:
continue
logger
.
log
(
u
"
Downloading a result from
"
+
self
.
name
+
"
at
"
+
url
)
logger
.
log
(
u
"
Downloading a result from
"
+
self
.
name
+
"
at
"
+
url
)
if
helpers
.
download_file
(
self
.
proxy
.
_buildURL
(
url
),
filename
,
session
=
self
.
session
,
headers
=
self
.
headers
):
if
helpers
.
download_file
(
self
.
proxy
.
_buildURL
(
url
),
filename
,
session
=
self
.
session
,
headers
=
self
.
headers
):
if
self
.
_verify_download
(
filename
):
if
self
.
_verify_download
(
filename
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment