The branch, frodo has been updated
       via  c93b31275829e78bede81896ca84814bfa9e0f31 (commit)
       via  1692e36f7f6226c4111bff1fcd96ddcfa3e31ea0 (commit)
      from  e0ec22a5ef5def71c62b9992951f4f79bb90e22e (commit)

- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=c93b31275829e78bede81896ca84814bfa9e0f31

commit c93b31275829e78bede81896ca84814bfa9e0f31
Author: amet <amet.nos...@gmail.com>
Date:   Sat Oct 5 21:39:05 2013 +0400

    [script.njoy] -v0.2.1
    
    0.2.1
    - fixup localize strings

diff --git a/script.njoy/addon.xml b/script.njoy/addon.xml
index 17e4a69..d697e34 100644
--- a/script.njoy/addon.xml
+++ b/script.njoy/addon.xml
@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="script.njoy"
        name="Njoy Live TV"
-       version="0.2.0"
+       version="0.2.1"
        provider-name="amet">
   <requires>
-    <import addon="xbmc.python" version="2.0"/>
+    <import addon="xbmc.python" version="2.1.0"/>
   </requires>
   <extension point="xbmc.python.script" library="default.py">
         <provides>video</provides>
diff --git a/script.njoy/changelog.txt b/script.njoy/changelog.txt
index e617170..4f75f8a 100644
--- a/script.njoy/changelog.txt
+++ b/script.njoy/changelog.txt
@@ -1,3 +1,6 @@
+0.2.1
+- fixup localize strings
+
 0.2.0
 - increase zapping speed to 500 miliseconds
 
diff --git a/script.njoy/resources/skins/Default/720p/script-njoy-main.xml 
b/script.njoy/resources/skins/Default/720p/script-njoy-main.xml
index 1ec22bb..7b59840 100644
--- a/script.njoy/resources/skins/Default/720p/script-njoy-main.xml
+++ b/script.njoy/resources/skins/Default/720p/script-njoy-main.xml
@@ -44,7 +44,7 @@
                        <ondown>115</ondown>
                        <onleft>120</onleft>
                        <onright>120</onright>
-                       <label>$LOCALIZE[SCRIPT667]</label>
+                       <label>$ADDON[script.njoy 667]</label>
                        <font>font13</font>
                        <align>center</align>
                        <aligny>center</aligny>
@@ -60,7 +60,7 @@
                        <ondown>650</ondown>
                        <onleft>120</onleft>
                        <onright>120</onright>
-                       <label>$LOCALIZE[SCRIPT668]</label>
+                       <label>$ADDON[script.njoy 668]</label>
                        <font>font13</font>
                        <align>center</align>
                        <aligny>center</aligny>
@@ -159,7 +159,7 @@
                                <height>32</height>
                                <align>left</align>
                                <aligny>center</aligny>
-                               <label>$LOCALIZE[SCRIPT666]</label>
+                               <label>$ADDON[script.njoy 666]</label>
                                <font>font12</font>
                        </control>
                </control>
@@ -190,7 +190,7 @@
                        <height>25</height>
                        <align>right</align>
                        <font>font13</font>
-                       <label>$LOCALIZE[SCRIPT669]</label>
+                       <label>$ADDON[script.njoy 669]</label>
                        <textcolor>FFD7DF21</textcolor>
                </control>
                <control type="label" id="205">
@@ -209,7 +209,7 @@
                        <height>25</height>
                        <align>left</align>
                        <font>font13</font>
-                       <label>$LOCALIZE[SCRIPT670]</label>
+                       <label>$ADDON[script.njoy 670]</label>
                        <textcolor>FFD7DF21</textcolor>
                </control>
                <control type="label" id="206">

http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=1692e36f7f6226c4111bff1fcd96ddcfa3e31ea0

commit 1692e36f7f6226c4111bff1fcd96ddcfa3e31ea0
Author: amet <amet.nos...@gmail.com>
Date:   Sat Oct 5 21:37:41 2013 +0400

    [script.xbmc.subtitles] -v3.9.15
    
    3.9.15
    - update regex for Tv Shows (Season 01 Episode 02)
    - add support for Malay language
    - update $LOCALIZE to $ADDON[]
    - Some bugfixes and XBMC_OriginalTitle function cleanup,gfjardim
    - titulky.com fix and new captcha handling, Andrew Beam

diff --git a/script.xbmc.subtitles/addon.xml b/script.xbmc.subtitles/addon.xml
index 6913c96..be9fb78 100644
--- a/script.xbmc.subtitles/addon.xml
+++ b/script.xbmc.subtitles/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="script.xbmc.subtitles"
        name="XBMC Subtitles"
