feat: persist incremental live channel analysis
Persist live channel language metadata across background projection rebuilds and target Local AI identity analysis to newly detected streams unless a manual full analysis is requested. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -25,6 +25,7 @@ function createChannelList() {
|
||||
window.eval(script('js/services/channelLanguageDetection.js'));
|
||||
window.eval(script('js/services/channelLanguageFusion.js'));
|
||||
window.eval(script('js/services/channelVariantGrouping.js'));
|
||||
window.eval(script('js/services/layaStatusPresentation.js'));
|
||||
window.eval(script('js/services/liveChannelProjection.js'));
|
||||
window.eval(`${script('js/components/ChannelList.js')}\nwindow.ChannelList = ChannelList;`);
|
||||
window.app = {
|
||||
@ -95,6 +96,36 @@ test('language selection filters the complete loaded catalog immediately without
|
||||
dom.window.close();
|
||||
});
|
||||
|
||||
test('loading the projected channel list does not call Laya language detection during display', async () => {
|
||||
const { dom, window, channelList } = createChannelList();
|
||||
window.app.player.settings.languageDetectionMode = 'laya';
|
||||
let layaStatusCalls = 0;
|
||||
let layaBatchCalls = 0;
|
||||
window.API = {
|
||||
live: { getChannels: async () => projectedResponse() },
|
||||
laya: {
|
||||
getStatus: async () => {
|
||||
layaStatusCalls += 1;
|
||||
return { modelPresent: true, runtimeAvailable: true };
|
||||
},
|
||||
detectLanguages: async () => {
|
||||
layaBatchCalls += 1;
|
||||
return { results: [] };
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
await channelList.loadAllChannels();
|
||||
await wait(20);
|
||||
|
||||
assert.equal(layaStatusCalls, 0);
|
||||
assert.equal(layaBatchCalls, 0);
|
||||
} finally {
|
||||
dom.window.close();
|
||||
}
|
||||
});
|
||||
|
||||
test('Escape clears channel search while preserving language-panel Escape behavior', async () => {
|
||||
const { dom, window, channelList } = createChannelList();
|
||||
window.API = { live: { getChannels: async () => projectedResponse() } };
|
||||
|
||||
Reference in New Issue
Block a user