Skip to content

[IPTV] Improve handling of IPTV service entries and optimize default entry management - #1383

Merged
TwolDE2 merged 2 commits into
OpenViX:Developerfrom
DimitarCC:stream-config-av-fix
Oct 26, 2026
Merged

TwolDE2 merged 2 commits into
OpenViX:Developerfrom
DimitarCC:stream-config-av-fix

Conversation

@DimitarCC

Copy link
Copy Markdown
Contributor

This pull request refactors and improves the IPTV service cache handling in the DVB and MP3 service code. The changes focus on making the cache more robust by preventing unnecessary or default entries from being stored, improving file read/write reliability, and clarifying the logic for handling service references and PIDs.

IPTV service cache and file handling improvements:

  • Added the isDefault() method to eIPTVDBItem to identify entries that only contain default ("auto") audio/subtitle PIDs, and updated logic to avoid storing or persisting these default entries. [1] [2] [3]
  • Updated the file format and parsing logic in eDVBDB to split PID columns from the end of each line, improving robustness and removing legacy parsing code. The file is now written atomically using a temporary file and rename(). [1] [2]

Service reference and PID matching:

  • Added checks to ensure s_ref is not empty before using it in find() comparisons throughout the code, preventing invalid matches and potential errors. [1] [2] [3] [4]
  • Changed logic so that new entries are only created in the cache when there is meaningful information to store (i.e., not for default values), both in DVB and MP3 service code. [1] [2]
  • In eServiceMP3::setCacheEntry, treat the first audio track (pid==0) as "auto" (-1), and avoid storing entries for this default. [1] [2]

General code improvements:

  • Added missing <algorithm> include for use of std::remove_if.

These changes together ensure that only meaningful, non-default IPTV service cache entries are kept in memory and persisted, reducing file bloat and improving cache accuracy.

@TwolDE2
TwolDE2 merged commit c53b82e into OpenViX:Developer Oct 26, 2026
1 check passed
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.

2 participants