mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-10 06:54:21 +00:00
fix for cached episode IDs
This commit is contained in:
parent
0de6e2fe7b
commit
aa5fbf7fd1
1 changed files with 6 additions and 3 deletions
|
@ -202,10 +202,13 @@ class Cache:
|
|||
if row and row[to_id]:
|
||||
datetime_object = datetime.strptime(row["expiration_date"], "%Y-%m-%d")
|
||||
time_between_insertion = datetime.now() - datetime_object
|
||||
try:
|
||||
id_to_return = int(row[to_id])
|
||||
except ValueError:
|
||||
if "_" in row[to_id]:
|
||||
id_to_return = row[to_id]
|
||||
else:
|
||||
try:
|
||||
id_to_return = int(row[to_id])
|
||||
except ValueError:
|
||||
id_to_return = row[to_id]
|
||||
expired = time_between_insertion.days > self.expiration
|
||||
out_type = row["media_type"] if return_type else None
|
||||
if return_type:
|
||||
|
|
Loading…
Reference in a new issue