-       version="3.9.14"
+       version="3.9.15"
        provider-name="amet, mr_blobby">
   <requires>
     <import addon="xbmc.python" version="2.1.0"/>
diff --git a/script.xbmc.subtitles/changelog.txt 
b/script.xbmc.subtitles/changelog.txt
index aadad1a..0a41d9a 100644
--- a/script.xbmc.subtitles/changelog.txt
+++ b/script.xbmc.subtitles/changelog.txt
@@ -1,3 +1,10 @@
+3.9.15
+- update regex for Tv Shows (Season 01 Episode 02)
+- add support for Malay language
+- update $LOCALIZE to $ADDON[]
+- Some bugfixes and XBMC_OriginalTitle function cleanup,gfjardim
+- titulky.com fix and new captcha handling, Andrew Beam
+
 3.9.14
 - [fix] Legendas.TV new layout, gfjardim
 - [fix] Some movie filenames were treated as tvshows causing lookup to fail, 
arnova
diff --git a/script.xbmc.subtitles/resources/language/English/strings.po 
b/script.xbmc.subtitles/resources/language/English/strings.po
index 788255a..e292977 100644
--- a/script.xbmc.subtitles/resources/language/English/strings.po
+++ b/script.xbmc.subtitles/resources/language/English/strings.po
@@ -576,3 +576,7 @@ msgstr ""
 msgctxt "#30247"
 msgid "Farsi"
 msgstr ""
+
+msgctxt "#30248"
+msgid "Malay"
+msgstr ""
\ No newline at end of file
diff --git a/script.xbmc.subtitles/resources/lib/services/LegendasTV/service.py 
b/script.xbmc.subtitles/resources/lib/services/LegendasTV/service.py
index 180710e..74cc09b 100644
--- a/script.xbmc.subtitles/resources/lib/services/LegendasTV/service.py
+++ b/script.xbmc.subtitles/resources/lib/services/LegendasTV/service.py
@@ -2,12 +2,12 @@
 # Copyright, 2010, Guilherme Jardim.
 # This program is distributed under the terms of the GNU General Public 
License, version 3.
 # http://www.gnu.org/licenses/gpl.txt
-# Rev. 2.1.0
+# Rev. 2.1.1
 
 from operator import itemgetter
 from threading import Thread
 from BeautifulSoup import *
-from utilities import log, languageTranslate
+from utilities import log, languageTranslate, getShowId
 import cookielib
 import math
 import os
@@ -37,31 +37,16 @@ __scriptname__ = sys.modules[ "__main__" ].__scriptname__
 __addon__ = sys.modules[ "__main__" ].__addon__
 
 def XBMC_OriginalTitle(OriginalTitle):
