kodi-pvr / pvr.iptvsimple

IPTV Simple client for Kodi PVR
GNU General Public License v2.0
756 stars 371 forks source link

EPG loaded but not diplayed #794

Open JulienPalard opened 8 months ago

JulienPalard commented 8 months ago

I'm trying to generate a m3u file matching with an xmltv one, looks like what I generate works, it looks like it (I redacted parts for readability using the [...] syntax):

#EXTM3U
[...]
#EXTINF:0,tvg-id="arte.mafreebox.fr", 7 - Arte
rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=204
#EXTINF:0,tvg-id="arte-allemand.mafreebox.fr", 616 - Arte Allemand
rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=270
[...]
<tv>
[...]
  <channel id="arte.mafreebox.fr">
    <display-name>Arte</display-name>
    <icon src="http://mafreebox.freebox.fr/api/latest/tv/img/channels/logos68x60/uuid-webtv-204.png"/>
  </channel>
[...]
  <programme start="20231008133000 +0200" stop="20231008160000 +0200" channel="arte.mafreebox.fr">
    <title>El Perdido</title>
    <desc lang="fr">Le sh&#xE9;rif Dana Stribling poursuit Brendan O'Malley, responsable de la mort de sa soeur. Apr&#xE8;s avoir franchi la fronti&#xE8;re mexicaine, O'Malley atteint le ranch des Breckenridge, o&#xF9; il se fait engager pour convoyer un troupeau jusqu'au Texas. Le sh&#xE9;rif, qui peste de ne pas pouvoir intervenir puisque le meurtrier se trouve hors de sa juridiction, laisse entendre &#xE0; O'Malley qu'il le tuera &#xE0; la premi&#xE8;re occasion. En attendant, il se fait &#xE9;galement embaucher pour escorter les b&#xEA;tes de Breckenridge, lequel est dot&#xE9; d'une fort jolie &#xE9;pouse, pr&#xE9;nomm&#xE9;e Belle, avec laquelle O'Malley a eu une liaison seize ans plus t&#xF4;t. L'ancien amant ne l'a d'ailleurs pas oubli&#xE9;e, et s'empresse de la courtiser &#xE0; nouveau. Tout comme le sh&#xE9;rif, qui surench&#xE9;rit &#xE0; chaque occasion. Lorsque Breckenridge, lors du voyage, se fait tuer, Belle donne la pr&#xE9;f&#xE9;rence &#xE0; O'Malley...</desc>
    <category lang="en">Movie / Drama</category>
    <category lang="fr">Film</category>
    <length units="seconds">9000</length>
    <icon src="http://mafreebox.freebox.fr/api/latest/tv/img/epg/programs/168x130/EMI_2164411_AG.jpg"/>
  </programme>
[...]

It seems to load fine:

2023-10-08 20:41:22.943 T:509891    info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadChannelEpgs - Loaded '7' EPG channels.
2023-10-08 20:41:22.944 T:509891    info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadEpgEntries - Loaded '237' EPG entries.
2023-10-08 20:41:22.944 T:509891    info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadEPG - EPG Loaded - 92 (ms)

But inside Kodi in "TV" → "Guide" I'm getting the channels but no programs in them:

Capture d’écran du 2023-10-08 20-52-01

Maybe there's something that should be logged about what's going wrong?

$ kodi --version
Kodi from Debian Media Center 20.2 Debian package version: 2:20.2+dfsg-4+b1
Copyright (C) 2005-2021 Team Kodi from Debian - http://kodi.tv

iptvsimple version 20.6.1.

phunkyfish commented 8 months ago

The programme you showed is from earlier in the day so would not show in the guide. Do you also have programmes from the present time in the day?

phunkyfish commented 8 months ago

The programme you showed is from earlier in the day so would not show in the guide. Do you also have programmes from the present time in the day?

Could you please also provide a full debug log?

JulienPalard commented 8 months ago

Do you also have programmes from the present time in the day?

Yes I had programs in the future in my xmltv file: the file was generated a few hours before my post with 24h of programs.

JulienPalard commented 8 months ago

Could you please also provide a full debug log?

