mirror of
https://github.com/markuryy/shark.git
synced 2025-12-15 04:41:01 +00:00
feat(dz): add cache clearing and database reset functionality
Add ability to fully clear cached online library by deleting and recreating the database file. Integrate new Clear Cache option in settings UI, which restarts the app after clearing. Remove unused artist/album fields from cache and UI. Add process plugin for relaunch.
This commit is contained in:
@@ -120,7 +120,11 @@ export async function upsertArtist(artist: {
|
||||
[artist.path]
|
||||
);
|
||||
|
||||
return artists[0]?.id || result.lastInsertId;
|
||||
const artistId = artists[0]?.id ?? result.lastInsertId;
|
||||
if (artistId == null) {
|
||||
throw new Error('Failed to get artist ID from upsert operation');
|
||||
}
|
||||
return artistId;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user