The branch, frodo has been updated
       via  8ee9e812727a65c61bb0df4e186620b81f69fae0 (commit)
      from  398fbba111afe33666954f7786c7693ceed14de6 (commit)

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

commit 8ee9e812727a65c61bb0df4e186620b81f69fae0
Author: sphere <[email protected]>
Date:   Wed Mar 19 08:47:39 2014 +0100

    [script.tvtunes] updated to version 4.3.4

diff --git a/script.tvtunes/addon.xml b/script.tvtunes/addon.xml
index 8c55608..06be964 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="4.3.3" 
provider-name="Ppic,Frost,ronie,robwebset">
+<addon id="script.tvtunes" name="TvTunes" version="4.3.4" 
provider-name="Ppic,Frost,ronie,robwebset">
        <requires>
                <import addon="xbmc.python" version="2.1.0"/>
                <import addon="script.module.simplejson" version="2.0.10"/>
@@ -26,7 +26,7 @@
        
                <summary lang="fr">Récupérez et écoutez les génériques des 
séries TV</summary>
        
-               <summary lang="fr_CA">Télécharger et jouer les thèmes de vos 
films et émissions télé</summary>
+               <summary lang="fr_CA">Télécharger et jouer les thèmes de vos 
films et séries télé</summary>
        
                <summary lang="gl">Obter e reproducir a música das súas 
Series de TV</summary>
        
@@ -64,7 +64,7 @@
        
                <description lang="fr">Ce script vous aidera à télécharger 
vos génériques de série depuis www.televisiontunes.com Il les enregistrera 
dans un fichier theme.mp3 dans vos répertoires de série, ils seront ensuite 
joué lorsque vous entrerez dans la série correspondante (cette fonctionalité 
requiert une skin compatible)</description>
        
-               <description lang="fr_CA">Ce script vous aidera à obtenir des 
thèmes pour votre vidéothèque de films et émissions télé à partir de 
www.televisiontunes.com. Il les enregistrera dans les fichiers theme[0-9].mp3 
dans chacun de vos dossiers vidéo, et les jouera pendant la navigation de 
votre vidéothèque quand vous accédez au dossier des émissions télé ou 
l'écran d'informations sur les vidéo (votre habillage doit être compatible 
pour ce fonction).</description>
+               <description lang="fr_CA">Ce script vous aidera à obtenir des 
thèmes pour votre vidéothèque de films et séries télé à partir de 
www.televisiontunes.com. Il les enregistrera dans les fichiers theme[0-9].mp3 
dans chacun de vos dossiers vidéo, et les jouera pendant la navigation de 
votre vidéothèque quand vous accédez au dossier des séries télé ou 
l'écran d'informations sur les vidéo (votre habillage doit être compatible 
pour ce fonction).</description>
        
                <description lang="gl">Este script axudaralle a obter dende 
www.televisiontunes.com o tema da súa biblioteca de series, gardándoo no 
ficheiro theme.mp3 por cada cartafol da biblioteca entón reproduciranse ao 
entrar nos diferentes cartafoles ao navegar pola biblioteca (precisa de que o 
seu tema sexa compatíbel con esta carácteristica)</description>
        
diff --git a/script.tvtunes/changelog.txt b/script.tvtunes/changelog.txt
index 5f04b9a..cdc6a37 100644
--- a/script.tvtunes/changelog.txt
+++ b/script.tvtunes/changelog.txt
@@ -1,3 +1,7 @@
+v4.3.4
+- Option to allow addons to force continued playing of a theme
+- Support themes directories at same level as DVD/Blueray image directories
+
 v4.3.3
 - Fix issue with custom download path not downloading themes
 
