Mailing List Archive

Culling my MythTV channels
Hi All,

This seems like a pretty basic question, but I've been searching and trying
things for over two hours to no avail and I'm just tired.

My cable provider and Schedules Direct have maybe 1000 channels, but I only
want to see a small subset, maybe 200 of them in my guide. I essentially
want to pretend the other 800 don't exist.

I have enabled the 200 I want and disabled the 800 I don't in the Schedules
Direct web interface. However running mythfilldatabase
--only-update-channels still leaves me with the entire lineup.
What's the smart way to fix this without manually deleting 800 channels in
mythtv-setup's channel editor or MythWeb's channel editor (where they would
probably come back anyway)?

Thanks,
Fred
Re: Culling my MythTV channels [ In reply to ]
On 19/03/2021 22:27, Fred Hamilton wrote:
> Hi All,
>
> This seems like a pretty basic question, but I've been searching and trying
> things for over two hours to no avail and I'm just tired.
>
> My cable provider and Schedules Direct have maybe 1000 channels, but I only
> want to see a small subset, maybe 200 of them in my guide. I essentially
> want to pretend the other 800 don't exist.
>
> I have enabled the 200 I want and disabled the 800 I don't in the Schedules
> Direct web interface. However running mythfilldatabase
> --only-update-channels still leaves me with the entire lineup.
> What's the smart way to fix this without manually deleting 800 channels in
> mythtv-setup's channel editor or MythWeb's channel editor (where they would
> probably come back anyway)?
>
Quick answer, don't delete them, just mark them non-visible. I do this in mythweb.

Since they still exist, they won't get re-added but you won't see them again in the schedules. I
don't even think their schedule info gets updated if they are marked invisible.

--

Mike Perkins

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Culling my MythTV channels [ In reply to ]
On Fri, Mar 19, 2021 at 3:57 PM Mike Perkins <mikep@randomtraveller.org.uk>
wrote:

> On 19/03/2021 22:27, Fred Hamilton wrote:
> > ...running mythfilldatabase
> > --only-update-channels still leaves me with the entire lineup.
> > What's the smart way to fix this without manually deleting 800 channels
> in
> > mythtv-setup's channel editor or MythWeb's channel editor (where they
> would
> > probably come back anyway)?
>
> Quick answer, don't delete them, just mark them non-visible. I do this in
> mythweb.
>
> Since they still exist, they won't get re-added but you won't see them
> again in the schedules. I
> don't even think their schedule info gets updated if they are marked
> invisible.
>

Thanks, I'll do that if it comes to that. But I really was hoping I could
get it to only download the data for the channels I care about, in large
part because myfilldatabase is taking up to 20 minutes to run, and I'd like
to get that back down to the ~1 minute it used to take to download an
update.
Re: Culling my MythTV channels [ In reply to ]
On 2021-03-20 4:33 p.m., Fred Hamilton wrote:
>
>
> On Fri, Mar 19, 2021 at 3:57 PM Mike Perkins
> <mikep@randomtraveller.org.uk <mailto:mikep@randomtraveller.org.uk>> wrote:
>
> On 19/03/2021 22:27, Fred Hamilton wrote:
> > ...running mythfilldatabase
> > --only-update-channels still leaves me with the entire lineup.
> > What's the smart way to fix this without manually deleting 800
> channels in
> > mythtv-setup's channel editor or MythWeb's channel editor (where
> they would
> > probably come back anyway)?
>
> Quick answer, don't delete them, just mark them non-visible. I do
> this in mythweb.
>
> Since they still exist, they won't get re-added but you won't see
> them again in the schedules. I
> don't even think their schedule info gets updated if they are marked
> invisible.
>
>
> Thanks, I'll do that if it comes to that.  But I really was hoping I
> could get it to only download the data for the channels I care about, in
> large part because myfilldatabase is taking up to 20 minutes to run, and
> I'd like to get that back down to the ~1 minute it used to take to
> download an update.


Firstly mythfilldatabase ----only-update-channels does not update the
program listings, according to 'mythfilldatabase --help'. It updates the
channels list.

You do not make it clear how you are getting your EPG data.
If you are using mythfilldatabase directly to download the DataDirect
feed from SchedulesDirect (which is what the program mfdb does), then
you have to set the channel listings to be downloaded *at
schedulesdirect.org*, using your browser. You will have to click to
deselect the channel boxes you do not want: all 800 of them.

If you are using the SD JSON service (which is set in mythtv-setup),
then the channels for which data is to be downloaded are controlled by
the 'visible' entry in the mythconverg channel table.

You will have to mark the unwanted channels "invisible". If you know
enough mysql to live dangerously, you can amend the channel table in
mythconverg to set 'visible=0' for the channels you do NOT want. You can
probably achieve the desired result, or near to it fairly quickly, by
adding a 'where' clause: 'where channum > 200'.

(If you do not understand these hints, then you are unlikely to damage
your database by trying something).

The other route is to use the channel editor. Enter the channel editor
in mythtv-setup (#6) and either;
enter each channel, scroll down, and toggle the 'visible' check-box,
or use the quicker route of just selecting the channel in the listing,
and deleting it (using 'D' iirc).
In the first case, you retain all of the channels found by your scan, so
you can re-select a channel if you find you want it. In the second case,
your list contains only the channels you presently want.

After doing this, mythtv will only download data for the limited list of
channels.


Geoff

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Culling my MythTV channels [ In reply to ]
On 20/03/2021 21:32, R. G. Newbury wrote:
> On 2021-03-20 4:33 p.m., Fred Hamilton wrote:
>>
>>
>> On Fri, Mar 19, 2021 at 3:57 PM Mike Perkins <mikep@randomtraveller.org.uk
>> <mailto:mikep@randomtraveller.org.uk>> wrote:
>>
>>     On 19/03/2021 22:27, Fred Hamilton wrote:
>>      > ...running mythfilldatabase
>>      > --only-update-channels still leaves me with the entire lineup.
>>      > What's the smart way to fix this without manually deleting 800
>>     channels in
>>      > mythtv-setup's channel editor or MythWeb's channel editor (where
>>     they would
>>      > probably come back anyway)?
>>
>>     Quick answer, don't delete them, just mark them non-visible. I do
>>     this in mythweb.
>>
>>     Since they still exist, they won't get re-added but you won't see
>>     them again in the schedules. I
>>     don't even think their schedule info gets updated if they are marked
>>     invisible.
>>
>>
>> Thanks, I'll do that if it comes to that.  But I really was hoping I could get it to only download
>> the data for the channels I care about, in large part because myfilldatabase is taking up to 20
>> minutes to run, and I'd like to get that back down to the ~1 minute it used to take to download an
>> update.
>
>
> Firstly mythfilldatabase ----only-update-channels does not update the program listings, according to
> 'mythfilldatabase --help'. It updates the channels list.
>
> You do not make it clear how you are getting your EPG data.
> If you are using mythfilldatabase directly to download the DataDirect feed from SchedulesDirect
> (which is what the program mfdb does), then you have to set the channel listings to be downloaded
> *at schedulesdirect.org*, using your browser. You will have to click to deselect the channel boxes
> you do not want: all 800 of them.
>
> If you are using the SD JSON service (which is set in mythtv-setup),
> then the channels for which data is to be downloaded are controlled by the 'visible' entry in the
> mythconverg channel table.
>
> You will have to mark the unwanted channels "invisible". If you know enough mysql to live
> dangerously, you can amend the channel table in mythconverg to set 'visible=0' for the channels you
> do NOT want. You can probably achieve the desired result, or near to it fairly quickly, by adding a
> 'where' clause: 'where channum > 200'.
>
> (If you do not understand these hints, then you are unlikely to damage your database by trying
> something).
>
> The other route is to use the channel editor. Enter the channel editor in mythtv-setup (#6) and either;
> enter each channel, scroll down, and toggle the 'visible' check-box,
> or use the quicker route of just selecting the channel in the listing, and deleting it (using 'D'
> iirc).
> In the first case, you retain all of the channels found by your scan, so you can re-select a channel
> if you find you want it. In the second case, your list contains only the channels you presently want.
>
> After doing this, mythtv will only download data for the limited list of channels.
>
I will add: you can use the mythweb channel edit screen for this to avoid mangling SQL. (I do it
this way, but I don't have so many channels as you do.) That would be mythweb -> spanner icon -> TV
-> 'channel info' tab.

This presents all channels in a single huge list with a 'save' button at the bottom. You want to
untick the 'visible' column (2nd from right) for those you don't want. In order to ensure that the
update works correctly you may have to raise one or more of the form/field limits in php.ini, since
*everything* is returned to the server when you hit 'update', not just the ones you changed.

--

Mike Perkins

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Culling my MythTV channels [ In reply to ]
On Sat, Mar 20, 2021 at 2:32 PM R. G. Newbury <newbury@mandamus.org> wrote:

> You do not make it clear how you are getting your EPG data.
> If you are using mythfilldatabase directly to download the DataDirect
> feed from SchedulesDirect (which is what the program mfdb does), then
> you have to set the channel listings to be downloaded *at
> schedulesdirect.org*, using your browser. You will have to click to
> deselect the channel boxes you do not want: all 800 of them.
>

That's the way I used to do it, before I flailed around off and on for a
few months and got xmltv to (mostly anyway) work with the JSON service. It
was after I switched to SD JSON that the automatic mfdb that myth runs
daily(?) stopped getting programming updates. I found that
mythfilldatabase --only-update-channels *does* update the schedules, but it
takes 15-25 minutes to complete, so I figured there was something
sub-optimal about my config, which is why I started this thread.

If you are using the SD JSON service (which is set in mythtv-setup),
> then the channels for which data is to be downloaded are controlled by
> the 'visible' entry in the mythconverg channel table.
>

Ah, that's very helpful to know.


> You will have to mark the unwanted channels "invisible". If you know
> enough mysql to live dangerously, you can amend the channel table in
> mythconverg to set 'visible=0' for the channels you do NOT want. You can
> probably achieve the desired result, or near to it fairly quickly, by
> adding a 'where' clause: 'where channum > 200'.
>
> (If you do not understand these hints, then you are unlikely to damage
> your database by trying something).
>

I think you meant "likely" :-). I've successfully made small edits to the
db before, and the temptation to use the where clause is great enough that
I will try again! (Will backup entire system and database first.) Thanks
for that tip.


> The other route is to use the channel editor. Enter the channel editor
> in mythtv-setup (#6) and either;
> enter each channel, scroll down, and toggle the 'visible' check-box,
> or use the quicker route of just selecting the channel in the listing,
> and deleting it (using 'D' iirc).
> In the first case, you retain all of the channels found by your scan, so
> you can re-select a channel if you find you want it. In the second case,
> your list contains only the channels you presently want.
>

> After doing this, mythtv will only download data for the limited list of
> channels.
>

After hiding or deleting or only after deleting?

Thanks Geoff, this is very helpful!
Re: Culling my MythTV channels [ In reply to ]
On Sat, Mar 20, 2021 at 4:04 PM Mike Perkins <mikep@randomtraveller.org.uk>
wrote:

> I will add: you can use the mythweb channel edit screen for this to avoid
> mangling SQL. (I do it
> this way, but I don't have so many channels as you do.) That would be
> mythweb -> spanner icon -> TV
> -> 'channel info' tab.
>
> This presents all channels in a single huge list with a 'save' button at
> the bottom. You want to
> untick the 'visible' column (2nd from right) for those you don't want. In
> order to ensure that the
> update works correctly you may have to raise one or more of the form/field
> limits in php.ini, since
> *everything* is returned to the server when you hit 'update', not just the
> ones you changed.
>

Also helpful, but since there doesn't seem to be a way to mass select one
column of checkboxes I'll probably try mucking with the database first
(system's overdue for a good backup anyway). Thanks Mike.
Re: Culling my MythTV channels [ In reply to ]
Here's what I think I know:

- Schedules Direct now only supports the XMLTV format
- The only(?) way to download Schedules Direct data to mythtv v31 is by
using "Schedules Direct JSON API (xmltv)" (or similar depending on your
locale)
- My source.xmltv file looks like:
cache=/home/fred/.xmltv/tv_grab_zz_sdjson.cache
channel-id-format=mythtv
previously-shown-format=date
username=*********
password=*********
mode=lineup
lineup=USA-CA04459-X
- I'm not actually sure what channel-id-format and mode should be, maybe
one is set wrong?

Here are my known unknowns:
- In this XMLTV-only world, what exactly does the Schedules Direct lineup
edit page (https://www.schedulesdirect.org/lineups/edit/xxxxxxxx) do?
- What does "enabling" or "disabling" a channel do?
- It seems like Schedules Direct can *add* channels to the myth database,
but it can't delete them?

I'd really like to understand this better. If there's a FAQ or
documentation that explains this please let me know! Right now the more I
read the more confused I get.

Thanks everyone.
Re: Culling my MythTV channels [ In reply to ]
On 2021-03-21 6:35 p.m., Fred Hamilton wrote:
> Here's what I think I know:
>
> - Schedules Direct now only supports the XMLTV format

NO. SD still supports the DataDirect format, with channel selection
through the web-site, and downloading data using the mythfilldatabase
program.

However the tv_grab_zz_sdjson and tv_grab_zz_sdjson-sqlite programs
provide data from a different base, with more/better data, and reduced
server load at the SD end, and reduced computer load/bandwidth at the
user's end. Program data is separated fropm scheduling and downloaded
once. Schedules for channels are not re-downloaded if unchanged.

> - The only(?) way to download Schedules Direct data to mythtv v31 is by
> using "Schedules Direct JSON API (xmltv)" (or similar depending on your
> locale)

I just did some checking. It appears that the entry in mythtv-setup ->
General -> (scroll to the bottom ) Program Download Options (or
somesuch) -> and setting mythfilldatabase OR /usr/local/bin/my-grabber
actually does not control the download.

*THAT* is set in mythtv-setup -> 4. Video Sources ->
Your-named-source-here -> Select grabber option from the LONG list. In
this case SD JSON API

> - My source.xmltv file looks like:
>      cache=/home/fred/.xmltv/tv_grab_zz_sdjson.cache
> channel-id-format=mythtv
Another choice is channel-id-format=default

> previously-shown-format=date
Another choice is previously-shown-format=datetime (possibly more
granular??)

> username=*********
> password=*********
> mode=lineup
Another choice is mode=channels

> lineup=USA-CA04459-X

My OTA.xmltv file covers the US channels I get through one of my antenna:
mode=channels
channels!CAN-0005580-X
channels!CAN-OTA-L5H3J2
# NOTE the '!' negating the lineup

channels=USA-OTA-14174
channel=31507
channel=24051
and continuing list of channel/xmltvid pairs

> - I'm not actually sure what channel-id-format and mode should be, maybe
> one is set wrong?

'He who dares, wins'. If you are not getting what you think you should
be getting, then give it a try.

> Here are my known unknowns:
> - In this XMLTV-only world, what exactly does the Schedules Direct
> lineup edit page (https://www.schedulesdirect.org/lineups/edit/xxxxxxxx)
> do?
> - What does "enabling" or "disabling" a channel do?

Nothing to the xmltv world. It is a completely parallel world which is
only accessed by using the mythfilldatabase program from your mythtv
box. (With General -> Program Download... -> mythfilldatabase AND forex
Video Source -> OTA -> mythfilldatabase.

> - It seems like Schedules Direct can *add* channels to the myth
> database, but it can't delete them?

Of course you can. If you are using the JSON xmltv setup, that is done
through the JSON configuration process, OR, as previously set out, using
mythtv-setup -> Channel Editor.


> I'd really like to understand this better.  If there's a FAQ or
> documentation that explains this please let me know!  Right now the more
> I read the more confused I get.

I guess I will have to go look at the wiki and see if the setup process
can be clarified. Last time I looked it seemed reasonable to me, but
then I *knew* that it was completely different from using the one and
only! original mythfilldatabase off the web-site. (I've been using the
JSON xmltv route since 2015!)

Geoff




_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Culling my MythTV channels [ In reply to ]
Fred Hamilton <fred@yonkitime.com> wrote:

> - My source.xmltv file looks like:
> cache=/home/fred/.xmltv/tv_grab_zz_sdjson.cache
> channel-id-format=mythtv
> previously-shown-format=date
> username=*********
> password=*********
> mode=lineup

If you change mode to channels then you can specify what channels you want to fetch. But instead of manually maintaining a list - let the computer do it for you ;-)

Have a look at https://lists.archive.carbon60.com/mythtv/users/631199 where I replied to a different request - but the principle will probably still help you.
IF you maintain your channel list to only have the channels you want as visible, then the script (adapt as required) will fetch the listings for only those channels.

If you find yourself having to redo the chennels selections (e.g. re-scans are more than "very rare") then have a look at the link in that archive above to the wiki https://www.mythtv.org/wiki/Database_editing_script. That's something I setup a long time ago when I got "rather annoyed" at having to redo all my channel changes every time I had to retune - those in charge of UK Freeview seem to think it's fair game to alter things any time there's a 'y' in the day ! It's a right PITA to setup the script, but once done it's less work to maintain. The main think is looking at the channel list (I use mythweb for that) and see if there's anything been shoved out the way & made invisible that you want to watch - then tweaking the script to suit and re-running it.

I use this script to get a list of channels available from SD :
> #!/bin/bash
>
> # Get full xml listing and extract channel-ids & names
>
> base="/var/lib/mythtv/.xmltv"
> conf="${base}/tv_grab_sd_json.conf"
> chan_file="${base}/channels"
>
> rm ${conf}.full ${chan_file}.txt ${chan_file}.xml 2>/dev/null
>
> sed -e 's/channels/lineup/' < ${conf}.base > ${conf}.full
>
> tv_grab_zz_sdjson --config-file ${conf}.full --days 0 --output ${chan_file}.xml
> grep 'channel id
> display-name' < ${chan_file}.xml > ${chan_file}.txt
Then I open the output file in ${favourite editor} and search t=for the channels names I need to find IDs for.

The base conf file I use 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

My get_listings script then adds all the channels I have set to visible and which don't use on-air listings to this conf file before using it to fetch listings :
> #!/bin/bash
>
> base="/var/lib/mythtv/.xmltv"
> conf="${base}/tv_grab_sd_json.conf"
> xmlfile="${base}/listings.xml"
> xmlfile2="${base}/sd.xml"
>
> rm ${conf} ${xmlfile} ${xmlfile2} 2>/dev/null
>
> cp ${conf}.base ${conf}
>
> mysql --host=localhost --user=mythtv --database=mythconverg --password='*****' \
> -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}
>
> /usr/bin/tv_grab_zz_sdjson --config-file ${conf} --output ${xmlfile}
> /usr/bin/tv_grep --output ${xmlfile2} --not --title 'To Be Announced' ${xmlfile}
>
> mythfilldatabase --only-update-guide --sourceid 1 --file --xmlfile ${xmlfile2} 2>&1 | grep -v 'Ignoring unknown timestamp format'



OK, this doesn't help you in picking out the 200 channels you want - but it will deal with only fetching the schedules data you need when you've done it.
It's also using the JSON format - the only format supported by SD for the UK.

Simon
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Culling my MythTV channels [ In reply to ]
On Mon, Mar 22, 2021 at 10:54 AM R. G. Newbury <newbury@mandamus.org> wrote:

> On 2021-03-21 6:35 p.m., Fred Hamilton wrote:
> > Here's what I think I know:
> > - Schedules Direct now only supports the XMLTV format
>
> NO. SD still supports the DataDirect format, with channel selection
> through the web-site, and downloading data using the mythfilldatabase
> program.
>

I thought I'd read that SD was deprecating DataDirect. I'd be happy to go
back to that if it's not in danger of disappearing. On the other hand, I
wouldn't mind all the benefits you mention here:


> However the tv_grab_zz_sdjson and tv_grab_zz_sdjson-sqlite programs
> provide data from a different base, with more/better data, and reduced
> server load at the SD end, and reduced computer load/bandwidth at the
> user's end. Program data is separated fropm scheduling and downloaded
> once. Schedules for channels are not re-downloaded if unchanged.
>
> > - The only(?) way to download Schedules Direct data to mythtv v31 is by
> > using "Schedules Direct JSON API (xmltv)" (or similar depending on your
> > locale)
>
> I just did some checking. It appears that the entry in mythtv-setup ->
> General -> (scroll to the bottom ) Program Download Options (or
> somesuch) -> and setting mythfilldatabase OR /usr/local/bin/my-grabber
> actually does not control the download.
>


> *THAT* is set in mythtv-setup -> 4. Video Sources ->
> Your-named-source-here -> Select grabber option from the LONG list. In
> this case SD JSON API
>

I think I have the correct grabber. That may be the one thing I'm doing
right.

My OTA.xmltv file covers the US channels I get through one of my antenna:
> mode=channels
> channels!CAN-0005580-X
> channels!CAN-OTA-L5H3J2
> # NOTE the '!' negating the lineup
>

And I thought my mind couldn't be further blown...I just have the one
lineup - you have so much going on you have to negate lineups?!?

'He who dares, wins'. If you are not getting what you think you should
> be getting, then give it a try.
>

I'm usually great with that, but my incomprehension of how this all works
is so great I'm not at the point of messing with anything that seems like
it's working. :-)

> Here are my known unknowns:
> > - In this XMLTV-only world, what exactly does the Schedules Direct
> > lineup edit page (https://www.schedulesdirect.org/lineups/edit/xxxxxxxx)
>
> > do?
> > - What does "enabling" or "disabling" a channel do?
>
> Nothing to the xmltv world. It is a completely parallel world which is
> only accessed by using the mythfilldatabase program from your mythtv
> box. (With General -> Program Download... -> mythfilldatabase AND forex
> Video Source -> OTA -> mythfilldatabase.
>

Got it. But are you also saying that mythfilldatabase is no longer used/no
longer needed after switching to xmltv?

> - It seems like Schedules Direct can *add* channels to the myth
> > database, but it can't delete them?
>
> Of course you can. If you are using the JSON xmltv setup, that is done
> through the JSON configuration process, OR, as previously set out, using
> mythtv-setup -> Channel Editor.
>

I know *I* can, I was just complaining about how SD has added hundreds of
channels to my myth database over the years, but I'm not able to use it to
delete any. Don't like the asymmetry! But you explained earlier that this
doesn't matter with xmltv so happy to let it go.

> I'd really like to understand this better. If there's a FAQ or
> > documentation that explains this please let me know! Right now the more
> > I read the more confused I get.
>
> I guess I will have to go look at the wiki and see if the setup process
> can be clarified. Last time I looked it seemed reasonable to me, but
> then I *knew* that it was completely different from using the one and
> only! original mythfilldatabase off the web-site. (I've been using the
> JSON xmltv route since 2015!)
>

My biggest issue (aside from not being a linux or database guy) is that I'm
a visual thinker with a lousy memory. I can understand block diagrams and
flowcharts but when faced with pages and pages of text full of acronyms I'm
not familiar with, it's just up and down rabbit holes trying to figure out
even the basics. I'm not complaining about the documentation on an
amazing, free product; just trying to explain to everyone why I seem so
dense. If I ever get an understanding of the full picture I'll try to
write up something that past me would have understood.

Really appreciate the help!
Re: Culling my MythTV channels [ In reply to ]
On Mon, Mar 22, 2021 at 1:27 PM Simon Hobson <linux@thehobsons.co.uk> wrote:

> If you change mode to channels then you can specify what channels you want
> to fetch. But instead of manually maintaining a list - let the computer do
> it for you ;-)
>

Thanks - I ran across your post and script earlier in my research and will
consider using them. They seem like the most elegant and efficient way to
deal with channel management. Appreciate the additional examples as well!

But right now I'm just struggling with the big picture, like I'm not even
sure if mythfilldatabase is even needed with xmltv/json. I guess it is
since 'mythfilldatabase --only-update-channels' is the only way I know to
get updates, but then it re-adds any channels I've deleted or hidden.

I've been using myth for 12 years now and been able to keep everything
working and updated (though I've always struggled a little with the various
ways to control lineup - SD website, mythtv-setup, mythweb). But I still
lack a basic understanding of how this xmltv grabbing is supposed to work
with SD, JSON grabbers, mythfilldatabase, mythbackend, and all the various
config files.
Re: Culling my MythTV channels [ In reply to ]
On Mon, 22 Mar 2021 17:55:01 -0700, you wrote:

>On Mon, Mar 22, 2021 at 1:27 PM Simon Hobson <linux@thehobsons.co.uk> wrote:
>
>> If you change mode to channels then you can specify what channels you want
>> to fetch. But instead of manually maintaining a list - let the computer do
>> it for you ;-)
>>
>
>Thanks - I ran across your post and script earlier in my research and will
>consider using them. They seem like the most elegant and efficient way to
>deal with channel management. Appreciate the additional examples as well!
>
>But right now I'm just struggling with the big picture, like I'm not even
>sure if mythfilldatabase is even needed with xmltv/json. I guess it is
>since 'mythfilldatabase --only-update-channels' is the only way I know to
>get updates, but then it re-adds any channels I've deleted or hidden.
>
>I've been using myth for 12 years now and been able to keep everything
>working and updated (though I've always struggled a little with the various
>ways to control lineup - SD website, mythtv-setup, mythweb). But I still
>lack a basic understanding of how this xmltv grabbing is supposed to work
>with SD, JSON grabbers, mythfilldatabase, mythbackend, and all the various
>config files.

Mythfilldatabase runs the grabbers for each source, then takes the
xmltv format data provided by each grabber and puts it in the
database. So you need to configure mythbackend to run
mythfilldatabase, or do that externally, as I do from a cron job. Then
you need to configure each source to tell mythfilldatabase what
grabber to run with what options.

If you have an xmltv file on disk, there are also options to get
mythfilldatabase to read that file and insert it into the database. I
do that in virtual machines where I am testing something - I copy an
xmltv file from my main MythTV box and manually run "mythfilldatabase
--sourceid <x> --file -xmlfile <xxxx>.xmltv".
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Culling my MythTV channels [ In reply to ]
Fred Hamilton <fred@yonkitime.com> wrote:

> But right now I'm just struggling with the big picture, like I'm not even sure if mythfilldatabase is even needed with xmltv/json. I guess it is since 'mythfilldatabase --only-update-channels' is the only way I know to get updates, but then it re-adds any channels I've deleted or hidden.

It's still needed.

Referring to my earlier message, the command my script is using is :
> mythfilldatabase --only-update-guide --sourceid 1 --file --xmlfile ${xmlfile2}


I'm assuming that --only-update-guide means it should do nothing but add the scheduling data to the database - not update channels or anything like that. The program help is terse and just says "Only update guide data". I would have thought that --only-update-channels would be the exact opposite of what you want since according to the program help that specifies "only update channel lineup" which I'd interpret as updating channels but not loading any listings.

I call it from a script as that allows me to do "stuff" before passing a file to mythfilldatabase - in the backend settings, you can specify a script to be run to grab listings.

Simon

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Culling my MythTV channels [ In reply to ]
On Thu, Mar 25, 2021 at 2:32 PM Simon Hobson <linux@thehobsons.co.uk> wrote:

> Referring to my earlier message, the command my script is using is :
> > mythfilldatabase --only-update-guide --sourceid 1 --file --xmlfile
> ${xmlfile2}
>

Will try --only-update-guide, thanks.

I'm assuming that --only-update-guide means it should do nothing but add
> the scheduling data to the database - not update channels or anything like
> that. The program help is terse and just says "Only update guide data". I
> would have thought that --only-update-channels would be the exact opposite
> of what you want since according to the program help that specifies "only
> update channel lineup" which I'd interpret as updating channels but not
> loading any listings.
>

I thought it was crazy, too. After all my channels stopped updating last
year, I figured it was due to the switch to xmltv. So I tried to switch to
xmltv. I still couldn't get listing updates. I flailed around and tried
"--only-update-channels", and I got listing data! I haven't touched it
because in my experience one mistake and all my channels disappear or all
my deleted channels reappear.

Thanks to your help (and Mike's and Geoff's and Stephen's), I've got my
lineup where I want it. Next step is to try --only-update-guide (and then
your scripts to clean things up and make them more maintainable).

Thanks,
Fred