From d9bff5dffee4db6f55caf595e0c8bf1e6fec600f Mon Sep 17 00:00:00 2001 From: Erwan Miran Date: Sun, 8 Apr 2018 23:43:42 +0200 Subject: [PATCH] size may be set as torznab:attr --- headphones/searcher.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/headphones/searcher.py b/headphones/searcher.py index 74cad281..39500b94 100644 --- a/headphones/searcher.py +++ b/headphones/searcher.py @@ -1353,8 +1353,10 @@ def searchTorrent(album, new=False, losslessOnly=False, albumlength=None, else: logger.info('Skipping %s, could not determine size' % title) continue - else: + elif item.size: size = int(item.size.string) + else: + size = int(item.find("torznab:attr", attrs={"name": "size"}).get('value')) if all(word.lower() in title.lower() for word in term.split()): if size < maxsize and minimumseeders < seeders: