From caa1da7a4ab63607b8f064abb66815d8f5cb274e Mon Sep 17 00:00:00 2001 From: Kim Wittenburg <5wittenb@informatik.uni-hamburg.de> Date: Tue, 4 Sep 2018 15:37:27 +0200 Subject: [PATCH] Fix bug where tracks might have no duration --- beetsplug/itunes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beetsplug/itunes.py b/beetsplug/itunes.py index 3a0f402..b33859d 100644 --- a/beetsplug/itunes.py +++ b/beetsplug/itunes.py @@ -313,7 +313,7 @@ class iTunesPlugin(BeetsPlugin): track.track_id, artist = track.artist_name, artist_id = track.artist_id, - length = track.track_time / 1000, + length = track.track_time / 1000 if hasattr(track, 'track_time') else None, index = index, medium = track.disc_number, medium_index = track.track_number,