diff --git a/script.tvtunes/resources/language/Bulgarian/strings.po 
b/script.tvtunes/resources/language/Bulgarian/strings.po
index e466702..2db3cfb 100644
--- a/script.tvtunes/resources/language/Bulgarian/strings.po
+++ b/script.tvtunes/resources/language/Bulgarian/strings.po
@@ -58,7 +58,7 @@ msgstr "Път:"
 
 msgctxt "#32008"
 msgid "Fade tune out when exiting"
-msgstr "Плавно затихване на мелодиите при 
приключване"
+msgstr "Плавно затихване при приключване на 
мелодиите "
 
 msgctxt "#32009"
 msgid "Automatically download if an exact match is found"
@@ -78,7 +78,7 @@ msgstr "Тип файлове"
 
 msgctxt "#32013"
 msgid "Fade in the tune when starting"
-msgstr "Плавно увеличаване на мелодиите при 
стартиране"
+msgstr "Плавно увеличаване на звука в 
началото на мелодиите"
 
 msgctxt "#32014"
 msgid "Always add additional themes (no overwrite)"
@@ -98,11 +98,11 @@ msgstr "Възпроизвеждай мелодии при 
преглеждан
 
 msgctxt "#32018"
 msgid "Debugging"
-msgstr "Debugging"
+msgstr "Дебъгване"
 
 msgctxt "#32019"
 msgid "Enable debug logging"
-msgstr "Водене на debug дневник"
+msgstr "Включи дебъг дневника"
 
 msgctxt "#32020"
 msgid "Show the TvTunes button on the Video Info screen"
@@ -134,7 +134,7 @@ msgstr "Име на директорията"
 
 msgctxt "#32027"
 msgid "Limit track duration when multiple themes (seconds)"
-msgstr "При няколко налични мелодии 
просвирвай всяка по (сек)"
+msgstr "Възпроизвеждай всяка от наличните 
мелодии за (сек)"
 
 msgctxt "#32028"
 msgid "Default Theme Search Source"
diff --git a/script.tvtunes/resources/language/French (Canada)/strings.po 
b/script.tvtunes/resources/language/French (Canada)/strings.po
index bf24ae1..5b1bf36 100644
--- a/script.tvtunes/resources/language/French (Canada)/strings.po      
+++ b/script.tvtunes/resources/language/French (Canada)/strings.po      
@@ -18,11 +18,11 @@ msgstr ""
 
 msgctxt "Addon Summary"
 msgid "Get and play your Movie and TV shows Themes"
-msgstr "Télécharger et jouer les thèmes de vos films et émissions télé"
+msgstr "Télécharger et jouer les thèmes de vos films et séries télé"
 
 msgctxt "Addon Description"
 msgid "This script will help you to get themes for your movie and TV show 
library from www.televisiontunes.com It will save them in theme[0-9].mp3 file 
in each of your video folders then they will be played while browsing your 
video library when you enter the TV Show folder or Video Information screen 
(need your skin to be compatible for this feature)"
-msgstr "Ce script vous aidera à obtenir des thèmes pour votre vidéothèque 
de films et émissions télé à partir de www.televisiontunes.com. Il les 
enregistrera dans les fichiers theme[0-9].mp3 dans chacun de vos dossiers 
vidéo, et les jouera pendant la navigation de votre vidéothèque quand vous 
accédez au dossier des émissions télé ou l'écran d'informations sur les 
vidéo (votre habillage doit être compatible pour ce fonction)."
+msgstr "Ce script vous aidera à obtenir des thèmes pour votre vidéothèque 
de films et séries télé à partir de www.televisiontunes.com. Il les 
enregistrera dans les fichiers theme[0-9].mp3 dans chacun de vos dossiers 
vidéo, et les jouera pendant la navigation de votre vidéothèque quand vous 
accédez au dossier des séries télé ou l'écran d'informations sur les 
vidéo (votre habillage doit être compatible pour ce fonction)."
 
 msgctxt "Addon Disclaimer"
 msgid "Skinners, please see the wiki to know how to integrate it in your skin: 
