blacktwin / JBOPS

Just a Bunch Of Plex Scripts
1.71k stars 304 forks source link

URL formatting issue #271

Closed vegasit closed 3 years ago

vegasit commented 3 years ago

There is a problem with the URL formatting in the 'purge_removed_plex_friends'

If there is a trailing '/' then the script fails when running

image

I have fixed it and tried to update the code in branch but it will not let me. So here it is.

Original Line 38:

formatted_url = f'{TAUTULLI_URL}/api/v2'

chnaged to:

formatted_url = TAUTULLI_URL.rstrip('/') + '/api/v2'

Now it will execute with or without the trailing '/'

blacktwin commented 3 years ago

Are you using a config file to store your credentials and URLs or are you adding this information to the script?

You have to create a PR for making any changes. Please follow the PR template when submitting.

vegasit commented 3 years ago

I am using the script for the config no seprate config file. I will look at the PR template, I tried to push one and it would not allow me to. I will attempt again

blacktwin commented 3 years ago

Or just remove the trailing /.