Skip to content

Conversation

@TobiGr
Copy link
Contributor

@TobiGr TobiGr commented Dec 21, 2025

What is it?

  • Bugfix (user facing)

Description of the changes in your PR

Bug fix

The bug is caused by a wanted but forgotten inconsistency in the database. A stream can be listed in the watch history (StreamHistoryEntity) while having no corresponding playback state (StreamStateEntity) containing the matching playback position. This is caused by the fact that NewPipe does not consider a watch time of less than five seconds to be worthy to be put into the StreamStateEntity because the video was most likely played by error. Those videos are, however, counted and stored in the watch history.

I think we need to discuss whether we should add the stream to the watch history at all.

UI/UX improvements

The dialog with three options was changed to a yes and cancel button and a checkbox. The strings were changed to respect that a playlist can also contain audio streams. "streams" is now used in favour of "video".

Before/After Screenshots/Screen Record

A screen record with the old version is in #12917. The following recording shows the new behaviour and dialog.

Screen_recording_20251221_212542.webm

Fixes the following issue(s)

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

This backup can be used to easily test different scenarios: NewPipe-Data-Playlist-stream-states.zip

The test playlist contains five streams:

  • not watched
  • watched, but playback position < 5 sec
  • watched (playback position in the middle of the video)
  • watched more than 3/4, but not completely
  • watched until the end

Due diligence

@TobiGr TobiGr added this to v0.28.x Dec 21, 2025
@TobiGr TobiGr added bug Issue is related to a bug playlist Anything to do with playlists in the app history Anything to do with previously watched stuff labels Dec 21, 2025
@github-project-automation github-project-automation bot moved this to Todo in v0.28.x Dec 21, 2025
@github-actions github-actions bot added the size/medium PRs with less than 250 changed lines label Dec 21, 2025
The bug is caused by a wanted but forgotten inconsistency in the database.
A stream can be listed in the watch history (StreamHistoryEntity) while having no corresponding playback state (StreamStateEntity) containing the matching playback position. This is caused by the fact that NewPipe does not consider a watch time of less than five seconds to be worthy to be put into the StreamStateEntity because the video was most likely played by error. Those videos are, however, counted and stored in the watch history.
@TobiGr TobiGr force-pushed the fix/playlist-remove-watched branch 2 times, most recently from d14d330 to 655666c Compare December 21, 2025 19:48
Playlists can also contain audio-only items. Therefore, the term "stream" is used.
@TobiGr TobiGr force-pushed the fix/playlist-remove-watched branch from 655666c to 6cefb4b Compare December 21, 2025 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue is related to a bug history Anything to do with previously watched stuff playlist Anything to do with playlists in the app size/medium PRs with less than 250 changed lines

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

"Remove watched" removes unwatched videos

2 participants