Here's the full log: kodi.log

Here's an extract:

$ grep -i epg ~/.kodi/temp/kodi.log 
2023-10-09 21:00:06.802 T:635381    info <general>: Running database version Epg16
2023-10-09 21:00:07.105 T:635382   debug <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadEPG - EPG Load Start
2023-10-09 21:00:08.294 T:635382   debug <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadChannelEpgs - Loaded channel EPG with id 'france-3-paris-ile-de-france.mafreebox.fr' with display names: 'France 3 Paris Ile-de-France'
2023-10-09 21:00:08.294 T:635382   debug <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadChannelEpgs - Loaded channel EPG with id 'france-5.mafreebox.fr' with display names: 'France 5'
2023-10-09 21:00:08.294 T:635382   debug <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadChannelEpgs - Loaded channel EPG with id 'arte.mafreebox.fr' with display names: 'Arte'
2023-10-09 21:00:08.294 T:635382   debug <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadChannelEpgs - Loaded channel EPG with id 'france-2.mafreebox.fr' with display names: 'France 2'
2023-10-09 21:00:08.295 T:635382   debug <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadChannelEpgs - Loaded channel EPG with id 'la-chaine-parlementaire.mafreebox.fr' with display names: 'La Chaîne Parlementaire'
2023-10-09 21:00:08.295 T:635382   debug <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadChannelEpgs - Loaded channel EPG with id 'arte-allemand.mafreebox.fr' with display names: 'Arte Allemand'
2023-10-09 21:00:08.295 T:635382   debug <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadChannelEpgs - Loaded channel EPG with id 'france-4.mafreebox.fr' with display names: 'France 4'
2023-10-09 21:00:08.295 T:635382    info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadChannelEpgs - Loaded '7' EPG channels.
2023-10-09 21:00:08.304 T:635382    info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadEpgEntries - Loaded '773' EPG entries.
2023-10-09 21:00:08.305 T:635382    info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadEPG - EPG Loaded - 1200 (ms)
2023-10-09 21:00:08.327 T:635438   debug <general>: Thread EPGUpdater start, auto delete: false
2023-10-09 21:00:41.154 T:635470   debug <general>: Thread epg-grid-refresh-timeline-items start, auto delete: false
2023-10-09 21:00:50.376 T:635470   debug <general>: Thread epg-grid-refresh-timeline-items 140440380626624 terminating
2023-10-09 21:00:56.357 T:635438    info <general>: EPG Container: Persisting unsaved events...
2023-10-09 21:00:56.358 T:635438    info <general>: EPG Container: Persisting events done
2023-10-09 21:00:56.358 T:635438   debug <general>: Thread EPGUpdater 140440397412032 terminating

The m3u file is at https://mdk.fr/tele.m3u and the xml file is at https://mdk.fr/xmltv.xml (this one generated to contain 10 days of programs).

phunkyfish commented 8 months ago

I can't find fault with your M3U file or the xmltv.

Can you have a look in the EPG database in kodi and see what is in there?

It's in userdata/Database/epg*.db. You'll need DB Browser for SQL lite or a similar program to look inside it.

JulienPalard commented 8 months ago

Thanks for the time you spend on this issue.

The Epg db is "almost empty", see:

$ sqlite3 ~/.kodi/userdata/Database/Epg16.db 
SQLite version 3.43.1 2023-09-11 12:01:27
Enter ".help" for usage hints.
sqlite> .tables
epg            epgtags        lastepgscan    savedsearches  version      
sqlite> select * from version;
16|0
sqlite> select * from savedsearches;
sqlite> select * from lastepgscan;
1|2023-10-09 18:44:28
2|2023-10-09 18:44:28
3|2023-10-09 18:44:28
4|2023-10-09 18:44:28
5|2023-10-09 18:44:28
6|2023-10-09 18:44:28
7|2023-10-09 18:44:28
sqlite> select * from epgtags ;
sqlite> select * from epg;
1|2 - France 2|client
2|3 - France 3|client
3|14 - France 4|client
4|5 - France 5|client
5|7 - Arte|client
6|616 - Arte Allemand|client
7|13 - La Chaîne Parlementaire|client
sqlite> 
phunkyfish commented 8 months ago

