From bdc9beb63da6d3f53471ac9635f4d5ffb2ca1475 Mon Sep 17 00:00:00 2001 From: Kim Wittenburg <5wittenb@informatik.uni-hamburg.de> Date: Fri, 7 Sep 2018 00:34:07 +0200 Subject: [PATCH] Fix Track Index Problem --- beetsplug/itunes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beetsplug/itunes.py b/beetsplug/itunes.py index 78623c1..8d1a297 100644 --- a/beetsplug/itunes.py +++ b/beetsplug/itunes.py @@ -311,7 +311,7 @@ class iTunesPlugin(BeetsPlugin): info.copyright = album.copyright if hasattr(album, 'copyright') else None return info - def make_track_info(self, track, index): + def make_track_info(self, track, index=None): track_name = track.track_censored_name if self.use_censored_names and hasattr(track, 'track_censored_name') else track.track_name collection_name = track.collection_censored_name if self.use_censored_names and hasattr(track, 'collection_censored_name') else track.collection_name info = TrackInfo(track_name, @@ -319,7 +319,7 @@ class iTunesPlugin(BeetsPlugin): artist = track.artist_name, artist_id = track.artist_id, length = track.track_time / 1000 if hasattr(track, 'track_time') else None, - index = index, + index = index if index else track.track_number, medium = track.disc_number, medium_index = track.track_number, medium_total = track.track_count,