2013-09-12, 16:50
Hi Ronie,
First off I would like to thank you for the TvTunes addon - it certainly adds something to XBMC.
I was messing about with it a little and noticed that if you were browsing TV Series, having a look at the information for each (i.e. loading up the info screen from the TV Series list) then there was no theme music played in the backgroud as you read details about the TV show, cast etc.
I hope you don't mind, but I have done a bit of investigation and think I may have the changes that will allow this to be implemented.
The changes are highlighted as follows (from tvtunes_backend.py)
The other advantage of this change is that it will supply one of the other features that I spotted was requested by a few people earlier in the thread - it will also play a theme if looking at info for a Movie (as long as they have manually added a theme.mp3 file there).
What do you think - is this something you would be willing to add to the addon?
Thanks
Rob
P.S. I can send you a copy of the file if that is easier (I couldn't find a way to have code formatting and highlighting together)
First off I would like to thank you for the TvTunes addon - it certainly adds something to XBMC.
I was messing about with it a little and noticed that if you were browsing TV Series, having a look at the information for each (i.e. loading up the info screen from the TV Series list) then there was no theme music played in the backgroud as you read details about the TV show, cast etc.
I hope you don't mind, but I have done a bit of investigation and think I may have the changes that will allow this to be implemented.
The changes are highlighted as follows (from tvtunes_backend.py)
Quote: def run( self ):
try:
isStartedDueToInfoScreen = False
while not self._stop: # the code
if not xbmc.getCondVisibility( "Window.IsVisible(10025)"): self.stop() #destroy threading
if xbmc.getCondVisibility( "Window.IsVisible(12003)") and not xbmc.Player().isPlaying() and "plugin://" not in xbmc.getInfoLabel( "ListItem.Path" ) and not xbmc.getInfoLabel( "container.folderpath" ) == "videodb://5/":
isStartedDueToInfoScreen = True
if isStartedDueToInfoScreen or 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":
tvshow = xbmc.getInfoLabel( "ListItem.TVShowTitle" ).replace(":","")
tvshow = normalize_string( tvshow )
self.newpath = os.path.join(self.custom_path, tvshow).decode("utf-8")
elif xbmc.getCondVisibility( "Window.IsVisible(12003)") and xbmc.getInfoLabel( "container.folderpath" ) == "videodb://2/2/":
self.newpath = xbmc.getInfoLabel( "ListItem.FilenameAndPath" )
else:
self.newpath = xbmc.getInfoLabel( "ListItem.Path" )
if not self.newpath == self.oldpath and not self.newpath == "" and not self.newpath == "videodb://2/2/":
log( "### old path: %s" % self.oldpath )
log( "### new path: %s" % self.newpath )
self.oldpath = self.newpath
if not xbmc.Player().isPlaying() : self.start_playing()
else: log( "### player already playing" )
if xbmc.getInfoLabel( "Window(10025).Property(TvTunesIsAlive)" ) == "true" and not xbmc.Player().isPlaying():
log( "### playing ends" )
if self.loud: self.raise_volume()
xbmcgui.Window( 10025 ).clearProperty('TvTunesIsAlive')
if (xbmc.getCondVisibility( "Container.Content(tvshows)" ) or xbmc.getCondVisibility( "Container.Content(movies)" ) ) and self.playpath and not xbmc.getCondVisibility( "Window.IsVisible(12003)" ):
isStartedDueToInfoScreen = False
log( "### reinit condition" )
self.newpath = ""
self.oldpath = ""
self.playpath = ""
log( "### stop playing" )
if __addon__.getSetting("fade") == 'true':
self.fade_out()
else:
xbmc.Player().stop()
if self.loud: self.raise_volume()
xbmcgui.Window( 10025 ).clearProperty('TvTunesIsAlive')
The other advantage of this change is that it will supply one of the other features that I spotted was requested by a few people earlier in the thread - it will also play a theme if looking at info for a Movie (as long as they have manually added a theme.mp3 file there).
What do you think - is this something you would be willing to add to the addon?
Thanks
Rob
P.S. I can send you a copy of the file if that is easier (I couldn't find a way to have code formatting and highlighting together)