bobo1on1 / script.xbmc.boblight

XBMC addon for boblight
http://code.google.com/p/boblight/
34 stars 27 forks source link

Fix detection of 'livetv' mode. #26

Closed ksooo closed 10 years ago

ksooo commented 10 years ago

Fixed detection of "livetv". Player.HasVideo() does return False when watching Live TV.

Memphiz commented 10 years ago

thx

Memphiz commented 10 years ago

Just fyi - i have reverted that commit. Your assumption was wrong. Which XBMC version did you test this on and what made you think that hasvideo is false for livetv?

ksooo commented 10 years ago

Tested this on latest XBMC master. Maybe Player.HasVideo() is broken? OTOH docs are not really clear, telling that this function will return True if player has a video file. Is live TV a file? Will do a little more testing and come back to you on this.

Am 03.03.2014 um 18:44 schrieb Kai Sommerfeld kai.sommerfeld@gmx.com:

Hmm. Tested This on latest XBMC master. Maybe Player.HasVideo() IS Borken there? The docs tell

Am 03.03.2014 um 18:11 schrieb Memphiz notifications@github.com:

Just fyi - i have reverted that commit. Your assumption was wrong. Which XBMC version did you test this on and what made you think that hasvideo is false for livetv?

— Reply to this email directly or view it on GitHub.

Memphiz commented 10 years ago

I fixed it that way :+1:

https://github.com/bobo1on1/script.xbmc.boblight/commit/777346ca9a9e478312b7bb6349eb0f7705d0d644

ksooo commented 10 years ago

Very strange. Seems indeed to be timing problem. All tests I just did (even without https://github.com/bobo1on1/script.xbmc.boblight/commit/777346ca9a9e478312b7bb6349eb0f7705d0d644) were all successful. No more problems.

ksooo commented 10 years ago

Thanks. Although I don't understand why this fixes the problem. These "wait for a certain amount of time" (or a little longer) fixes look always fragile and strange to me. But if it helps and nobody has a better fix...

Viele Grüße Kai Sommerfeld.

Am 03.03.2014 um 20:43 schrieb Memphiz notifications@github.com:

I fixed it that way

777346c

— Reply to this email directly or view it on GitHub.

MartijnKaijser commented 10 years ago

could be that sync to display is active and that it block the actual setting of the Player.HasVideo() properties. I have this in another script where that blocks the updating of the library while Player().Ended is already kicked

Memphiz commented 10 years ago

relying on any info bools in the on* callbacks is flawed cause those info bools are updated by a slow background thread which doesn't guaranty that all infos are up to date when those callbacks are fired.