Description
There appears to be an inconsistency between the EPG lookup used by the channel list and the lookup used by the EPG Grid.
I am using an Xtream IPTV profile with an external XMLTV EPG source.
For example, the Xtream data provides:
Channel name: TR: A HABER HD
tvg-id: A Haber
The external XMLTV source contains:
I added the following mapping to epg_key_mappings:
After restarting EngPlayer:
- The channel list correctly displays the current program:
Akşam Ajansı
- The EPG Grid, however, still shows:
Bu kanal için program bilgisi bulunamadı
This seems to be caused by two different EPG lookup paths.
Channel list
ui/channel_list.py uses the stored mapping:
matched_key = database.get_epg_mapping(search_key)
and subsequently retrieves the mapped EPG data.
EPG Grid
core/window.py::_find_epg_data_for_channel() does not consult epg_key_mappings.
Its lookup sequence is essentially:
programs = database.get_epg_programs(provider_tvg_id)
clean_key = self._clean_key(provider_tvg_id)
programs = database.get_epg_programs(clean_key)
# fuzzy matching...
For A Haber, the clean/fuzzy lookup does not reliably resolve to A.HABER.HD.tr, while the explicitly stored mapping does.
Expected
The EPG Grid should use the same stored EPG mapping as the channel list and display:
Akşam Ajansı
for A Haber.
Actual
The channel list displays:
Akşam Ajansı
while the EPG Grid reports:
Bu kanal için program bilgisi bulunamadı
Suggested fix
I think _find_epg_data_for_channel() should first check the same stored mapping used by channel_list.py, before falling back to the existing direct/clean/fuzzy lookup:
mapped_key = database.get_epg_mapping(provider_tvg_id)
if mapped_key:
programs = database.get_epg_programs(mapped_key)
if programs:
logging.debug(
f"EPG Found in DB (Stored Mapping): "
f"'{provider_tvg_id}' -> '{mapped_key}'"
)
self.epg_match_cache[provider_tvg_id] = programs
return programs
This would make the EPG Grid and channel list use the same persisted EPG mappings and should also benefit other channels requiring manual or previously learned mappings.
Additional details
The XMLTV database itself is correct. It contains program data for:
A.HABER.HD.tr
and the current program is correctly identified as:
Akşam Ajansı
Therefore, the issue does not appear to be missing XMLTV data. The problem is that the EPG Grid does not use the existing epg_key_mappings lookup.
Thanks for EngPlayer — it is a very nice IPTV application. I hope this small inconsistency can be fixed.
Description
There appears to be an inconsistency between the EPG lookup used by the channel list and the lookup used by the EPG Grid.
I am using an Xtream IPTV profile with an external XMLTV EPG source.
For example, the Xtream data provides:
The external XMLTV source contains:
I added the following mapping to
epg_key_mappings:After restarting EngPlayer:
Akşam AjansıBu kanal için program bilgisi bulunamadıThis seems to be caused by two different EPG lookup paths.
Channel list
ui/channel_list.pyuses the stored mapping: