Skip to content

Commit

Permalink
[5] fix trace
Browse files Browse the repository at this point in the history
  • Loading branch information
meisnate12 committed Feb 22, 2023
1 parent 8ea14dc commit 60f711c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.7-develop4
0.9.7-develop5
9 changes: 4 additions & 5 deletions pmm_overlay_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
config_dir = os.path.join(base_dir, "config")

pmmargs = PMMArgs("meisnate12/PMM-Overlay-Reset", base_dir, options, use_nightly=False)
logger = logging.PMMLogger(script_name, "overlay_reset", os.path.join(config_dir, "logs"), discord_url=pmmargs["discord"], log_requests=pmmargs["trace"])
logger = logging.PMMLogger(script_name, "overlay_reset", os.path.join(config_dir, "logs"), discord_url=pmmargs["discord"], trace=pmmargs["trace"], log_requests=pmmargs["trace"])
logger.secret([pmmargs["url"], pmmargs["discord"], pmmargs["tmdbapi"], pmmargs["token"], quote(str(pmmargs["url"])), requests.utils.urlparse(pmmargs["url"]).netloc])
requests.Session.send = util.update_send(requests.Session.send, pmmargs["timeout"])
plexapi.BASE_HEADERS["X-Plex-Client-Identifier"] = pmmargs.uuid
Expand Down Expand Up @@ -168,13 +168,12 @@ def reset_from_plex(item_title, item_with_posters):
if plex_poster.key.startswith("/"):
temp_url = f"{pmmargs['url']}{plex_poster.key}&X-Plex-Token={pmmargs['token']}"
if plex_poster.ratingKey.startswith("upload"):
if detect_overlay_in_image(item_title, f"Plex Poster {p}", url_path=temp_url):
continue
else:
if not detect_overlay_in_image(item_title, f"Plex Poster {p}", url_path=temp_url):
plex_image_url = temp_url
else:
plex_image_url = plex_poster.key
break
if plex_image_url:
break
if plex_image_url:
return "Plex", plex_image_url
else:
Expand Down

0 comments on commit 60f711c

Please sign in to comment.