mirror of
https://github.com/litruv/AudioSort.git
synced 2026-07-26 11:46:03 +10:00
fix file by id in the parent field
This commit is contained in:
@@ -214,6 +214,20 @@ export class LibraryService {
|
||||
return this.database.listFiles();
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to resolve a file summary by id. Returns null when the record no longer exists.
|
||||
*/
|
||||
public getFileById(fileId: number): AudioFileSummary | null {
|
||||
try {
|
||||
return this.database.getFileById(fileId);
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
console.warn(`Failed to resolve file by id ${fileId}:`, error.message);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns groups of files that have identical checksums (potential duplicates).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user