xteve-project / xTeVe

M3U Proxy for Plex DVR and Emby Live TV
MIT License
1.81k stars 232 forks source link

m3u format requiring space, when Wikipedia showing examples without #226

Open natha909 opened 3 years ago

natha909 commented 3 years ago

So xteve requires a space after the comma, but before the title. m3u examples from https://en.wikipedia.org/wiki/M3U:

#EXTM3U

#EXTINF:123, Sample artist - Sample title
C:\Documents and Settings\I\My Music\Sample.mp3

#EXTINF:321,Example Artist - Example title
C:\Documents and Settings\I\My Music\Greatest Hits\Example.ogg 

I'm not sure which is correct, as Wikipedia shows both as proper and providers use both. The issue is, if no space is present, xteve doesn't read all #EXTINF tags. Easy way to check is to remove the space before the title and see if it reads the CUID. In addition, when no space is present "Update Channel Name:" option is missing from channel mapping.

my exact example:

EXTINF:-1 CUID="4 NBC KNBC" tvg-chno="4" tvg-id="KNBC.us" tvg-name="4 NBC KNBC" tvg-logo="https://imgx.fubo.tv/station_logos/nbc_c.png" group-title="LOCALS",4 NBC KNBC

adding a space before "4 NBC KNBC" allows CUID and "Update Channel Name:" option

mar-mei commented 3 years ago

I've tested the example with the current beta, works. grafik

Install the current beta and test it with it.

How do you guarantee that the value of CUID will never change?

MCTyler commented 3 years ago

Thanks for Testing Marmei. I abandoned this approach long ago in lieu of Tivimate so I'm glad you could test it. I didn't think anything has changed since I was using it.

natha909 commented 3 years ago

I'll be leaving on vacation tomorrow and won't have time to test until I return next week. I did write a script that added the space for my M3U, prior to xteve update, as a test. I think this is essentially what the fixed beta version will do, as it will now read the EXTINF line correctly. One issue that I faced was all 300 channels lost it's association to my DS XMLTV file&channel. I assume this is because it now sees the channel title and/or CUID? Will this be the same case for the beta fix and if so is there a way to migrate that link between the channel and epg.

My CUID is my stream title. If the EXTINF stream title was being properly read (without a space), would I have even needed that? ...was the title being read at all, without a space?

Thanks

mar-mei commented 3 years ago

I looked at the history of the M3U parser code. The difference to Beta is only an error message when using an M3U8 file. But I have a guess, if the CUID occurs twice, the channel is not imported. CUID stands for: Channel Unique ID

I still don't know why you are using the channel name for this, xTeVe does that as a fallback if no ID is found. If xTeVe finds a unique ID for each stream, this value is used as a reference for changes to the channel (Channel Name, URL, ...). Similar to a phone number, it doesn't matter how often you change your cell phone, as long as your number stays the same, anyone can call you.

In the video you can see what the CUID is needed for: https://cdn.discordapp.com/attachments/484099914574462977/525051040739885077/cuid.mp4

natha909 commented 3 years ago

I was not using channel name, only the title in the example shown to you. My CUID is/was static and would not change, which is key for any event channels. So, with that in mind, create a NEW channel without a space, with a static, unique CUID - if ONLY the "tvg-name" and title changed, I found xTeVe would assume a new channel was being added and dump the old channel. I assume it didn't parse the EXTINF properly. Which happens ONLY with the space is missing.

Oh and in addition adding only the space to each line, not changing anything else, with a unique CUID for each, all channelswere deleted and new ones created after updating the m3u in xteve. I don't believe removing the space AFTER the channel has been mapped had the same effect.