Skip to content
New issue

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

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

Already on GitHub? # to your account

Strange Playlist Order in the Add to Playlist preview #10993

Closed
6 tasks done
Monstanner opened this issue Apr 23, 2024 · 13 comments · Fixed by #11566
Closed
6 tasks done

Strange Playlist Order in the Add to Playlist preview #10993

Monstanner opened this issue Apr 23, 2024 · 13 comments · Fixed by #11566
Assignees
Labels
bug Issue is related to a bug database Issue and PRs related to database operations GUI Issue is related to the graphical user interface playlist Anything to do with playlists in the app

Comments

@Monstanner
Copy link

Checklist

  • I am able to reproduce the bug with the latest version given here: CLICK THIS LINK.
  • I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • I have read the FAQ and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Affected version

0.27.0

Steps to reproduce the bug

Not really an issue

  1. Open New Pipe
  2. Add a Video to a Playlist (Either when you long press on a video or when you press the icon on a video)
  3. The order of the playlists is no longer alphabetical / numeric. At first I thought it was sorted by playlist creation date, but it looks more like thrown together.

Expected behavior

The order of the playlist should be the same as in the previous versions (0.26.1, etc.)

Actual behavior

Wildly thrown together playlist order. (Only in the Add to Playlist preview)

Screenshots/Screen recordings

No response

Logs

No response

Affected Android/Custom ROM version

Android 13 Vanilla

Affected device model

Nokia X10

Additional information

No response

@Monstanner Monstanner added bug Issue is related to a bug needs triage Issue is not yet ready for PR authors to take up labels Apr 23, 2024
@SpazMahTazz
Copy link

I can't replicate this, but on a semi-related note, new playlists now go to the top. I like the sort option but I also liked it when they were put in alphabetical order when they were created.

@Monstanner
Copy link
Author

I can't replicate this, but on a semi-related note, new playlists now go to the top. I like the sort option but I also liked it when they were put in alphabetical order when they were created.

I know how to reproduce the bug. If you upgrade from 0.26.1 to 0.27.0 and then add a video to a playlist without rearranging a playlist first, the playlist will look messed up in the Add to Playlist Preview. However, if you rearrange a playlist, the preview will look the same as before. The issue can be closed.

@Stypox
Copy link
Member

Stypox commented Apr 24, 2024

@Monstanner thank you for the details. Although this behavior is somewhat unintended, it's also something that can happen only right after upgrading to 0.27.0, so I wouldn't worry about it. It's ok that the order is not updated when querying playlists, but only when doing something with them.

Anyway, this can be fixed by adding a clause to the ORDER BY of some SQL query, in case someone wants to solve it.

@Stypox Stypox closed this as not planned Won't fix, can't repro, duplicate, stale Apr 24, 2024
@opusforlife2 opusforlife2 removed the needs triage Issue is not yet ready for PR authors to take up label Apr 24, 2024
@ajgae

This comment was marked as off-topic.

@ajgae

This comment was marked as off-topic.

@opusforlife2

This comment was marked as off-topic.

@ajgae

This comment was marked as off-topic.

@ajgae

This comment was marked as off-topic.

@opusforlife2

This comment was marked as off-topic.

@GfEW
Copy link

GfEW commented May 7, 2024

@Monstanner

The issue can be closed.

@Stypox

only right after upgrading to 0.27.0, so I wouldn't worry about it. It's ok that the order is not updated when querying playlists, but only when doing something with them.

Whilst that conclusion feels reasonable from the perspective of github folks and power users, I don't think it aligns very well with the reality of not-so-techy end users who appreciate NewPipe for their everyday yt endeavors and have learned how to use it, but e. g. wouldn't file bug reports - for the following reasons:

1. Who's affected: If this bug reproducibly shows up by the upgrade to 0.27.0, this means the entire userbase runs into it, with the exception of only those who don't upgrade to 0.27.0, or accidentally rearrange playlists before their next use of "add to playlist".

2. How severely affected: There are more severe bugs for sure, but if your collection of playlists has grown into the dozens, the messed-up order is a real nuisance every time you wish to playlist a new medium.

3. How easy to overcome: If you've never faced a need to rearrange playlists (because they've always been in consistent alphabetical order on their own), it's far from obvious how the sudden mess-up in the "add to playlist" dialog can be fixed.
3.1. In the "add to playlist" dialog, there is no button to switch sorting back to alphabetical (or to any other sorting mode), nor are there handles that would allow manual rearrangment.
3.2. In the playlist tab (where you could solve the problem if you knew), the problem doesn't even exist. Why should it be relevant to the bug? The suggested "hidden solution" by rearranging a listing that already is in perfect alphabetical order, in order to fix a different listing elsewhere that is not, doesn't make a lot of common sense.

Anyway, this can be fixed by adding a clause to the ORDER BY of some SQL query, in case someone wants to solve it.

Although I'm able to contribute to github issues (which already separates me from the majority of NewPipe users I know), I'm not a coder, hence left hoping for someone more technically adept to take care of the code side of things.

Given the above reasons, would it be appropriate to reopen this issue, or am I totally off the road?

@AudricV AudricV reopened this May 20, 2024
@AudricV AudricV added good first issue Easy/simple issues perfect for newcomers to get involved in the project GUI Issue is related to the graphical user interface database Issue and PRs related to database operations playlist Anything to do with playlists in the app labels May 20, 2024
@illustribe
Copy link

illustribe commented May 24, 2024

It's also happening to me. It's annoying since the order of the playlists in the preview seems completely random, so one has to go through all the names to find the intended one... A big nuisance when adding many items to different playlists in a row.

Edit: @Monstanner is right and after rearranging any one playlist the order gets fixed again. Thanks!

@nicholasala
Copy link
Contributor

nicholasala commented Sep 24, 2024

Hello everybody!

I am new to the open source community and I would like to contribute to NewPipe project.

I had the same problem with the strange playlist order. It happens only when the user has not yet given an order to the playlists because at this phase the value displayIndex of each playlist (local or remote) is set to -1 and the code that create the list of playlist in "Bookmarked Playlists" sort every playlist with the same displayIndex value using a case insensitive order during the merge between remote and local playlists. While this case insensitive sorting does not happen for the add to playlist dialog list.

We have some possible solutions that can be applied to fix the problem:

  1. Order also the list on the add to playlist dialog using a case insensitive order when the user has not yet given an order to the playlists.
  2. Skip the case insensitive ordering of playlists with the same displayIndex value in "Bookmarked Playlists" when the user has not yet given an order to the playlists.
  3. Use an incremental value and not -1 for the new playlist since the beginning. In this way there can be no playlists with the same displayIndex value and both playlist lists are ordered chronologically (when the user has not yet given an order). Probably this is the best solution even if it can be more tricky and it needs a proper database migration.

@Stypox what do you think about that ? In case you can assign this issue to me, thank you

@Stypox
Copy link
Member

Stypox commented Sep 25, 2024

@nicholasala thank you for the interest! I would go with 1., which should be solvable by "adding a clause to the ORDER BY of some SQL query". I assigned the issue to you.

@Stypox Stypox assigned Stypox and nicholasala and unassigned Stypox Sep 25, 2024
@nicholasala nicholasala mentioned this issue Sep 26, 2024
5 tasks
Stypox added a commit that referenced this issue Nov 10, 2024
@ShareASmile ShareASmile removed the good first issue Easy/simple issues perfect for newcomers to get involved in the project label Nov 10, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Issue is related to a bug database Issue and PRs related to database operations GUI Issue is related to the graphical user interface playlist Anything to do with playlists in the app
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants