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

Sticker database is reset on music database update #1897

Open
tae-soo-kim opened this issue Nov 13, 2023 · 3 comments
Open

Sticker database is reset on music database update #1897

tae-soo-kim opened this issue Nov 13, 2023 · 3 comments
Labels

Comments

@tae-soo-kim
Copy link

Bug report

Describe the bug

  1. Start MPD
  2. Write to sticker database
  3. Stop MPD
  4. Change music_directory in mpd.conf
  5. Start MPD
  6. Database update
  7. Read from sticker database

Expected Behavior

Old sticker database data shall be kept available.

This behavior is expected for two use cases:

  1. Old and new music directories have files in common so sticker data can be shared.
  2. Switch between two music directories occasionally, without losing any sticker data.

Actual Behavior

Old sticker data is lost. Sticker database is empty after database update.

One may consider old sticker data not applicable to new music directory. But this is not always true. Accidentally losing all sticker data on a database update is a bug in my opinion.

Version

Music Player Daemon 0.23.14 (0.23.14)

@tae-soo-kim tae-soo-kim changed the title Sticker database is reset on database update Sticker database is reset on music database update Nov 13, 2023
@MaxKellermann
Copy link
Member

If you switch music directories, you must also switch sticker databases.
If a song file disappears, MPD will remove any stickers attached to it. If MPD wouldn't do that, your sticker database would grow forever, and then you'd complain that it still contain stickers for songs that you deleted 10 years ago, wouldn't you?
What is your exact suggestion, and how would you respond to users complaining about the behavior you suggest?

@MaxKellermann MaxKellermann added the bogus Bogus issue - not a bug, maybe based on wrong assumptions label Nov 14, 2023
@tae-soo-kim
Copy link
Author

What is your exact suggestion, and how would you respond to users complaining about the behavior you suggest?

Thanks for clarification. I didn't find anything about this issue in the doc. What happened to me was the whole sticker database suddenly gone without a notice and I lost all the data inside by switching the music directory. Next time when I switch the music directory again, I would switch the stickers too. But I think it's good for users to have a keep_sticker config option so that they can decide by themselves when to remove stickers. This option is currently false and they don't complain if they keep it false and everything remains the same. For some use cases, for example when the music directory has manageable total size but needs to be frequently switched, setting keep_sticker to true could be helpful.

@MaxKellermann
Copy link
Member

Yes, that sounds like a good feature! Let's change this to a feature request then.

@MaxKellermann MaxKellermann added feature and removed bogus Bogus issue - not a bug, maybe based on wrong assumptions labels Nov 15, 2023
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