From ff04e234d06f428b104424ced188dd8fb5a20bd5 Mon Sep 17 00:00:00 2001 From: Prinz23 Date: Sun, 18 Feb 2018 01:29:19 +0000 Subject: [PATCH 1/2] Change relax strict mode from subtitle languages and show unknown.png flag for 'Undetermined' subtitle languages. The strict parameter for languages simply raises a ValueError instead of returning Undetermined as language if unknown language is used. --- CHANGES.md | 9 ++++++++- gui/slick/interfaces/default/inc_displayShow.tmpl | 4 +++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 2cf333d3..1005302d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,11 @@ -### 0.14.3 (2018-02-13 13:00:00 UTC) +### 0.14.4 (2018-02-15 13:00:00 UTC) + +Change relax strict mode from subtitle languages and show unknown.png flag for 'Undetermined' subtitle languages. + +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) Change improve thetvdb api response handling diff --git a/gui/slick/interfaces/default/inc_displayShow.tmpl b/gui/slick/interfaces/default/inc_displayShow.tmpl index 75de3a14..6a2aebc9 100644 --- a/gui/slick/interfaces/default/inc_displayShow.tmpl +++ b/gui/slick/interfaces/default/inc_displayShow.tmpl @@ -94,9 +94,11 @@ #if $sg_var('USE_SUBTITLES') and $show.subtitles #if $ep['subtitles'] - #for $sub_lang in subliminal.language.language_list($ep['subtitles'].split(',')) + #for $sub_lang in subliminal.language.language_list($ep['subtitles'].split(','), strict=False) #if '' != sub_lang.alpha2 ${sub_lang} + #elif 'und' == sub_lang.alpha3 + undetermined #end if #end for #end if From 02c6eb1f56c002a3c403ac39263b9c96ecbaf8d7 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Sun, 18 Feb 2018 05:33:04 +0000 Subject: [PATCH 2/2] Add Paramount Network icon. Change strict modes for a couple of subliminal cases. --- CHANGES.md | 7 +++---- gui/slick/images/network/paramount network.png | Bin 0 -> 1626 bytes .../default/manage_subtitleMissed.tmpl | 2 +- sickbeard/webserve.py | 8 ++++---- 4 files changed, 8 insertions(+), 9 deletions(-) create mode 100644 gui/slick/images/network/paramount network.png diff --git a/CHANGES.md b/CHANGES.md index 1005302d..be0344de 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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. - -The strict parameter for languages simply raises a ValueError instead of returning Undetermined as language if unknown language is used. +Change relax strict mode from subtitle languages and show unknown.png flag for 'Undetermined' subtitle languages +Add Paramount Network icon ### 0.14.3 (2018-02-13 13:00:00 UTC) diff --git a/gui/slick/images/network/paramount network.png b/gui/slick/images/network/paramount network.png new file mode 100644 index 0000000000000000000000000000000000000000..edba8d2a5f5ec73c07f9000e1988b2bd733a2bd0 GIT binary patch literal 1626 zcmV-g2BrClP)<6P>KvyjSp6i5mt`?TbTe` znjch%6jzZ0T$>hHk|I`$23?#OS(5-@od98;C0L9AVxJpZl?`8>0Arv4WT60Lq7Px3 z0A-^9W~32fn-*l91#6=vW0whRq$p*X9%!N|W||*so;GNgCU2rAaHAY^tTJw$EOVwf zbD|}BtvYq2GIy&cd#*}yoD15I>bf7AIut#~LNP46~e5*-&r8_I-a;3_GqP~Np zzj>y{g{8rIsK|z*e&%YmxIiK)eYtjvF{&5NtYg0IhpugQ(A%7n4e zkFU#xveSyQ&XTdthqTp}vB;RS%9*swj)0V&5o4?ha!Pca|)}F%GsKC;n!`Y_6*|5LUtHRWx#@wyM)}+YZw8Yo1#@MCF z->k>qu*cc4$=kTd+^Egsw9MYS%HFlj-?q-+x6k3R(c!z#+qlr;y3ymq&)vJyO=*ZmY$=&J7 z-s{xd<DA%y&*Sgd;px!i@YCe#+vM!k=Iq_& z?$_w=-sbP$=kVI<@!;w4+w1b->hj|2^W*IFhJRF@bl^M`t9=d z?(_EV_4n}h`11Gp^Z5Jp`TX_z{r3C*_x=C){{Q*^|Nj5{sySBy0009ONklCII!Lo50S_&CLY{2opwKfb4>tZFjDndUA1=1$i!Lda)+}I?05D0fcIFk^XhVjb9B9UZ#I} zGU@l^tv}L`(?Qa-X>rnf{%@C(TKTPL{m-^XuQK-hn9}!a=Jv1U&!3lk-L~yVZvW4D zAFtN@T(RnB-Hi|FA1?``=Y_a0Kk}qvznlvHc&+p2Y?DWi9B+MW{CcA2*UW8S8{S{l zzWRQ{uby*XYQ9_onzHF<8Ae{%{`a(w)Rdon2YxSj^FAo$`>I8McijBdeC1=w*V9}6 zEb98X;`x&$e@@=`({=32%JybH#FAa{xJsnnHxCy}NF?501ayG+X)mA)4nBBr)=_|e zTYJF4M%pcNR*BCZ3&Y0y4lC=!2OL_G|#^Ef#@w`{Ls zWsTl&BpsIv%)HI)BqR)Cqk!2-%}*KV0zDUVQ&1RqdIG~h&dJz;n@iK)+I6&E7+fv@ Y0Nca9PXNUxs{jB107*qoM6N<$f)*r@(*OVf literal 0 HcmV?d00001 diff --git a/gui/slick/interfaces/default/manage_subtitleMissed.tmpl b/gui/slick/interfaces/default/manage_subtitleMissed.tmpl index d8c1a9a9..63d0948d 100644 --- a/gui/slick/interfaces/default/manage_subtitleMissed.tmpl +++ b/gui/slick/interfaces/default/manage_subtitleMissed.tmpl @@ -19,7 +19,7 @@ #end if ## #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 #if not $whichSubs or ($whichSubs and not $ep_counts) #if $whichSubs: diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index fb770b95..8f7d1991 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -2437,10 +2437,10 @@ class Home(MainHandler): return json.dumps({'result': 'failure'}) # try do download subtitles for that episode - previous_subtitles = set(subliminal.language.Language(x) for x in ep_obj.subtitles) 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]) - except: + except(StandardError, Exception): return json.dumps({'result': 'failure'}) # 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]['subtitles'] = ','.join( - subliminal.language.Language(subtitle).alpha2 for subtitle in cur_result['subtitles'].split(',')) if not \ - cur_result['subtitles'] == '' else '' + subliminal.language.Language(subtitle, strict=False).alpha2 + for subtitle in cur_result['subtitles'].split(',')) if '' != cur_result['subtitles'] else '' return json.dumps(result)