Overview of LRCGET
main.lrc files, saving them in the same directory as the original music files. It serves as the official client for the LRCLIB service.repository·main·Indexed 24 days ago
https://github.com/tranxuanthang/lrcgetA desktop utility and official client for the LRCLIB service designed for mass-downloading synchronized LRC lyrics to local music libraries. Built with Tauri v2, Rust, and SQLite, it scans music directories to retrieve and save .lrc files. The project includes a YAML-based lyrics specification supporting word-level synchronization for karaoke effects and a Fake Music Generator tool for testing.
.lrc files, saving them in the same directory as the original music files. It serves as the official client for the LRCLIB service.The frontend uses a composable-based state management pattern instead of a dedicated store library (like Pinia or Vuex). State is managed via module-level ref singletons in the composables/ directory.
Key composables include:
useGlobalState(): Manages isHotkey, themeMode, and lrclibInstance.usePlayer(): Manages playingTrack, status, duration, progress, and volume. It listens to player-state events from the backend.useDownloader(): Manages the download queue and progress.useSearchLibrary(): Provides shared search text and filters for Tracks, Albums, and Artists.useEditLyricsV2(): Manages the state for the lyrics editing modal.LRCGET is built using the Tauri v2 (Rust) framework with a SQLite backend. It utilizes Kira for audio playback and integrates with the LRCLIB API for lyric retrieval.
AppState containing Mutex<Connection> (for database access) and Mutex<Player> (for audio control).ServiceAccess trait on AppHandle to facilitate read/write operations.app.emit() and organizes all FFI (Foreign Function Interface) commands in main.rs by domain.If you are updating a frontend integration, follow these migration steps to move from the deprecated fs_track logic to the new scanner implementation:
initialize_library and refresh_library with scan_library_incremental.initialize-progress.scan-progress and scan-complete.filesScanned/filesCount, use the message field from the scan-progress event (e.g., {{ scanProgress.message }}) and calculate percentage using scanProgress.progress.ChooseDirectory.vue), a scan is explicitly triggered if no tracks currently exist in the library.Keyboard shortcuts are managed via a central registry in composables/edit-lyrics-v2/shortcutRegistry.js.
Key Features:
Ctrl+/ or the header keyboard icon.KeyboardShortcutsModal.vue to remap keys. The system detects duplicate assignments and provides warnings.localStorage.setShortcutOverrideresetShortcutOverrideresetAllShortcutOverridesDownload the appropriate .dmg file based on your hardware:
To install the Fake Music Generator, navigate to the tools directory and install the required Python dependencies using pip.
Optional dependencies for enhanced functionality:
faker: Provides more realistic artist and album names.mutagen: Enables proper ID3 metadata tags.pydub: Provides better MP3 generation capabilities.cd tools
pip install -r requirements.txtWhen scanning music directories, you can choose between two detection modes to balance speed and accuracy:
xxhash3 on the first 64KB of the file. This is 100% accurate for detecting moved files.mtime (modification time) and file_size. This is faster but may result in duplicate entries if metadata changes without the file moving.Scan Results: The scanning process returns a ScanResult object containing total_files, added, modified, deleted, moved, unchanged, is_initial_scan, and duration_ms.
When creating LRCGET files, adhere to these rules:
word.text, include trailing spaces except for the last word of the line.metadata.instrumental is true, both lines and plain should be empty or omitted.|) for the plain field to preserve newlines and spacing exactly as written.The project uses Vitest for testing. Tests are located next to the source files they exercise.
npm test: Run tests once.npm run test:watch: Run tests in watch mode.npm test
npm run test:watch