Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 30a31,32
- > self.lastplayedpath = ""
- > self.lastplaytime = 0
- 118,123c120,130
- < if not self.loud: self.lower_volume()
- < xbmcgui.Window( 10025 ).setProperty( "TvTunesIsAlive", "true" )
- < print "### start playing %s" % self.playpath
- < xbmc.Player().play(self.playpath)
- < if params.get("loop", "false" ) == "true" : xbmc.executebuiltin('XBMC.PlayerControl(Repeat)')
- < else: xbmc.executebuiltin('XBMC.PlayerControl(RepeatOff)')
- ---
- > if (self.lastplayedpath != self.playpath) or (time.time() - 300 >= self.lastplaytime):
- > self.lastplayedpath = self.playpath
- > self.lastplaytime = time.time()
- >
- > if not self.loud: self.lower_volume()
- > xbmcgui.Window( 10025 ).setProperty( "TvTunesIsAlive", "true" )
- > print "### start playing %s" % self.playpath
- > xbmc.Player().play(self.playpath)
- > if params.get("loop", "false" ) == "true" : xbmc.executebuiltin('XBMC.PlayerControl(Repeat)')
- > else: xbmc.executebuiltin('XBMC.PlayerControl(RepeatOff)')
- > else: print "### Not playing theme %s, since it has already been played recently " % ( self.playpath )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement