From d98d64f28a2870bd20625f3d5ad04bc7280de94b Mon Sep 17 00:00:00 2001 From: Claudio Saavedra Date: Wed, 16 Aug 2023 12:24:45 +0300 Subject: [PATCH] music: Fix multidisc indexing Kodi uses internally a right-shift operation to codify in a single integer disc number and track number. This is taken into account in this addon but, incorrectly, it is done for discnumber > 1 only, while Kodi uses it for tracks in all discs. Fix this by directly codifying the track and disc number for all discs. This patch is based on investigation by user @neightwulf in github. --- jellyfin_kodi/objects/music.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jellyfin_kodi/objects/music.py b/jellyfin_kodi/objects/music.py index 2a95bfa74..1ecf68779 100644 --- a/jellyfin_kodi/objects/music.py +++ b/jellyfin_kodi/objects/music.py @@ -291,8 +291,7 @@ def song(self, item, e_item): if obj['DatePlayed']: obj['DatePlayed'] = Local(obj['DatePlayed']).split('.')[0].replace('T', " ") - if obj['Disc'] != 1: - obj['Index'] = obj['Disc'] * 2 ** 16 + obj['Index'] + obj['Index'] = obj['Disc'] * 2 ** 16 + obj['Index'] if update: self.song_update(obj)