Fix optional Jellyfin RunTimeTicks (#108254)

pull/113250/head
Jan Stienstra 2024-03-11 19:09:18 +01:00 committed by Franck Nijhof
parent efe9938b33
commit 649dd433d5
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
1 changed files with 3 additions and 1 deletions

View File

@ -149,7 +149,9 @@ class JellyfinMediaPlayer(JellyfinEntity, MediaPlayerEntity):
media_content_type = CONTENT_TYPE_MAP.get(self.now_playing["Type"], None)
media_content_id = self.now_playing["Id"]
media_title = self.now_playing["Name"]
media_duration = int(self.now_playing["RunTimeTicks"] / 10000000)
if "RunTimeTicks" in self.now_playing:
media_duration = int(self.now_playing["RunTimeTicks"] / 10000000)
if media_content_type == MediaType.EPISODE:
media_content_type = MediaType.TVSHOW