-    json_query = 
xbmc.executeJSONRPC('{"jsonrpc":"2.0","method":"Player.GetItem", "params": { 
"playerid": 1} ,"id":1}' )
-    json_player_getitem = simplejson.loads(unicode(json_query, 'utf-8', 
errors='ignore'))
-#        self.Log("JSON_RPC: %s" % (json_player_getitem))
-    if json_player_getitem.has_key('result') and 
json_player_getitem['result'].has_key('item') and 
json_player_getitem['result']['item'].has_key('id') and 
json_player_getitem['result']['item'].has_key('type'):
-        if json_player_getitem['result']['item']['type'] == "movie":
-            json_query = 
xbmc.executeJSONRPC('{"jsonrpc":"2.0","method":"VideoLibrary.GetMovieDetails", 
"params": { "movieid": %s, "properties": ["originaltitle"]} ,"id":1}' % 
(json_player_getitem['result']['item']['id']) )
-            json_getmoviedetails = simplejson.loads(unicode(json_query, 
'utf-8', errors='ignore'))
-#                self.Log("JSON_RPC: %s" % (json_getmoviedetails))
-            if json_getmoviedetails.has_key('result') and 
json_getmoviedetails['result'].has_key('moviedetails') and 
json_getmoviedetails['result']['moviedetails'].has_key('originaltitle'):
-                OriginalTitle = 
json_getmoviedetails['result']['moviedetails']['originaltitle']
-        elif json_player_getitem['result']['item']['type'] == "episode":
-            json_query = 
xbmc.executeJSONRPC('{"jsonrpc":"2.0","method":"VideoLibrary.GetEpisodeDetails",
 "params": { "episodeid": %s, "properties": ["originaltitle", "tvshowid"]} 
,"id":1}' % (json_player_getitem['result']['item']['id']) )
-            json_getepisodedetails = simplejson.loads(unicode(json_query, 
'utf-8', errors='ignore'))
-#                self.Log("JSON_RPC: %s" % (json_getepisodedetails))
-            if json_getepisodedetails.has_key('result') and 
json_getepisodedetails['result'].has_key('episodedetails') and 
json_getepisodedetails['result']['episodedetails'].has_key('tvshowid'):
-                json_query = 
xbmc.executeJSONRPC('{"jsonrpc":"2.0","method":"VideoLibrary.GetTVShowDetails", 
"params": { "tvshowid": %s, "properties": ["originaltitle", "imdbnumber"]} 
,"id":1}' % (json_getepisodedetails['result']['episodedetails']['tvshowid']) )
-                json_gettvshowdetails = simplejson.loads(unicode(json_query, 
'utf-8', errors='ignore'))
-#                    self.Log("JSON_RPC: %s" % (json_gettvshowdetails))
-                if json_gettvshowdetails.has_key('result') and 
json_gettvshowdetails['result'].has_key('tvshowdetails') and 
json_gettvshowdetails['result']['tvshowdetails'].has_key('imdbnumber'):
-                    thetvdb = 
json_gettvshowdetails['result']['tvshowdetails']['imdbnumber']
-                    HTTPResponse = 
urllib2.urlopen("http://www.thetvdb.com//data/series/"+str(thetvdb)+"/").read()
-                    if re.findall("<SeriesName>(.*?)</SeriesName>", 
HTTPResponse, re.IGNORECASE | re.DOTALL):
-                        OriginalTitle = 
re.findall("<SeriesName>(.*?)</SeriesName>", HTTPResponse, re.IGNORECASE | 
re.DOTALL)[0]
-    OriginalTitle = OriginalTitle.encode('ascii', 'replace')
-    return OriginalTitle
+    MovieName =  xbmc.getInfoLabel("VideoPlayer.OriginalTitle")
+    if MovieName:
+        OriginalTitle = MovieName
+    else:
+        ShowID = getShowId()
+        if ShowID:
+            HTTPResponse = 
urllib2.urlopen("http://www.thetvdb.com//data/series/%s/"; % str(ShowID)).read()
+            if re.findall("<SeriesName>(.*?)</SeriesName>", HTTPResponse, 
re.IGNORECASE | re.DOTALL):
+                OriginalTitle = re.findall("<SeriesName>(.*?)</SeriesName>", 
HTTPResponse, re.IGNORECASE | re.DOTALL)[0]
+    return OriginalTitle.encode('ascii', 'replace')
 
 class LTVThread(Thread):
     def __init__ (self, obj, count, main_id, page):
@@ -84,6 +69,12 @@ class LegendasTV:
     def Log(self, message):
 #        print "####  %s" % message.encode("utf-8")
         log(__name__, message)
+        
+    def _urlopen(self, request):
+        try:
+            return urllib2.urlopen(request).read()
+        except urllib2.HTTPError:
+            return ""
 
     def login(self, username, password):
         if self.cookie:
@@ -122,7 +113,7 @@ class LegendasTV:
     
     def _UNICODE(self,text):
         if text:
-            return unicode(BeautifulSoup(text, smartQuotesTo=None))
+            return unicode(BeautifulSoup(text, fromEncoding="utf-8",  
smartQuotesTo=None))
         else:
             return text
         
@@ -149,7 +140,6 @@ class LegendasTV:
                 Ratio = "%.2f" % float(0)
         return Ratio
                 
-
     def _log_List_dict(self, obj, keys="", maxsize=100):
         Content = ""
         if not len(obj):
@@ -181,17 +171,18 @@ class LegendasTV:
 
     def findID(self, Movie, TVShow, Year, Season, SearchTitle, SearchString):
         allResults, discardedResults, filteredResults, LTVSeason, LTVYear = 
[], [], [], 0, 0
-        Response = 
urllib2.urlopen("http://minister.legendas.tv/util/busca_titulo/"; + 
urllib.quote_plus(SearchString)).read()
+        Response = 
self._urlopen("http://minister.legendas.tv/util/busca_titulo/"; + 
urllib.quote_plus(SearchString))
         Response =  simplejson.loads(unicode(Response, 'utf-8', 
errors='ignore'))
         # Load the results
         # Parse and filter the results
         self.Log("Message: Searching for movie/tvshow list with term(s): [%s]" 
% SearchString)
         for R in Response:
+            LTVSeason = 0
             if R.has_key('Filme') and R['Filme'].has_key('dsc_nome'):
-                LTVTitle = R['Filme']['dsc_nome']
+                LTVTitle = self.CleanLTVTitle(R['Filme']['dsc_nome'])
                 TitleBR = R['Filme']['dsc_nome_br']
-                if re.findall(".*? - (\d{1,2}).*", TitleBR):
-                    LTVSeason = re.findall(".*? - (\d{1,2}).*", TitleBR)[0]
+                if re.findall(".*? - (\d{1,2}).*?emporada", TitleBR):
+                    LTVSeason = re.findall(".*? - (\d{1,2}).*?emporada", 
TitleBR)[0]
                 ContentID = R['Filme']['id_filme']
                 # Calculate the probability ratio and append the result
                 Ratio = self.CalculateRatio(LTVTitle, SearchTitle)
@@ -205,7 +196,7 @@ class LegendasTV:
             allResults = sorted(allResults, key=lambda k: k["ratio"], 
reverse=True)
             for Result in allResults:
                 if TVShow:
-                    if int(Season) == int(Result["season"]):
+                    if int(Season) == int(Result["season"]) or (not 
Result["season"] and Result["ratio"] == "1.00"):
                         if len(filteredResults):
                             if Result["ratio"] == filteredResults[0]["ratio"]:
                                 filteredResults.append(Result)
@@ -240,7 +231,7 @@ class LegendasTV:
         # Log the page download attempt.
         self.Log("Message: Retrieving page [%s] for Movie[%s], Id[%s]." % 
(Page, MainID["title"], MainID["id"]))
         
-        Response = 
urllib2.urlopen("http://minister.legendas.tv/util/carrega_legendas_busca/page:%s/id_filme:%s";
 % (Page, MainID["id"])).read()
