feat(stalker): add radio support

Entire-Checkpoint: f957cd9849e0
This commit is contained in:
4gray committed 2026-05-09 01:28:39 +02:00
1 parent e9875f9f29
commit ab905af285
59 files changed
+1059 -179

No files matched your search

@@ -110,6 +110,22 @@ describe('workspace-shell-route.utils', () => {
})
);
expect(
parseWorkspaceShellRoute('/workspace/stalker/pl-2/radio')
).toEqual(
expect.objectContaining({
kind: 'portal',
context: {
provider: 'stalker',
playlistId: 'pl-2',
},
section: 'radio',
contextPanel: 'category',
searchMode: 'remote-search',
usesQuerySearch: true,
})
);
expect(
parseWorkspaceShellRoute('/workspace/stalker/pl-2/recent?q=test')
).toEqual(
@@ -171,6 +187,12 @@ describe('workspace-shell-route.utils', () => {
'recent'
)
).toBe(true);
expect(
usesWorkspaceRouteQuerySearch(
{ provider: 'stalker', playlistId: '1' },
'radio'
)
).toBe(true);
expect(
usesWorkspaceRouteQuerySearch(
{ provider: 'playlists', playlistId: '1' },
@@ -57,6 +57,7 @@ const PORTAL_SECTIONS: readonly PortalRailSection[] = [
'live',
'recent',
'recently-added',
'radio',
'search',
'series',
'vod',
@@ -84,6 +85,7 @@ const STALKER_CATEGORY_CONTEXT_SECTIONS = new Set<PortalRailSection>([
'vod',
'series',
'itv',
'radio',
]);
function normalizePath(url: string): {
@@ -159,6 +161,7 @@ function resolvePortalSearchMode(
section === 'vod' ||
section === 'series' ||
section === 'itv' ||
section === 'radio' ||
section === 'search'
) {
return 'remote-search';