2011-11-27, 23:09
Machine-Sanctum Wrote:Could it be when unloading VideoFullScreen.xml ?That's what I originally intended doing -
Hitcher Wrote:I want to run the watchedlist script whenever a video is stopped so I added <onunload>RunScript(script.watchlist)</onunload> to the VideoFullScreen.xml thinking that would do the trick but the script fails to run.
This can easily be tested by adding <onunload>ReplaceWindow(Home)</onunload> instead and you'll see when stopping a video you wont be returned to the home screen. Changing it to <onload> however does work.
Bug or am I missing something?
Thanks.
pieh Wrote:You are right, just confirmed that's a bug and onunload actions in VideoFullScreen aren't executed
---
edit: just random thought - running this when unloading VideoFullScreen won't be sufficent, it will execute when we toggle fullscreen (not stoppingvideo) and also when not in fullscreen, stopping video won't run script. Better approach would be to create service addon that will listen to xbmc.Player events (i.e. onPlaybackStopped) and will run proper script(s) then.
---
yet another edit: fixed in fb2e7d1e
Hitcher Wrote:You're right I didn't think of those conditions.
I just wanted to avoid having to run the script every time you enter home.
I guess "Better approach would be to create service addon that will listen to xbmc.Player events (i.e. onPlaybackStopped) and will run proper script(s) then." is what we're after?
ronie Wrote:i'll check if there's any way to handle this script side.
Thanks.