+        Response = 
self._urlopen("http://minister.legendas.tv/util/carrega_legendas_busca/page:%s/id_filme:%s";
 % (Page, MainID["id"]))
 
         if not re.findall(regex_1, Response, re.IGNORECASE | re.DOTALL):
             self.Log("Error: Failed retrieving page [%s] for Movie[%s], 
Id[%s]." % (Page, MainID["title"], MainID["id"]))
@@ -252,11 +243,11 @@ class LegendasTV:
                 release = self._UNICODE(content[1])
                 rating =  content[2]
                 lang = self._UNICODE(content[3])
-                if lang == u"Português-BR": LanguageId = "pb" 
-                elif lang == u"Português-PT": LanguageId = "pt" 
-                elif lang == u"Inglês": LanguageId = "en" 
-                elif lang == u"Espanhol": LanguageId = "es"
-                elif lang == u"Francês": LanguageId = "fr"
+                if re.search("Portugu.s-BR", lang):   LanguageId = "pb" 
+                elif re.search("Portugu.s-PT", lang): LanguageId = "pt"
+                elif re.search("Ingl.s", lang):       LanguageId = "en" 
+                elif re.search("Espanhol", lang):     LanguageId = "es"
+                elif re.search("Franc.s", lang):      LanguageId = "fr"
                 else: continue
                 for Preference, LangName in self.Languages:
                     if LangName == languageTranslate(LanguageId, 2, 0):
@@ -303,16 +294,18 @@ class LegendasTV:
         if Movie: SearchTitle = Movie
         else: SearchTitle = TVShow
         discardedResults, filteredResults = "", ""
-        # Searching for movie titles/tvshow ids using the lengthiest words
-        if len(SearchTitle.split(" ")):
-            for SearchString in sorted(SearchTitle.split(" "), key=len, 
reverse=True):
-                if SearchString in [ 'The', 'O', 'A', 'Os', 'As', 'El', 'La', 
'Los', 'Las', 'Les', 'Le' ] or len(SearchString) < 2:
-                    continue
-                discardedResults, filteredResults = self.findID(Movie, TVShow, 
Year, Season, SearchTitle, SearchString)
-                if filteredResults: 
-                    break
-        else:
-            discardedResults, filteredResults = self.findID(Movie, TVShow, 
Year, Season, SearchTitle, SearchTitle)
+        discardedResults, filteredResults = self.findID(Movie, TVShow, Year, 
Season, SearchTitle, SearchTitle)
+        if not filteredResults:
+            # Searching for movie titles/tvshow ids using the lengthiest words
+            if len(SearchTitle.split(" ")):
+                for SearchString in sorted(SearchTitle.split(" "), key=len, 
reverse=True):
+                    if SearchString in [ 'The', 'O', 'A', 'Os', 'As', 'El', 
'La', 'Los', 'Las', 'Les', 'Le' ] or len(SearchString) < 2:
+                        continue
+                    discardedResults, filteredResults = self.findID(Movie, 
TVShow, Year, Season, SearchTitle, SearchString)
+                    if filteredResults: 
+                        break
+            else:
+                discardedResults, filteredResults = self.findID(Movie, TVShow, 
Year, Season, SearchTitle, SearchTitle)
         if not filteredResults and len(discardedResults):
             filteredResults = []
             for Result in discardedResults[0:4]:
@@ -326,7 +319,7 @@ class LegendasTV:
         for MainID in filteredResults[0:4]:
             # Find how much pages are to download
             self.Log("Message: Retrieving results to id[%s]" % (MainID["id"]))
-            Response = 
urllib2.urlopen("http://minister.legendas.tv/util/carrega_legendas_busca/page:%s/id_filme:%s";
 % ("1", MainID["id"])).read()
+            Response = 
self._urlopen("http://minister.legendas.tv/util/carrega_legendas_busca/page:%s/id_filme:%s";
 % ("1", MainID["id"]))
             regResponse = re.findall(regex_2, Response)
             TotalPages = len(regResponse) +1
             # Form and execute threaded downloads
diff --git a/script.xbmc.subtitles/resources/lib/services/Titulky/service.py 
b/script.xbmc.subtitles/resources/lib/services/Titulky/service.py
index 45d9a45..153147b 100644
--- a/script.xbmc.subtitles/resources/lib/services/Titulky/service.py
+++ b/script.xbmc.subtitles/resources/lib/services/Titulky/service.py
@@ -55,23 +55,21 @@ def download_subtitles (subtitles_list, pos, zip_subs, 
tmp_sub_dir, sub_folder,
                img_file = open(os.path.join(tmp_sub_dir,'image.png'),'w')
                img_file.write(img)
                img_file.close()
-               dialog = xbmcgui.Dialog()
-               dialog.ok(__scriptname__,_( 757 ),_( 758 ))
-               log(__name__,'Notifying user for 10s')
-               xbmc.executebuiltin("XBMC.Notification(%s,%s,10000,%s)" % 
(__scriptname__,'',os.path.join(tmp_sub_dir,'image.png')))
-               kb = xbmc.Keyboard('',_( 759 ),False)
-               kb.doModal()
-               if kb.isConfirmed():
-                       code = kb.getText()
-                       content = 
client.get_subtitle_page2(content,code,subtitle_id)
+
+               solver = CaptchaInputWindow(captcha = 
os.path.join(tmp_sub_dir,'image.png'))
+               solution = solver.get()
+               if solution:
+                       log(__name__,'Solution provided: %s' %solution)
+                       content = 
client.get_subtitle_page2(content,solution,subtitle_id)
                        control_img2 = client.get_control_image(content)
                        if not control_img2 == None:
                                log(__name__,'Invalid control text')
                                return 
True,subtitles_list[pos]['language_name'], ""
                else:
-                       # user was not interested 
+                       log(__name__,'Dialog was canceled')
                        log(__name__,'Control text not confirmed, returning in 
error')
                        return True,subtitles_list[pos]['language_name'], ""
+
        wait_time = client.get_waittime(content)
        cannot_download = client.get_cannot_download_error(content)
        if not None == cannot_download:
@@ -95,7 +93,7 @@ def download_subtitles (subtitles_list, pos, zip_subs, 
tmp_sub_dir, sub_folder,
        zip_file = open(zip_subs,'wb')
        zip_file.write(data)
        zip_file.close()
-       return True,subtitles_list[pos]['language_name'], "" #standard output
+       return True,subtitles_list[pos]['language_name'], "zip" #standard output
 
 def lang_titulky2xbmclang(lang):
        if lang == 'CZ': return 'Czech'
@@ -119,6 +117,24 @@ def lang2_opensubtitles(lang):
        lang = lang_titulky2xbmclang(lang)
        return languageTranslate(lang,0,2)
 
+
+class CaptchaInputWindow(xbmcgui.WindowDialog):
+   def __init__(self, *args, **kwargs):
+      self.cptloc = kwargs.get('captcha')
+      self.img = xbmcgui.ControlImage(435,50,524,90,self.cptloc)
+      self.addControl(self.img)
+      self.kbd = xbmc.Keyboard('',_( 759 ),False)
+
+   def get(self):
+      self.show()
+      self.kbd.doModal()
+      if (self.kbd.isConfirmed()):
+         text = self.kbd.getText()
+         self.close()
+         return text
+      self.close()
+      return False
+
 class TitulkyClient(object):
 
        def __init__(self):
@@ -223,15 +239,11 @@ class TitulkyClient(object):
                        return int(matches.group(1))
 
        def get_link(self,content):
-               for matches in re.finditer('<a?[= \w\"]+href="([^\"]+)\"', 
content, re.IGNORECASE | re.DOTALL):
-                       return str(matches.group(1))
-
-       def _get_session_id(self,content):
-               for matches in re.finditer('secode.php\?PHPSESSID=([\w\d]+)', 
content, re.IGNORECASE | re.DOTALL):
+               for matches in re.finditer('<a.+id=\"downlink\" 
href="([^\"]+)\"', content, re.IGNORECASE | re.DOTALL):
                        return str(matches.group(1))
 
        def get_control_image(self,content):
-               for matches in re.finditer('(secode.php\?[\w\d=]+)', content, 
re.IGNORECASE | re.DOTALL):
+               for matches in re.finditer('\.\/(captcha\/captcha\.php)', 
content, re.IGNORECASE | re.DOTALL):
                        return '/'+str(matches.group(1))
                return None
 
@@ -246,8 +258,7 @@ class TitulkyClient(object):
                return content
 
        def get_subtitle_page2(self,content,code,id):
-               session_id = self._get_session_id(content)
-               url = 
self.server_url+'/idown.php?'+urllib.urlencode({'PHPSESSID':session_id})
+               url = self.server_url+'/idown.php'
                post_data = 
{'downkod':code,'titulky':id,'zip':'z','securedown':'2','histstamp':''}
                req = urllib2.Request(url,urllib.urlencode(post_data))
                log(__name__,'Opening %s POST:%s' % (url,str(post_data)))
diff --git a/script.xbmc.subtitles/resources/lib/utilities.py 
b/script.xbmc.subtitles/resources/lib/utilities.py
index bcd385b..574b90a 100644
--- a/script.xbmc.subtitles/resources/lib/utilities.py
+++ b/script.xbmc.subtitles/resources/lib/utilities.py
@@ -61,29 +61,30 @@ LANGUAGES      = (
     ("Latvian"                    , "21",       "lv",            "lav",        
         "26",                    30227  ),
     ("Lithuanian"                 , "0",        "lt",            "lit",        
         "27",                    30228  ),
     ("Macedonian"                 , "35",       "mk",            "mac",        
         "28",                    30229  ),
-    ("Norwegian"                  , "3",        "no",            "nor",        
         "29",                    30230  ),
-    ("Polish"                     , "26",       "pl",            "pol",        
         "30",                    30232  ),
-    ("Portuguese"                 , "32",       "pt",            "por",        
         "31",                    30233  ),
-    ("PortugueseBrazil"           , "48",       "pb",            "pob",        
         "32",                    30234  ),
-    ("Romanian"                   , "13",       "ro",            "rum",        
         "33",                    30235  ),
-    ("Russian"                    , "27",       "ru",            "rus",        
         "34",                    30236  ),
-    ("Serbian"                    , "36",       "sr",            "scc",        
         "35",                    30237  ),
-    ("Slovak"                     , "37",       "sk",            "slo",        
         "36",                    30238  ),
-    ("Slovenian"                  , "1",        "sl",            "slv",        
         "37",                    30239  ),
-    ("Spanish"                    , "28",       "es",            "spa",        
         "38",                    30240  ),
-    ("Swedish"                    , "25",       "sv",            "swe",        
         "39",                    30242  ),
-    ("Thai"                       , "0",        "th",            "tha",        
         "40",                    30243  ),
-    ("Turkish"                    , "30",       "tr",            "tur",        
         "41",                    30244  ),
-    ("Ukrainian"                  , "46",       "uk",            "ukr",        
         "42",                    30245  ),
-    ("Vietnamese"                 , "51",       "vi",            "vie",        
         "43",                    30246  ),
+    ("Malay"                      , "0",        "ms",            "may",        
         "29",                    30248  ),    
+    ("Norwegian"                  , "3",        "no",            "nor",        
         "30",                    30230  ),
+    ("Polish"                     , "26",       "pl",            "pol",        
         "31",                    30232  ),
+    ("Portuguese"                 , "32",       "pt",            "por",        
         "32",                    30233  ),
+    ("PortugueseBrazil"           , "48",       "pb",            "pob",        
         "33",                    30234  ),
+    ("Romanian"                   , "13",       "ro",            "rum",        
         "34",                    30235  ),
+    ("Russian"                    , "27",       "ru",            "rus",        
         "35",                    30236  ),
+    ("Serbian"                    , "36",       "sr",            "scc",        
         "36",                    30237  ),
+    ("Slovak"                     , "37",       "sk",            "slo",        
         "37",                    30238  ),
+    ("Slovenian"                  , "1",        "sl",            "slv",        
         "38",                    30239  ),
+    ("Spanish"                    , "28",       "es",            "spa",        
         "39",                    30240  ),
+    ("Swedish"                    , "25",       "sv",            "swe",        
         "40",                    30242  ),
+    ("Thai"                       , "0",        "th",            "tha",        
         "41",                    30243  ),
+    ("Turkish"                    , "30",       "tr",            "tur",        
         "42",                    30244  ),
+    ("Ukrainian"                  , "46",       "uk",            "ukr",        
         "43",                    30245  ),
+    ("Vietnamese"                 , "51",       "vi",            "vie",        
         "44",                    30246  ),
     ("BosnianLatin"               , "10",       "bs",            "bos",        
         "100",                   30204  ),
     ("Farsi"                      , "52",       "fa",            "per",        
         "13",                    30247  ),
     ("English (US)"               , "2",        "en",            "eng",        
         "100",                   30212  ),
     ("English (UK)"               , "2",        "en",            "eng",        
         "100",                   30212  ),
     ("Portuguese (Brazilian)"     , "48",       "pt-br",         "pob",        
         "100",                   30234  ),
-    ("Portuguese (Brazil)"        , "48",       "pb",            "pob",        
         "32",                    30234  ),
-    ("Portuguese-BR"              , "48",       "pb",            "pob",        
         "32",                    30234  ),
-    ("Brazilian"                  , "48",       "pb",            "pob",        
         "32",                    30234  ),
+    ("Portuguese (Brazil)"        , "48",       "pb",            "pob",        
         "33",                    30234  ),
+    ("Portuguese-BR"              , "48",       "pb",            "pob",        
         "33",                    30234  ),
+    ("Brazilian"                  , "48",       "pb",            "pob",        
         "33",                    30234  ),
     ("Español (Latinoamérica)"    , "28",       "es",            "spa",      
           "100",                   30240  ),
     ("Español (España)"           , "28",       "es",            "spa",      
           "100",                   30240  ),
     ("Spanish (Latin America)"    , "28",       "es",            "spa",        
         "100",                   30240  ),
@@ -99,11 +100,12 @@ REGEX_EXPRESSIONS = [ 
'[Ss]([0-9]+)[][._-]*[Ee]([0-9]+)([^\\\\/]*)$',
                       '[\._ \-]([0-9]+)([0-9][0-9])([\._ \-][^\\/]*)',         
 # foo.109
                       '([0-9]+)([0-9][0-9])([\._ \-][^\\/]*)',
                       '[\\\\/\\._ -]([0-9]+)([0-9][0-9])[^\\/]*',
-                      'Season ([0-9]+) - Episode ([0-9]+)[^\\/]*',
+                      'Season ([0-9]+) - Episode ([0-9]+)[^\\/]*',             
 # Season 01 - Episode 02
+                      'Season ([0-9]+) Episode ([0-9]+)[^\\/]*',               
 # Season 01 Episode 02
                       '[\\\\/\\._ -][0]*([0-9]+)x[0]*([0-9]+)[^\\/]*',
-                      '[[Ss]([0-9]+)\]_\[[Ee]([0-9]+)([^\\/]*)',               
  #foo_[s01]_[e01]
-                      '[\._ \-][Ss]([0-9]+)[\.\-]?[Ee]([0-9]+)([^\\/]*)',      
  #foo, s01e01, foo.s01.e01, foo.s01-e01
-                      's([0-9]+)ep([0-9]+)[^\\/]*',                            
  #foo - s01ep03, foo - s1ep03
+                      '[[Ss]([0-9]+)\]_\[[Ee]([0-9]+)([^\\/]*)',               
 #foo_[s01]_[e01]
+                      '[\._ \-][Ss]([0-9]+)[\.\-]?[Ee]([0-9]+)([^\\/]*)',      
 #foo, s01e01, foo.s01.e01, foo.s01-e01
+                      's([0-9]+)ep([0-9]+)[^\\/]*',                            
 #foo - s01ep03, foo - s1ep03
                       '[Ss]([0-9]+)[][ ._-]*[Ee]([0-9]+)([^\\\\/]*)$',
                       '[\\\\/\\._ \\[\\(-]([0-9]+)x([0-9]+)([^\\\\/]*)$'
                      ]
diff --git a/script.xbmc.subtitles/resources/settings.xml 
b/script.xbmc.subtitles/resources/settings.xml
index 9e80197..b24ff6b 100644
--- a/script.xbmc.subtitles/resources/settings.xml
+++ b/script.xbmc.subtitles/resources/settings.xml
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <settings>
     <category label="30100">
-      <setting id="Lang01" type="select" label="30101" default="11" 
lvalues="30201|30202|30203|30204|30205|30206|30207|30208|30209|30210|30211|30212|30213|30247|30214|30215|30216|30217|30218|30219|30220|30221|30222|30224|30225|30226|30227|30228|30229|30230|30232|30233|30234|30235|30236|30237|30238|30239|30240|30242|30243|30244|30245|30246"
 />
-      <setting id="Lang02" type="select" label="30102" default="35" 
lvalues="30201|30202|30203|30204|30205|30206|30207|30208|30209|30210|30211|30212|30213|30247|30214|30215|30216|30217|30218|30219|30220|30221|30222|30224|30225|30226|30227|30228|30229|30230|30232|30233|30234|30235|30236|30237|30238|30239|30240|30242|30243|30244|30245|30246"
 />
-      <setting id="Lang03" type="select" label="30111" default="11" 
lvalues="30201|30202|30203|30204|30205|30206|30207|30208|30209|30210|30211|30212|30213|30247|30214|30215|30216|30217|30218|30219|30220|30221|30222|30224|30225|30226|30227|30228|30229|30230|30232|30233|30234|30235|30236|30237|30238|30239|30240|30242|30243|30244|30245|30246"
 />
+      <setting id="Lang01" type="select" label="30101" default="11" 
lvalues="30201|30202|30203|30204|30205|30206|30207|30208|30209|30210|30211|30212|30213|30247|30214|30215|30216|30217|30218|30219|30220|30221|30222|30224|30225|30226|30227|30228|30229|30248|30230|30232|30233|30234|30235|30236|30237|30238|30239|30240|30242|30243|30244|30245|30246"
 />
+      <setting id="Lang02" type="select" label="30102" default="35" 
lvalues="30201|30202|30203|30204|30205|30206|30207|30208|30209|30210|30211|30212|30213|30247|30214|30215|30216|30217|30218|30219|30220|30221|30222|30224|30225|30226|30227|30228|30229|30248|30230|30232|30233|30234|30235|30236|30237|30238|30239|30240|30242|30243|30244|30245|30246"
 />
+      <setting id="Lang03" type="select" label="30111" default="11" 
lvalues="30201|30202|30203|30204|30205|30206|30207|30208|30209|30210|30211|30212|30213|30247|30214|30215|30216|30217|30218|30219|30220|30221|30222|30224|30225|30226|30227|30228|30229|30248|30230|30232|30233|30234|30235|30236|30237|30238|30239|30240|30242|30243|30244|30245|30246"
 />
     </category>
     <category label="30103">
       <setting id="Argenteam" type="bool" label="Argenteam.net" 
default="false"/>
diff --git 
a/script.xbmc.subtitles/resources/skins/Default/720p/script-XBMC-Subtitles-main.xml
 
b/script.xbmc.subtitles/resources/skins/Default/720p/script-XBMC-Subtitles-main.xml
index d3dc1bf..890dc81 100644
--- 
a/script.xbmc.subtitles/resources/skins/Default/720p/script-XBMC-Subtitles-main.xml
+++ 
b/script.xbmc.subtitles/resources/skins/Default/720p/script-XBMC-Subtitles-main.xml
@@ -305,7 +305,7 @@
                                                        <height>40</height>
                                                        <font>font13</font>
                                                        
<textcolor>FFFFFFFF</textcolor>
-                                                       
<label>$LOCALIZE[SCRIPT655]</label>
+                                                       
<label>$ADDON[script.xbmc.subtitles 655]</label>
                                                        <aligny>center</aligny>
                                                        
<wrapmultiline>true</wrapmultiline>
                                                </control>
@@ -335,7 +335,7 @@
                                        <posy>150</posy>
                                        <width>240</width>
                                        <height>26</height>
-                                       
<label>[B]$LOCALIZE[SCRIPT760][/B]</label>
+                                       <label>[B]$ADDON[script.xbmc.subtitles 
760][/B]</label>
                                        <font>font13</font>
                                        <align>center</align>
                                        <aligny>top</aligny>

-----------------------------------------------------------------------

Summary of changes:
 script.njoy/addon.xml                              |    4 +-
 script.njoy/changelog.txt                          |    3 +
 .../skins/Default/720p/script-njoy-main.xml        |   10 +-
 script.xbmc.subtitles/addon.xml                    |    2 +-
 script.xbmc.subtitles/changelog.txt                |    7 ++
 .../resources/language/English/strings.po          |    4 +
 .../resources/lib/services/LegendasTV/service.py   |   95 +++++++++-----------
 .../resources/lib/services/Titulky/service.py      |   49 ++++++----
 script.xbmc.subtitles/resources/lib/utilities.py   |   46 +++++-----
 script.xbmc.subtitles/resources/settings.xml       |    6 +-
 .../Default/720p/script-XBMC-Subtitles-main.xml    |    4 +-
 11 files changed, 125 insertions(+), 105 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Xbmc-addons mailing list
Xbmc-addons@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to