cabernetwork / provider_video_m3u

Provides an interface to the M3U and XMLTV.XML URLs
MIT License
1 stars 1 forks source link

Cabernet fails to parse some program guide xmls. #5

Open Lowclock opened 1 month ago

Lowclock commented 1 month ago

Cabernet fails to parse certain XMLs. This original epg.xml contains multiple days of data that parses properly in everything I've tried like tivimate, kodi, tvheadend, jellyfin, etc, but cabernet produces an xmltv that is just 10 hours of channels full of 1 hour "Not Available" programs. I've included a zip containing the xmltv that cabernet produces, as well as a log, config, original epg and channels. Thanks.

xmlparsefailure.zip

rocky4546 commented 1 month ago

I took the xmltv.xml file and ran it across multiple xml validator sites and they all found it to be a valid xml file. Will look through the other info, but the xml file is valid.

cabernet.log is fine. There seems to be no issue with cabernet.

If you believe the issue is with the ingest, then you will need to provide a Cabernet log of the ingest part.

Lowclock commented 1 month ago

It's not that the xmltv.xml isn't valid, it's that it doesn't contain any useful information from the original epg. It's just a bunch of 1 hour "Not available", while using the URLs from that config.ini on anything else produces multiple days of accurate program guide.

cabernet.log

rocky4546 commented 1 month ago

looking into it. First, I have been told the "channel-id" is now common and has replaced "channelID". Added that, but it still not quite there. Will continue investigating.

Lowclock commented 1 month ago

I appreciate it. I was quite confused that it's only that m3u/xml combo, and only with Cabernet, when they seem to be formatted more or less the same as all the rest on that site.

rocky4546 commented 1 month ago

it looks like it is working as expected once I added the channel-id. It is still giving the missing program data lines, but that is because the data is missing for the dates shown. It is just filling in data for the rest of the last day. It should overwrite it when the new data comes in. I will clean up the files and post a new m3u plugin today.

rocky4546 commented 1 month ago

version 15 is available with the few lines to add channel-id. See if that makes things work better.

Lowclock commented 1 month ago

It's closer. There are SOME programs in the xmltv now, but it's still missing most of it.

Take this channel for instance. In epg.xml there's over 90 programs like this.

  <programme channel="roku-390053bfbc6858999cb0d6354b57d938" start="20240525181205 +0000" stop="20240525190115 +0000">
    <title>Karamo</title>
    <sub-title>Unlock The Phone</sub-title>
    <desc>It was love at first sight, but now Jesse and Ashley's relationship has been tumultuous for the past 8 years.</desc>
    <icon src="https://images.sr.roku.com/idType/roku/context/trc/id/2604909073755ad1a1058c8a7bd738b9/rokuFeed/assets/732c91cc581257f79db72c3e6ca6b316.jpg"/>
    <episode-num system="onscreen">S01E12</episode-num>
    <rating system="USA Parental Rating">TV14</rating>
  </programme>

Cabernet's xmltv.xml just has this instead.

<programme start="20240525180000 -0700" stop="20240525190000 -0700" channel="roku-390053bfbc6858999cb0d6354b57d938"><title lang="en">Confess by Nosey</title>
<desc lang="en">Not Available</desc><length units="minutes">60</length><previously-shown/></programme>

Cabernet says

2024-05-23 19:22:36,886-DEBUG:epg M3U:roku Channel roku-390053bfbc6858999cb0d6354b57d938 missing program data, adding default for day 2024-05-25

But it's clearly right there. Some other channels even have a few programs here and there, with Not Available all between them. Even just the fact that epg.xml is 23MB and xmltv.xml is 3MB shows how much data is missing.

xmlparsefailure2.zip

Lowclock commented 1 month ago

I tested it some more today and this new version of the M3U plugin actually breaks more than it fixes. EPGs that used to get parsed properly now end up the same as that Roku EPG where only some programs actually get populated in Cabernet's xmltv, and the rest end up Not Available. This happens with Plex, Roku, SamsungTVPlus, and Stirr m3u+xml combos from https://i.mjh.nz/ , and probably more. All work great with every other client, none work correctly with Cabernet. I attached an example using SamsungTVPlus.

xmlparsefailure3.zip

Lowclock commented 1 month ago

It looks like some of those m3u8s have channel-ids that are prefixed with their name like channel-id="samsung-USBA2000001BR" instead of tvg-id="USBA2000001BR" which is the name present in the xml. Re-ordering channel.py so it looks for tvg-id before channel-id fixes this, but I'm not sure if this is the best way to go about it. I don't know if they changed recently, or how they used to work correctly for me when this code hasn't really changed, but this works now.

I still don't know what's wrong with Roku yet.

rocky4546 commented 1 month ago

I suspect there are more places that channel-id needs updates. There is a PR #141 that has that for cabernet. take a look and try some changes...