Skip to content

Commit ff50a73

Browse files
committed
Playlist Loader: Drop more bad playlist entries
Do this on startup, with more stringent checks, because apparently some people have bad playlist data still? Really weird. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
1 parent 34a742a commit ff50a73

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Application/AppController.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,9 @@ - (void)applicationWillTerminate:(NSNotification *)aNotification {
514514

515515
NSManagedObjectContext *moc = playlistController.persistentContainer.viewContext;
516516

517+
// How the heck are people getting this in their playlists
517518
for(PlaylistEntry *pe in playlistController.arrangedObjects) {
518-
if(pe.deLeted) {
519+
if(pe.deLeted || !pe.urlString || [pe.urlString isEqualToString:@""] || !pe.url) {
519520
[moc deleteObject:pe];
520521
continue;
521522
}

0 commit comments

Comments
 (0)