The branch, gotham has been updated
       via  d16516a0bc71491388e964a6df820a85dd4c4d33 (commit)
      from  af4e09fa806efd5f3d2d387356aa9464d8c47c42 (commit)

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

commit d16516a0bc71491388e964a6df820a85dd4c4d33
Author: Martijn Kaijser <mcm.kaij...@gmail.com>
Date:   Mon Jun 9 14:38:56 2014 +0200

    [service.subtitles.legendasdivx] 0.1.0

diff --git a/service.subtitles.legendasdivx/addon.xml 
b/service.subtitles.legendasdivx/addon.xml
index e63d5ab..b5a5a89 100644
--- a/service.subtitles.legendasdivx/addon.xml
+++ b/service.subtitles.legendasdivx/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="service.subtitles.legendasdivx"
        name="LegendasDivx.com"
-       version="0.0.9"
+       version="0.1.0"
        provider-name="HiGhLaNdeR">
   <requires>
     <import addon="xbmc.python" version="2.14.0"/>
diff --git a/service.subtitles.legendasdivx/changelog.txt 
b/service.subtitles.legendasdivx/changelog.txt
index 809e86d..44d5a4c 100644
--- a/service.subtitles.legendasdivx/changelog.txt
+++ b/service.subtitles.legendasdivx/changelog.txt
@@ -1,3 +1,6 @@
+0.1.0
+- Fix the decoding BUG in Raspberry Pi (Linux and Windows have different 
behaviours).
+- New pattern for the last resort search to check if it's a movie or tvshow.
 0.0.9
 - Account verification added.
 0.0.8
diff --git a/service.subtitles.legendasdivx/service.py 
b/service.subtitles.legendasdivx/service.py
index e3e4934..da694f8 100644
--- a/service.subtitles.legendasdivx/service.py
+++ b/service.subtitles.legendasdivx/service.py
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Service LegendasDivx.com version 0.0.9
+# Service LegendasDivx.com version 0.1.0
 # Code based on Undertext (FRODO) service
 # Coded by HiGhLaNdR@OLDSCHOOL
 # Ported to Gotham by HiGhLaNdR@OLDSCHOOL
@@ -36,7 +36,7 @@ __language__   = __addon__.getLocalizedString
 __cwd__        = 
xbmc.translatePath(__addon__.getAddonInfo('path')).decode("utf-8")
 __profile__    = 
xbmc.translatePath(__addon__.getAddonInfo('profile')).decode("utf-8")
 __resource__   = xbmc.translatePath(pjoin(__cwd__, 'resources', 'lib' ) 
).decode("utf-8")
-__temp__       = xbmc.translatePath(pjoin(__profile__, 'temp')).decode("utf-8")
+__temp__       = xbmc.translatePath(pjoin(__profile__, 'temp'))
 
 sys.path.append (__resource__)
 
@@ -375,8 +375,13 @@ def Search(item):
                     searchstring = title[-1]
                     #log(u"TITLE NULL Searchstring string = %s" % 
(searchstring,))
                 else:
-                    searchstring = filename
-                    #log(u"TITLE Searchstring string = %s" % (searchstring,))
+                    if re.search("(.+?s[0-9][0-9]e[0-9][0-9])", filename, 
re.IGNORECASE):
+                        searchstring = 
re.search("(.+?s[0-9][0-9]e[0-9][0-9])", filename, re.IGNORECASE)
+                        searchstring = searchstring.group(0)
+                        #log(u"FilenameTV Searchstring = %s" % (searchstring,))
+                    else:
+                        searchstring = filename
+                        #log(u"Filename Searchstring = %s" % (searchstring,))
 
     PT_ON = __addon__.getSetting( 'PT' )
     PTBR_ON = __addon__.getSetting( 'PTBR' )
@@ -481,7 +486,7 @@ def Download(id, filename):
                 # determine if there is a newer file created in __temp__ 
(marks that the extraction had completed)
                 for file in files:
                     if file.split('.')[-1] in SUB_EXTS:
-                        mtime = os.stat(pjoin(__temp__, 
file.encode("utf-8").decode("utf-8"))).st_mtime
+                        mtime = os.stat(pjoin(__temp__, file)).st_mtime
                         if mtime > max_mtime:
                             max_mtime =  mtime
                 waittime  = waittime + 1
@@ -497,8 +502,11 @@ def Download(id, filename):
                     #if file.split('.')[-1] in SUB_EXTS and 
os.stat(pjoin(__temp__, file)).st_mtime > init_max_mtime:
                     if searchsubscount == 1:
                         # unpacked file is a newly created subtitle file
-                        log(u"Unpacked subtitles file '%s'" % (file,))
-                        subs_file = pjoin(__temp__, file.decode("utf-8"))
+                        #log(u"Unpacked subtitles file '%s'" % 
(file.decode('utf-8'),))
+                        try:
+                            subs_file = pjoin(__temp__, file.decode("utf-8"))
+                        except:
+                            subs_file = pjoin(__temp__, file.decode("latin1"))
                         subtitles_list.append(subs_file)
                         break
                     else:

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

Summary of changes:
 service.subtitles.legendasdivx/addon.xml     |    2 +-
 service.subtitles.legendasdivx/changelog.txt |    3 +++
 service.subtitles.legendasdivx/service.py    |   22 +++++++++++++++-------
 3 files changed, 19 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://www.hpccsystems.com
_______________________________________________
Xbmc-addons mailing list
Xbmc-addons@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to