Kodi Community Forum

Full Version: Schedules Direct for Tvheadend addon
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
For some reason - I forgot to post this in this forum after getting it up and tested on LE.

Schedules Direct for Tvheadend (sd4tvh) addon is now ready for testing!!
Thanks to astrilchuk and primaeval for their work taht I merged/morphed into this. The code is not optimized and needs further consolidation, but it has reached a point of needed some feedback from other users.

The sd4tvh addon creates an xmltv grabber for tvheadend using the Schedules Direct JSON API. It also contains a kodi interface to manage your Schedules Direct lineups and configure a channel filter. The main purpose of the filter is to reduce download time and to fix a Schedules Direct timeout issue for those who use cable lineups (as these often start with 1000 channels).

The channel filter uses a file to limit the number of channels downloaded from SD. This speeds up the time it takes to generate your xmltv.xml file and reduces the size of you sdcache.db file. There is an untested hdhomerun filter than can be used in place of the file based filter - if you have an hdhomerun setup. This should recognize the channels you have configured in the hdhomerun system and only download the necessary guide data. **As I do not have an hdhomerun - feedback is welcomed.

The instructions are over on the LE forum here: https://forum.libreelec.tv/thread/3715-w...#post27764



1/10/2017 - inital version 0.2.1

Download the addon: https://github.com/edit4ever/script.modu...h/releases

Source Code: https://github.com/edit4ever/script.module.sd4tvh

** Special temporary download for Kodi 18 Leia alpha tests: https://www.dropbox.com/s/170aviil80pjtm...6.zip?dl=0


I also just released an addon to configure Tvheadend from within kodi - see that here: 2613810 (post)


If you like my work you can buy me a coffee
I have never understood why anyone in the USA would pay for Schedules Direct when with only a bit more effort you can use zap2xml (http://zap2xml.awardspace.info/) and get schedule data for free. I basically followed the instructions at https://freetoairamerica.wordpress.com/2...-frontend/ which probably aren't as clear as they should be, but I was able to follow along and got it working after a few minutes effort. If you want to create an addon that would really help people instead of forcing them to pay, why not make one that makes it easy to setup and use zap2xml?
I did create that addon awhile ago! Tongue

The discussion is here: https://forum.libreelec.tv/thread/440-tv...1#post3301

And the release can be found here: https://github.com/edit4ever/script.modu...l/releases

If you combine that with the Tvheadhend addon for kodi interface that I built here: 317841 (thread)

You can easily get up and running.

As for Schedules Direct - some people prefer to use a real guide data provider that has the most complete set of data available. It's also the most "legit" way of getting the data. I've created addons for both and let the end user decide what's best for them.
Good, thanks!

Always good to have choices, especially when one of them is free!

As for the "legitimacy" of using zap2xml, I don't see much difference in doing that and using a video addon in Kodi that displays freely-available content from a provider's web site. In either case you are going out to a web site to get the data, and maybe you are not displaying it in exactly the manner the provider intended, but you aren't doing anything illegal either (at least not anything that's ever been explicitly declared illegal in a court of law). However I do recognize that some people have plenty of money to burn, and don't mind paying, so I'm glad you support both choices.
Doesn't the Xmltv project already have a schedules direct scraper?
(2017-07-08, 23:25)nickr Wrote: [ -> ]Doesn't the Xmltv project already have a schedules direct scraper?

Yes, but the version of Perl and supporting modules shipped in OE/LE is insufficient to run the XMLTV grabbers, as many of the modules need to be compiled as binaries. Additionally, if you are starting from scratch, the tv_grab_zz_sdjson grabber (which is the name of the Schedules Direct JSON API grabber) can only be configured from the commandline as the user which runs the Tvheadend service.

Combine these two issues, and you'll find that the XMLTV project's grabbers are not a good match with OE/LE. (Although to be honest, because of the nature of Tvheadend's configuration and paradigm, I'm not certain that it is a good match for the appliance-like nature of OE/LE, either.)
I had indeed forgotten about the perl issue. The tv_grab I use is written in python. (not that I use it on libreelec anyway)
These are the exact reasons i've been creating these add-ons. To simplify installing and running tvh on a simple to install os like LE.

This way noobs can get a simple DVR system up and running and cut the cord! :-)
Excellent.
FYI - my addons are being impacted by the changes to Kodi addon settings - if you're running a Kodi 18 Leia build - my grabber addons are not going to work. I am testing some fixes and will update soon. If you're running Kodi 17.x it should be fine.
Post #1 updated with temporary Leia fix version.

https://forum.kodi.tv/showthread.php?tid...pid2614416
Just spent a bit trying to get this to work but seems to freeze my kodi and not grab anything

Code:
2017-09-28 14:25:22.014 spawn: Executing "/storage/.kodi/addons/script.module.sd4tvh/bin/tv_grab_sd4tvh"

There seems to be a problem with the live update feed from Tvheadend. Trying to reconnect...

Reconnected to Tvheadend

2017-09-28 14:29:09.288 spawn: cat: can't open 'xmltv.xml': No such file or directory

2017-09-28 14:29:09.351 xmltv: /storage/.kodi/addons/script.module.sd4tvh/bin/tv_grab_sd4tvh: no output detected

2017-09-28 14:29:09.351 xmltv: /storage/.kodi/addons/script.module.sd4tvh/bin/tv_grab_sd4tvh: grab returned no data

here is my log, doesn't really tell me anything

https://pastebin.com/raw/LqNmeYvw

I have it set to 1 day, not really sure what I could be doing wrong. Any input would be helpful, thanks
Couple of quick questions just to make sure I have all the info:

What version of LibreELEC are you running (hardware and software)?

Did you setup the lineup through the sd4tvh addon (add schedules direct provider lineup)?

I assume you left HDHomerun Channel filter off and File Based Channel Filter on in the sd4tvh addon?

Finally - do note that the first time you download data for a lineup - it can take 5-7 minutes on a fast connection. However, this should not freeze kodi. If you want to speed this up, you can use the Add & Remove channels from lineup feature in sd4tvh to just have the channels you want included. That way they're the only ones that download. As an example, this dropped my download time from 160 seconds to 18 seconds.

Once you send me the answers above - we can take a look at next steps.

Thanks!
Yeah, basically default settings. I added 1 lineup in the addon and 2 on SD. I'm running libreelec krypton 17
What hardware are you running on (RPi, amlogic box, x64, etc)? And what LE version (7, 8, 8.2, 9)?

Adding anything in th eschedules direct website won't impact the download as the addon uses the schedules direct json api which has to be configured through the sd4tvh addon.

I can run a test on my end if you give me the lineup information you are trying to download - location (zipcode) and lineup.

Also in the meantime - go into the addon and see if you can add & remove channels for your lineup.
Pages: 1 2 3 4 5