From 514695a547551ae24dcfd9e511f0401acf93627d Mon Sep 17 00:00:00 2001 From: James Bunton Date: Sun, 12 Feb 2012 20:44:50 +1100 Subject: [PATCH] Ignore non-files without warning --- libnotipod.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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): -- 2.39.2