Backfill device song metadata and queue guarded server caching
This commit is contained in:
@@ -271,3 +271,12 @@ test('secondary and phonetic lyric fields survive validation without changing ol
|
||||
const result = N.sanitizeLyrics({ lines:[{t:1,text:'主',kind:'line',secondary:' Your grace\n is enough ',phonetic:' zhǔ\u0007 '},{t:2,text:'Legacy',kind:'line'}] });
|
||||
expect(result.lines[0].secondary).toBe('Your grace\nis enough'); expect(result.lines[0].phonetic).toBe('zhǔ'); expect(result.lines[1]).toEqual({t:2,text:'Legacy',kind:'line'});
|
||||
});
|
||||
|
||||
test('admin song list includes metadata-only phone songs for lyrics lookup', async () => {
|
||||
const id = 'phoneSong01';
|
||||
await dbmod.upsertMedia(id, { status: 'failed', duration: 240, meta: JSON.stringify({ title: 'Phone song', channel: 'Phone artist' }) });
|
||||
const cookie = await adminCookie();
|
||||
const res = await app.request('/api/admin/media', { headers: { Cookie: cookie } });
|
||||
const song = (await res.json()).media.find(x => x.id === id);
|
||||
expect(song).toMatchObject({ title: 'Phone song', channel: 'Phone artist', duration: 240, cacheStatus: 'failed' });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user