Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Program no-focus highlight disappears #47

Closed
iainsmacleod opened this issue Aug 29, 2016 · 15 comments
Closed

Program no-focus highlight disappears #47

iainsmacleod opened this issue Aug 29, 2016 · 15 comments

Comments

@iainsmacleod
Copy link
Contributor

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

@primaeval
Copy link
Owner

primaeval commented Aug 29, 2016

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
Copy link
Contributor Author

I'll do my best to help.

@primaeval
Copy link
Owner

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

@iainsmacleod
Copy link
Contributor Author

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
Copy link
Owner

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
Copy link
Contributor Author

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
Copy link
Owner

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
Copy link
Contributor Author

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
Copy link
Owner

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

@primaeval
Copy link
Owner

Is that the current playing channel or current selected channel?

@iainsmacleod
Copy link
Contributor Author

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
#47 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEAHoiCWhKwCuAbwUXHQ-Bulyh09Ddv0ks5qkyN4gaJpZM4Jvnux
.

@primaeval
Copy link
Owner

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
Copy link
Contributor Author

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
#47 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEAHogDaWKVy_ykSSWgHw8St06woFoZNks5qk0aigaJpZM4Jvnux
.

@iainsmacleod
Copy link
Contributor Author

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

@primaeval
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants