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

Music library folder was reset to default #75

Open
cloo opened this issue Apr 17, 2022 · 13 comments
Open

Music library folder was reset to default #75

cloo opened this issue Apr 17, 2022 · 13 comments

Comments

@cloo
Copy link

cloo commented Apr 17, 2022

I'm not sure how to check when it happened, but my guess would be it was on last update (probably months ago).
Using 0.47.5~ynh2 on YunoHost 4.3.5

(Sorry for not using template - it should be clear enough though.. )

@cloo
Copy link
Author

cloo commented Apr 17, 2022

Also, after setting the library folder back, I found my playlists wiped. All playlists are listed in UI, but with no content.
When playlist downloaded via UI, the only line in .m3u file is
#EXTM3U

@ericgaspar
Copy link
Member

it is hard to tell without logs...

@zecamigo
Copy link

zecamigo commented Feb 6, 2023

@cloo

Were you using a custom location for your music library?

@ericgaspar
This just happened to me because when you upgrade the configuration file is reset.

Which means the music library location is reset to default and immediately after upgrade a scan is performed. This breaks all the favorites, playlists etc...

I couldn't find a way to stop navidrome from either resetting the configuration file or at least not start the service immediately so I can change the library location to my custom setting.

@ericgaspar
Copy link
Member

The configuration file has been regenerated to be synchronized with the new upstream settings. Some parameters have been added to the config_panel.

@zecamigo
Copy link

zecamigo commented Feb 6, 2023

The webadmin upgrades are awesome btw

So the workaround here would be to backup the database manually and the restore it after the upgrade?

@ericgaspar
Copy link
Member

ericgaspar commented Feb 6, 2023

There is a sum check done to the replaced config file to check if it as custom changes, if so, a copy is then made before the file gets regenerated (I can't recall where this copy is stored...)

@zecamigo
Copy link

zecamigo commented Feb 6, 2023

Yes the config file is saved, but before you have time to restore it, navidrome is already scanning the music library and breaking the favorites, playlists because it can't find the music files.

@zecamigo
Copy link

zecamigo commented Feb 7, 2023

So the workaround here would be to backup the database manually and the restore it after the upgrade?

@ericgaspar would this be a viable workaround?
The custom config is saved, it's the scan after the update that instantly resets any favorites, playlists etc based on the files on a custom location.

This is permanent, even after the custom library location setting is restored, the database remains broken. This is possibly an upstream problem?

@IsidoreIsou
Copy link

Anyone found any solution to that problem?

@zecamigo
Copy link

zecamigo commented Dec 4, 2023

@IsidoreIsou @ericgaspar
This is being discussed here:
navidrome/navidrome#2671

And an upstream improvement is being considered.

As this behavior in the YNH package breaks irreversibly the favorites playlist etc it would it be possible to also fix it also on this side?

For now I just restored from the backup and I'm waiting for a fix before I upgrade.

@IsidoreIsou
Copy link

thanks @zecamigo.

Something I'm not sure to understand:

Before the update, is there a location where Navidrome auto backup some config files like the "Recently Added" list? And can I restore this file after the update?

@zecamigo
Copy link

zecamigo commented Dec 5, 2023

Before the update, is there a location where Navidrome auto backup some config files like the "Recently Added" list?

I'm guessing the date each file is added should be on the database before update.

The only backups should be the automatic ones if you have them running, and the backup ynh does just before the update. I don't know how to extract the database from that backup.

But even then the database structure might change from one version to the other, so it's not advisable to restore a previous' version database into the upgraded version.

@zecamigo
Copy link

This issue seems to have been fixed in the upstream code in version 0.51.1
@cloo @IsidoreIsou

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

No branches or pull requests

4 participants