Mailing List Archive

Can I setup xmltv before changing grabbers in mythtv-setup?
I'm currently using the Data Direct grabber. Can I setup XMLTV from the
command line per the Wiki, matching channels with my current lineups before
making any changes in mythtv-setup? If it goes south or takes a week to
accomplish, I don't want Mythtv to be down. I will need two lineups, local
off the air and Dish. After setting up XMLTV, then I'd like to go into
mythtv-setup and change grabbers and lineups.

Mark
Re: Can I setup xmltv before changing grabbers in mythtv-setup? [ In reply to ]
On 6/8/20 6:59 AM, Mark Goldberg wrote:
> I'm currently using the Data Direct grabber. Can I setup XMLTV from the
> command line per the Wiki,

Yes. Changing schedulesdirect' to'tv_grab_zz_sdjson_sqlit' is
the "on/off" switch, if you will (I use tv_grab_zz_sdjson_sqlite.)

matching channels with my current lineups before
> making any changes in mythtv-setup? If it goes south or takes a week to
> accomplish, I don't want Mythtv to be down. I will need two lineups, local
> off the air and Dish. After setting up XMLTV, then I'd like to go into
> mythtv-setup and change grabbers and lineups.

That's the way I did it.

There's a note near the top of the Wiki that mentions:
... By running all programs as user mythtv ... You'll
really want to do that. After things are setup, then
if you run mythfilldatabase manually, then do that as
user mythtv too. Same if MFDB is run out of cron etc.

--
Bill

Some ASCII art I've been working on that may be of interest
as far as where files end up (works for me with plain
text email.)

------------------------------------------------------------------

See if systemd starts the backend using: MYTHCONFDIR or if HOME is
set somewhere other than the 'typical' place, e.g. /home/mythtv:

systemctl show --property="Environment,Home" mythtv-backend.service

Look for MYTHCONFDIR in the output. Users of other init systems should
look in files their systems use, such as /etc/init/mythtv-backend.

Example for distributions that store MythTV data relative to ~mythtv/.mythtv,

/
??? home
??? mythtv
??? .mythtv
?   ??? OTA.xmltv # Which contains:
? ? database=/home/mythtv/.xmltv/SchedulesDirect.DB
? ? lineup=USA-OTA-90210
? ? mythtv-categories=enabled
? ?
?   ??? CABLE.xmltv # Which contains:
? database=/home/mythtv/.xmltv/SchedulesDirect.DB
? lineup=USA-IL90210-X
? mythtv-categories=enabled
?
??? .xmltv
??? SchedulesDirect.DB

Note that nothing is stored under the login user's .mythtv or .xmltv


In this example, MYTHCONFDIR was set to /var/lib/mythtv/confdir. This grabber
setup doesn't honor MYTHCONFDIR, so path must be changed to the desired locations
not the defaults.

/
??? var
??? lib
??? mythtv
??? confdir
?   ??? OTA.xmltv # Which contains:
? ? database=/var/lib/mythtv/SchedulesDirect.DB
? ? lineup=USA-OTA-90210
? ? mythtv-categories=enabled
? ?
?   ??? CABLE.xmltv # Which contains:
? database=/var/lib/mythtv/SchedulesDirect.DB
? lineup=USA-IL90210-X
? mythtv-categories=enabled
?
??? SchedulesDirect.DB

Nothing is under the login or mythtv users .mythtv and .xmltv directories.
_______________________________________________
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: Can I setup xmltv before changing grabbers in mythtv-setup? [ In reply to ]
On Mon, Jun 8, 2020 you wrote:

>On 6/8/20 6:59 AM, Mark Goldberg wrote:
>> I'm currently using the Data Direct grabber. Can I setup XMLTV from the
>> command line per the Wiki,
>
>Yes. Changing schedulesdirect' to'tv_grab_zz_sdjson_sqlit' is
>the "on/off" switch, if you will (I use tv_grab_zz_sdjson_sqlite.)
>
>matching channels with my current lineups before
>> making any changes in mythtv-setup? If it goes south or takes a week to
>> accomplish, I don't want Mythtv to be down. I will need two lineups, local
>> off the air and Dish. After setting up XMLTV, then I'd like to go into
>> mythtv-setup and change grabbers and lineups.
>>
>That's the way I did it.
>
>There's a note near the top of the Wiki that mentions:
>... By running all programs as user mythtv ... You'll
>really want to do that. After things are setup, then
>if you run mythfilldatabase manually, then do that as
>user mythtv too. Same if MFDB is run out of cron etc.

