diff --git a/beetsplug/metasync/itunes.py b/beetsplug/metasync/itunes.py index b2795f9a4..17139f549 100644 --- a/beetsplug/metasync/itunes.py +++ b/beetsplug/metasync/itunes.py @@ -94,7 +94,8 @@ class Itunes(MetaSource): # Make the iTunes library queryable using the path self.collection = {_norm_itunes_path(track['Location']): track - for track in raw_library['Tracks'].values()} + for track in raw_library['Tracks'].values() + if 'Location' in track} def sync_from_source(self, item): result = self.collection.get(util.bytestring_path(item.path).lower()) diff --git a/docs/changelog.rst b/docs/changelog.rst index 666a76641..eb423079e 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -28,6 +28,8 @@ Fixes: * :doc:`/plugins/thumbnails`: Fix a crash with Unicode paths. :bug:`1686` * :doc:`/plugins/embedart`: The ``remove_art_file`` option now works on import (as well as with the explicit command). :bug:`1662` :bug:`1675` +* :doc:`/plugins/metasync`: Fix a crash when syncing with recent versions of + iTunes. :bug:`1700` 1.3.15 (October 17, 2015)