Commit 2aa5b96d authored by echel0n's avatar echel0n
Browse files

Testing fix for "unsupported operand type" during BTN provider search

parent fad12a41
# Changelog
- * 69efb12 - 2018-10-13: Release v9.3.82
- * 0e68147 - 2018-10-13: Testing fix for "unsupported operand type" during BTN provider search
- * 536c3ba - 2018-10-13: Release v9.3.82
- * a120b3e - 2018-10-13: Fixed issue with re-scanning existing show episodes that do not contain the show name in the filename
- * a216e2b - 2018-10-13: Fixed issue with displaying provider icons for custom providers
- * f29e97d - 2018-10-12: Release v9.3.81
......
......@@ -208,13 +208,14 @@ def pickBestResult(results, show):
# quality definition video file size constraints check
try:
quality_size = sickrage.app.config.quality_sizes[cur_result.quality]
file_size = float(cur_result.size / 1000000)
if file_size > quality_size:
raise Exception(
"Ignoring " + cur_result.name + " with size: {} based on quality size filter: {}".format(
file_size, quality_size)
)
if cur_result.size:
quality_size = sickrage.app.config.quality_sizes[cur_result.quality]
file_size = float(cur_result.size / 1000000)
if file_size > quality_size:
raise Exception(
"Ignoring " + cur_result.name + " with size: {} based on quality size filter: {}".format(
file_size, quality_size)
)
except Exception as e:
sickrage.app.log.info(str(e))
continue
......
......@@ -26,7 +26,7 @@ import jsonrpclib
import sickrage
from sickrage.core import scene_exceptions
from sickrage.core.caches.tv_cache import TVCache
from sickrage.core.helpers import sanitizeSceneName, episode_num
from sickrage.core.helpers import sanitizeSceneName, episode_num, try_int
from sickrage.providers import TorrentProvider
......@@ -107,9 +107,9 @@ class BTNProvider(TorrentProvider):
if not all([title, download_url]):
continue
seeders = row.get('Seeders', 1)
leechers = row.get('Leechers', 0)
size = row.get('Size') or -1
seeders = try_int(row.get('Seeders'))
leechers = try_int(row.get('Leechers'))
size = try_int(row.get('Size'), -1)
results += [
{'title': title, 'link': download_url, 'size': size, 'seeders': seeders, 'leechers': leechers}
......
Supports Markdown
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