2013-09-13, 05:36
(2013-09-13, 02:36)Legion455 Wrote: I couldn't find any errors to my changes in the py file,... so I turned on debug logging,.. and got a "exceptions.indentationerror", "unindent does not match any outer indentation level"
if anyone has any ideas about this,...
thanks
Legion
Hi Legion, White space is important in python - so you will need to make sure that it all the indentation is correct.
I did originally create a patch file, but thought that it was hard to read for posting what I had done - infortunately when I posted the section from the file, it removed all whitespace
Patch file/diff:
Code:
*** C:/XBMC/workspace/Stubs/tvtunes_backend-Original.py Thu Sep 12 14:28:28 2013
--- C:/XBMC/workspace/Stubs/tvtunes_backend.py Thu Sep 12 15:38:35 2013
***************
*** 54,67 ****
def run( self ):
try:
while not self._stop: # the code
if not xbmc.getCondVisibility( "Window.IsVisible(10025)"): self.stop() #destroy threading
! 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":
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/":
--- 54,73 ----
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/":
***************
*** 76,82 ****
if self.loud: self.raise_volume()
xbmcgui.Window( 10025 ).clearProperty('TvTunesIsAlive')
! if xbmc.getCondVisibility( "Container.Content(tvshows)" ) and self.playpath and not xbmc.getCondVisibility( "Window.IsVisible(12003)" ):
log( "### reinit condition" )
self.newpath = ""
self.oldpath = ""
--- 82,89 ----
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)" ): # or (not xbmc.getCondVisibility( "Window.IsVisible(12003)") and self.playpath and isStartedDueToInfoScreen == True):
! isStartedDueToInfoScreen = False
log( "### reinit condition" )
self.newpath = ""
self.oldpath = ""