Skip to content

Commit

Permalink
resolves issue #53
Browse files Browse the repository at this point in the history
  • Loading branch information
gignsky committed Jan 21, 2023
1 parent 317f294 commit 1121bd3
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions logic/logical_functions/plex_logical.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@


def plex_show_tvdb_CHECKER(plex_show):
# TODO NOTE THIS PROBOBLY NEEDS TO BE REFINED INTO ITERATING THROUGH A LOOP SO THAT IF TVDB ID IS NOT IN ONE OF THOSE TWO PLACES IT CAN STILL BE FOUND THIS WILL PRODUCE A PLEX SHOW CANNOT BE FOUND ERROR
"""Prevents end of index issues with some user accounts containing large histories"""
try:
x = str(plex_show.guids[2].id).replace("tvdb://", "")
# print("Index -- No Error")
return x
except:
x = str(plex_show.guids[1].id).replace("tvdb://", "")
# print("End of Index -- Due to Error")
return x
if plex_show.guids != []:
try:
x = str(plex_show.guids[2].id).replace("tvdb://", "")
# print("Index -- No Error")
except:
x = str(plex_show.guids[1].id).replace("tvdb://", "")
# print("End of Index -- Due to Error")
else:
x = None

return x


def plex_shows_to_check(inprogress_shows):
Expand Down

0 comments on commit 1121bd3

Please sign in to comment.