I don't use systemd to start mythtv. It's started with my own scripts.
This is an installation that dates back to 2006 but has been upgraded
many times since. It runs as mythtv and I can log in as such.

Regards,

Mark
_______________________________________________
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: Can I setup xmltv before changing grabbers in mythtv-setup? [ In reply to ]
On 6/8/20 4:53 PM, Mark Goldberg wrote:
> On Mon, Jun 8, 2020 you wrote:
>
>> On 6/8/20 6:59 AM, Mark Goldberg wrote:
>>> I'm currently using the Data Direct grabber. Can I setup XMLTV from the
>>> command line per the Wiki,
>>
>> Yes. Changing schedulesdirect' to'tv_grab_zz_sdjson_sqlit' is
>> the "on/off" switch, if you will (I use tv_grab_zz_sdjson_sqlite.)
>>
>> matching channels with my current lineups before
>>> making any changes in mythtv-setup? If it goes south or takes a week to
>>> accomplish, I don't want Mythtv to be down. I will need two lineups, local
>>> off the air and Dish. After setting up XMLTV, then I'd like to go into
>>> mythtv-setup and change grabbers and lineups.
>>>
>> That's the way I did it.
>>
>> There's a note near the top of the Wiki that mentions:
>> ... By running all programs as user mythtv ... You'll
>> really want to do that. After things are setup, then
>> if you run mythfilldatabase manually, then do that as
>> user mythtv too. Same if MFDB is run out of cron etc.
>
> I don't use systemd to start mythtv. It's started with my own scripts.
> This is an installation that dates back to 2006 but has been upgraded
> many times since. It runs as mythtv and I can log in as such.

Good feedback, I'll change the: "Users of other init systems should
look in files their systems use, such as /etc/init/mythtv-backend"
line to mention scripts or simple command line startup.

