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.
Addon and source link is at the bottom of this post.
To get started:
- Download and install the sd4tvh addon
- Run the addon and select Configure Settings and Options
- Input your Schedules Direct username/password
- Set the Number of Days to Download as desired (may want to set at 1 until you are sure everything is working)
- If you have an HDHomerun setup
- select Discover or IP in the HDHomerun Channel Filter
- Discover - should find your device on the network
- IP - if you know the hdhomerun ip address you can enter it here
- Disable the File Based Channel Filter setting
- If you do not have an HDHomerun
- Leave the HDHomerun Channel Filter set to None
- Leave the File Based Channel Filter enabled
- Select OK
- Select the Add Schedules Direct Provider Lineup (sd4tvh uses the JSON API for SD so the lineups on the SD website are not relevant)
- Follow prompts to select country / zip code / lineup
- You can review/remove your existing lineups by selecting Remove Schedules Direct Provider Lineup
- List of subscribed lineups will display
- Select lineup you wish to remove
- Select Add & Remove Channels from Lineup ***(Not needed if using HDHomerun filter)*** and follow prompts
- Select the lineup you wish to add/remove channels for
- If there are new channels (all show here the first time) the New Channels Found prompt appears
- Select which channels to include in downloads
- The Excluded Channels List prompt shows channels that will not be downloaded (any not selected above will now be here)
- Select which channels to include in downloads
- The Included Channels List propmt shows channels that will be downloaded
- Select which channels you do NOT want included in downloads
- Channels will now be saved to a file called filter.cfg in the addon userdata folder - this text file can be manually edited if desired
- Login to the tvheadend web interface to configure the sd4tvh grabber (I will include basic tvh setup info for those who need it)
- Go to the CONFIGURATION > CHANNEL/EPG > EPG GRABBER MODULES tab
- Select the Internal: XMLTV: tv_grab_sd4tvh is a simple wrapper for sd4tvh.py grabber (if missing - reboot)
- click Enabled
- click Save
- click Re-run internal EPG Grabbers
- tvheadend will now run the sd4tvh grabber and get a list of the channels (you can monitor progress in the bottom log window)
- Go to the CONFIGURATION > CHANNEL/EPG > CHANNELS tab
- For each channel, double click in the EPG source column and select the correct schedules direct channel feed
- click Save
- Return to the CONFIGURATION > CHANNEL/EPG > EPG GRABBER MODULES tab
- click Re-run internal EPG Grabbers
- tvheadend will now run the sd4tvh grabber and get a program list for the channels (you can monitor progress in the bottom log window)
- When it finishes running, the Electronic Program Guide tab should be populated
You can change your lineups and channels whenever you want, but to get the data to updated in tvheadend you need to rerun the internal grabber. The cron is set to update twice a day - you can adjust the cron time on the CONFIGURATION > CHANNEL/EPG > EPG GRABBER tab.
I'm hoping to add some of the options from my zap2xml addon in the near future.
Please provide any and all issues or feedback!! Thanks
1/10/2017 - inital version 0.2.1Download the addon: Releases · edit4ever/script.module.sd4tvh · GitHub
Source Code: GitHub - edit4ever/script.module.sd4tvh: Schedules Direct for Tvhheadend