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

Remove Hidden Tracks from System #11402

Closed
Swiftb0y opened this issue Mar 23, 2023 · 6 comments
Closed

Remove Hidden Tracks from System #11402

Swiftb0y opened this issue Mar 23, 2023 · 6 comments
Labels

Comments

@Swiftb0y
Copy link
Member

Feature Description

I often find myself importing songs into my Music library which I change my mind about later. I usually just use the context menu to hide the track. Now that I've built up a decent library of tracks I want to get rid of, it would be nice to do that all in one go. It would be nice if there was a delete or "move to trash" button next to the "Purge" and "Unhide" buttons in the "Hidden Tracks"-View (same entry should also be added to the context menu).
Details to discuss:

  • Should we delete the tracks permanently or just move them to the trash (Qt has an API for that as part of QFile)
  • What should happen to entries in the database? Should they be purged, their path updated to their new location in the trash or should the path stay as is? What if the user restores the tracks later again via the file manager?
@ronso0
Copy link
Member

ronso0 commented Mar 23, 2023

Great idea! That's why it was added to Mixxx 2.4, starting with #3212 ; )

You can invoke it from the track menu (library and decks) and with a feature button in Tracks > Missing Hidden
Tracks are purged and files removed.

@ronso0
Copy link
Member

ronso0 commented Mar 23, 2023

Sending files to the trash bin QFile::moveToTrash() would be preferred but it requires Qt 5.15, so that would not be available on all platforms (some are stuck with Qt 5.12.x). Nevertheless, it should be implemeted IMO

#10760

@ronso0
Copy link
Member

ronso0 commented Mar 23, 2023

So can we close this as Done or did I miss a detail that's not covered, yet?

@Swiftb0y
Copy link
Member Author

Sure, I'm sorry I didn't do my research beforehand. I was thinking that I would've remembered such a PR I we had already implemented it. My bad.

@ronso0
Copy link
Member

ronso0 commented Mar 24, 2023

Don't worry.

What should happen to entries in the database? Should they be purged, their path updated to their new location in the trash or should the path stay as is? What if the user restores the tracks later again via the file manager?

Moving files to the trash bin should only protect from accidental file removal (in case the user somehow missed that fact) but the dialog (Purge as well as Delete) is clear about the track info being removed from the database.

Keeping track data after deletion would require to add a 2nd level of 'deleted' (IIRC there is already fs_deleted for deleted tracks/dirs when the user decided to keep the data). Changing the paths to the new trash bin paths would allow to finally wipe releated metadata when the trash is emptied, which should be some sort of auto-rescan of just the deleted files (just checking for file presence, and just those tracks, not the entire library).
What do you think?

@Swiftb0y
Copy link
Member Author

Mhmm. lets not overcomplicate things. If we already have the code that can handle the "marked for deletion" state then sure, but if we don't we can leave it as is.

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

No branches or pull requests

2 participants