Skip to content

fix(epg): chunk native-program lookup to stay under SQLite's variable… - #223

Open
marcoeg wants to merge 1 commit into
Davidona:masterfrom
marcoeg:fix/epg-chunked-sql-variables
Open

fix(epg): chunk native-program lookup to stay under SQLite's variable…#223
marcoeg wants to merge 1 commit into
Davidona:masterfrom
marcoeg:fix/epg-chunked-sql-variables

Conversation

@marcoeg

@marcoeg marcoeg commented Aug 28, 2026

Copy link
Copy Markdown

… cap

resolveForProvider passed every channel's epgChannelId as a bind variable to a single IN (...) query. On Android <= 11 (SQLite < 3.32) SQLITE_MAX_VARIABLE_NUMBER is 999, so any provider with 1,000+ channels fails EPG import with "too many SQL variables" — reproduced on an NVIDIA SHIELD (Android 11) with a 1,080-channel M3U.

Chunk at 500, mirroring the pattern already used at every sibling call site (EpgRepositoryImpl.getPrograms*/getNowPlaying*, EpgResolutionEngine's mapping/programme lookups) — this was the last un-chunked channel-list query. Adds a regression test asserting the chunk sizes (500 + 100 for 600 channels) and id coverage.

… cap

resolveForProvider passed every channel's epgChannelId as a bind
variable to a single IN (...) query. On Android <= 11 (SQLite < 3.32)
SQLITE_MAX_VARIABLE_NUMBER is 999, so any provider with 1,000+ channels
fails EPG import with "too many SQL variables" — reproduced on an
NVIDIA SHIELD (Android 11) with a 1,080-channel M3U.

Chunk at 500, mirroring the pattern already used at every sibling
call site (EpgRepositoryImpl.getPrograms*/getNowPlaying*,
EpgResolutionEngine's mapping/programme lookups) — this was the last
un-chunked channel-list query. Adds a regression test asserting the
chunk sizes (500 + 100 for 600 channels) and id coverage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant