Beer4Ever83 / ipytv

A python library to handle IPTV playlists in m3u_plus format
MIT License
25 stars 6 forks source link

Some Questions #70

Closed halfagascan closed 7 months ago

halfagascan commented 11 months ago

Just found this program and have some questions. I primarily use tvheadend, with an iptv provider. In tvheadend, the original m3u8 seems to be fine, no issues with display of the playlist. Your m3udoctor.py, makes some minor changes, as below. Referencing the original m3u8, how would these manifest as errors or issues?

`original

EXTINF:-1 tvh-chnum="948" tvg-id="hallmarkchannel.us" tvg-name="HALLMARK CHANNEL" tvg-logo="https://tv-fanatic-res.cloudinary.com/iu/s--gBrQRyxY--/t_full/cs_srgb, 162 f_auto,fl_strip_profile.lossy,q_auto:420/v1434689610/hallmark-channel-logo.jpg" group-title="US-ENTERTAINMENT",HALLMARK CHANNEL

163 http://my.provider.zzz.as:port/me/password/1XXXX5623

m3udoctor.py

EXTINF:-1 tvh-chnum="948" tvg-id="hallmarkchannel.us" tvg-name="HALLMARK CHANNEL" tvg-logo="https://tv-fanatic-res.cloudinary.com/iu/s--gBrQRyxY--/t_full/cs_srgb% 162 2Cf_auto%2Cfl_strip_profile.lossy%2Cq_auto:420/v1434689610/hallmark-channel-logo.jpg" group-title="US-ENTERTAINMENT",HALLMARK CHANNEL

163 http://my.provider.zzz.as:port/me/password/1XXXX4356

original

EXTINF:-1 tvg-id="" tvg-name="Music Choice 00: 70s Audio Channel" tvg-logo="http://primestreamstv.com/logos/MC%20POP%20.png" group-title="MUSIC",Music Choice 00: 2 70s Audio Channel

  3 http://my.provider.zzz.as:port/me/password/2XXXght

m3udoctor.py

EXTINF:-1 tvg-id="" tvg-name="Music Choice 00: 70s Audio Channel" tvg-logo="http://primestreamstv.com/logos/MC%20POP%20.png" group-title="MUSIC",Music Choice 00: 2 70s Audio Channel

  3 http://my.provider.zzz.as:port/me/password/2cxzsad

original

EXTINF:-1 tvg-id="" tvg-name="PC: Golf PC: Open " tvg-logo="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d3/NBCUniversal_Peacock_Logo.svg/2560px-NBCUniversal_Peacock_Logo.svg.png" group-title="US-PEACOCK",PC: Golf PC: Open

http://my.provider.zzz.as:port/me/password/2thuygfd

m3udoctor.py

EXTINF:-1 tvg-id="" tvg-name="PC: Golf PC: Open " tvg-logo="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d3/NBCUniversal_Peacock_Logo.svg/2560px-NBCUniversal_Peacock_Logo.svg.png" group-title="US-PEACOCK",PC: Golf PC: Open

http://my.provider.zzz.as:port/me/password/2opulip

original

EXTINF:-1 tvg-id="ESPNPlay100.jm" tvg-name="(JM) ESPN PLAY 100:" tvg-logo="https://artwork.api.espn.com/artwork/collections/airings/b2ca1b6e-a870-4177-b782-0a12650c0b53/default?width=640&apikey=1ngjw23osgcis1i1vbj96lmfqs&timestamp" group-title="ESPN PLAY",(JM) ESPN PLAY 100:

m3udoctor.py

EXTINF:-1 tvg-id="ESPNPlay100.jm" tvg-name="(JM) ESPN PLAY 100:" tvg-logo="https://artwork.api.espn.com/artwork/collections/airings/b2ca1b6e-a870-4177-b782-0a12650c0b53/default?width=640&amp%3Bapikey=1ngjw23osgcis1i1vbj96lmfqs&amp%3Btimestamp" group-title="ESPN PLAY",(JM) ESPN PLAY 100:

` I generally have more issues with the epg data, the tv_grab_file has problems digesting the xml file, I have to socat to xmltv.sock, that seems to work. The xml never validates, to many errors. Are you aware of some script, or program similar to m3udoctor.py, that checks and repairs xmltv ? Thanks

Beer4Ever83 commented 11 months ago

Hi, Thanks for reaching out and apologies for the late reply: I've been busy. It looks to me that the only difference between the original entry and the one produced by the m3udoctor module is that the value of the tvg-logo fields has been url-encoded. I don't know how familiar you are with URLs and HTTP requests in general, but - in a nutshell - the standard says that certain characters, when present in a URL string, have to be encoded with a %XY form. For example, some commas in your entries have been converted to the %2C code.

how would these manifest as errors or issues?

The most common http clients take care of encoding these characters before sending a request, but some of them don't and might crash.

