chore(lyrics): rename first-party provider to Zarz-LRC

Update settings, About, provider descriptions, and lyric source credits. Preserve the stored provider ID and recognize both current and legacy credits as direct sources.
This commit is contained in:
zarzet committed 2026-10-19 11:18:45 +07:00
1 parent fbaf7fa4ee
commit 18fd556869
12 files changed
+29 -38

No files matched your search

+3 -3
View File
@@ -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": {
+2 -2
View File
@@ -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": {
+1 -1
View File
@@ -317,7 +317,7 @@ class SettingsNotifier extends Notifier<AppSettings> {
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) {
+2 -2
View File
@@ -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,
@@ -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,
);
@@ -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',
@@ -116,9 +116,9 @@ pub fn available_providers() -> Vec<AvailableProvider> {
),
(
"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",
@@ -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)",
] {
@@ -244,14 +244,9 @@ pub fn format_spotiflac_apple(
multi_person: bool,
word_timing: bool,
) -> Result<String, String> {
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
@@ -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 {
@@ -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]
@@ -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 {