mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-07-25 21:40:57 +02:00
feat: add local library scanning with duplicate detection
- Add Go backend library scanner for FLAC, M4A, MP3, Opus, OGG files - Read metadata from file tags (ISRC, track name, artist, album, bit depth, sample rate) - Fallback to filename parsing when tags unavailable - Add SQLite database for O(1) duplicate lookups - Show 'In Library' badge on search results for existing tracks - Match by ISRC (exact) or track name + artist (fuzzy) - Add Library Settings page with scan, cleanup, and clear actions - Add 30+ localization strings for library feature
This commit is contained in:
@@ -892,6 +892,33 @@ class MainActivity: FlutterActivity() {
|
||||
}
|
||||
result.success(response)
|
||||
}
|
||||
// Local Library Scanning
|
||||
"scanLibraryFolder" -> {
|
||||
val folderPath = call.argument<String>("folder_path") ?: ""
|
||||
val response = withContext(Dispatchers.IO) {
|
||||
Gobackend.scanLibraryFolderJSON(folderPath)
|
||||
}
|
||||
result.success(response)
|
||||
}
|
||||
"getLibraryScanProgress" -> {
|
||||
val response = withContext(Dispatchers.IO) {
|
||||
Gobackend.getLibraryScanProgressJSON()
|
||||
}
|
||||
result.success(response)
|
||||
}
|
||||
"cancelLibraryScan" -> {
|
||||
withContext(Dispatchers.IO) {
|
||||
Gobackend.cancelLibraryScanJSON()
|
||||
}
|
||||
result.success(null)
|
||||
}
|
||||
"readAudioMetadata" -> {
|
||||
val filePath = call.argument<String>("file_path") ?: ""
|
||||
val response = withContext(Dispatchers.IO) {
|
||||
Gobackend.readAudioMetadataJSON(filePath)
|
||||
}
|
||||
result.success(response)
|
||||
}
|
||||
else -> result.notImplemented()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
|
||||
Reference in New Issue
Block a user