From 4dfa76b49e13aebedb1beee33b90482b23729ddd Mon Sep 17 00:00:00 2001 From: zarzet Date: Wed, 1 Apr 2026 21:04:42 +0700 Subject: [PATCH] fix: remove deleted local library item from provider state after file deletion When deleting a non-CUE local library track from the metadata screen, only the file was removed but the library database entry and provider state were left untouched, causing the track to persist in the library UI. Now calls removeItem() on localLibraryProvider after deleteFile(). --- README.md | 13 +++++++++++++ go_backend/qobuz.go | 2 +- lib/screens/track_metadata_screen.dart | 5 +++++ site/index.html | 6 +++--- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 91bf53f..ac6c553 100644 --- a/README.md +++ b/README.md @@ -170,5 +170,18 @@ Interested in contributing? Check out the [Contributing Guide](CONTRIBUTING.md) | [dabmusic.xyz](https://dabmusic.xyz) | [AfkarXYZ](https://github.com/afkarxyz) | [LRCLib](https://lrclib.net) | [Paxsenix](https://lyrics.paxsenix.org) | [Cobalt](https://cobalt.tools) | | [qwkuns.me](https://qwkuns.me) | [SpotubeDL](https://spotubedl.com) | [Song.link](https://song.link) | [IDHS](https://github.com/sjdonado/idonthavespotify) | | +--- + +## Disclaimer + +This repository and its contents are provided strictly for educational and research purposes. The software is provided "as-is" without warranty of any kind, express or implied, as stated in the [MIT License](LICENSE). + +- No copyrighted content is hosted, stored, mirrored, or distributed by this repository. +- Users must ensure that their use of this software is properly authorized and complies with all applicable laws, regulations, and third-party terms of service. +- This software is provided free of charge by the maintainer. If you paid a third party for access to this software in its original form from this repository, you may have been misled or scammed. Any redistribution or commercial use by third parties must comply with the terms of the repository license. No affiliation, endorsement, or support by the maintainer is implied unless explicitly stated in writing. +- SpotiFLAC Mobile is an independent project. It is not affiliated with, endorsed by, or connected to any other project or version on other platforms that may share a similar name. The maintainer of this repository has no control over or responsibility for third-party projects. +- The author(s) disclaim all liability for any direct, indirect, incidental, or consequential damages arising from the use or misuse of this software. Users assume all risk associated with its use. +- If you are a copyright holder or authorized representative and believe this repository infringes upon your rights, please contact the maintainer with sufficient detail (including relevant URLs and proof of ownership). The matter will be promptly investigated and appropriate action will be taken, which may include removal of the referenced material. + > [!TIP] > **Star the repo** to get notified about all new releases directly from GitHub. diff --git a/go_backend/qobuz.go b/go_backend/qobuz.go index bd97d0e..b0f8c9a 100644 --- a/go_backend/qobuz.go +++ b/go_backend/qobuz.go @@ -53,7 +53,7 @@ const ( qobuzTrackOpenBaseURL = "https://open.qobuz.com/track/" qobuzTrackPlayBaseURL = "https://play.qobuz.com/track/" qobuzStoreBaseURL = "https://www.qobuz.com/us-en" - qobuzDownloadAPIURL = "https://api.zarz.moe/v1/qbz" + qobuzDownloadAPIURL = "https://dl.musicdl.me/qobuz/download" qobuzDabMusicAPIURL = "https://dabmusic.xyz/api/stream?trackId=" qobuzDeebAPIURL = "https://dab.yeet.su/api/stream?trackId=" qobuzAfkarAPIURL = "https://qbz.afkarxyz.qzz.io/api/track/" diff --git a/lib/screens/track_metadata_screen.dart b/lib/screens/track_metadata_screen.dart index b1d9b2e..056fe85 100644 --- a/lib/screens/track_metadata_screen.dart +++ b/lib/screens/track_metadata_screen.dart @@ -3851,6 +3851,11 @@ class _TrackMetadataScreenState extends ConsumerState { } catch (e) { debugPrint('Failed to delete file: $e'); } + if (_localLibraryItem != null) { + await ref + .read(localLibraryProvider.notifier) + .removeItem(_localLibraryItem!.id); + } } } else { try { diff --git a/site/index.html b/site/index.html index 47999b3..02a0566 100644 --- a/site/index.html +++ b/site/index.html @@ -4,12 +4,12 @@ SpotiFLAC Mobile - Lossless Music Downloader - + - + @@ -404,7 +404,7 @@

SpotiFLAC Mobile

-

Download music in true lossless FLAC from Tidal, Qobuz & Deezer — no account required.

+

Mobile music utility built with Flutter and Go. High-quality audio management for your personal library.