The branch, gotham has been updated
       via  1ec7cb56508d373dccff84f3860ac19e994be8bc (commit)
       via  20106ed1f7c8848fadcdae4bd4a37f91ba7828c9 (commit)
      from  2d4f19c6ee352dc54d22db427884adb1f7e8f06d (commit)

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

commit 1ec7cb56508d373dccff84f3860ac19e994be8bc
Author: sphere <sph...@dersphere.de>
Date:   Tue Mar 18 08:32:25 2014 +0100

    [service.subtitles.subtituloses] updated to version 0.0.4

diff --git a/service.subtitles.subtituloses/addon.xml 
b/service.subtitles.subtituloses/addon.xml
old mode 100644
new mode 100755
index 4151ae5..5fd0b31
--- a/service.subtitles.subtituloses/addon.xml
+++ b/service.subtitles.subtituloses/addon.xml
@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="service.subtitles.subtituloses"
        name="Subtitulos.es"
-       version="0.0.3"
+       version="0.0.4"
        provider-name="infinito">
   <requires>
-    <import addon="xbmc.python" version="2.1.0"/>
+    <import addon="xbmc.python" version="2.14.0"/>
   </requires>
   <extension point="xbmc.subtitle.module"
              library="service.py" />
@@ -12,6 +12,7 @@
     <summary lang="en">Subtitulos.es</summary>
     <description lang="en">Search and download subtitles from 
Subtitulos.es</description>
     <disclaimer lang="en"></disclaimer>
+    <language>es en</language>
     <platform>all</platform>
     <license>GNU GENERAL PUBLIC LICENSE. Version 2, June 1991</license>
     <forum>http://forum.xbmc.org/showthread.php?tid=185685</forum>
diff --git a/service.subtitles.subtituloses/changelog.txt 
b/service.subtitles.subtituloses/changelog.txt
index b1bf80b..579c007 100644
--- a/service.subtitles.subtituloses/changelog.txt
+++ b/service.subtitles.subtituloses/changelog.txt
@@ -1,3 +1,6 @@
+0.0.4
+- Fixed problem that prevented spanish subtitles to be shown when latino subs 
were present
+
 0.0.3
 - Fixed logo.png and icon.png to match XBMC'x addon guidelines
 - Removed language files
diff --git a/service.subtitles.subtituloses/resources/lib/SubEsUtilities.py 
b/service.subtitles.subtituloses/resources/lib/SubEsUtilities.py
index 6248f88..a66dd85 100644
--- a/service.subtitles.subtituloses/resources/lib/SubEsUtilities.py
+++ b/service.subtitles.subtituloses/resources/lib/SubEsUtilities.py
@@ -137,7 +137,7 @@ def clean_subtitles_list(subtitles_list):
     seen = set()
     subs = []
     for sub in subtitles_list:
-        filename = sub['filename']
+        filename = sub['link']
         #log(__name__, "Filename: %s" % filename)
         if filename not in seen:
             subs.append(sub)
diff --git a/service.subtitles.subtituloses/service.py 
b/service.subtitles.subtituloses/service.py
index aeb6233..e204d5e 100644
--- a/service.subtitles.subtituloses/service.py
+++ b/service.subtitles.subtituloses/service.py
@@ -122,9 +122,6 @@ def get_params():
 
 params = get_params()
 
-print params
-
-
 if params['action'] == 'search':
   item = {}
   item['temp']               = False

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

commit 20106ed1f7c8848fadcdae4bd4a37f91ba7828c9
Author: sphere <sph...@dersphere.de>
Date:   Tue Mar 18 08:31:42 2014 +0100

    [service.subtitles.itasa] updated to version 0.0.5

diff --git a/service.subtitles.itasa/addon.xml 
b/service.subtitles.itasa/addon.xml
index 2bd1cc9..3187a33 100644
--- a/service.subtitles.itasa/addon.xml
+++ b/service.subtitles.itasa/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="service.subtitles.itasa"
        name="italiansubs.net"
-       version="0.0.4"
+       version="0.0.5"
        provider-name="phate89">
   <requires>
     <import addon="xbmc.python" version="2.14.0"/>
diff --git a/service.subtitles.itasa/changelog.txt 
b/service.subtitles.itasa/changelog.txt
index 3028cce..b78e010 100644
--- a/service.subtitles.itasa/changelog.txt
+++ b/service.subtitles.itasa/changelog.txt
@@ -1,3 +1,7 @@
+0.0.5
+- fixed bug with the retrieve tv show list function
+- added fallback to filename search in case search by tv show name fails
+
 0.0.4
 - added notification in case of failed login, attempt to search other language 
than italian and attempt to search movies
 - fixed check of WEB-DL quality with different namings
diff --git a/service.subtitles.itasa/service.py 
b/service.subtitles.itasa/service.py
index ef27e65..897205f 100644
--- a/service.subtitles.itasa/service.py
+++ b/service.subtitles.itasa/service.py
@@ -154,7 +154,7 @@ def getItaSATVShowList():
        if content:
                result = 
re.findall(r'<id>([\s\S]*?)</id>[\s\S]*?<name>([\s\S]*?)</name>', content, 
re.IGNORECASE | re.DOTALL)
                if result:
-                       return None
+                       return result
                else:
                        log(__name__,'Match of tv shows failed')
                        return None
@@ -265,17 +265,17 @@ def search(item):
                if item['mansearch']:
                        search_manual(item['mansearchstr'], filename)
                elif item['tvshow']:
-                       search_tvshow(item['tvshow'], item['season'], 
item['episode'], item['onlineid'], filename)
+                       search_tvshow(item['tvshow'], item['season'], 
item['episode'], item['onlineid'], filename, True)
                elif item['title'] and item['year']:
                        xbmc.executebuiltin((u'Notification(%s,%s)' % 
(__scriptname__ , __language__(32006))).encode('utf-8'))
                        log(__name__, 'Itasa only works with tv shows. Skipped')
                else:
-                       search_filename(filename)
+                       search_filename(filename, False)
        else:
                xbmc.executebuiltin((u'Notification(%s,%s)' % (__scriptname__ , 
__language__(32005))).encode('utf-8'))
                log(__name__, 'Itasa only works with italian. Skipped')
        
-def search_tvshow(tvshow, season, episode, onlineid, filename):
+def search_tvshow(tvshow, season, episode, onlineid, filename, allowfallback):
        log(__name__, "Search tv show '%s'" % tvshow)
        itasaid = getItaSATVShowID(tvshow, onlineid)
        if itasaid:
@@ -288,7 +288,11 @@ def search_tvshow(tvshow, season, episode, onlineid, 
filename):
                        else:
                                log(__name__, 'No subtitles found')
        else:
-               log(__name__, 'TV Show not found')
+               if allowfallback:
+                       log(__name__, 'TV Show not found, try with filename 
search')
+                       search_filename(filename, False)
+               else:
+                       log(__name__, 'TV Show not found')
 
 def search_manual(searchstr, filename):
        searchstring = searchstr
@@ -337,23 +341,23 @@ def checksyncandadd(result, filename):
                elif not (subtitleversion.lower() in fl):
                        append_subtitle(subtitleid, subtitlename + ' ' + 
subtitleversion, filename, False)
 
-def search_filename(filename):
+def search_filename(filename, allowfallback):
        log(__name__, 'Search tv show using the file name')
        title, year = xbmc.getCleanMovieTitle(filename)
        log(__name__, "clean title: \"%s\" (%s)" % (title, year))
        match = re.search(r'\WS(?P<season>\d{1,3})[ 
._-]*E(?P<episode>\d{1,3})', title, flags = re.IGNORECASE)
        if match is not None:
-               tvshow = string.strip(title[:match.start('season')-1])
+               tvshow = string.strip(title[:match.start('season')-1]).lower()
                season = string.lstrip(match.group('season'), '0')
                episode = match.group('episode')
-               search_tvshow(tvshow, season, episode, -1, filename)
+               search_tvshow(tvshow, season, episode, -1, filename, 
allowfallback)
        else:
                match = 
re.search(r'\W(?P<season>\d{1,3})x(?P<episode>\d{1,3})', title, flags = 
re.IGNORECASE)
                if match is not None:
                        tvshow = string.strip(title[:match.start('season')-1])
                        season = string.lstrip(match.group('season'), '0')
                        episode = string.lstrip(match.group('episode'), '0')
-                       search_tvshow(tvshow, season, episode, -1, filename)
+                       search_tvshow(tvshow, season, episode, -1, filename, 
allowfallback)
                else:
                        log(__name__, 'Unable to retrieve a tv show name and 
episode from file name')
 

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

Summary of changes:
 service.subtitles.itasa/addon.xml                  |    2 +-
 service.subtitles.itasa/changelog.txt              |    4 +++
 service.subtitles.itasa/service.py                 |   22 +++++++++++--------
 service.subtitles.subtituloses/addon.xml           |    5 ++-
 service.subtitles.subtituloses/changelog.txt       |    3 ++
 .../resources/lib/SubEsUtilities.py                |    2 +-
 service.subtitles.subtituloses/service.py          |    3 --
 7 files changed, 25 insertions(+), 16 deletions(-)
 mode change 100644 => 100755 service.subtitles.subtituloses/addon.xml


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Xbmc-addons mailing list
Xbmc-addons@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to