From 3b8b948a1eede8d0146b9569f0c1e920fcbfa149 Mon Sep 17 00:00:00 2001 From: Chris Moeller Date: Fri, 18 Oct 2013 00:43:55 -0700 Subject: [PATCH] Playlists are now saved as they have been rearranged in the UI --- Playlist/PlaylistLoader.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Playlist/PlaylistLoader.m b/Playlist/PlaylistLoader.m index bffdb2b85..8e0bf879b 100755 --- a/Playlist/PlaylistLoader.m +++ b/Playlist/PlaylistLoader.m @@ -122,7 +122,7 @@ } [fileHandle truncateFileAtOffset:0]; - for (PlaylistEntry *pe in [playlistController content]) + for (PlaylistEntry *pe in [playlistController arrangedObjects]) { NSString *path = [self relativePathFrom:filename toURL:[pe URL]]; [fileHandle writeData:[[path stringByAppendingString:@"\n"] dataUsingEncoding:NSUTF8StringEncoding]]; @@ -144,7 +144,7 @@ [fileHandle writeData:[[NSString stringWithFormat:@"[playlist]\nnumberOfEntries=%lu\n\n",(unsigned long)[[playlistController content] count]] dataUsingEncoding:NSUTF8StringEncoding]]; int i = 1; - for (PlaylistEntry *pe in [playlistController content]) + for (PlaylistEntry *pe in [playlistController arrangedObjects]) { NSString *path = [self relativePathFrom:filename toURL:[pe URL]]; NSString *entry = [NSString stringWithFormat:@"File%i=%@\n",i,path]; @@ -207,7 +207,7 @@ NSMutableDictionary * dictionaryWithPropertiesOfObject(id obj, NSArray * filterL NSMutableArray * topLevel = [[NSMutableArray alloc] init]; - for (PlaylistEntry *pe in [playlistController content]) + for (PlaylistEntry *pe in [playlistController arrangedObjects]) { BOOL error = [pe error];