mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-10-11 02:08:44 +02:00
fix: sync lyric romanization and clear stale selection menus
Preserve romanization and translation metadata through Rust exports and cache, match rounded line times, and retain word endings. Highlight romanization with the main lyric clock in Material and Mornye. Clear selection overlay ownership safely when collection screens are disposed. Add parser, rendering, cache and overlay lifecycle regression coverage.
This commit is contained in:
1 parent
ebcd1fd877
commit
ba44bafa92
14 files changed
+1286
-67
No files matched your search
@@ -41,18 +41,41 @@ pub fn text_from_bytes(bytes: &[u8]) -> String {
|
||||
crate::text::utf8(bytes)
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct LyricsWord {
|
||||
pub text: String,
|
||||
pub start_time_ms: i64,
|
||||
pub end_time_ms: i64,
|
||||
}
|
||||
|
||||
json::go_deserialize!(LyricsWord {
|
||||
"text" => text,
|
||||
"starttimems" => start_time_ms,
|
||||
"endtimems" => end_time_ms,
|
||||
});
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct LyricsLine {
|
||||
pub start_time_ms: i64,
|
||||
pub words: String,
|
||||
pub end_time_ms: i64,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub romanization: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub romanization_words: Option<Vec<LyricsWord>>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub translation: Option<String>,
|
||||
}
|
||||
|
||||
json::go_deserialize!(LyricsLine {
|
||||
"starttimems" => start_time_ms,
|
||||
"words" => words,
|
||||
"endtimems" => end_time_ms,
|
||||
"romanization" => romanization,
|
||||
"romanizationwords" => romanization_words,
|
||||
"translation" => translation,
|
||||
});
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
|
||||
|
||||
Reference in new issue
Block a user