mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
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.
This commit is contained in:
parent
eadcc46395
commit
d98d64f28a
1 changed files with 1 additions and 2 deletions
|
@ -291,8 +291,7 @@ class Music(KodiDb):
|
|||
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)
|
||||
|
|
Loading…
Reference in a new issue