Permalink
Browse files

3.0.2

have script wait until fullscreen video is available before detecting a stop of playback
  • Loading branch information...
1 parent e383137 commit c8ae34b91497144ff370289004f20f5d7c15ed89 @Giftie committed Feb 19, 2013
Showing with 16 additions and 6 deletions.
  1. +1 −1 addon.xml
  2. +4 −0 changelog.txt
  3. +10 −5 resources/lib/ce_player.py
  4. +1 −0 resources/lib/xbmcscript_trivia.py
View
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.cinema.experience"
name="Cinema Experience"
- version="3.0.1"
+ version="3.0.2"
provider-name="Giftie - nuka1195">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
View
@@ -1,3 +1,7 @@
+3.0.2
+- fix - make sure home_automation.py is moved in service.py if it does not exist
+- fix - have script wait until full screen video is playing before detecting a stop, should fix when XBMC is slow to start
+
3.0.1
- fix - more HTTP-API calls removed(none should be left in functioning code)
- fix - Local Folder trailer scraper
@@ -97,12 +97,13 @@ def start_script( self, library_view = "oldway" ):
mplaylist = xbmc.PlayList(xbmc.PLAYLIST_MUSIC)
mplaylist.clear()
trigger_list = self.load_trigger_list()
- #xbmc.Player().play( playlist )
self.player.play( playlist )
count = -1
stop_check = 0
paused = False
- # prelim programming for adding - Activate script and other additions
+ # wait until fullscreen video is shown
+ while not xbmc.getCondVisibility( "Window.IsActive(fullscreenvideo)" ):
+ pass
while not playlist.getposition() == ( playlist.size() - 1 ):
if playlist.getposition() > count:
try:
@@ -119,8 +120,10 @@ def start_script( self, library_view = "oldway" ):
#if not self.player.isPlayingVideo() and not is_paused:
if not xbmc.getCondVisibility( "Window.IsActive(fullscreenvideo)" ):
xbmc.log( "[ script.cinema.experience ] - Video may have stopped", level=xbmc.LOGNOTICE )
- messy_exit = True
- break
+ xbmc.sleep( 5000 ) # wait 5 seconds for fullscreen video to show up(during playback)
+ if not xbmc.getCondVisibility( "Window.IsActive(fullscreenvideo)" ): # if fullscreen video does not show up, break and exit script
+ messy_exit = True
+ break
except:
if xbmc.getCondVisibility( "Container.Content(movies)" ):
xbmc.log( "[ script.cinema.experience ] - Video Definitely Stopped", level=xbmc.LOGNOTICE )
@@ -293,6 +296,7 @@ def _play_trivia( self, mpaa, genre, plist, equivalent_mpaa ):
_rebuild_playlist( plist )
import xbmcscript_player as script
script.Main()
+ xbmc.executebuiltin( "XBMC.ActivateWindow(fullscreenvideo)" )
#xbmc.sleep(500) # wait .5 seconds
#xbmc.Player().play( playlist )
elif trivia_settings[ "trivia_folder" ] and trivia_settings[ "trivia_mode" ] == 1: # Start Slide Show
@@ -322,7 +326,7 @@ def _play_trivia( self, mpaa, genre, plist, equivalent_mpaa ):
del ui
# we need to activate the video window
#xbmc.sleep(5) # wait .005 seconds
- xbmc.executebuiltin( "XBMC.ActivateWindow(2005)" )
+ xbmc.executebuiltin( "XBMC.ActivateWindow(fullscreenvideo)" )
#xbmc.Player().play( playlist )
elif trivia_settings[ "trivia_mode" ] == 0: # No Trivia
# no trivia slide show so play the video
@@ -331,5 +335,6 @@ def _play_trivia( self, mpaa, genre, plist, equivalent_mpaa ):
# play the video playlist
import xbmcscript_player as script
script.Main()
+ xbmc.executebuiltin( "XBMC.ActivateWindow(fullscreenvideo)" )
xbmc.sleep(500) # wait .5 seconds
#xbmc.Player().play( playlist )
@@ -208,6 +208,7 @@ def _play_video_playlist( self ):
self._fade_volume( False )
elif ( not self.settings[ "trivia_fade_volume" ] and self.settings[ "trivia_adjust_volume"] ):
xbmc.executebuiltin( "XBMC.SetVolume(%d)" % ( self.xbmc_volume ) )
+ xbmc.executebuiltin( "XBMC.ActivateWindow(fullscreenvideo)" )
#xbmc.PlayList(xbmc.PLAYLIST_MUSIC).clear()
#xbmc.Player().play( self.playlist )
#xbmc.Player().pause()

0 comments on commit c8ae34b

Please sign in to comment.