diff --git a/lib/l10n/arb/app_en.arb b/lib/l10n/arb/app_en.arb index 79cecf95..f7322dee 100644 --- a/lib/l10n/arb/app_en.arb +++ b/lib/l10n/arb/app_en.arb @@ -749,7 +749,7 @@ }, "aboutLyricsWebsite": "Lyrics website", "@aboutLyricsWebsite": { - "description": "Link to the SpotiFLAC-Mobile Lyrics website for searching and saving word-timed lyrics" + "description": "Link to the Zarz-LRC website for searching and saving word-timed lyrics" }, "aboutServiceStatus": "Service status", "@aboutServiceStatus": { @@ -4259,9 +4259,9 @@ "@lyricsProviderLyricsPlusDesc": { "description": "Description for LyricsPlus provider" }, - "lyricsProviderSpotiflacLyricsDesc": "Word-by-word Apple Music lyrics from SpotiFLAC-Mobile", + "lyricsProviderSpotiflacLyricsDesc": "Word-by-word Apple Music lyrics from Zarz-LRC", "@lyricsProviderSpotiflacLyricsDesc": { - "description": "Description for the first-party SpotiFLAC-Mobile Lyrics provider" + "description": "Description for the first-party Zarz-LRC provider" }, "lyricsProviderLrcRedDesc": "Word-by-word Apple Music lyrics, matched by recording", "@lyricsProviderLrcRedDesc": { diff --git a/lib/l10n/arb/app_id.arb b/lib/l10n/arb/app_id.arb index ab302cf0..ee28fe7b 100644 --- a/lib/l10n/arb/app_id.arb +++ b/lib/l10n/arb/app_id.arb @@ -4265,9 +4265,9 @@ "@lyricsProviderLyricsPlusDesc": { "description": "Description for LyricsPlus provider" }, - "lyricsProviderSpotiflacLyricsDesc": "Lirik Apple Music per kata dari SpotiFLAC-Mobile", + "lyricsProviderSpotiflacLyricsDesc": "Lirik Apple Music per kata dari Zarz-LRC", "@lyricsProviderSpotiflacLyricsDesc": { - "description": "Description for the first-party SpotiFLAC-Mobile Lyrics provider" + "description": "Description for the first-party Zarz-LRC provider" }, "lyricsProviderLrcRedDesc": "Lirik Apple Music per kata, dicocokkan per rekaman", "@lyricsProviderLrcRedDesc": { diff --git a/lib/providers/settings_provider.dart b/lib/providers/settings_provider.dart index bba1c66d..0452c53f 100644 --- a/lib/providers/settings_provider.dart +++ b/lib/providers/settings_provider.dart @@ -317,7 +317,7 @@ class SettingsNotifier extends Notifier { libraryQualityLabelMode: AppSettings.libraryQualityLabelBitDepthOnly, ); } - // Migration 13: SpotiFLAC-Mobile Lyrics left Apple Music's Paxsenix + // Migration 13: Zarz-LRC left Apple Music's Paxsenix // fallback chain. Untouched defaults move to the new defaults; a custom // order keeps the former fallback right after Apple Music. if (lastMigration < 13) { diff --git a/lib/screens/settings/about_page.dart b/lib/screens/settings/about_page.dart index b4701a78..6ca4bcc1 100644 --- a/lib/screens/settings/about_page.dart +++ b/lib/screens/settings/about_page.dart @@ -150,8 +150,8 @@ class AboutPage extends StatelessWidget { ), _AboutSettingsItem( icon: Icons.lyrics_outlined, - title: 'SpotiFLAC-Mobile Lyrics', - subtitle: context.l10n.lyricsProviderAppleMusicDesc, + title: 'Zarz-LRC', + subtitle: context.l10n.lyricsProviderSpotiflacLyricsDesc, onTap: () => _launchUrl('https://api.zarz.moe/apple-music/docs'), showDivider: true, diff --git a/lib/screens/settings/lyrics_provider_priority_page.dart b/lib/screens/settings/lyrics_provider_priority_page.dart index 4e9c471f..e9771171 100644 --- a/lib/screens/settings/lyrics_provider_priority_page.dart +++ b/lib/screens/settings/lyrics_provider_priority_page.dart @@ -231,7 +231,7 @@ class _LyricsProviderPriorityPageState ); case 'spotiflac_lyrics': return _LyricsProviderInfo( - name: 'SpotiFLAC-Mobile Lyrics', + name: 'Zarz-LRC', description: context.l10n.lyricsProviderSpotiflacLyricsDesc, icon: Icons.verified_outlined, ); diff --git a/lib/screens/settings/lyrics_settings_page.dart b/lib/screens/settings/lyrics_settings_page.dart index ec4c5e6f..27cef7f5 100644 --- a/lib/screens/settings/lyrics_settings_page.dart +++ b/lib/screens/settings/lyrics_settings_page.dart @@ -198,7 +198,7 @@ class LyricsSettingsPage extends ConsumerWidget { 'netease': 'Netease', 'musixmatch': 'Musixmatch', 'apple_music': 'Apple Music', - 'spotiflac_lyrics': 'SpotiFLAC-Mobile Lyrics', + 'spotiflac_lyrics': 'Zarz-LRC', 'qqmusic': 'QQ Music', 'spotify': 'Spotify', 'deezer': 'Deezer', diff --git a/rust_backend/crates/core/src/lyrics/config.rs b/rust_backend/crates/core/src/lyrics/config.rs index a84be7cf..8120bce7 100644 --- a/rust_backend/crates/core/src/lyrics/config.rs +++ b/rust_backend/crates/core/src/lyrics/config.rs @@ -116,9 +116,9 @@ pub fn available_providers() -> Vec { ), ( "spotiflac_lyrics", - "SpotiFLAC-Mobile Lyrics", + "Zarz-LRC", false, - "Word-by-word Apple Music lyrics from SpotiFLAC-Mobile", + "Word-by-word Apple Music lyrics from Zarz-LRC", ), ( "qqmusic", diff --git a/rust_backend/crates/core/src/lyrics/lrc.rs b/rust_backend/crates/core/src/lyrics/lrc.rs index daa444e9..41488166 100644 --- a/rust_backend/crates/core/src/lyrics/lrc.rs +++ b/rust_backend/crates/core/src/lyrics/lrc.rs @@ -159,6 +159,8 @@ pub fn source_uses_proxy(source: &str) -> bool { !source.is_empty() && ![ "lrclib", + "zarz-lrc", + // Retain credits embedded before the provider was renamed. "spotiflac-mobile lyrics", "kugou direct", "qq music direct", @@ -257,6 +259,8 @@ mod tests { #[test] fn first_party_lyrics_do_not_credit_paxsenix() { for source in [ + "Zarz-LRC", + "Zarz-LRC (cached)", "SpotiFLAC-Mobile Lyrics", "SpotiFLAC-Mobile Lyrics (cached)", ] { diff --git a/rust_backend/crates/core/src/lyrics/payloads.rs b/rust_backend/crates/core/src/lyrics/payloads.rs index da81a13a..cd677a7a 100644 --- a/rust_backend/crates/core/src/lyrics/payloads.rs +++ b/rust_backend/crates/core/src/lyrics/payloads.rs @@ -244,14 +244,9 @@ pub fn format_spotiflac_apple( multi_person: bool, word_timing: bool, ) -> Result { - let payload: ApplePayload = json::decode(raw) - .map_err(|error| format!("invalid SpotiFLAC-Mobile Lyrics response: {error}"))?; - format_apple_payload( - &payload, - "SpotiFLAC-Mobile Lyrics", - multi_person, - word_timing, - ) + let payload: ApplePayload = + json::decode(raw).map_err(|error| format!("invalid Zarz-LRC response: {error}"))?; + format_apple_payload(&payload, "Zarz-LRC", multi_person, word_timing) } /// Shared by every source that exposes Apple's own line structure, either as diff --git a/rust_backend/crates/core/src/lyrics/payloads/tests.rs b/rust_backend/crates/core/src/lyrics/payloads/tests.rs index 4d1eff7a..0c40e79e 100644 --- a/rust_backend/crates/core/src/lyrics/payloads/tests.rs +++ b/rust_backend/crates/core/src/lyrics/payloads/tests.rs @@ -28,8 +28,7 @@ fn spotiflac_apple_preserves_syllables_and_separate_background_groups() { let text = format_spotiflac_apple(&raw, true, words).unwrap(); assert!(text.starts_with("[00:01.009]v1:")); assert_eq!(text.matches("[bg:").count(), 2); - let lyrics = - LyricsResponse::from_text(&text, "SpotiFLAC-Mobile Lyrics", "SpotiFLAC-Mobile Lyrics"); + let lyrics = LyricsResponse::from_text(&text, "Zarz-LRC", "Zarz-LRC"); assert_eq!(lyrics.lines().len(), 1); assert_eq!(lyrics.lines()[0].start_time_ms, 1009); if words { diff --git a/rust_backend/crates/providers/src/lyrics/builtin/apple.rs b/rust_backend/crates/providers/src/lyrics/builtin/apple.rs index afe4bc4a..0c2b8ea2 100644 --- a/rust_backend/crates/providers/src/lyrics/builtin/apple.rs +++ b/rust_backend/crates/providers/src/lyrics/builtin/apple.rs @@ -1,4 +1,4 @@ -//! Built-in Apple Music and SpotiFLAC lyrics providers. +//! Built-in Apple Music and Zarz-LRC providers. use super::*; use crate::lyrics::http; @@ -229,7 +229,7 @@ impl BuiltinLyricsClient { AppleLyricsSource::SpotiFlac => ( payloads::format_spotiflac_apple(raw, multi_person, word_timing) .map_err(LyricsError::Unavailable)?, - "SpotiFLAC-Mobile Lyrics", + "Zarz-LRC", ), }; let mut lyrics = from_text(&text, name, name)?; @@ -252,18 +252,14 @@ mod tests { #[test] fn spotiflac_lyrics_credit_never_names_the_proxy() { - let lyrics = LyricsResponse::from_text( - "[00:01.00]Example", - "SpotiFLAC-Mobile Lyrics", - "SpotiFLAC-Mobile Lyrics", - ); + let lyrics = LyricsResponse::from_text("[00:01.00]Example", "Zarz-LRC", "Zarz-LRC"); let saved = spotiflac_core::lyrics::lrc::with_metadata(&lyrics, "Track", "Artist"); - assert!(saved.contains("source: SpotiFLAC-Mobile Lyrics")); + assert!(saved.contains("source: Zarz-LRC")); assert!(!saved.contains("Paxsenix")); } #[test] - #[ignore = "requires live Apple catalog and SpotiFLAC-Mobile Lyrics access"] + #[ignore = "requires live Apple catalog and Zarz-LRC access"] fn live_spotiflac_lyrics_works_without_paxsenix() { let network = NetworkService::new().unwrap(); let client = BuiltinLyricsClient::with_endpoints( @@ -285,8 +281,8 @@ mod tests { let lyrics = client.spotiflac_lyrics(&request, &|| Ok(())).unwrap(); assert!(lyrics.has_usable_text()); assert!(lyrics.is_synced()); - assert_eq!(lyrics.provider, "SpotiFLAC-Mobile Lyrics"); - assert_eq!(lyrics.source, "SpotiFLAC-Mobile Lyrics"); + assert_eq!(lyrics.provider, "Zarz-LRC"); + assert_eq!(lyrics.source, "Zarz-LRC"); } #[test] diff --git a/rust_backend/crates/providers/src/lyrics/cache.rs b/rust_backend/crates/providers/src/lyrics/cache.rs index 09fc74b7..8674de34 100644 --- a/rust_backend/crates/providers/src/lyrics/cache.rs +++ b/rust_backend/crates/providers/src/lyrics/cache.rs @@ -337,11 +337,8 @@ mod tests { fn current_snapshot_restores_supplementary_text() { let file = tempfile::NamedTempFile::new().unwrap(); let now = UNIX_EPOCH + Duration::from_secs(100); - let mut lyrics = LyricsResponse::from_text( - "[00:01.009]Original", - "Apple Music", - "SpotiFLAC-Mobile Lyrics", - ); + let mut lyrics = + LyricsResponse::from_text("[00:01.009]Original", "Apple Music", "Zarz-LRC"); let line = &mut lyrics.lines.as_mut().unwrap()[0]; line.romanization = Some("Romanized".into()); line.romanization_words = Some(vec![spotiflac_core::lyrics::LyricsWord {