android: the hub's filters on the network results, pasted lyrics
The raw results take the Soulseek hub's filters — a free slot only, FLAC or MP3 320+ — as chips above the folders. The lyrics sheet has the desktop's paste door: plain text, or LRC with timestamps, kept for the track.
This commit is contained in:
1 parent
59be9f6c3e
commit
3c8989dfa6
6 files changed
+58
-3
No files matched your search
@@ -623,6 +623,12 @@ function mockNet(cmd, args) {
|
||||
]), 200));
|
||||
if (cmd === "lyrics_select") return Promise.resolve({ ...mockLyrics(args?.title), source: "lrclib #" + args?.candidateId });
|
||||
if (cmd === "lyrics_set_offset") return Promise.resolve();
|
||||
if (cmd === "lyrics_save_text") {
|
||||
const lines = String(args?.text || "").split(/\r?\n/).map((l) => l.trim()).filter(Boolean);
|
||||
const timed = lines.map((l) => { const m = /^\[(\d+):(\d\d(?:\.\d+)?)\]\s*(.*)$/.exec(l); return m ? { time_ms: Math.round((+m[1] * 60 + +m[2]) * 1000), text: m[3] } : null; });
|
||||
const synced = timed.every(Boolean);
|
||||
return Promise.resolve({ status: synced ? "synced" : "plain", source: "pasted", synced: synced ? timed : [], plain: synced ? null : lines.join("\n"), offset_ms: 0, auto_offset_ms: 0, auto_sync_off: false });
|
||||
}
|
||||
if (cmd === "lyrics_clear") return Promise.resolve();
|
||||
if (cmd === "clear_play_history") return Promise.resolve();
|
||||
if (cmd === "refresh_album_art") return new Promise((r) => setTimeout(() => r("C:\\mock\\cover.jpg"), 200));
|
||||
|
||||
Reference in new issue
Block a user