|
|
@ -2008,18 +2008,19 @@ class SubtitleNameInfo(Resource):
|
|
|
|
for name in names:
|
|
|
|
for name in names:
|
|
|
|
opts = dict()
|
|
|
|
opts = dict()
|
|
|
|
opts['type'] = 'episode'
|
|
|
|
opts['type'] = 'episode'
|
|
|
|
result = guessit(name, options=opts)
|
|
|
|
guessit_result = guessit(name, options=opts)
|
|
|
|
|
|
|
|
result = {}
|
|
|
|
result['filename'] = name
|
|
|
|
result['filename'] = name
|
|
|
|
if 'subtitle_language' in result:
|
|
|
|
if 'subtitle_language' in guessit_result:
|
|
|
|
result['subtitle_language'] = str(result['subtitle_language'])
|
|
|
|
result['subtitle_language'] = str(guessit_result['subtitle_language'])
|
|
|
|
|
|
|
|
|
|
|
|
if 'episode' in result:
|
|
|
|
if 'episode' in guessit_result:
|
|
|
|
result['episode'] = result['episode']
|
|
|
|
result['episode'] = int(guessit_result['episode'])
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
result['episode'] = 0
|
|
|
|
result['episode'] = 0
|
|
|
|
|
|
|
|
|
|
|
|
if 'season' in result:
|
|
|
|
if 'season' in guessit_result:
|
|
|
|
result['season'] = result['season']
|
|
|
|
result['season'] = int(guessit_result['season'])
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
result['season'] = 0
|
|
|
|
result['season'] = 0
|
|
|
|
|
|
|
|
|
|
|
|