Bottom line, if MYTHCONFDIR is in play, adjust paths appropriately.
[.We had a user that didn't look 1st and wasted lots of time.]

--
Bill
_______________________________________________
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: Can I setup xmltv before changing grabbers in mythtv-setup? [ In reply to ]
On Mon, Jun 8, 2020 you wrote:

>Good feedback, I'll change the: "Users of other init systems should
>look in files their systems use, such as /etc/init/mythtv-backend"
>line to mention scripts or simple command line startup.
>
>Bottom line, if MYTHCONFDIR is in play, adjust paths appropriately.
>[..We had a user that didn't look 1st and wasted lots of time.]

On startup, I get this message in the backend log:

Using configuration directory = /home/mythtv/.mythtv

So, can I use the command line to set up xmltv before running
mythtv-setup and put the config files in

/home/mythtv/.mythv/OTA.xmltv
and
/home/mythtv/.mythv/DISH.xmltv

for example and then I can go into mythtv-setup, choose the new
grabber and then I will be able to choose the lineups I created there?

Mark
_______________________________________________
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: Can I setup xmltv before changing grabbers in mythtv-setup? [ In reply to ]
I'm going through the command line setup steps and get these done
successfully for the first lineup:

tv_grab_zz_sdjson_sqlite --manage-lineups --config-file $HOME/.mythtv/OTA.xmltv
tv_grab_zz_sdjson_sqlite --configure --config-file $HOME/.mythtv/OTA.xmltv
tv_grab_zz_sdjson_sqlite --days 0 --config-file $HOME/.mythtv/OTA.xmltv

It's populated with channels.

I then saved the python script and ran it and get an error

./xmltv_channel_selection --list --database
/home/mythtv/SchedulesDirect.DB --file /tmp/callsigns
Traceback (most recent call last):
File "./xmltv_channel_selection", line 165, in <module>
if main():
File "./xmltv_channel_selection", line 159, in main
return list_callsigns(args)
File "./xmltv_channel_selection", line 92, in list_callsigns
for row in cursor.execute('SELECT station,selected from channels'):
sqlite3.OperationalError: no such table: channels

Any suggestions?

For this lineup I ran the tedious channel selection and they are
selected, but for the Dish lineup, we get a small subset of the
available channels and it would be really tedious. In addition, I
don't want new channels to be added automatically with the Dish
lineup, as we don't subscribe to them. Do I select
2: Set future new or updated lineup channels as unselected
in manage channels or will the mythfilldatabase option
--omit-new-channels keep it from adding new channels.

When I create $HOME/.mythtv/DISH.xmltv do I use the same database at
/home/mythtv/SchedulesDirect.DB? Can those channels be in the same
database?

Regards,

Mark
_______________________________________________
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: Can I setup xmltv before changing grabbers in mythtv-setup? [ In reply to ]
On 6/10/20 8:48 AM, Mark Goldberg wrote:
> I'm going through the command line setup steps and get these done
> successfully for the first lineup:
>
> tv_grab_zz_sdjson_sqlite --manage-lineups --config-file $HOME/.mythtv/OTA.xmltv
> tv_grab_zz_sdjson_sqlite --configure --config-file $HOME/.mythtv/OTA.xmltv
> tv_grab_zz_sdjson_sqlite --days 0 --config-file $HOME/.mythtv/OTA.xmltv
>
> It's populated with channels.

I ran the fourth command (still all as user mythtv, so home for
me was ~mythtv.)

tv_grab_zz_sdjson_sqlite --manage-lineups --config-file $HOME/.mythtv/HDHR.xmltv
# Manage database lineup channel selection/select lineup/set future new or updated/repeat

> I then saved the python script and ran it and get an error
>
> ./xmltv_channel_selection --list --database
> /home/mythtv/SchedulesDirect.DB --file /tmp/callsigns
> Traceback (most recent call last):
> File "./xmltv_channel_selection", line 165, in <module>
> if main():
> File "./xmltv_channel_selection", line 159, in main
> return list_callsigns(args)
> File "./xmltv_channel_selection", line 92, in list_callsigns
> for row in cursor.execute('SELECT station,selected from channels'):
> sqlite3.OperationalError: no such table: channels
>
> Any suggestions?

I didn't write that, but I'll download and take a look. I did install the
sqlite browser: sqlitebrowser ~mythtv/.xmltv/SchedulesDirect.DB. That would
prove that the channels table is still there. I didn't have that problem.

> For this lineup I ran the tedious channel selection and they are
> selected, but for the Dish lineup, we get a small subset of the
> available channels and it would be really tedious. In addition, I
> don't want new channels to be added automatically with the Dish
> lineup, as we don't subscribe to them. Do I select
> 2: Set future new or updated lineup channels as unselected
> in manage channels or will the mythfilldatabase option
> --omit-new-channels keep it from adding new channels.

I chose to get new ones, no help here, sorry.

> When I create $HOME/.mythtv/DISH.xmltv do I use the same database at
> /home/mythtv/SchedulesDirect.DB? Can those channels be in the same
> database?

Yes, that's what I did and I have OTA and CABLE. I haven't tried
using 'per source' databases. Even though it clearly looks OK to
do.

--
Bill
_______________________________________________
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: Can I setup xmltv before changing grabbers in mythtv-setup? [ In reply to ]
On Wed, Jun 10, 2020 at 6:48 AM Mark Goldberg <marklgoldberg@gmail.com> wrote:
>
> I'm going through the command line setup steps and get these done
> successfully for the first lineup:
>
> tv_grab_zz_sdjson_sqlite --manage-lineups --config-file $HOME/.mythtv/OTA.xmltv
> tv_grab_zz_sdjson_sqlite --configure --config-file $HOME/.mythtv/OTA.xmltv
> tv_grab_zz_sdjson_sqlite --days 0 --config-file $HOME/.mythtv/OTA.xmltv
>
> It's populated with channels.
>
> I then saved the python script and ran it and get an error
>
> ./xmltv_channel_selection --list --database
> /home/mythtv/SchedulesDirect.DB --file /tmp/callsigns
> Traceback (most recent call last):
> File "./xmltv_channel_selection", line 165, in <module>
> if main():
> File "./xmltv_channel_selection", line 159, in main
> return list_callsigns(args)
> File "./xmltv_channel_selection", line 92, in list_callsigns
> for row in cursor.execute('SELECT station,selected from channels'):
> sqlite3.OperationalError: no such table: channels
>
> Any suggestions?

Never mind on this one. The database is at
/home/mythtv/.xmltv/SchedulesDirect.db. The command I typed just
created an empty database somewhere else.

I still have the next two questions.

>
> For this lineup I ran the tedious channel selection and they are
> selected, but for the Dish lineup, we get a small subset of the
> available channels and it would be really tedious. In addition, I
> don't want new channels to be added automatically with the Dish
> lineup, as we don't subscribe to them. Do I select
> 2: Set future new or updated lineup channels as unselected
> in manage channels or will the mythfilldatabase option
> --omit-new-channels keep it from adding new channels.



> When I create $HOME/.mythtv/DISH.xmltv do I use the same database at
> /home/mythtv/SchedulesDirect.DB? Can those channels be in the same
> database?

Regards,

Mark
_______________________________________________
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: Can I setup xmltv before changing grabbers in mythtv-setup? [ In reply to ]
On Wed, Jun 10, 2020 at 8:06 AM Mark Goldberg <marklgoldberg@gmail.com> wrote:

> I still have the next two questions.
>
> >
> > For this lineup I ran the tedious channel selection and they are
> > selected, but for the Dish lineup, we get a small subset of the
> > available channels and it would be really tedious. In addition, I
> > don't want new channels to be added automatically with the Dish
> > lineup, as we don't subscribe to them. Do I select
> > 2: Set future new or updated lineup channels as unselected
> > in manage channels or will the mythfilldatabase option
> > --omit-new-channels keep it from adding new channels.
>
>
>
> > When I create $HOME/.mythtv/DISH.xmltv do I use the same database at
> > /home/mythtv/SchedulesDirect.DB? Can those channels be in the same
> > database?
>
> Regards,
>
> Mark

One more issue. With the two lineups, there may be duplicate callsigns
or at least similar ones from OTA and Dish. The python script gives me
all of them. It would be much easier to get channel numbers. The Dish
channels are in integer format. The OTA channels are in the X.1, X.2
etc format so they can be distinguished.

Dish has 1052 channels, most of which we don't get, and they assign
the same channel to more than one channel number, and the same channel
number to both SD and HD versions of a channel, so only callsigns is
not so helpful there. Channel numbers and callsigns, sorted
numerically by channel number would be much more useful.

Regards,

Mark
_______________________________________________
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: Can I setup xmltv before changing grabbers in mythtv-setup? [ In reply to ]
On Wed, Jun 10, 2020, 11:30 AM Mark Goldberg, <marklgoldberg@gmail.com>
wrote:

> On Wed, Jun 10, 2020 at 8:06 AM Mark Goldberg <marklgoldberg@gmail.com>
> wrote:
>
> > I still have the next two questions.
> >
> > >
> > > For this lineup I ran the tedious channel selection and they are
> > > selected, but for the Dish lineup, we get a small subset of the
> > > available channels and it would be really tedious. In addition, I
> > > don't want new channels to be added automatically with the Dish
> > > lineup, as we don't subscribe to them. Do I select
> > > 2: Set future new or updated lineup channels as unselected
> > > in manage channels or will the mythfilldatabase option
> > > --omit-new-channels keep it from adding new channels.
> >
> >
> >
> > > When I create $HOME/.mythtv/DISH.xmltv do I use the same database at
> > > /home/mythtv/SchedulesDirect.DB? Can those channels be in the same
> > > database?
> >
> > Regards,
> >
> > Mark
>
> One more issue. With the two lineups, there may be duplicate callsigns
> or at least similar ones from OTA and Dish. The python script gives me
> all of them. It would be much easier to get channel numbers. The Dish
> channels are in integer format. The OTA channels are in the X.1, X.2
> etc format so they can be distinguished.
>
> Dish has 1052 channels, most of which we don't get, and they assign
> the same channel to more than one channel number, and the same channel
> number to both SD and HD versions of a channel, so only callsigns is
> not so helpful there. Channel numbers and callsigns, sorted
> numerically by channel number would be much more useful.
>
> Regards,
>
> Mark
>
>
I've considered doing this remotely. What is the average time to make the
xmltv transition and would you recommend coffee or whiskey to go along with
the process?

>
>