From: James Bunton Date: Sun, 12 Feb 2012 09:44:50 +0000 (+1100) Subject: Ignore non-files without warning X-Git-Url: https://code.delx.au/notipod/commitdiff_plain/514695a547551ae24dcfd9e511f0401acf93627d Ignore non-files without warning --- diff --git a/libnotipod.py b/libnotipod.py index bc0b1ee..fdf22ee 100644 --- a/libnotipod.py +++ b/libnotipod.py @@ -102,10 +102,13 @@ class ITunesLibrary(NSObject): tracks = [] for item in pl_playlist.get("Playlist Items", []): trackID = item["Track ID"] + item = pl_tracks[str(trackID)] self.track2playlist[trackID].add(pid) tracks.append(trackID) if trackID not in self.track2filename: - filename = str(pl_tracks[str(trackID)]["Location"]) + if item["Track Type"] != "File": + continue + filename = str(item["Location"]) filename = self.loc2name(filename) filename = filename.decode("utf-8") if not filename.startswith(self.folder):