OmerTu / GoogleHomeKodi

Control kodi via Google Home / Assistant
522 stars 163 forks source link

Weird player behaviour when switching PVR channels #255

Open Mr-Groch opened 4 years ago

Mr-Groch commented 4 years ago

When I'm watching some PVR channel, and next I will send kodiPlayChannelByName command, channel will switch, but player will behave weird. There will be no current channel name, no epg info, no DVR possibilities (look at screenshot)

screenshot001

I have added to helper.js Kodi.Player.Stop action before new channel open action, and problem is gone.

My workaround look like this:

            let channelFound = searchResult[0];

            Kodi.Player.Stop({ playerid: VIDEO_PLAYER }) // eslint-disable-line new-cap

            console.log(`Found PVR channel ${channelFound.label} - ${channelFound.channelnumber} (${channelFound.channelid})`);
            return Kodi.Player.Open({ // eslint-disable-line new-cap
                item: {
                    channelid: channelFound.channelid
                }
            });
keydon commented 4 years ago

Hmm I cannot evaluate your workaround properly, since I am not able to use kodis PVR feature. Would you say the "zapping" experience still ok with your fix? And no matter if we adopt your fix or not, I would recommend you reporting that behaivour to the kodi guys, since this seems either to be a bug in kodi itself or the PVR-Plugin.

Mr-Groch commented 4 years ago

"Zapping" works fine with my workaround. Earlier, Kodi has been able even to crash after few channel changes with that weird player behaviour. I realize that my workaround is not a clean solution - before each channel change, you can see a short blink of last displayed Kodi view, but I don't know any other workaround.