This is great! Instead of your changes in get_server_section, I think you need to add a check for the CLI argument vs the environment variable before we initialize the plex instance. See line 120 of your PR. Do something like:
if args.library or PLEX_LIBRARY:
plex = Plex(args.library or PLEX_LIBRARY)
else:
plex = Plex()
This is great! Instead of your changes in
get_server_section
, I think you need to add a check for the CLI argument vs the environment variable before we initialize the plex instance. See line 120 of your PR. Do something like:(untested) but I think that would work.