Cleaner comparison for resume variable

This commit is contained in:
Matt 2021-10-06 19:04:45 -04:00
parent 4b40c75c91
commit 942ed0c407

View file

@ -182,7 +182,7 @@ class Actions(object):
# Automatically resume if the item is in progress (casting from server) # Automatically resume if the item is in progress (casting from server)
resume = item['UserData'].get('PlaybackPositionTicks') resume = item['UserData'].get('PlaybackPositionTicks')
item["resumePlayback"] = True if resume else False item["resumePlayback"] = bool(resume)
play = playutils.PlayUtils(item, False, self.server_id, self.server, self.api_client) play = playutils.PlayUtils(item, False, self.server_id, self.server, self.api_client)
source = play.select_source(play.get_sources()) source = play.select_source(play.get_sources())