drrlramsey / xbmc-addons

Automatically exported from code.google.com/p/xbmc-addons
0 stars 0 forks source link

Home Automation - triggers not accurate #94

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Cinema Experience, Home Automation bug

For some reason the triggers of the home automation script seem to be 
inaccurate when running on my Home Theater. For example, when the trailers end, 
nothing should be triggered, according to my settings. However, even before the 
audio logo movie and the countdown movie are played, the trigger 'Movie' is 
already triggered. As you can see, it is triggered too early. I found something 
in my log file that may be useful.

  LOG FILE
------------
22:40:35 T:140057574881024  NOTICE: [ script.cinema.experience ] - Problem With 
Trigger List
22:40:35 T:140057574881024  NOTICE: [ script.cinema.experience ] - Playlist 
Position: 9  Playlist Size: 10
22:40:35 T:140057574881024   ERROR: Traceback (most recent call last):
22:40:35 T:140057574881024   ERROR:   File 
"/storage/.xbmc/addons/script.cinema.experience/addon.py", line 325, in <module>
22:40:35 T:140057574881024   ERROR:     exit = Script().start_script( "oldway" )
22:40:35 T:140057574881024   ERROR:   File 
"/storage/.xbmc/addons/script.cinema.experience/resources/lib/ce_player.py", 
line 113, in start_script
22:40:35 T:140057574881024   ERROR:     prev_trigger = 
Launch_automation().launch_automation( trigger_list[ playlist.getposition() ], 
prev_trigger )
22:40:35 T:140057574881024   ERROR: IndexError: list index out of range
22:40:35 T:140057574881024  NOTICE: [ script.cinema.experience ] - messy_exit: 
Use exit() or Ctrl-D (i.e. EOF) to exit

Since it seems to stop with 'messy_exit', I think the 'Script End' trigger 
never gets triggered, because it cannot be found anywhere in my log file. But 
of course you're the experts here, so I am not sure...

I'm using XBMC 12.2 Frodo, running on OpenELEC 3.2.2. The addon version is 
3.0.6. I also tried a rollback to 3.0.4, with the same result.

Summary of my experiences:
- Inaccurate triggers
- Missing triggers (from trigger list?)

I hope I'm not wasting your time and this will help you out solving the bug, if 
it is indeed one. Good luck to all of you, your work is much appreciated! :)

Original issue reported on code.google.com by tjheft...@gmail.com on 5 Oct 2013 at 9:11

GoogleCodeExporter commented 8 years ago
Hello developers,

I did some research about the problem. In the cinema experience script I added 
a few rows of code to log every item in the playlist when the playlist is 
loaded and played. This is the result:

  LOG FILE
------------
13:38:26 T:140512271005440  NOTICE: @@@ XBMC Playlist Item: 0 - 
nfs://10.0.0.1/raid/storage/media/intro_720p/Movie Theatre 
Intro/hd_other_imax_intro.avi
13:38:26 T:140512271005440  NOTICE: @@@ XBMC Playlist Item: 1 - 
nfs://10.0.0.1/raid/storage/media/intro_720p/black3s.mp4
13:38:26 T:140512271005440  NOTICE: @@@ XBMC Playlist Item: 2 - 
nfs://10.0.0.1/raid/storage/media/intro_720p/Movie Theatre 
Intro/hd_other_technicolor.avi
13:38:26 T:140512271005440  NOTICE: @@@ XBMC Playlist Item: 3 - 
nfs://10.0.0.1/raid/storage/media/intro_720p/Coming Attractions 
Intro/playlist.pls
13:38:26 T:140512271005440  NOTICE: @@@ XBMC Playlist Item: 4 - 
http://trailers.apple.com/movies/fox/walkingwithdinosaurs/walkingwithdinosaurs-t
lr2_h640w.mov|User-Agent=QuickTime%2F7.6.5+%28qtver%3D7.6.5%3Bos%3DWindows+NT+5.
1Service+Pack+3%29
13:38:26 T:140512271005440  NOTICE: @@@ XBMC Playlist Item: 5 - 
http://trailers.apple.com/movies/sony_pictures/robocop/robocop-tlr1_h640w.mov|Us
er-Agent=QuickTime%2F7.6.5+%28qtver%3D7.6.5%3Bos%3DWindows+NT+5.1Service+Pack+3%
29
13:38:26 T:140512271005440  NOTICE: @@@ XBMC Playlist Item: 6 - 
http://trailers.apple.com/movies/dreamworks/needforspeed/needforspeed-tlr1xxzzs2
_h640w.mov|User-Agent=QuickTime%2F7.6.5+%28qtver%3D7.6.5%3Bos%3DWindows+NT+5.1Se
rvice+Pack+3%29
13:38:26 T:140512271005440  NOTICE: @@@ XBMC Playlist Item: 7 - 
nfs://10.0.0.1/raid/storage/media/intro_720p/Coming Attractions 
Outro/playlist.pls
13:38:26 T:140512271005440  NOTICE: @@@ XBMC Playlist Item: 8 - 
nfs://10.0.0.1/raid/storage/media/intro_720p/Audio/THX/hd_thx_amazing_life_lossl
ess.avi
13:38:26 T:140512271005440  NOTICE: @@@ XBMC Playlist Item: 9 - 
nfs://10.0.0.1/raid/storage/media/movie/Tron_Legacy.mp4

Here are the contents of the automatic generated triggers_list.txt:
    ['Movie Theater Intro', 'Coming Attractions Intro', 'Movie Trailer', 'Movie Trailer', 'Movie Trailer', 'Coming Attractions Outro', 'Countdown', 'Movie']

Actually, the trigger list is right, because there are only 8 items. However, 
the first item is a .pls-playlist with three items for the Movie Theater Intro 
part, which gets 'extracted' and replaces the first item, resulting in 2 more 
items in the playlist (index 1 and 2). At the end it tries to retrieve index 8 
and 9 in trigger_list.txt, but results in an 'list index out of range' error, 
because they simply don't exist. I personally think that this is the problem of 
the missing triggers part.

When it reaches the Coming Attractions Outro (right before my Countdown video: 
the THX logo, with playlist index 9), both the playlist and the trigger list 
reach index 7. Again, I personally think that is why my triggers are 
inaccurate: the trigger list is always 2 triggers (in my case) ahead of my 
playlist.

So, back to the actual problem... It seems that either the Movie Theater Intro 
playlist specific or a multiple item playlist in general gets 'extracted' into 
seperated movie files and the trigger list does not anticipate on this behavior.

Just some thoughts, I hope it will help a bit more to get to the problem. :)

Original comment by tjheft...@gmail.com on 6 Oct 2013 at 12:05

GoogleCodeExporter commented 8 years ago
Sorry, wrong repository. Copied issue to GitHub here: 
https://github.com/Giftie/script.cinema.experience/issues/10

Original comment by tjheft...@gmail.com on 6 Oct 2013 at 2:42