http://wiki.xbmc.org/index.php?title=Add-on:TvTunes";
@@ -94,7 +94,7 @@ msgstr "Jouer les thèmes lors de la navigation de la liste 
des films"
 
 msgctxt "#32017"
 msgid "Play themes when browsing TV Show list"
-msgstr "Jouer les thèmes lors de la navigation de la liste des émissions 
télé"
+msgstr "Jouer les thèmes lors de la navigation de la liste des séries télé"
 
 msgctxt "#32018"
 msgid "Debugging"
diff --git a/script.tvtunes/resources/settings.xml 
b/script.tvtunes/resources/settings.xml
index ffc2435..2362212 100644
--- a/script.tvtunes/resources/settings.xml
+++ b/script.tvtunes/resources/settings.xml
@@ -16,7 +16,7 @@
        <category label="32992">
                <setting id="exact_match" type="bool" label="32009" 
default="false"/>
                <setting id="multiThemeDownload" type="bool" label="32014" 
default="false"/>
-               <setting id="searchMovieDownload" type="bool" label="32015" 
default="false"/>
+               <setting id="searchMovieDownload" type="bool" label="32015" 
default="true"/>
                <setting id="showVideoInfoButton" type="bool" label="32020" 
default="true"/>
                <setting id="themeSearchSource" type="labelenum" label="32028" 
values="televisiontunes.com|goear.com" default="goear.com" />
                <setting label="32022" type="lsep"/>
diff --git a/script.tvtunes/resources/tvtunes_backend.py 
b/script.tvtunes/resources/tvtunes_backend.py
index b8a8164..01d0981 100644
--- a/script.tvtunes/resources/tvtunes_backend.py
+++ b/script.tvtunes/resources/tvtunes_backend.py
@@ -587,7 +587,17 @@ class ThemeFiles():
             themeDir = self._getUsablePath(rawPath)
             themeDir = os_path_join( themeDir, Settings.getThemeDirectory() )
             themeFiles = self._generateThemeFilelist(themeDir)
