chazlarson / Media-Scripts

MIT License
114 stars 24 forks source link

Update .env.example #54

Closed dezerving closed 3 weeks ago

dezerving commented 1 month ago

Fixed PLEXAPI_SKIP_VERIFYSSL to be expected value (0 or 1).

chazlarson commented 1 month ago

The code should accept pretty much any boolean-like value for these settings, since they all get run through:

def booler(thing):
    if type(thing) == str:
        thing = eval(thing)
    return bool(thing)
dezerving commented 3 weeks ago

Just wanted to leave as a comment too (spoke in Discord) that the error I was getting was this:

Plex Error: ("name 'false' is not defined",)
Traceback (most recent call last):
  File "/mnt/user/appdata/graballposters/Media-Scripts/Plex/grab-all-posters.py", line 318, in <module>
    plex = get_plex()
  File "/mnt/user/appdata/graballposters/Media-Scripts/Plex/helpers.py", line 62, in get_plex
    raise ex
  File "/mnt/user/appdata/graballposters/Media-Scripts/Plex/helpers.py", line 46, in get_plex
    if booler(os.getenv("PLEXAPI_SKIP_VERIFYSSL", 'false')):
  File "/mnt/user/appdata/graballposters/Media-Scripts/Plex/helpers.py", line 29, in booler
    thing = eval(thing)
  File "<string>", line 1, in <module>
NameError: name 'false' is not defined

Copied and pasted from Discord. Your fix at the time was to switch to 0 or 1 which worked for me.

chazlarson commented 3 weeks ago

Well, alrighty then.