Commit d41e5256 authored by echel0n's avatar echel0n

Fixed issue with "unable to verify the download url"

parent dd0f62c8
# Changelog
- * 55e7878 - 2019-01-22: Release v9.4.58
- * c815554 - 2019-02-11: Fixed issue with "unable to verify the download url"
- * 9a10462 - 2019-01-22: Release v9.4.58
- * 92b5423 - 2019-01-22: Dockerfile default TZ set to Canada/Pacific
- * c128f16 - 2019-01-22: Pre-Release v9.4.58.dev1
- * 8913178 - 2019-01-21: Release v9.4.57
......
......@@ -653,15 +653,13 @@ class TorrentProvider(GenericProvider):
info_hash = b16encode(b32decode(info_hash)).upper()
if info_hash:
torrent_url = "https://itorrents.org/torrent/{info_hash}.torrent".format(info_hash=info_hash)
result = verify_torrent(super(TorrentProvider, self).get_content(torrent_url))
try:
# add to external api database
TorrentCacheAPI().add(url)
result = verify_torrent(b64decode(TorrentCacheAPI().get(info_hash)['data']['content']).strip())
except Exception:
pass
torrent_url = "https://itorrents.org/torrent/{info_hash}.torrent".format(info_hash=info_hash)
result = verify_torrent(super(TorrentProvider, self).get_content(torrent_url))
if not result:
result = verify_torrent(super(TorrentProvider, self).get_content(url))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment