Minor artwork caching changes

Art ID should be set on new files when they are stored into the
database, and the album art property should be affected by assigning to
the artId property, since it affects the caching identifier.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
CQTexperiment
Christopher Snowhill 2022-02-10 22:45:26 -08:00
parent 740fdfa883
commit bf88c57454
2 changed files with 3 additions and 1 deletions

View File

@ -120,7 +120,7 @@
}
+ (NSSet *)keyPathsForValuesAffectingAlbumArt {
return [NSSet setWithObject:@"albumArtInternal"];
return [NSSet setWithObjects:@"albumArtInternal", @"artId", nil];
}
+ (NSSet *)keyPathsForValuesAffectingGainCorrection {

View File

@ -1037,6 +1037,7 @@ static SQLiteStore *g_sharedStore = NULL;
if(albumArt)
artId = [self addArt:albumArt];
[track setArtId:artId];
st = stmt[stmt_add_track];
@ -1232,6 +1233,7 @@ static SQLiteStore *g_sharedStore = NULL;
if(albumArt)
artId = [self addArt:albumArt];
[track setArtId:artId];
st = stmt[stmt_update_track];