Private GIT

Skip to content
Snippets Groups Projects
Commit a5a15a68 authored by dvizzacc's avatar dvizzacc
Browse files

Fixed pt-BR not recognized, fixed flags in subtitles settings, removed useless code

parent 618255f4
Branches
Tags
No related merge requests found
...@@ -2976,7 +2976,7 @@ li.token-input-token { ...@@ -2976,7 +2976,7 @@ li.token-input-token {
} }
li.token-input-token img { li.token-input-token img {
padding-top: 7px; padding-top: 3px;
padding-right: 4px; padding-right: 4px;
float: left; float: left;
} }
......
...@@ -313,6 +313,7 @@ ...@@ -313,6 +313,7 @@
<script type="text/javascript" src="${srRoot}/js/lib/jquery.cookiejar.js?${sbPID}"></script> <script type="text/javascript" src="${srRoot}/js/lib/jquery.cookiejar.js?${sbPID}"></script>
<script type="text/javascript" src="${srRoot}/js/lib/jquery.json-2.2.min.js?${sbPID}"></script> <script type="text/javascript" src="${srRoot}/js/lib/jquery.json-2.2.min.js?${sbPID}"></script>
<script type="text/javascript" src="${srRoot}/js/lib/jquery.selectboxes.min.js?${sbPID}"></script> <script type="text/javascript" src="${srRoot}/js/lib/jquery.selectboxes.min.js?${sbPID}"></script>
<script type="text/javascript" src="${srRoot}/js/lib/jquery.tokeninput.js?${sbPID}"></script>
<script type="text/javascript" src="${srRoot}/js/lib/jquery.tablesorter-2.17.7.min.js?${sbPID}"></script><!-- Can't be added to bower --> <script type="text/javascript" src="${srRoot}/js/lib/jquery.tablesorter-2.17.7.min.js?${sbPID}"></script><!-- Can't be added to bower -->
<script type="text/javascript" src="${srRoot}/js/lib/jquery.tablesorter.widgets-2.17.7.min.js?${sbPID}"></script><!-- Can't be added to bower --> <script type="text/javascript" src="${srRoot}/js/lib/jquery.tablesorter.widgets-2.17.7.min.js?${sbPID}"></script><!-- Can't be added to bower -->
<script type="text/javascript" src="${srRoot}/js/lib/jquery.tablesorter.widget-columnSelector-2.17.7.js?${sbPID}"></script><!-- Can't be added to bower --> <script type="text/javascript" src="${srRoot}/js/lib/jquery.tablesorter.widget-columnSelector-2.17.7.js?${sbPID}"></script><!-- Can't be added to bower -->
......
...@@ -74,7 +74,6 @@ provider_urls = { ...@@ -74,7 +74,6 @@ provider_urls = {
'tvsubtitles': 'http://www.tvsubtitles.net' 'tvsubtitles': 'http://www.tvsubtitles.net'
} }
SINGLE = 'und'
def sortedServiceList(): def sortedServiceList():
newList = [] newList = []
...@@ -294,11 +293,6 @@ def subtitlesLanguages(video_path): ...@@ -294,11 +293,6 @@ def subtitlesLanguages(video_path):
elif hasattr(language, 'alpha2') and language.alpha2: elif hasattr(language, 'alpha2') and language.alpha2:
resultList.append(language.alpha2) resultList.append(language.alpha2)
defaultLang = wantedLanguages()
if ('pob' in defaultLang or 'pb' in defaultLang) and ('pt' not in defaultLang and 'por' not in defaultLang):
resultList = [x if not x in ['por', 'pt'] else u'pob' for x in resultList]
return (sorted(resultList), should_save_subtitles) return (sorted(resultList), should_save_subtitles)
def getEmbeddedLanguages(video_path): def getEmbeddedLanguages(video_path):
...@@ -339,6 +333,8 @@ def scan_subtitle_languages(path): ...@@ -339,6 +333,8 @@ def scan_subtitle_languages(path):
subtitles.add(Language.fromopensubtitles(os.path.splitext(p)[0][-2:])) subtitles.add(Language.fromopensubtitles(os.path.splitext(p)[0][-2:]))
elif os.path.splitext(p)[0].endswith(language_extensions) and len(os.path.splitext(p)[0].rsplit('.', 1)[1]) is 3: elif os.path.splitext(p)[0].endswith(language_extensions) and len(os.path.splitext(p)[0].rsplit('.', 1)[1]) is 3:
subtitles.add(Language.fromopensubtitles(os.path.splitext(p)[0][-3:])) subtitles.add(Language.fromopensubtitles(os.path.splitext(p)[0][-3:]))
elif os.path.splitext(p)[0].endswith('pt-BR') and len(os.path.splitext(p)[0].rsplit('.', 1)[1]) is 5:
subtitles.add(Language.fromopensubtitles('pob'))
else: else:
subtitles.add(Language('und')) subtitles.add(Language('und'))
...@@ -374,7 +370,7 @@ class SubtitlesFinder(): ...@@ -374,7 +370,7 @@ class SubtitlesFinder():
# get episodes on which we want subtitles # get episodes on which we want subtitles
# criteria is: # criteria is:
# - show subtitles = 1 # - show subtitles = 1
# - episode subtitles != config wanted languages or SINGLE (depends on config multi) # - episode subtitles != config wanted languages or 'und' (depends on config multi)
# - search count < 2 and diff(airdate, now) > 1 week : now -> 1d # - search count < 2 and diff(airdate, now) > 1 week : now -> 1d
# - search count < 7 and diff(airdate, now) <= 1 week : now -> 4h -> 8h -> 16h -> 1d -> 1d -> 1d # - search count < 7 and diff(airdate, now) <= 1 week : now -> 4h -> 8h -> 16h -> 1d -> 1d -> 1d
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment