The branch, frodo has been updated
       via  ceaec183d6e6d163bd54fb09e6690a9800c5c16f (commit)
      from  fef0996ad96bde72ab7bf6e67b46cb34afbb24ff (commit)

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

commit ceaec183d6e6d163bd54fb09e6690a9800c5c16f
Author: ronie <[email protected]>
Date:   Sun Jan 6 20:00:40 2013 +0100

    [script.tvtunes] -v3.0.4

diff --git a/script.tvtunes/addon.xml b/script.tvtunes/addon.xml
index df43b3f..e3917fe 100644
--- a/script.tvtunes/addon.xml
+++ b/script.tvtunes/addon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="script.tvtunes" name="TvTunes" version="3.0.2" provider-name="Ppic, 
Frost, ronie">
+<addon id="script.tvtunes" name="TvTunes" version="3.0.4" provider-name="Ppic, 
Frost, ronie">
        <requires>
                <import addon="xbmc.python" version="2.1.0"/>
                <import addon="script.module.simplejson" version="2.0.10"/>
diff --git a/script.tvtunes/changelog.txt b/script.tvtunes/changelog.txt
index 36fbb68..f16ac6f 100644
--- a/script.tvtunes/changelog.txt
+++ b/script.tvtunes/changelog.txt
@@ -1,4 +1,10 @@
-V3.0.2
+v3.0.4
+- changed don't replay tune when navigating with a tv show folder
+
+v3.0.3
+- fix saving themes in custom path
+
+v3.0.2
 - enable fade out by default
 
 v3.0.1
diff --git a/script.tvtunes/resources/language/Spanish/strings.xml 
b/script.tvtunes/resources/language/Spanish/strings.xml
index 516c6a3..e6c97e7 100644
--- a/script.tvtunes/resources/language/Spanish/strings.xml
+++ b/script.tvtunes/resources/language/Spanish/strings.xml
@@ -8,6 +8,7 @@
        <string id="32006">Desacagar temas en carpeta personalizada</string>
        <string id="32007">Carpeta:</string>
        <string id="32008">Desvanecer tema al salir de la serie</string>
+       <string id="32009">Descargar automáticamente si se encuentra una 
coincidencia exacta</string>
        <string id="32101">ERROR</string>
        <string id="32102">Sitio no encontrado</string>
        <string id="32103">TvTunes descargas</string>
@@ -25,4 +26,7 @@
        <string id="32115">TvTunes</string>
        <string id="32116">Usted puede ayudar a obtener más temas en:</string>
        <string id="32117">http://www.televisiontunes.com/</string>
+       <string id="32991">Reproducir</string>
+       <string id="32992">Descargar</string>
+       <string id="32993">Sistema de archivos</string>
 </strings>
diff --git a/script.tvtunes/resources/tvtunes_backend.py 
b/script.tvtunes/resources/tvtunes_backend.py
index 61313a6..8a48fdc 100644
--- a/script.tvtunes/resources/tvtunes_backend.py
+++ b/script.tvtunes/resources/tvtunes_backend.py
@@ -20,6 +20,11 @@ def log(txt):
     message = u'%s: %s' % (__addonid__, txt)
     xbmc.log(msg=message.encode("utf-8"), level=xbmc.LOGDEBUG)
 
+def normalize_string( text ):
+    try: text = unicodedata.normalize( 'NFKD', _unicode( text ) ).encode( 
'ascii', 'ignore' )
+    except: pass
+    return text
+
 try:
     # parse sys.argv for params
     log( sys.argv[ 1 ] )
@@ -39,6 +44,7 @@ class mythread( threading.Thread ):
         self.newpath = ""
         self.oldpath = ""
         self.playpath = ""
+        self.prevplaypath = ""
         self.loud = False
         self.enable_custom_path = __addon__.getSetting("custom_path_enable")
         if self.enable_custom_path == "true":
@@ -53,7 +59,9 @@ class mythread( threading.Thread ):
 
                 if xbmc.getCondVisibility( "Container.Content(Seasons)" ) or 
xbmc.getCondVisibility( "Container.Content(Episodes)" ) and not 
xbmc.Player().isPlaying() and "plugin://" not in xbmc.getInfoLabel( 
"ListItem.Path" ) and not xbmc.getInfoLabel( "container.folderpath" ) == 
"videodb://5/":
                     if self.enable_custom_path == "true":
-                        self.newpath = self.custom_path + xbmc.getInfoLabel( 
"ListItem.TVShowTitle" )
+                        tvshow = xbmc.getInfoLabel( "ListItem.TVShowTitle" 
).replace(":","")
+                        tvshow = normalize_string( tvshow )
+                        self.newpath = os.path.join(self.custom_path, 
tvshow).decode("utf-8")
                     else:
                         self.newpath = xbmc.getInfoLabel( "ListItem.Path" )
                     if not self.newpath == self.oldpath and not self.newpath 
== "" and not self.newpath == "videodb://2/2/":
@@ -80,6 +88,11 @@ class mythread( threading.Thread ):
                         xbmc.Player().stop()
                     if self.loud: self.raise_volume()
                     xbmcgui.Window( 10025 ).clearProperty('TvTunesIsAlive')
+
+                if xbmc.getInfoLabel( "container.folderpath" ) == 
"videodb://2/2/":
+                    # clear the last tune path if we are back at the root of 
the tvshow library
+                    self.prevplaypath = ""
+
                 time.sleep( .5 )
         except:
             print_exc()
@@ -158,6 +171,9 @@ class mythread( threading.Thread ):
         else: self.playpath = False
 
         if self.playpath:
+            if self.playpath == self.prevplaypath: 
+                return # don't play the same tune twice (when moving from 
season to episodes etc)
+            self.prevplaypath = self.playpath
             if not self.loud: self.lower_volume()
             xbmcgui.Window( 10025 ).setProperty( "TvTunesIsAlive", "true" )
             log( "### start playing %s" % self.playpath )
diff --git a/script.tvtunes/resources/tvtunes_scraper.py 
b/script.tvtunes/resources/tvtunes_scraper.py
index e089330..ea3aa11 100644
--- a/script.tvtunes/resources/tvtunes_scraper.py
+++ b/script.tvtunes/resources/tvtunes_scraper.py
@@ -81,7 +81,9 @@ class TvTunes:
         self.DIALOG_PROGRESS.create( __language__(32105) , __language__(32106) 
)
         if params.get("mode", "false" ) == "solo":
             if self.enable_custom_path == "true":
-                self.scan(normalize_string( params.get("name", "" ) 
),self.custom_path.decode("utf-8"))              
+                tvshow = params.get("name", "" ).replace(":","")
+                tvshow = normalize_string( tvshow )
+                self.scan(normalize_string( params.get("name", "" ) 
),os.path.join(self.custom_path, tvshow).decode("utf-8"))
             else:
                 self.scan(normalize_string( params.get("name", "" ) 
),params.get("path", "false" ).decode("utf-8"))
         else:
@@ -226,7 +228,7 @@ class TvTunes:
                 tvshow = item['title'].replace(":","")
                 tvshow = normalize_string( tvshow )
                 if self.enable_custom_path == "true":
-                    path = self.custom_path + (tvshow)
+                    path = os.path.join(self.custom_path, 
tvshow).decode("utf-8")
                 else:
                     path = item['file']
                 TVlist.append( ( tvshow , path ) )

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

Summary of changes:
 script.tvtunes/addon.xml                           |    2 +-
 script.tvtunes/changelog.txt                       |    8 +++++++-
 .../resources/language/Spanish/strings.xml         |    4 ++++
 script.tvtunes/resources/tvtunes_backend.py        |   18 +++++++++++++++++-
 script.tvtunes/resources/tvtunes_scraper.py        |    6 ++++--
 5 files changed, 33 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to