spl0k / supysonic

Supysonic is a Python implementation of the Subsonic server API.
https://supysonic.readthedocs.io
GNU Affero General Public License v3.0
263 stars 58 forks source link

More folder management options #262

Open ivan-avalos opened 8 months ago

ivan-avalos commented 8 months ago

The current folder management feature of Supysonic is very limited, only allowing basic insertion, deletion and scanning (foreground/background). Some ideas that come to my mind are:

  1. A new CLI command to change the path of a folder. This would be especially useful when migrating servers or moving the music folder to a different location. Currently, moving the music folder results in Supysonic wiping all the tracks and playlist contents, which leads me to number 2.
  2. A new option for scanning (either via CLI or config file) to enable or disable automatic track deletion. This would help prevent that feeling of panic and despair when logging-in to an empty library after relocating the music folder (number 1) or misplacing it by mistake. This has already caused me to lose playlists!
spl0k commented 8 months ago

Can your second point be solved by running the daemon or is it a use case I fail to understand?

ivan-avalos commented 8 months ago

The last time I logged-in to an empty library after scanning was when I scanned from an app, and it was because the NFS folder where I have my music had temporarily failed and appeared empty.

If I understand correctly, when scanning from the Subsonic API, the daemon is used to scan the library. Also, the scanning code is shared between the CLI and the daemon, so it shouldn't be any different, right?