enen92 / script.tubecast

A castv1 implementation for Kodi and Youtube
MIT License
111 stars 31 forks source link

App loses connection #17

Open movedoa opened 5 years ago

movedoa commented 5 years ago

When watching longer videos 20 min+ and reopening the youtube app, the app still shows that it is connected but the progress of the video is at 0:00 and you can't control anything anymore. I can disconnect and reconnect but that only works sometimes and if it does work, the current video restarts.

movedoa commented 4 years ago

Just guessing here but maybe https://github.com/enen92/script.tubecast/pull/26 also fixes this issue.

siku2 commented 4 years ago

@movedoa Sadly, I don't think this issue is related to #26. The PR should only affect the "setPlaylist" command.

I know it's been a while but could you perhaps share some more details on this issue? I just tried to reproduce it and the app seemed to forget which video is currently playing. Only after selecting the current video in the playlist did the app show the controls and progress bar again. This seems to be different from what you're experiencing...

siku2 commented 4 years ago

I was hoping the app would issue the "nowPlaying" command when opened. This command currently isn't implemented properly, it always returns an empty result (i.e. it always claims that nothing is playing). Alas, this wasn't the issue. The app doesn't send any kind of command when re-opened.

Here's a rundown of what happens when you kill the app with Kodi:

Now let's look at what happens when you open the app again:

The next thing I tried is adding a video to the queue. To my surprise this fixed the issue entirely. This is very interesting because TubeCast doesn't respond to "updatePlaylist" commands at all.

It looks to me - from the way the app displays it - that it is waiting for TubeCast to actively send some information. Maybe we can include more information (like the current video) in the progress update event or maybe we need to send a "nowPlaying" event every now and then.

movedoa commented 4 years ago

I found out that using the "skip 10 seconds button" (in any direction) in the app fixes the issue, so your theory seems to be correct.

movedoa commented 4 years ago

But strangely enough skipping 10s doesn't fix the playlist, only the progress.