Skip to content

Commit

Permalink
Fix codeql issues
Browse files Browse the repository at this point in the history
  • Loading branch information
luigi311 committed Apr 11, 2023
1 parent 4870ff9 commit fc80f50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/jellyfin.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ async def get_user_library_watched(
)

for movie in watched["Items"]:
if "MediaSources" in movie and movie["MediaSources"] is not {}:
if "MediaSources" in movie and movie["MediaSources"] != {}:
logger(
f"Jellyfin: Adding {movie['Name']} to {user_name} watched list",
3,
Expand All @@ -188,7 +188,7 @@ async def get_user_library_watched(

# Get all partially watched movies greater than 1 minute
for movie in in_progress["Items"]:
if "MediaSources" in movie and movie["MediaSources"] is not {}:
if "MediaSources" in movie and movie["MediaSources"] != {}:
if movie["UserData"]["PlaybackPositionTicks"] < 600000000:
continue

Expand Down

0 comments on commit fc80f50

Please sign in to comment.