2013-08-17, 20:38
Im creating an addon to play a youtube video after you watch a tv show, and im a little stuck.
I was wondering if anyone would mind helping my with a few things:
1. Give me ideas on how to clean up my code
2. Pointers on how to include the resources library i downloaded, with this script
3. Stop youtube video from playing more than once, here is what i have:
Here is the source to my addon:
GitHub - https://github.com/Karrade/script.tv.promos
Source - http://source.sytes.net/ (script.tv.promos)
I was wondering if anyone would mind helping my with a few things:
1. Give me ideas on how to clean up my code
2. Pointers on how to include the resources library i downloaded, with this script
3. Stop youtube video from playing more than once, here is what i have:
Code:
self.varVideoTime = xbmc.getInfoLabel("VideoPlayer.Duration")
...
def onPlayBackEnded(self):
if self.varVideoTime <= '07:00':
pass
else:
xbmc.executebuiltin("XBMC.PlayMedia(plugin://plugin.video.youtube/?action=play_video&videoid=" + self.varVideoID + ")")
Here is the source to my addon:
GitHub - https://github.com/Karrade/script.tv.promos
Source - http://source.sytes.net/ (script.tv.promos)