Fixed another issue with assrt. #1953

This commit is contained in:
morpheus65535 2022-10-16 23:13:52 -04:00
parent 560cbc0bd4
commit 0374790ed2
1 changed files with 6 additions and 0 deletions

View File

@ -75,7 +75,13 @@ class AssrtSubtitle(Subtitle):
r.raise_for_status()
result = r.json()
if not len(result['sub']['subs']):
logger.error('Can\'t get subtitle details')
return False
sub = result['sub']['subs'][0]
if not len(sub['filelist']):
logger.error('Can\'t get filelist from subtitle details')
return False
files = sub['filelist']
# first pass: guessit