Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Exporting a playlist removes history entries #13000

Closed
montoner0 opened this issue Mar 25, 2024 · 5 comments
Closed

Exporting a playlist removes history entries #13000

montoner0 opened this issue Mar 25, 2024 · 5 comments

Comments

@montoner0
Copy link

montoner0 commented Mar 25, 2024

Bug Description

Trying to export a playlist from the history pane when tracks in the library are marked as deleted (field mixxx_deleted in the library table equals to 1) will wipe their entries from the history.
Pretty unpleasant issue since this happens silently and you can easily lose a lot of important entries.

Version

2.4.0

OS

WIndows 10

@montoner0 montoner0 added the bug label Mar 25, 2024
@ronso0
Copy link
Member

ronso0 commented Mar 26, 2024

Exporting a playlist does not change it, please provide exact steps how to reproduce the issue you experienced.

This is what I have just tried:

  • played 3 songs that where not in the music directories watched by Mixxx
  • (now those tracks are registered in the library, regardless if their parent directories are watched)
  • quit Mixxx, rename those track files, restart Mixxx
  • trigger a library rescan
  • export that previous history playlist
  • = History playlist unchanged
  • = exported (.m3u) contained all 3 tracks

@montoner0 montoner0 changed the title Exporting a playlist when files aren't available removes history entries Exporting a playlist removes history entries Mar 26, 2024
@montoner0
Copy link
Author

@ronso0
You're right, location isn't a culprit. I've investigated a bit and found that mixxx_deleted field in the library table is the real reason. When a track has 1 in this field, it will disappear from the history after exporting a playlist. I've changed the issue description.

@ronso0
Copy link
Member

ronso0 commented Mar 26, 2024

mixxx_deleted stands for hidden tracks. These tracks will be hidden from regular playlists, and Mixxx warns about this when hiding a track.
The History feature however loads all playlists with keepDeletedTracks (should be keepHiddenTracks).

Long story short: I can still not reproduce the issue. The exported playlist and the Mixxx playlist both contain all tracks after export.

@montoner0
Copy link
Author

Well, I don't know why you can't reproduce the bug. I've tried this multiple times and every time I export a playlist with such tracks - they disappear from the history. Here a database with a single track and a single playlist that reproduces for me every time, and a screencast in case I wasn't clear enough.
mixxxdb.sqlite.zip
2024-03-27 21_46_08_mixxx_Mixxx

@ronso0
Copy link
Member

ronso0 commented Mar 28, 2024

Okay, I can reproduce it now (no clue why it succeeded earlier, maybe a duplicate test track?)

The issue is that BasePlaylistFeature::slotExportPlaylist creates a temp PlaylistTableModel which does not set the keepHiddenTracks flag and thereby removes all hidden tracks from the selected playlist, regardless if the playlist feature has set it (History does).

Fixed by #13016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants