[mythtv-users] mythfilldatabase confusion

Paul Gardiner lists at glidos.net
Sun Jun 9 18:05:54 UTC 2024



On 09/06/2024 15:59, Hika van den Hoven wrote:
> Hoi Paul,
> 
> Sunday, June 9, 2024, 4:32:28 PM, you wrote:
> 
>> On 09/06/2024 15:13, Hika van den Hoven wrote:
>>> Hoi Paul,
>>>
>>> Sunday, June 9, 2024, 1:20:53 PM, you wrote:
>>>
>>>> For many years, I've been running mythfilldatabase from a cronjob,
>>>> rather than configuring mythbackend to run it. Also I've been using a
>>>> bespoke script to set xmltvid and icon fields in the channel table. It
>>>> works okay, but it's a pain. It used to be necessary, I think, because I
>>>> was piping the data from one lineup into two video sources and messing
>>>> with the call sign to have channels duplicated across the two video
>>>> sources appear as one.
>>>
>>>> My system is simpler now: I have just one video source. I'm
>>>> experimenting to see if mythtfilldatabase can set icon and xmltvid.
>>>
>>>> First question - is this a lost cause? Should I stick with my bespoke
>>>> script? (This Freeview in the UK. I have reliable logical channel
>>>> numbers in both scan data and the listing, which made me think it would
>>>> work).
>>>
>>>> What I've done so far towards this change is:
>>>
>>>> * Performed a new channel scan
>>>> * Manually (mysql) set icon and xmltvid to "" for all channels.
>>>> * From the new web app, set up the tv_grab_zz_json to be called
>>>> automatically (same grabber I was using before from a cron job)
>>>> * Newly configured the grabber according to the web app's instructions
>>>
>>>
>>>> Now, I assume, sometime during the next 24 hours, mythbackend will run
>>>> mythfilldatabase and I will find out if my experiment has worked, but
>>>> I'd like to find out now.
>>>
>>>> So second question: is there a way to trigger mythbackend to run it now?
>>>> I can run mythfilldatabase directly from the command line, but I don't
>>>> know what arguments mythbackend might supply. Also I can't find a way to
>>>> set at what time a day the automatic run is performed.
>>>
>>>> Cheers,
>>>>           Paul.
>>>
>>> xmltvid's are the proprietary ids for the channels in the import data.
>>> If you do not before the first run add them to your mythtv lineup,
>>> they can not match and new channels without link to your physical
>>> mythtv lineup can get created.
>>> So you have to set them once before the first run. Icons should be
>>> added automatically.
>>> It could be that schedules direct knows about the physical lineup and
>>> that your idea works, but I do not know.
> 
>> Yep. It didn't work. In the end, I decided that an altered version of
>> the grabber/mythfilldatabase pipeline that I'd been running as a cron
>> job would be the thing to try - alterations being explicitly set the
>> config file for the grabber and remove --only-update-guide. That added a
>> load of channels but with strange call signs. It certainly didn't merge
>> the data in the way I hoped it might. So I'm back with my old solution
>> which is a set of ruby scripts that performs heuristic matching, creates
>> a .htm file so that I can view the results, and some sql to set icon and
>> xmtvid in the database. It's the one messy area of my set up.
> 
>> Paul
> 
> If I understand correct, you change the xmltvid's in the grabber data
> on every run to the one you have set in your mythtv setup. That's the
> world upside-down.

I think my description wasn't very clear. Other than my experiment 
today, I set xmltvid's in the database and only after a scan.

> Xmltvid's are specific to the grabber you use and if you have more
> than one video source that partially contain the same channels you can
> use those same xmltvid's on all the sources. You can run
> mythfilldatabase multiple times with the same dataset. Ones for every
> video source. If I remember correct the possibility to automatically
> add channels to mythtv for those xmlyvid's in the data that are not
> present in that video source, can be turned on or off by a commandline
> switch. So if you reuse the grabber data for multiple sources, make
> sure that switch is off!

I used to reuse grabber data for multiple sources, but recently moved to 
having one source. That's what led to my experimenting. It's exactly 
that automatic adding of channels with which I was trying to experiment. 
I don't think it is going to work in my case. I haven't yet understood 
in what scenario that feature is supposed to be used.


More information about the mythtv-users mailing list