quodlibet / quodlibet

Music player and music library manager for Linux, Windows, and macOS
https://quodlibet.readthedocs.io
GNU General Public License v2.0
1.43k stars 223 forks source link

Modifying selected playlist from secondary browser doesn't update playlist's songlist #4072

Open declension opened 2 years ago

declension commented 2 years ago

Steps to reproduce

Expected Output

Actual Output

Which version of Quod Libet?

git 7308c0d6fc1ccd4bf627ac07dde097fffa64c402

declension commented 2 years ago

This and #3957 are fighting each other now I think

Meriipu commented 1 year ago

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).

etc

That is not to say that playlists were without issues before the activate-line was added.

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