TeamNewPipe / NewPipe

A libre lightweight streaming front-end for Android.
https://newpipe.net
GNU General Public License v3.0
31.35k stars 3.05k forks source link

NewPipe doesn't remember last position in a video if it's opened from a playlist #4525

Open nbmrjuhneibkr opened 4 years ago

nbmrjuhneibkr commented 4 years ago

Checklist

Steps to reproduce the bug

  1. Create a playlist and add some videos to it.
  2. Start playing the playlist in background player.
  3. Let it play play until some point in the middle of the 1st video, then stop playback and clear the queue.
  4. Open the playlist in NewPipe again. NewPipe will show your last position in the 1st video under its thumbnail.
  5. Start playing the playlist in background again.

Actual behaviour

NewPipe loses the last position and starts paying video from the beginning.

Expected behavior

NewPipe should start playing video from the position when you stopped it on step 3.

Device info

Stypox commented 4 years ago

This is the expected behaviour, since playing a video in a playlist adds the whole playlist to the queue and starts playing at the correct index, and when playing a queue with more than one videos it wouldn't make sense to restart each stream in the queue from where it left off. Even though I agree the current behaviour might be a little bit inconsistent, I would not change it, since e.g. when I start playing a music playlist from a video at a random index I don't want that track to start playing where I left off the last time.

nbmrjuhneibkr commented 3 years ago

current behaviour might be a little bit inconsistent

It certainly is inconsistent. When I see the last position indicator under the video in playlist, I don't expect NewPipe to permanently lose that position when I start playback. Some of my playlists contain long podcasts, so finding the moment where I left off may be difficult.
I agree that always remembering last position would be bad for music playlists. Maybe there could be a way to make this behavior optional (not as a global setting, but for individual playlists).

I just noticed that this problem can be partially avoided by holding the Background button in playlist to enqueue it. However, this is inconsistent too, because it only works for the first video, and NewPipe will reset other videos in playlist when it reaches them.

opusforlife2 commented 3 years ago

It would be pretty weird for several videos in a playlist to start playing from the middle. I think videos in playlists/queues should always start from the beginning, and ignore the Resume timestamp entirely.

I don't expect NewPipe to permanently lose that position when I start playback.

It should absolutely not lose the timestamp, though. Resuming should still happen if the video is being opened individually.

Maybe, if there is a resumable video in a queue and the player is about to switch to it, a dialogue box could be shown asking if it should be resumed or played from the beginning? With an "always do this" checkbox?

nbmrjuhneibkr commented 3 years ago

be pretty weird for several videos in a playlist to start playing from the middle

Weird and bad for music playlist, but rather convenient for a podcast playlist.

It should absolutely not lose the timestamp, though.

But which timestamp are you going to keep if there's more than one of them now?

a dialogue box could be shown

Not going to work. It's the background player, so the screen is very likely to be locked.
I think the solution may be to add a separate option for enqueuing playlists/videos in background, but with their timestamps taken into account.

avently commented 3 years ago

@Stypox after start of playlist the position expected (by me as who made this) to be restored. Position of next videos in playlist shouldn't be restored. So it looks like I made something wrong in the newest commits because initially (after merging initial PR) it worked fine. So I can look into it after a couple of month..

PavelCibulka commented 3 years ago

I undestant if someone has music playlist he wants to restart position. I use newpipe only to listen to podcasts. It is really anoing, when I lost last position in podcast.

Ideally there were this funcionality.