Polochon-street / blissify-rs

bliss bindings for MPD.
30 stars 6 forks source link

how to reset config / -c location not working? #72

Open iconoclasthero opened 1 month ago

iconoclasthero commented 1 month ago

The config info and db has been deleted.

All it did was go around in circles telling me that i didn't have config files.

How do you reset this program so you can start from scratch now that I realize I don't want the config or db in ~?

iconoclasthero commented 1 month ago
iconoclasthero commented 1 month ago
$ blissify -c /library/music/.share/bliss-rs/config.json init . &>>/var/log/mpd/blissify.log; cat /var/log/mpd/blissify.log
Error: unable to open database file: /home/$USER/.local/share/bliss-rs/songs.db

Caused by:
    Error code 14: Unable to open the database file

I'm not surprised it's not finding it there since /home/$USER/.local/share/bliss-rs doesn't exist.

It seems like the -c option is not being observed.

toofar commented 1 month ago

Have a look at blissify init --help. Maybe blissify -c /config/path init -d /database/path will work for you?

"$XDG_CONFIG_HOME" should be used for config files

Yeah it uses XDG_DATA_HOME for both.

Polochon-street commented 1 month ago

Hi,

Thanks for reporting! The UX is indeed not the greatest here, but I'm not sure how to change it. As @toofar rightly said, blissify -c /path/to/config.json init /database/path.db should do the trick. I'll add it to README.md, but is there anything else that would make the whole init process easier to use?

Also this XDG_DATA_HOME bit should be XDG_CONFIG_HOME, I'll change it in an upcoming release :)

Polochon-street commented 1 month ago

Just a small update - the latest version of blissify (0.5.2) now uses XDG_CONFIG_HOME by default when you do cargo init. The users with an already existing database shouldn't be affected.

There should also be some quality of life improvements as to when you manually select a config file path (e.g. the associated database file automatically gets created in the same folder). I've also amended the documentation so things make more sense.

Tell me what you think!