mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-16 14:16:16 -08:00
fix(xtream): scroll to the selected category (#1663)
This commit is contained in:
1 parent
e39c854a41
commit
e619a2be86
7 files changed
+224
-8
No files matched your search
@@ -84,6 +84,15 @@ function generatePortalData(username: string, password: string): PortalData {
|
||||
};
|
||||
}
|
||||
let liveCategories = generateCategories('live', categoryCount.live);
|
||||
if (scenario.categoryFixture === 'scroll') {
|
||||
liveCategories = liveCategories.map((category, index) => ({
|
||||
...category,
|
||||
// Coprime step permutes names independently of provider/SQLite IDs.
|
||||
category_name: `${index % 4 === 0 ? 'Visible' : 'Hidden'} ${String(
|
||||
(index * 137) % categoryCount.live
|
||||
).padStart(3, '0')}`,
|
||||
}));
|
||||
}
|
||||
const vodCategories = generateCategories('vod', categoryCount.vod);
|
||||
const seriesCategories = generateCategories('series', categoryCount.series);
|
||||
const epgListingsByStreamId = new Map<number, RawEpgListing[]>();
|
||||
|
||||
@@ -13,6 +13,8 @@ export interface ScenarioConfig {
|
||||
expiryDate: string;
|
||||
/** Optional deterministic EPG fixture profile for scenario-specific tests. */
|
||||
epgFixture?: 'timezone-focus';
|
||||
/** Large, deliberately reordered categories for sidebar scroll coverage. */
|
||||
categoryFixture?: 'scroll';
|
||||
/**
|
||||
* Optional `server_info` clock override. `timezone` is reported
|
||||
* verbatim (real panels sometimes send spellings such as `UTC+3` that
|
||||
@@ -54,6 +56,18 @@ export interface ScenarioConfig {
|
||||
* Unknown credential pairs use a hash of "username:password" as seed.
|
||||
*/
|
||||
export const SCENARIOS: Record<string, ScenarioConfig> = {
|
||||
'category-scroll:category-scroll': {
|
||||
name: 'category-scroll',
|
||||
description: '800 live categories, including 200 marked Visible',
|
||||
seed: 800,
|
||||
categoryCount: { live: 800, vod: 0, series: 0 },
|
||||
itemsPerCategory: 1,
|
||||
seasonsPerSeries: 1,
|
||||
episodesPerSeason: 1,
|
||||
accountStatus: 'Active',
|
||||
expiryDate: '2099-12-31',
|
||||
categoryFixture: 'scroll',
|
||||
},
|
||||
'live-fallback:live-fallback': {
|
||||
name: 'live-format-fallback',
|
||||
description: 'Local HLS failures and playable TS',
|
||||
|
||||
Reference in new issue
Block a user