feat(dz): add playlist download, existence check, and improved queue handling

Add ability to download entire playlists as M3U8 files, with UI
integration and per-track download actions. Implement track existence
checking to avoid duplicate downloads, respecting the overwrite setting.
Improve queue manager to sync downloaded tracks to the library
incrementally. Refactor playlist parsing and metadata reading to use the
Rust backend for better performance and accuracy. Update UI to reflect
track existence and download status in playlist views.

BREAKING CHANGE: Deezer playlist and track download logic now relies on
Rust backend for metadata and new existence checking; some APIs and
internal behaviors have changed.
This commit is contained in:
2025-10-02 19:26:12 -04:00
parent 40e72126aa
commit e1e7817c71
17 changed files with 1341 additions and 332 deletions

View File

@@ -1,6 +1,7 @@
use tauri_plugin_sql::{Migration, MigrationKind};
mod tagger;
mod metadata;
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
#[tauri::command]
@@ -19,6 +20,12 @@ fn tag_audio_file(
tagger::tag_audio_file(&path, &metadata, cover_data.as_deref(), embed_lyrics)
}
/// Read metadata from an audio file (MP3 or FLAC)
#[tauri::command]
fn read_audio_metadata(path: String) -> Result<metadata::AudioMetadata, String> {
metadata::read_audio_metadata(&path)
}
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
let library_migrations = vec![Migration {
@@ -136,7 +143,7 @@ pub fn run() {
.plugin(tauri_plugin_store::Builder::new().build())
.plugin(tauri_plugin_dialog::init())
.plugin(tauri_plugin_fs::init())
.invoke_handler(tauri::generate_handler![greet, tag_audio_file])
.invoke_handler(tauri::generate_handler![greet, tag_audio_file, read_audio_metadata])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}