[mythtv] RE: [mythtv-users] tv_grab_na_dd backport data to.14system?

Matthew Mead mkmead at hoodnet.net
Sat May 22 18:42:22 EDT 2004


I forgot to add I set my box off based off the fedora myth how to..

That site says to do this to setup automatic updates:

$ crontab -e

### Run mythfilldatabase every night at some random time after 2:30am
30 2 * * * sleep $(expr $RANDOM \% 7200) && mythfilldatabase >
/var/log/mythtv/mythfilldatabase.log 2>&1


So do I need to do that still?

I think I'm getting confused because what your saying below and what I did
above (old method) are similar yet different.

Anyhow I still have this cron job setup but I also created a
mythfilldatabase.cron file in that /etc/cron.daily directory and pasted the
following there:

#!/bin/sh
    #/usr/local/bin/mythfilldatabasecron_dd

    # temporary filename
    dirname='/tmp'
    filename="tv-${RANDOM}${RANDOM}"
    xml_file=${dirname}/${filename}.xml

    # From step 8
    sourceid=1

    # replace all data
    offset=-1

    # How many days worth of guide data to download
    numdays=10

    /usr/bin/tv_grab_na_dd --output ${xml_file} --days ${numdays}
\--old-chan-id && \
    /usr/bin/mythfilldatabase --file ${sourceid} ${offset} ${xml_file}

    # Remove the temporary file
    rm ${xml_file}


My source ID was 1.

I checked to make sure there was no spaces at the end of any lines. I also
moved the --old-chan-id & & \ up to the first \ to get rid of that spaces..

So now how to do fire this guy off and test it?

Thanks for you help guys!

----- Original Message ----- 
From: "Shane Hetzel" <shane-lists at thehillpeople.org>
To: "Discussion about mythtv" <mythtv-users at mythtv.org>
Sent: Saturday, May 22, 2004 10:54 AM
Subject: Re: [mythtv] RE: [mythtv-users] tv_grab_na_dd backport data
to.14system?


> All of us, including you I'm guessing, have a script file in
/etc/cron.daily
> that fetches listings each night. For me, the name of the file is
> /etc/cron.daily/mythfilldatabase.cron, but it doesn't matter what the name
> is. Just find your particular file and edit it (using nano or vim or
> whatever you wish).
>
> Basically, up until now you probably only had one real command in the
file,
> and that is "mythfilldatabase". That command used to call tv_grab_na
> automatically and pull in the listings. However now we're going to call
> tv_grab_na_dd ourselves and give that file specifically to
mythfilldatabase
> (with a couple of other otptions). That should take are of it.
>
> 1) Replace the contents of your file with the listing.
>
> 2) Set the value of the sourceid to the number you discovered in step 8.
> Very important.
>
> 3) Take care around the line continuation characters. Spaces after the "\"
> screw things up. If it would be easier for you, simply take those three
> lines and make that one big line.
>
> 4) Run it. you should be good to go.
>
>
> -Shane
>
>
>
> ----- Original Message ----- 
> From: "Matthew Mead" <mkmead at hoodnet.net>
> To: "Development of mythtv" <mythtv-dev at mythtv.org>; "Discussion about
> mythtv" <mythtv-users at mythtv.org>
> Sent: Saturday, May 22, 2004 1:34 AM
> Subject: Re: [mythtv] RE: [mythtv-users] tv_grab_na_dd backport data to
> .14system?
>
>
> > Can anyone explain how to do the last step..
> >
> > I have no clue as to how to do a script much less what file do I need to
> > replace?
> > ----- Original Message ----- 
> > From: "Scott Rowe" <mythgnomer at rowelab.com>
> > To: "'Discussion about mythtv'" <mythtv-users at mythtv.org>
> > Cc: <mythtv-dev at mythtv.org>
> > Sent: Friday, May 21, 2004 5:14 PM
> > Subject: [mythtv] RE: [mythtv-users] tv_grab_na_dd backport data to .14
> > system?
> >
> >
> > > I can confirm that this works.. Good job guys!
> > >
> > > If 0.15 isn't coming soon, could this make it into the docs?
> > >
> > >
> >
>
http://www.gossamer-threads.com/lists/mythtv/users/67813?search_string=tv_gr
> > > ab_na_dd;#67813
> > >
> > > (for the -dev list)
> > >
> > > > -----Original Message-----
> > > > From: mythtv-users-bounces at mythtv.org
> > > > [mailto:mythtv-users-bounces at mythtv.org] On Behalf Of William Powers
> > > > Sent: Tuesday, May 11, 2004 4:08 PM
> > > > To: Discussion about mythtv
> > > > Subject: Re: [mythtv-users] tv_grab_na_dd backport data to .14
system?
> > > >
> > > > Gerald Schepens wrote:
> > > > > Here's a version of the file that is intended to grab data from
two
> > > > > different lineups, one from standard cable and the other
> > > > from digital.
> > > > > I hope you can comment on whether this script will work.
> > > >
> > > > I can't comment directly because I've never personally dealt
> > > > with multiple lineups.  It *looks* like Mike Dean's script,
> > > > which he vouched for, and from what I know about
> > > > tv_grab_na_dd, I think it should work.
> > > >
> > > > Best advice I can give is to backup your database first and
> > > > then try it!
> > > >
> > > > As a refinement, one thing you might consider is connecting
> > > > all of the 'tv_grab_na_dd' and 'mythfilldatabase' statements
> > > > together with '&&'.
> > > > That way, if the first command fails, the remaining
> > > > statements won't execute with possibly bad input data,
> > > > potentially corrupting your database.
> > > >
> > > > Good luck!
> > > >
> > > > Bill
> > > >
> > > >
> > >
> > >
> >
> >
>
> --------------------------------------------------------------------------
> --
> > ----
> >
> >
> > _______________________________________________
> > mythtv-dev mailing list
> > mythtv-dev at mythtv.org
> > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
> >
> >
> >
>
> --------------------------------------------------------------------------
> --
> > ----
> >
> >
> > _______________________________________________
> > mythtv-users mailing list
> > mythtv-users at mythtv.org
> > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> >
> >
> > _______________________________________________
> > mythtv-users mailing list
> > mythtv-users at mythtv.org
> > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> >
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>




More information about the mythtv-users mailing list