SQLite store: Fix track update cache
parent
fbef034903
commit
61d096aef3
|
@ -1293,19 +1293,8 @@ static SQLiteStore *g_sharedStore = NULL;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now to replace the playlist entries
|
[databaseMirror replaceObjectAtIndex:[track index] withObject:track];
|
||||||
for (size_t i = 0; i < [databaseMirror count]; ++i)
|
|
||||||
{
|
|
||||||
PlaylistEntry *oldpe = [databaseMirror objectAtIndex:i];
|
|
||||||
if ([oldpe dbIndex] == trackId)
|
|
||||||
{
|
|
||||||
PlaylistEntry *newpe = [track mutableCopy];
|
|
||||||
[newpe setIndex:i];
|
|
||||||
[newpe setEntryId:[oldpe entryId]];
|
|
||||||
[databaseMirror replaceObjectAtIndex:i withObject:newpe];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue