diff --git a/addon.xml b/addon.xml index 6653150..75a9829 100644 --- a/addon.xml +++ b/addon.xml @@ -24,8 +24,8 @@ 0.1.7BETA : New Keywords Blacklist to ignore chosen subtitles tracks based on name content. 1.0.0 : Mandatory clean-up to propose as candidate version for Kodi.tv addons repository. 1.0.1 : Initial version for main Kodi.tv addons repository -1.0.2 : Forced sub tracks : check subtitle stream field "isforced" in addition to just field "name" which can be empty - Fix to avoid 10-15sec delay and few lines lost on subtitles at the very begining of a video +1.0.2 : Fix 10sec latency on subs display and possible few lines lost - at video start or when switching audio. + Forced sub tracks : check also subtitle field "isforced" in case field "name" is empty or misspelled. diff --git a/changelog.txt b/changelog.txt index a3bc439..3f16f6e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,7 +1,7 @@ --- Version 1.0.2 -- To identify forced sub tracks : check subtitle stream field "isforced" in addition to just field "name" which can be empty -- Fix to avoid 10-15sec delay and few lines lost on subtitles showing at the very begining of a video +- Fix 10sec latency on subs display and possible few lines lost - at video start or when switching audio. +- Forced sub tracks : check also subtitle field "isforced" in case field "name" is empty or misspelled. --- Version 1.0.1 diff --git a/resources/lib/prefutils.py b/resources/lib/prefutils.py index 6246726..7d9b9e9 100644 --- a/resources/lib/prefutils.py +++ b/resources/lib/prefutils.py @@ -317,7 +317,12 @@ def testForcedFlag(self, forced, subName, subForcedTag): test = subName.lower() matches = ['forced', 'forcés'] found = any(x in test for x in matches) - return ((forced == 'false') and not found) or ((forced == 'true') and found) or ((forced == 'true') and subForcedTag) or ((forced == 'false') and not subForcedTag) + # Only when looking for forced subs : + # in case the sub name is plain empty or not well documented, + # check also the sub isforced tag and consider it a match if set + if (forced and not found and subForcedTag): + found = True + return ((forced == 'false') and not found) or ((forced == 'true') and found) def isExternalSub(self, subName): test = subName.lower()