Follow kodi track# convention

disc#*2**16 + track#
This commit is contained in:
angelblue05 2015-11-08 00:20:40 -06:00
parent 9f4584d83f
commit 6156557b7d

View file

@ -277,7 +277,9 @@ class WriteKodiMusicDB():
musicBrainzId = API().getProvider(MBitem, "musicBrainzTrackId") musicBrainzId = API().getProvider(MBitem, "musicBrainzTrackId")
genre = " / ".join(genres) genre = " / ".join(genres)
artists = " / ".join(MBitem.get('Artists')) artists = " / ".join(MBitem.get('Artists'))
track = MBitem.get('IndexNumber') tracknumber = MBitem.get('IndexNumber', 0)
disc = MBitem.get('ParentIndexNumber', 1)
track = disc*2**16 + tracknumber
year = MBitem.get('ProductionYear') year = MBitem.get('ProductionYear')
bio = API().getOverview(MBitem) bio = API().getOverview(MBitem)
duration = timeInfo.get('TotalTime') duration = timeInfo.get('TotalTime')