G Kazaroth wrote:
> Just a note. I have made some changes that now require python 3.7. If you do not have 3.7, let me know; the changes help plugin capability. I am aware that Ubuntu 18 runs python 3.6 and upgrading to Ubuntu 20 will upgrade to python 3.8. Not sure about running RPI.
I have Python 3.7.3 so no problem there.
Just a few other thoughts:
I don't know what kind of plugins you are planning on supporting but if you haven't decided yet, I would suggest you don't put much effort into Pluto TV because it is rather useless without a usable guide, and by usable I mean one that has listings that go out more than a few hours. The whole point of something like Tvheadend is to be able to schedule programs in advance and record them, and you can't do that with a provider that only tells you what is on currently or next. In my opinion it would be better to start with something like Sling TV because their guide goes out a week, even though they have fewer streaming channels. If there was any way to get schedule data for Pluto that lasts more than a short time then that would probably be a better choice because of the sheer number of channels they have, but apparently they have made an idiotic decision to not let their viewers know what will be coming on tomorrow, let alone a week from now. Don't get me wrong, Pluto is great for on demand stuff, it's their streaming channels that are useless in my opinion due to the short guide duration, and I know some others would disagree but personally I don't do mindless channel surfing anymore.
And speaking of guide data, there are two things that frustrate me about the XML files that your software produces. One is that there are almost no line breaks. Compare the XML file produced by your software to one produced by something like zap2xml and you will see that the one produced by zap2xml has plenty of linefeeds in logical places where yours doesn't. Besides making the XML file more readable if you are trying to figure out an issue, it also makes it possible to use something like sed to remove all links to image files. The fact that those image file links are even included is the second thing. I do not want Tvheadend downloading image files, ever. If the XML file contains links to image files for every channel and every program in that channel, Tvheadend will happily download them and store themforever , even if you never watch a particular program, unless you know how to manually clean the image cache and remember to do so from time to time. After it has a few gigabytes of icons stored then it will not restart without making you wait for it to go through all those icons (not sure exactly what it is doing, but it's doingsomething with them), so after a reboot you are sitting there thinking there is something wrong with Tvheadend because it doesn't appear to be restarted (see the article at https://twosortoftechguys.wordpress.com/2018/08/26/how-to-fix-tvheadend-being-slow-to-start-after-a-system-reboot/ for more information on this problem). Plus those icons are usually low quality, and not all software will display them anyway - in Kodi I believe some skins will and some won't.
You may say that zap2xml also downloads them, well not in the version I run it doesn't - I found the lines that cause Tvheadend to download those infernal things (as mentioned in the article linked in the previous paragraph) and commented them out!
(EDIT: I finally did find a way to add linefeeds and remove those icon links, you just have to download the xmltv.xml file and do this:
xmllint --format xmltv.xml | sed '/<icon src=/d' > new.xml
However this assumes that you have the xmllint command available on your system - if not it can be installed usingsudo apt update && sudo apt install libxml2-utils
But now that I have figured that out, I can see that the listings from Locast only go out for less than a week, plus there is no way to specify which channels you want a.k.a. "favorite" channels, so I'd still use zap2xml. End edit.)
Also, if you plan to write any plugins that scrape guide data, my wish would be for one that works with
https://www.tvtv.us/ and
https://www.tvtv.ca/ - they seem to be more up to date on certain channel listings, and zap2xml doesn't work with them (nor does it appear to work with TV Guide anymore, so that might be another good choice if you can figure out how to do it). For most channels zap2xml works fine for me, but whenever a new subchannel is added or a channel changes the arrangements of their subchannels, it always takes a while for them to catch up. Actually, the best free guide out there in my opinion is TitanTV because it is fully configurable and you can add channels from any locale to a single account (which is helpful if you have a C-band satellite dish!), but apparently scraping from them is difficult to impossible. So, TVTV, Zap2it, and TV Guide all provide good listing data for the USA and Canada, but I suspect the first two might be the easiest to implement in a plugin (maybe - I have no clue how difficult it really is).