Are you aware of some script, or program similar to m3udoctor.py, that

checks and repairs xmltv ?

I'm not, sorry. I still haven't looked into XTMLTV.

I hope this helps.

Cheers.

Beer4Ever83

Il giorno mar 28 nov 2023 alle ore 23:38 halfagascan < @.***> ha scritto:

Just found this program and have some questions. I primarily use tvheadend, with an iptv provider. In tvheadend, the original m3u8 seems to be fine, no issues with display of the playlist. Your m3udoctor.py, makes some minor changes, as below. Referencing the original m3u8, how would these manifest as errors or issues?

`original

EXTINF:-1 tvh-chnum="948" tvg-id="hallmarkchannel.us" tvg-name="HALLMARK

CHANNEL" tvg-logo=" https://tv-fanatic-res.cloudinary.com/iu/s--gBrQRyxY--/t_full/cs_srgb, 162 f_auto,fl_strip_profile.lossy,q_auto:420/v1434689610/hallmark-channel-logo.jpg" group-title="US-ENTERTAINMENT",HALLMARK CHANNEL 163 http://my.provider.zzz.as:port/me/password/1XXXX5623

m3udoctor.py

EXTINF:-1 tvh-chnum="948" tvg-id="hallmarkchannel.us" tvg-name="HALLMARK

CHANNEL" tvg-logo=" https://tv-fanatic-res.cloudinary.com/iu/s--gBrQRyxY--/t_full/cs_srgb% 162 2Cf_auto%2Cfl_strip_profile.lossy%2Cq_auto:420/v1434689610/hallmark-channel-logo.jpg" group-title="US-ENTERTAINMENT",HALLMARK CHANNEL 163 http://my.provider.zzz.as:port/me/password/1XXXX4356

original

EXTINF:-1 tvg-id="" tvg-name="Music Choice 00: 70s Audio Channel"

tvg-logo="http://primestreamstv.com/logos/MC%20POP%20.png" group-title="MUSIC",Music Choice 00: 2 70s Audio Channel 3 http://my.provider.zzz.as:port/me/password/2XXXght

m3udoctor.py

EXTINF:-1 tvg-id="" tvg-name="Music Choice 00: 70s Audio Channel"

tvg-logo="http://primestreamstv.com/logos/MC%20POP%20.png" group-title="MUSIC",Music Choice 00: 2 70s Audio Channel 3 http://my.provider.zzz.as:port/me/password/2cxzsad

original

EXTINF:-1 tvg-id="" tvg-name="PC: Golf PC: Open " tvg-logo="

https://upload.wikimedia.org/wikipedia/commons/thumb/d/d3/NBCUniversal_Peacock_Logo.svg/2560px-NBCUniversal_Peacock_Logo.svg.png" group-title="US-PEACOCK",PC: Golf PC: Open http://my.provider.zzz.as:port/me/password/2thuygfd

m3udoctor.py

EXTINF:-1 tvg-id="" tvg-name="PC: Golf PC: Open " tvg-logo="

https://upload.wikimedia.org/wikipedia/commons/thumb/d/d3/NBCUniversal_Peacock_Logo.svg/2560px-NBCUniversal_Peacock_Logo.svg.png" group-title="US-PEACOCK",PC: Golf PC: Open http://my.provider.zzz.as:port/me/password/2opulip

original

EXTINF:-1 tvg-id="ESPNPlay100.jm" tvg-name="(JM) ESPN PLAY 100:"

tvg-logo=" https://artwork.api.espn.com/artwork/collections/airings/b2ca1b6e-a870-4177-b782-0a12650c0b53/default?width=640&amp;apikey=1ngjw23osgcis1i1vbj96lmfqs&amp;timestamp" group-title="ESPN PLAY",(JM) ESPN PLAY 100:

m3udoctor.py

EXTINF:-1 tvg-id="ESPNPlay100.jm" tvg-name="(JM) ESPN PLAY 100:"

tvg-logo=" https://artwork.api.espn.com/artwork/collections/airings/b2ca1b6e-a870-4177-b782-0a12650c0b53/default?width=640&amp%3Bapikey=1ngjw23osgcis1i1vbj96lmfqs&amp%3Btimestamp" group-title="ESPN PLAY",(JM) ESPN PLAY 100: ` I generally have more issues with the epg data, the tv_grab_file has problems digesting the xml file, I have to socat to xmltv.sock, that seems to work. The xml never validates, to many errors. Are you aware of some script, or program similar to m3udoctor.py, that checks and repairs xmltv ? Thanks

— Reply to this email directly, view it on GitHub https://github.com/Beer4Ever83/ipytv/issues/70, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF2HBBGQIHXOHVLODCO3CITYGZRWPAVCNFSM6AAAAAA76QCOC6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGAYTKNBUGE4TEMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>