primaeval / script.tvguide.fullscreen

tv guide fullscreen
GNU General Public License v2.0
25 stars 26 forks source link

Program no-focus highlight disappears #47

Closed iainsmacleod closed 8 years ago

iainsmacleod commented 8 years ago

If I browse off the EPG with the now playing channel, then come back - the nofocu highlight is no longer shown.

primaeval commented 8 years ago

There are lots of initialisation / re-initialisation bugs in here now. It is going to take a lot of work to sort everything out. The Up Next window seemed to lose the channel info so I don't use that right now. Now you know how to write to the debug log you could help out and see if the program and channel variables are getting set and reset properly.

iainsmacleod commented 8 years ago

I'll do my best to help.

primaeval commented 8 years ago

Thanks. There is a ton of code to debug now.

iainsmacleod commented 8 years ago

Tried the following debug, but I don't ever see it get into the try condition:

if control: control.setHeight(self.epgView.cellHeight-2) control.setWidth(176) control.setPosition(2,top) xbmc.log(repr(("IM: Current channel, channel IDX",self.currentChannel,channels[idx]))) try: if self.currentChannel == channels[idx]: control.setImage("tvg-playing-nofocus.png") xbmc.log(repr(("IM: Focused -Current channel, channel IDX",self.currentChannel,channels[idx]))) else: control.setImage("tvg-program-nofocus.png") xbmc.log(repr(("IM: No-focus - Current channel, channel IDX",self.currentChannel,channels[idx])))

Is this a correct compare?

The other output I do get something, first debug comment:

DEBUG: ('IM: Current channel, channel IDX', None, Channel(id=BBC1, title=BBC1, logo=None, streamUrl=None))

primaeval commented 8 years ago

The debug log can be very picky sometimes and not print out things you think should be easy. There are lots of complaints about encoding and decoding unicode.

The easiest way to see your code is to link to the line number in your commit or use a block with three backticks at the start or the end.

Follow the link below the comment box about "Styling with Markdown is supported".

Your code looks ok but you might need to check if the values aren't None first.

iainsmacleod commented 8 years ago

I feel I had to wait for the program to exit completely, like wait 5 seconds or so before entering again - I do see something strange self.currentChannel starts reporting none for some reason... Should it be initialized to last channel or none if not available?

primaeval commented 8 years ago

I would imagine it needs to be set to something. Sometimes when you come back to the epg it is actually a re-initialized epg. It is not the same one you left when you started watching tv. Log the init function to see when it restarts. I haven't totally got to grips with the lifecycle yet. Perhaps now is a good time to work it out.

iainsmacleod commented 8 years ago

I think that reloading of the EPG is what is causing my crashes/frezing too - because it happened when I tabbed out last night, as well as the previous reported stops. I'll have a look and see.

primaeval commented 8 years ago

It might be a good idea to store the current channel in the settings so that it is persistent.

primaeval commented 8 years ago

Is that the current playing channel or current selected channel?

iainsmacleod commented 8 years ago

I believe sell.currentChannel is the currently played and channels[idx] is the highlighted channel.

On Aug 29, 2016 2:23 PM, "primaeval" notifications@github.com wrote:

Is that the current playing channel or current selected channel?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/primaeval/script.tvguide.fullscreen/issues/47#issuecomment-243209473, or mute the thread https://github.com/notifications/unsubscribe-auth/AEAHoiCWhKwCuAbwUXHQ-Bulyh09Ddv0ks5qkyN4gaJpZM4Jvnux .

primaeval commented 8 years ago

I did some tests on my Android box. I think onPlayBackStopped is getting called prematurely and reseting self.currentChannel to None. I'll have a closer look tomorrow.

iainsmacleod commented 8 years ago

Ok. Sorry I didn't get further.

On Aug 29, 2016 16:52, "primaeval" notifications@github.com wrote:

I did some tests on my Android box. I think onPlayBackStopped is getting called prematurely and reseting self.currentChannel to None. I'll have a closer look tomorrow.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/primaeval/script.tvguide.fullscreen/issues/47#issuecomment-243252355, or mute the thread https://github.com/notifications/unsubscribe-auth/AEAHogDaWKVy_ykSSWgHw8St06woFoZNks5qk0aigaJpZM4Jvnux .

iainsmacleod commented 8 years ago

Looks like you solved this issue? If you agree we can close.

primaeval commented 8 years ago

I'm not convinced it is solid yet. It needs a lot more testing to be sure.