mjvotaw / plex-sub-downloader

An attempt to build a simple command-line tool for automating the adding of subtitles to Plex content.
MIT License
13 stars 3 forks source link

[Issue] Webhook URL is added as 'http://192.168.x.xNone/webhook' to Plex #13

Open SirJohnDoe opened 10 months ago

SirJohnDoe commented 10 months ago

Thanks for thie script! Manually it seems to work, but I have an issue with the webhook option:

When I try to start the webhook, it gets added with the following log:

PS C:\WINDOWS\system32> plex_sub_downloader --d --config "C:\Program Files\Plex Sub Downloader\config.json" start-webhook 2023-12-18 17:58:02:plex_sub_downloader:DEBUG - cmdline arguments: 2023-12-18 17:58:02:plex_sub_downloader:DEBUG - Namespace(config='C:\Program Files\Plex Sub Downloader\config.json', debug=True, command='start-webhook') 2023-12-18 17:58:02:PlexSubDownloader:INFO - Configuring PlexSubDownloader 2023-12-18 17:58:02:subliminalHelper:DEBUG - Setting up Subliminal with configs: 2023-12-18 17:58:02:subliminalHelper:DEBUG - providers: 2023-12-18 17:58:02:subliminalHelper:DEBUG - ['opensubtitles'] 2023-12-18 17:58:02:plex_sub_downloader:INFO - plex-sub-downloader starting up 2023-12-18 17:58:02:plexHelper:INFO - Checking if webhook url http://192.168.x.xNone/webhook has been added to Plex... 2023-12-18 17:58:03:plexHelper:INFO - webhook url http://192.168.x.xNone/webhook has been added to Plex

As you can see it doesn't do anything with the port, and just adds 'None' instead. When I play a file I don't see any logging, unlike the explanation here.

My config looks like this:

image

Changing the port or removing it altogether (as it is optional) doesn't change anything.

mjvotaw commented 10 months ago

Thanks for pointing this out! I actually had a pull request about a month ago that should fix this. I'll check and make sure I actually released a build that includes it. But, setting the webhook_port value should also get around the issue for now, so I'm surprised that it's not working for you. I'll admit that I've done zero testing on Windows, so I'm not sure if there might be a compatibility issue there or something.

I'm assuming that after you make changes to config.json, you're restarting the application?

Varming73 commented 10 months ago

I have the same problem on Ubuntu with this config: { "plex_base_url": "http://192.168.1.x:32400", "plex_auth_token": "password", "format_priority": [ "srt","smi" ], "set_next_episode_subtitles": true, "subtitle_providers": [ "opensubtitlesvip" ], "subtitle_provider_configs": { "opensubtitlesvip": { "username": "xyz", "password": "password" } }, "subtitle_destination": "metadata", "languages": [ "eng","dan" ], "webhook_host": "0.0.0.0", "webhook_port": 5000 }

mjvotaw commented 10 months ago

I've just released version 0.3.1, which should actually for real fix this issue. I don't know how I haven't managed to properly fix this earlier, but it was a mix up between the documented config names and the names actually being used in the code. So now everything uses webhook_host and webhook_port, and the default port of 5000 is actually used.

Please update through pip and let me know if it works!

Varming73 commented 10 months ago

Confirmed working