mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-18 06:07:48 +00:00
fix: bugs
This commit is contained in:
parent
fc08992244
commit
2f0e8e1e24
4 changed files with 35 additions and 20 deletions
|
|
@ -7,7 +7,7 @@ const db = new Dexie("yesplaymusic");
|
|||
|
||||
db.version(2)
|
||||
.stores({
|
||||
trackSources: "&id, createTime",
|
||||
trackSources: "&id",
|
||||
})
|
||||
.upgrade((tx) =>
|
||||
tx
|
||||
|
|
@ -29,8 +29,9 @@ async function deleteExcessCache() {
|
|||
if (
|
||||
store.state.settings.cacheLimit === false ||
|
||||
tracksCacheBytes < store.state.settings.cacheLimit * Math.pow(1024, 2)
|
||||
)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const delCache = await db.trackSources.orderBy("createTime").first();
|
||||
await db.trackSources.delete(delCache.id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue