[mythtv-users] Schedules Direct - two program feeds
Simon Hobson
linux at thehobsons.co.uk
Fri May 28 19:21:38 UTC 2021
Mike Perkins <mikep at randomtraveller.org.uk> wrote:
>>> I just got Schedules Direct set up (kind of) in xmltv.
> I let the myth backend run mythfilldatabase here, using schedulesdirect information, and I don't have to do any of that.
>
> I have two sources with completely different lineups ...
Jim Morton <jimmorton01 at gmail.com> wrote:
> You need (at least) 2 lineups at Schedules Direct.
Hmm, I was under the impression that with XMLTV you don't use "lineups" - are you using the JSON service, or the older Schedules Direct service (which does use lineups) ? Or are you referring to the 'channels=...' entry in xmltv's config file as a 'lineup' ?
My script (I use a script as I do a bit of filtering on the listings) builds a config file that looks like :
> cache=/var/lib/mythtv/.xmltv/tv_grab_sd_json.cache
> channel-id-format=mythtv
> username=<user>
> password=<pass)
> mode=channels
> channels=GBR-1000040-DEFAULT
> channel=102471
> channel=103817
> channel=...
> ...
After filtering the listings (remove all the 'To Be Announced' entries), it then uses :
> mythfilldatabase --only-update-guide --sourceid 1 --file --xmlfile ${xmlfile2} 2>&1
to load them.
As an aside, it use this code to get the active channel ID from the database :
> mysql --host=localhost --user=mythtv --database=mythconverg --password='<pass>' \
> -e "select distinct(xmltvid) from channel where visible=1 and useonairguide=0 order by xmltvid ;" |
> grep '[0-9][0-9][0-9][0-9][0-9]' |
> sed -e 's/^/channel=/' >> ${conf}
So grabbing listings is a maintenance free operation in terms of channel IDs - once they are set in MythTV.
Simon
More information about the mythtv-users
mailing list