-        
+
+        # Check for the case where there is a DVD directory and the themes
+        # directory is above it
+        if len(themeFiles) < 1:
+            if ('VIDEO_TS' in rawPath) or ('BDMV' in rawPath):
+                log( "ThemeFiles: Found VIDEO_TS in path: Correcting the path 
for DVDR tv shows" )
+                themeDir = self._getUsablePath(rawPath)
+                themeDir = self._updir( themeDir, 1 )
+                themeDir = os_path_join( themeDir, 
Settings.getThemeDirectory() )
+                themeFiles = self._generateThemeFilelist(themeDir)
+
         # If no themes were found in the directory then search the normal 
location
         if len(themeFiles) < 1:
             themeFiles = self._generateThemeFilelist(rawPath)
@@ -600,19 +610,21 @@ class ThemeFiles():
         # Get the full path with any network alterations
         workingPath = self._getUsablePath(rawPath)
 
-        #######hack for TV shows stored as ripped disc folders
-        if 'VIDEO_TS' in workingPath:
-            log( "### FOUND VIDEO_TS IN PATH: Correcting the path for DVDR tv 
shows" )
-            workingPath = self._updir( workingPath, 3 )
-            themeList = self._getThemeFiles(workingPath)
-            if len(themeList) < 1:
-                workingPath = self._updir(workingPath,1)
+        themeList = self._getThemeFiles(workingPath)
+
+        # If no themes have been found
+        if len(themeList) < 1:
+            #######hack for TV shows stored as ripped disc folders
+            if ('VIDEO_TS' in workingPath) or ('BDMV' in workingPath):
+                log( "ThemeFiles: Found VIDEO_TS or BDMV in path: Correcting 
the path for DVDR tv shows" )
+                workingPath = self._updir( workingPath, 1 )
                 themeList = self._getThemeFiles(workingPath)
-        #######end hack
-        else:
-            themeList = self._getThemeFiles(workingPath)
-            # If no theme files were found in this path, look at the parent 
directory
-            if len(themeList) < 1:
+                if len(themeList) < 1:
+                    workingPath = self._updir(workingPath,1)
+                    themeList = self._getThemeFiles(workingPath)
+            #######end hack
+            else:
+                # If no theme files were found in this path, look at the 
parent directory
                 workingPath = self._updir( workingPath, 1 )
                 themeList = self._getThemeFiles(workingPath)
 
@@ -915,7 +927,7 @@ class WindowShowing():
 
     @staticmethod
     def isVideoLibrary():
-        return xbmc.getCondVisibility("Window.IsVisible(videolibrary)") or 
WindowShowing.isTvTunesOverrideTvShows() or 
WindowShowing.isTvTunesOverrideMovie()
+        return xbmc.getCondVisibility("Window.IsVisible(videolibrary)") or 
WindowShowing.isTvTunesOverrideTvShows() or 
WindowShowing.isTvTunesOverrideMovie() or 
WindowShowing.isTvTunesOverrideContinuePlaying()
 
     @staticmethod
     def isMovieInformation():
@@ -955,10 +967,31 @@ class WindowShowing():
         win = xbmcgui.Window(xbmcgui.getCurrentWindowId())
         return win.getProperty("TvTunesSupported").lower() == "movies"
 
+    @staticmethod
+    def isTvTunesOverrideContinuePlaying():
+        # Check the home screen for the forced continue playing flag
+        if xbmcgui.Window( 12000 ).getProperty( "TvTunesContinuePlaying" 
).lower() == "true":
+            # Never allow continues playing on the Home Screen
+            if WindowShowing.isHome():
+                # An addon may have forgotten to undet the flag, or crashed
+                # force the unsetting of the flag
+                log("WindowShowing: Removing TvTunesContinuePlaying property 
when on Home screen")
+                xbmcgui.Window( 12000 ).clearProperty( 
"TvTunesContinuePlaying" )
+                return False
+            
+            # Only pay attention to the forced playing if there is actually 
audio playing
+            if xbmc.Player().isPlayingAudio():
+                return True
+        return False
+
     # Works out if the custom window option to play the TV Theme is set
     # and we have just opened a dialog over that
     @staticmethod
     def isTvTunesOverrideContinuePrevious():
+        # Check the master override that forces the existing playing theme
+        if WindowShowing.isTvTunesOverrideContinuePlaying():
+            return True
+
         if WindowShowing.isTvTunesOverrideTvShows() or 
WindowShowing.isTvTunesOverrideMovie():
             # Check if this is a dialog, in which case we just continue playing
             try: dialogid = xbmcgui.getCurrentWindowDialogId()
@@ -1116,6 +1149,12 @@ class TunesBackend( ):
                 return
 
             while (not self._stop):
+                # Check the forced TV Tunes status at the start of the loop, 
if this is True
+                # then we don't want to stop themes until the next iteration, 
this stops the case
+                # where some checks are done and the value changes part was 
through a single
+                # loop iteration
+                isForcedTvTunesContinue = 
WindowShowing.isTvTunesOverrideContinuePlaying()
+                
                 # If shutdown is in progress, stop quickly (no fade out)
                 if WindowShowing.isShutdownMenu() or xbmc.abortRequested:
                     self.stop()
@@ -1172,7 +1211,7 @@ class TunesBackend( ):
                 # to an area where the theme is no longer played, so it will 
trigger a stop and
                 # reset everything to highlight that nothing is playing
                 # Note: TvTunes is still running in this case, just not 
playing a theme
-                if not self.isPlayingZone():
+                if (not self.isPlayingZone()) and (not 
isForcedTvTunesContinue):
                     log( "TunesBackend: reinit condition" )
                     self.newThemeFiles.clear()
                     self.oldThemeFiles.clear()
@@ -1195,6 +1234,8 @@ class TunesBackend( ):
     # Works out if the currently displayed area on the screen is something
     # that is deemed a zone where themes should be played
     def isPlayingZone(self):
+        if WindowShowing.isTvTunesOverrideContinuePlaying():
+            return True
         if WindowShowing.isRecentEpisodesAdded():
             return False
         if WindowShowing.isPluginPath():
diff --git a/script.tvtunes/resources/tvtunes_scraper.py 
b/script.tvtunes/resources/tvtunes_scraper.py
index 984fc7a..1290c27 100644
--- a/script.tvtunes/resources/tvtunes_scraper.py
+++ b/script.tvtunes/resources/tvtunes_scraper.py
@@ -260,7 +260,20 @@ class TvTunesScraper:
         log("doesThemeExist: Checking directory: %s" % directory)
         # Check for custom theme directory
         if Settings.isThemeDirEnabled():
-            directory = os.path.join(directory, Settings.getThemeDirectory())
+            themeDir = os.path.join(directory, Settings.getThemeDirectory())
+            # Check if this directory exists
+            if not xbmcvfs.exists(themeDir):
+                workingPath = directory
+                # If the path currently ends in the directory separator
+                # then we need to clear an extra one
+                if (workingPath[-1] == os.sep) or (workingPath[-1] == 
os.altsep):
+                    workingPath = workingPath[:-1]
+                # If not check to see if we have a DVD VOB
+                if (os.path.split(workingPath)[1] == 'VIDEO_TS') or 
(os.path.split(workingPath)[1] == 'BDMV'):
+                    # Check the parent of the DVD Dir
+                    themeDir = os.path.split(workingPath)[0]
+                    themeDir = os.path.join(themeDir, 
Settings.getThemeDirectory())
+            directory = themeDir
 
         # check if the directory exists before searching
         if xbmcvfs.exists(directory):
@@ -319,7 +332,22 @@ class TvTunesScraper:
 
         # Check for custom theme directory
         if Settings.isThemeDirEnabled():
-            path = os.path.join(path, Settings.getThemeDirectory())
+            themeDir = os.path.join(path, Settings.getThemeDirectory())
+            if not xbmcvfs.exists(themeDir):
+                workingPath = path
+                # If the path currently ends in the directory separator
+                # then we need to clear an extra one
+                if (workingPath[-1] == os.sep) or (workingPath[-1] == 
os.altsep):
+                    workingPath = workingPath[:-1]
+                # If not check to see if we have a DVD VOB
+                if (os.path.split(workingPath)[1] == 'VIDEO_TS') or 
(os.path.split(workingPath)[1] == 'BDMV'):
+                    log("DVD image detected")
+                    # Check the parent of the DVD Dir
+                    themeDir = os.path.split(workingPath)[0]
+                    themeDir = os.path.join(themeDir, 
Settings.getThemeDirectory())
+            path = themeDir
+
+        log("target directory: %s" % path )
 
         theme_file = self.getNextThemeFileName(path)
         tmpdestination = xbmc.translatePath( 
'special://profile/addon_data/%s/temp/%s' % ( __addonid__ , theme_file ) 
).decode("utf-8")

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

Summary of changes:
 script.tvtunes/addon.xml                           |    6 +-
 script.tvtunes/changelog.txt                       |    4 +
 .../resources/language/Bulgarian/strings.po        |   10 ++--
 .../strings.po                                     |    4 +-
 .../resources/language/French (Canada)/strings.po  |    6 +-
 script.tvtunes/resources/settings.xml              |    2 +-
 script.tvtunes/resources/tvtunes_backend.py        |   71 +++++++++++++++----
 script.tvtunes/resources/tvtunes_scraper.py        |   32 ++++++++-
 8 files changed, 104 insertions(+), 31 deletions(-)
 copy script.tvtunes/resources/language/{English (Australia) => English (New 
Zealand)}/strings.po (81%)


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
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to