Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 3 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
Commits on Feb 19, 2013
@Giftie Copy home_automation file over to userdata/addon_data/ha_scripts in t…
…he service script since it is the first thing run
f71a0f4
@Giftie fix indent error e383137
@Giftie 3.0.2
have script wait until fullscreen video is available before detecting a stop of playback
c8ae34b
View
2  addon.xml
@@ -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
4 changelog.txt
@@ -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
View
15 resources/lib/ce_player.py
@@ -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 )
View
1  resources/lib/xbmcscript_trivia.py
@@ -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()
View
11 service.py
@@ -1,4 +1,4 @@
-import xbmc, xbmcaddon, xbmcgui
+import xbmc, xbmcaddon, xbmcgui, xbmcvfs
import os, sys
__addon__ = xbmcaddon.Addon()
@@ -9,6 +9,7 @@
__scriptID__ = __addonid__
BASE_RESOURCE_PATH = xbmc.translatePath( os.path.join( __addon__.getAddonInfo('path').decode('utf-8'), 'resources' ) )
+BASE_CURRENT_SOURCE_PATH = os.path.join( xbmc.translatePath( "special://profile/addon_data/" ).decode('utf-8'), os.path.basename( __addon__.getAddonInfo('path') ) )
sys.path.append( os.path.join( BASE_RESOURCE_PATH, "lib" ) )
true = True
false = False
@@ -43,6 +44,14 @@
"ha_resumed": eval( __setting__( "ha_resumed" ) )
}
+#Check to see if module is moved to /userdata/addon_data/script.cinema.experience
+if not xbmcvfs.exists( os.path.join( BASE_CURRENT_SOURCE_PATH, "ha_scripts", "home_automation.py" ) ) and ha_settings[ "ha_enable" ]:
+ source = os.path.join( BASE_RESOURCE_PATH, "ha_scripts", "home_automation.py" )
+ destination = os.path.join( BASE_CURRENT_SOURCE_PATH, "ha_scripts", "home_automation.py" )
+ xbmcvfs.mkdir( os.path.join( BASE_CURRENT_SOURCE_PATH, "ha_scripts" ) )
+ xbmcvfs.copy( source, destination )
+ log( "[ script.cinema.experience ] - home_automation.py copied", level=xbmc.LOGNOTICE )
+
from launch_automation import Launch_automation
from utils import log

No commit comments for this range

Something went wrong with that request. Please try again.