bebo-dot-dev / m3u-epg-editor

a python m3u / epg optimizer
120 stars 27 forks source link

A stretch type question #73

Closed sabre6 closed 1 year ago

sabre6 commented 1 year ago

Hi there,

Been using this great app for a few years now, using m3u login. But my IPTV provider will take that away soon and only use XC login. I don't suppose there is any option to make this work with an XC login?

Thank you.

bebo-dot-dev commented 1 year ago

hey, I have no idea what an XC login is, if it involves an m3u file / EPG file it might work, if not probably not.

sabre6 commented 1 year ago

Thank you. I might have a work around. I get an error when trying to create an edited .xml file. Do you know what this might be?

2023-03-11T12:59:31.251182 saving retrieved epg file: /home/pi/xxxx/xxxx/test/original.xml 2023-03-11T12:59:31.938941 Traceback (most recent call last): File "/home/pi/xxxx/yyyy/m3u-epg-editor-py3.py", line 1045, in main() File "/home/pi/xxxx/yyyy/m3u-epg-editor-py3.py", line 239, in main xml_tree = create_new_epg(args, epg_filename, m3u_entries) File "/home/pi/xxxx/yyyy/m3u-epg-editor-py3.py", line 848, in create_new_epg tvg_id_unique_entries = {e.tvg_id.lower(): e for e in m3u_entries}.values() File "/home/pi/xxxx/yyyy/m3u-epg-editor-py3.py", line 848, in tvg_id_unique_entries = {e.tvg_id.lower(): e for e in m3u_entries}.values() AttributeError: 'NoneType' object has no attribute 'lower' 2023-03-11T12:59:31.939630 process terminated early due to an exception

bebo-dot-dev commented 1 year ago

It's hard to say without being able to see the data but the error indicates that there's nothing/no value/a completely missing value in one or more of your m3u item tvg-id attribute values.

sabre6 commented 1 year ago

ok, thank you. Is the program able to edit a .m3u and .xml from a file location on my pi, or does it need to be from url?

bebo-dot-dev commented 1 year ago

Both http(s):// and file:// type URIs are supported. The Python script in this repo can pull files from local/remote web servers and local/remote file servers. Network connectivity allowing, a raspberry pi can act as a web server and/or a file server.

sabre6 commented 1 year ago

Thank you. So to use a file, it would be like this?

python3 /tmp/m3u-epg-editor-py3.py -m="file:///tmp/downloaded_m3u_file" -e="file:///tmp/downloaded_xml_file" -g=.......

bebo-dot-dev commented 1 year ago

Yep that's the way, just make sure that you get the number of forward slashes right. The right number of slashes differs depending on whether you're using script CLI arguments as in your sample and OS shell or if you're using JSON config. You have the general right idea though.

sabre6 commented 1 year ago

Thank you so much. Wonderful little program.

bebo-dot-dev commented 1 year ago

Hi @sabre6, I think this might be done, I'm going to close it. Feel free to reopen if need be.