digitalec / deemon

Monitor specified artists for new releases
GNU General Public License v3.0
174 stars 15 forks source link

Added a custom save path control. #36

Closed TheoD02 closed 3 years ago

TheoD02 commented 3 years ago

Description : Allowing to save different artist/playlist/import to specific location.

Information about functionality: The added functionality allows to control the location where the artist, the playlist or the import of a list of artists will be saved.

When adding an artist to the monitoring, for example, to download it immediately, we will use the "-D or --download" parameter.

I have slightly modified the behavior of this one so that it takes a value in addition. This value will be the destination path of the downloads (for this artist, playlist or import).

This means now that each imported item can have its independence on its location.

In case the path in parameters is incorrect, no error is generated. But the default path configured in the configuration will be used.

This behavior could be handled via a new config parameter ? (e.g config parameter "if_custom_path_not_exist_use_default": "true|false") If this parameter is set to false then an exception is generated, because the user doesn't really want to be warned if the path would be invalid. And in the case of true it would behave as currently on the default path in case of problem.

TheoD02 commented 3 years ago

Review the configuration of the "--download" parameter if there was no path entered by the user then sent the default path.

digitalec commented 3 years ago

Looks pretty good overall. Two things I noticed that would have to be resolved before merging:

  1. This will only work on a new install since there is no upgrade script for the database to add the new column (see do_upgrade() in db.py). I'd recommend using version "1.3.1". I have to rework the database module at some point to get around the need for this.

  2. The other thing is fairly minor but in keeping with PEP8 standards, downloadPath should be download_path as well as all other uses of camel case (setDownloadPath should be set_download_path), etc.