Add Paramount Network icon.

Change strict modes for a couple of subliminal cases.
This commit is contained in:
JackDandy 2018-02-18 05:33:04 +00:00
parent ff04e234d0
commit 02c6eb1f56
4 changed files with 8 additions and 9 deletions

View file

@ -1,8 +1,7 @@
### 0.14.4 (2018-02-15 13:00:00 UTC) ### 0.14.4 (2018-02-18 23:55:00 UTC)
Change relax strict mode from subtitle languages and show unknown.png flag for 'Undetermined' subtitle languages. Change relax strict mode from subtitle languages and show unknown.png flag for 'Undetermined' subtitle languages
Add Paramount Network icon
The strict parameter for languages simply raises a ValueError instead of returning Undetermined as language if unknown language is used.
### 0.14.3 (2018-02-13 13:00:00 UTC) ### 0.14.3 (2018-02-13 13:00:00 UTC)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -19,7 +19,7 @@
#end if #end if
## ##
#if $whichSubs #if $whichSubs
#set subsLanguage = $subliminal.language.Language($whichSubs) if not $whichSubs == 'all' else 'All' #set subsLanguage = $subliminal.language.Language($whichSubs, strict=False) if not $whichSubs == 'all' else 'All'
#end if #end if
#if not $whichSubs or ($whichSubs and not $ep_counts) #if not $whichSubs or ($whichSubs and not $ep_counts)
#if $whichSubs: #if $whichSubs:

View file

@ -2437,10 +2437,10 @@ class Home(MainHandler):
return json.dumps({'result': 'failure'}) return json.dumps({'result': 'failure'})
# try do download subtitles for that episode # try do download subtitles for that episode
previous_subtitles = set(subliminal.language.Language(x) for x in ep_obj.subtitles)
try: try:
previous_subtitles = set(subliminal.language.Language(x) for x in ep_obj.subtitles)
ep_obj.subtitles = set(x.language for x in ep_obj.downloadSubtitles().values()[0]) ep_obj.subtitles = set(x.language for x in ep_obj.downloadSubtitles().values()[0])
except: except(StandardError, Exception):
return json.dumps({'result': 'failure'}) return json.dumps({'result': 'failure'})
# return the correct json value # return the correct json value
@ -4027,8 +4027,8 @@ class Manage(MainHandler):
result[cur_season][cur_episode]['name'] = cur_result['name'] result[cur_season][cur_episode]['name'] = cur_result['name']
result[cur_season][cur_episode]['subtitles'] = ','.join( result[cur_season][cur_episode]['subtitles'] = ','.join(
subliminal.language.Language(subtitle).alpha2 for subtitle in cur_result['subtitles'].split(',')) if not \ subliminal.language.Language(subtitle, strict=False).alpha2
cur_result['subtitles'] == '' else '' for subtitle in cur_result['subtitles'].split(',')) if '' != cur_result['subtitles'] else ''
return json.dumps(result) return json.dumps(result)