Use season number instead of season name

Using season name is not reliable as it can vary between servers
and can be overridden by the user.

Signed-off-by: Luigi311 <git@luigi311.com>
This commit is contained in:
Luigi311
2023-12-10 10:41:59 -07:00
parent 03cad668aa
commit b8b627be1a
2 changed files with 12 additions and 11 deletions

View File

@@ -105,17 +105,17 @@ def get_user_library_watched_show(show):
for episode in show.episodes():
if episode in watched:
if episode.parentTitle not in episode_guids:
episode_guids[episode.parentTitle] = []
if episode.parentIndex not in episode_guids:
episode_guids[episode.parentIndex] = []
episode_guids[episode.parentTitle].append(
episode_guids[episode.parentIndex].append(
get_episode_guids(episode, show, completed=True)
)
elif episode.viewOffset > 0:
if episode.parentTitle not in episode_guids:
episode_guids[episode.parentTitle] = []
if episode.parentIndex not in episode_guids:
episode_guids[episode.parentIndex] = []
episode_guids[episode.parentTitle].append(
episode_guids[episode.parentIndex].append(
get_episode_guids(episode, show, completed=False)
)