Ok, so now we know that the your tags are not being saved in the DB.

What must be happening is that we load the EPG data in the add-on, but kodi-pvr is never requesting this data from the add-on.

stemy2 commented 2 months ago

I have the same problem. Strangely, epg worked fine for a while and i didn't changed anything in the parameters.

Here's what the database says

LibreELEC-pi:~ # sqlite3 ~/.kodi/userdata/Database/Epg16.db
SQLite version 3.40.1 2022-12-28 14:03:47
Enter ".help" for usage hints.
sqlite> .tables
epg            epgtags        lastepgscan    savedsearches  version      
sqlite> select * from version;
16|0
sqlite> select * from savedsearches;
sqlite> select * from lastepgscan;
1|2024-04-28 14:14:29
2|2024-04-28 14:14:29
3|2024-04-28 14:14:29
4|2024-04-28 14:14:29
5|2024-04-28 14:14:29
6|2024-04-28 14:14:29
sqlite> select * from epgtags ;
sqlite> select * from epg;
1|RTL-TVI|client
2|PLUG RTL|client
3|CLUB RTL|client
4|La Une|client
5|Tipik|client
6|La Trois|client
sqlite>

And the log

LibreELEC-pi:~ # grep -i epg ~/.kodi/temp/kodi.log
2024-04-28 12:05:58.277 T:1117     info <general>: Running database version Epg16
2024-04-28 12:05:58.605 T:1117     info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadChannelEpgs - Loaded '6' EPG channels.
2024-04-28 12:05:58.606 T:1117     info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadEpgEntries - Loaded '0' EPG entries.
2024-04-28 12:05:58.607 T:1117     info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadEPG - EPG Loaded - 7 (ms)
2024-04-28 12:05:58.609 T:1117     info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadEPG - EPG file path is not configured. EPG not loaded.
2024-04-28 12:05:59.667 T:1191     info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadChannelEpgs - Loaded '6' EPG channels.
2024-04-28 12:05:59.668 T:1191     info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadEpgEntries - Loaded '0' EPG entries.
2024-04-28 12:05:59.668 T:1191     info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadEPG - EPG Loaded - 3 (ms)
2024-04-28 12:05:59.669 T:1191     info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadEPG - EPG file path is not configured. EPG not loaded.
2024-04-28 12:31:00.495 T:1147     info <general>: [service.iptv.manager] [resources.lib.modules.addon] Requesting epg from plugin://plugin.video.catchuptvandmore/resources/lib/iptvmanager/epg/...
2024-04-28 12:31:00.495 T:1147     info <general>: [service.iptv.manager] [resources.lib.modules.addon] Executing RunPlugin(plugin://plugin.video.catchuptvandmore/resources/lib/iptvmanager/epg/?port=32837)...
2024-04-28 12:31:02.795 T:1191     info <general>: EPG Container: Persisting unsaved events...
2024-04-28 12:31:02.795 T:1191     info <general>: EPG Container: Persisting events done
2024-04-28 12:31:06.662 T:1596     info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadChannelEpgs - Loaded '6' EPG channels.
2024-04-28 12:31:06.663 T:1596     info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadEpgEntries - Loaded '0' EPG entries.
2024-04-28 12:31:06.663 T:1596     info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadEPG - EPG Loaded - 3 (ms)
2024-04-28 14:09:29.170 T:1609     info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadChannelEpgs - Loaded '6' EPG channels.
2024-04-28 14:09:29.171 T:1609     info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadEpgEntries - Loaded '0' EPG entries.
2024-04-28 14:09:29.172 T:1609     info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadEPG - EPG Loaded - 4 (ms)
2024-04-28 16:14:29.772 T:1609     info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadChannelEpgs - Loaded '6' EPG channels.
2024-04-28 16:14:29.774 T:1609     info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadEpgEntries - Loaded '0' EPG entries.
2024-04-28 16:14:29.774 T:1609     info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadEPG - EPG Loaded - 3 (ms)