RatingPosterDB / rpdb-folders

Monitors Media Folders and Adds Images with Ratings (poster.jpg / background.jpg) from the RPDB API
GNU Lesser General Public License v2.1
23 stars 2 forks source link

[Feature Request] Command-line options (e.g. passing commands to running instance) #24

Closed ghost closed 3 years ago

ghost commented 3 years ago

[Feature Request] Command-line options (passing commands to running instance)

Is your feature request related to a problem? Please describe. Not sure if it's a problem, but it would be nice addition to have a few command-line options. Especially if they could be "passed" towards an already running instance of rpdb-folders, since (in my case) I'm running it 24/7 with a systemd service file. This would also make it possible to make some custom cronjobs for various setups 😄

Describe the solution you'd like It would be nice to have commands like: (these are just some ideas) --initiate-full-scan to trigger a full scan --initiate-tv-scan to trigger a scan of the TV media folders added to rpdb-folders --initiate-movie-scan to trigger a scan of the Movie media folders added to rpdb-folders --initiate-full-overwrite-scan to trigger a full overwrite scan of all added media folders --initiate-overwrite-tv-scan to trigger an overwrite scan of the TV media folders added to rpdb-folders --initiate-overwrite-movie-scan to trigger an overwrite scan of the Movie media folders added to rpdb-folders

Additional context I hope it's possible 👍

jaruba commented 3 years ago

It's possible, I'll add them. The only thing that could break passing remote commands like this is if the default port is in use. (as the secondary instance could not guess the new port that the server would be running on)

ghost commented 3 years ago

So as long the (first) running instance of rpdb-folders is using the default port, it should work?

jaruba commented 3 years ago

I see no reason why it would not.

ghost commented 3 years ago

Just wanted to confirm I understood it correctly 👍

jaruba commented 3 years ago

I could also allow setting a custom port as a hidden setting. It would work with both the default port or the custom port in this case. The only edge case here is if the port it tries to use is occupied, forcing the server to work on an unknown port.

jaruba commented 3 years ago

This was added to v0.1.5, see the new wiki page for command line args: https://github.com/RatingPosterDB/rpdb-folders/wiki/Command-Line-Arguments