Closed Cazz0r closed 5 months ago
Thanks for raising this, this should definitely be possible, if you provided the API keys as part of the command, and had other configuration defined in config.yaml
, then does it still pull the rest of the config from config.yaml
?
I've also added CONFIGURATION.md documentation, could you please check against the documentation and make sure that you're not missing any steps?
@nylonee You set me on the right path, I found the issue was within my configuration file - not correctly formatted.
Turns out I hadn't correctly escaped the rootFolder configuration options, when they weren't correctly escaped the error thrown was "Unable to find sonarr API key" - this was leading me astray as I thought simply the config file wasn't being read at all.
After fixing the escaping, everything worked as we thought it would - that is; simply "java -Xmx100m -jar watchlistarr.jar" was possible.
Ah interesting! Could you share some more details? Perhaps it's something that Watchlistarr can add some safety in for
I'd be interested in what your rootFolder looked like before and after the change
Absolutely!
I had the following:
sonarr rootFolder config was set as "H:\TV Shows\"
radarr rootFolder config was set as "H:\Movies\"
With that setup, I wasn't able to simply run "java -Xmx100m -jar watchlistarr.jar", as it was throwing "Unable to find sonarr API key" error, which I took to mean it wasn't reading the config file, however, your new CONFIGURATION.md documentation pointed me at a syntax checker, and after copying and pasting my config.yaml into yamllint, it showed "invalid escape sequence" on the sonarr rootFolder line.
So, I adjusted the config to
sonarr rootFolder "H:\\TV Shows\\"
radarr rootFolder "H:\\Movies\\"
Then, running "java -Xmx100m -jar watchlistarr.jar" resulted in error "Unable to find root folder H:\TV Shows. Possible values are List(H:\TV Shows)". Which I deduced simply meant I didn't need the backslash at the end of the config parameters. So potential suggestion here would be to strip any trailing backslashes, but the error thrown from a misconfiguration here is quite alright.
Final update to config was
sonarr rootFolder "H:\\TV Shows"
radarr rootFolder "H:\\Movies"
And there were no further errors and I'm able to run "java -Xmx100m -jar watchlistarr.jar", even better, I now have sonarr/radarr tags being added correctly as the config file is being read properly - so ultimately, I feel it was always being read, it just had a syntax error, and then not being utilized.
Great, that's good to know, thanks for the information! I'll close this issue now :)
Running on Windows, using Plex, Sonarr & Radarr at default ports.
After executing:
java -Dsonarr.apikey=REDACTED -Dradarr.apikey=REDACTED -Dplex.token=REDACTED -Xmx100m -jar watchlistarr.jar
The config.yaml is created, after uncommenting and modifying the vast majority of options I would have expected to be able to simply execute:
java -Xmx100m -jar watchlistarr.jar
and have it use the config parameters, however, output shows:Even with executing the original command (with api keys and token as parameters), it does not seem to utilize the tags for either radarr or sonarr.
Edit: formatting