mirror of
https://github.com/Boof2015/astra-mobile.git
synced 2026-08-27 16:01:04 +02:00
11 lines
428 B
TypeScript
11 lines
428 B
TypeScript
import type { LibraryDatabase } from './database';
|
|
|
|
export const REBUILD_LOCAL_LIBRARY_INDEX_SQL =
|
|
"UPDATE tracks SET mtime = -1 WHERE source_type = 'local'";
|
|
|
|
/** Marks only device-local rows stale so the normal scanner re-extracts them. */
|
|
export async function markLocalTracksStaleForRebuild(db: LibraryDatabase): Promise<number> {
|
|
const result = await db.run(REBUILD_LOCAL_LIBRARY_INDEX_SQL);
|
|
return result.changes;
|
|
}
|