Open declension opened 2 years ago
This and #3957 are fighting each other now I think
How did you add the tracks? I can only reproduce it using one (out of the many ways of adding tracks to a playlist)
I began by commenting out self.activate
in quodlibet/browsers/playlists/main.py:
current = self._selected_playlist()
for row in self._lists:
if row[0] is playlist:
if refresh:
# Changes affect aggregate caches etc
print_d(f"Refreshing view in {self} for {playlist}")
self._lists.row_changed(row.path, row.iter)
#if playlist is current:
# self.activate()
break
I have disabled "sort songs when tracks are modified" (I expect the playlist to not jump around or reorder itself)
Then I select playlist and sort it on something arbitrary like rating.
These actions cause a refresh (without messing up the order, and without breaking options like "don't jump to current track")
This action fails to update the view:
If the new activate()-line is left uncommented, not only does "don't jump to current track" stop working, but the playlist will reorder itself to playlist-order whenever the track finishes playing.
I do not think it is fair to cause such breakage to playlists only to update the view (which the user can do by navigating away from and back to the playlist).
That is not to say that playlists were without issues before the activate-line was added.
Action: Play through a track in the playlist (while sorted on e.g. rating) Result: The sort is preserved when the track ends, and the track metadata is updated Uncommented: The playlist reorders itself when the track ends (even with the option for that disabled)
Action: DnD the selected playlist onto itself Result: The selected playlist is extended with its own songs duplicated. The view immediately shows them in sorted order (the column still has the arrow). The underlying playlist-order is insertion order (the sort is ignored) Uncommented: The playlist resets to playlist-order, then the view inserts each duplicate track beneath the corresponding original track. The underlying playlist-order is still insertion order. i.e. the view shows NEITHER playlist-order nor sort-order, but some weird buggy order. (admittedly, adding a playlist to itself is a weird action)
Action: DnD the selected playlist onto its own tracklist Result: The selected playlist is extended with its own songs duplicated, and they are inserted where they were dropped. The sort-column loses its arrow (they are no longer sorted) Uncommented: Same as commented out.
Action: Open the tracklist browser, then drag a track onto the playlist-tracklist Result: Inserted in-place (as above), sort-arrow disappears. The playlist-order is updated to the new view order. Uncommented: Same as commented out.
Action: Open the tracklist browser, then drag a track onto the playlist (in the playlist-list) Result: View shows it in sorted order. The playlist order is insertion order. Uncommented: Very weird.
Action: Rightclick a track in the tracklist-browser, select the option "Playlists > [currently seleted playlist]" Result: The playlist is not refreshed with the new track until navigated away from and back Uncommented: The playlist is refreshed (and reorders itself to playlist-order)
Action: Rightclick a track in the playlist-browser, select the option "Playlists > [currently seleted playlist]" Result: The track is not visibly removed from the playlist until navigated away from and back
I have one proposed solution to deal with the weirdness of adding tracks to sorted playlists. https://github.com/quodlibet/quodlibet/issues/4099#issuecomment-1272393821
Steps to reproduce
Expected Output
Actual Output
Which version of Quod Libet?
git 7308c0d6fc1ccd4bf627ac07dde097fffa64c402