MythTV Howto?

Please use this Forum to discuss Approved Applications (if something is approved, what version, etc)
Forum rules
So folks can help you, include in the subject the software package you're using and the version number in the body.
imorgan
Posts: 4
Joined: Mon Aug 20, 2007 10:58 am

Re: MythTV Howto?

Post by imorgan »

OK, Here is what I did. I replaced mythfilldatabase with a script, and have that script called from mythtv instead of mythfilldatabase.

Code: Select all

#!/bin/sh

cd /root/

/usr/bin/tv_grab_na_dd --days 13 --download-only --dd-data tv_all.xml

/usr/bin/mythfilldatabase --refresh-all --dd-file 1 -1 "0005410:-" tv_all.xml
The first three arguments to --dd-file are:
"1": my source id (from mythconverg database)
"-1": replace all data
"0005410:-": my lineup id (from mythconverg database or from the top of the tv_all.xml file)


Of course, before any of this, I thoroughly updated my myconverg database to fix-up all the seriedid's and programid's to the extended format, and I had to patch libmythtv's creation of temp tables used during the database filling to increase the programid field length from 12 to 14.

yhan26
Posts: 1
Joined: Wed Aug 22, 2007 3:15 am

Re: MythTV Howto?

Post by yhan26 »

Ok I understand I have to patch tv_grab_na_dd in order to make it work, but :

my xmltv is version 0.5.34-2
my mythtv is 0.16.
Running debian sarge.

I don't necessarily want to upgrade my mythtv because I would have to reformat the box, I heavily set it up, ...

So want do I need to patch in the perl script to make it work with those versions ?

URL ? what is the url to put in the script instead of the one from zap2it ?
chanids ?
anything else ?

Thanks !!

Yhan

rmeden
SD Board Member
Posts: 1563
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX
Contact:

Re: MythTV Howto?

Post by rmeden »

I suggest you upgrade XMLTV. The prerequisites should have already been met on your system so the install should be very smooth.

There are two changes to _na_dd. The first is the URL, the second is where dd_prog is set.

Code: Select all

old                     if ( $_->{program} =~ /^(..\d{6})(\d{4})$/ )
new                     if ( $_->{program} =~ /^(..\d{8})(\d{4})$/ )
I still tink you should upgrade.. the current version is about 30% faster than the one you're using.

Robert

mazda01
Posts: 22
Joined: Mon Aug 20, 2007 10:58 am

Re: MythTV Howto?

Post by mazda01 »

imorgan wrote:OK, Here is what I did. I replaced mythfilldatabase with a script, and have that script called from mythtv instead of mythfilldatabase.

Code: Select all

#!/bin/sh

cd /root/

/usr/bin/tv_grab_na_dd --days 13 --download-only --dd-data tv_all.xml

/usr/bin/mythfilldatabase --refresh-all --dd-file 1 -1 "0005410:-" tv_all.xml
The first three arguments to --dd-file are:
"1": my source id (from mythconverg database)
"-1": replace all data
"0005410:-": my lineup id (from mythconverg database or from the top of the tv_all.xml file)


Of course, before any of this, I thoroughly updated my myconverg database to fix-up all the seriedid's and programid's to the extended format, and I had to patch libmythtv's creation of temp tables used during the database filling to increase the programid field length from 12 to 14.
got it, one last question. what do I do with the source within mythtv-setup? currently it has the zap2it as the current source. Also, how do you get mythtv-setup to NOT run the mythfilldatabase by default when I exit it's setup? also, how do you tell mythtv to run this script instead of mythfilldatabase? Can you explain the myconverg database editing or should I just wait for my distro to release a package? hopefully they do it before Sept 14. thanks for any help?

UPDATE: I did it and it worked! I didn't change anything with my mythconverg database however and it still worked. All my recording schedules are intact, meaning that it still will always record Scrubs on a certian day and time etc etc. Is there something else I should be worried about?
Now the last thing I am curious about is what I asked above, the questions are as follows;
-what do I do with the current zap2it source within mythtv-setup? delete it? change it to no grabber?
-how do you get mythtv-setup to NOT run the mythfilldatabase by default when I exit it's setup?
-how do you tell mythtv to run this script instead of mythfilldatabase?
I didn't create the script or do it thru cron, I did it manually for now and per mythweb, the last mythfilldatabase was run at 11:13 today and finished at 11:14, this was immediately after I ran the commands above manually as root.
Last edited by mazda01 on Wed Aug 22, 2007 9:22 am, edited 1 time in total.

imorgan
Posts: 4
Joined: Mon Aug 20, 2007 10:58 am

Re: MythTV Howto?

Post by imorgan »

mazda01 wrote: got it, one last question. what do I do with the source within mythtv-setup? currently it has the zap2it as the current source. Also, how do you get mythtv-setup to NOT run the mythfilldatabase by default when I exit it's setup? also, how do you tell mythtv to run this script instead of mythfilldatabase? Can you explain the myconverg database editing or should I just wait for my distro to release a package? hopefully they do it before Sept 14. thanks for any help?

In MythTV settings, under General I believe, is where you set the program to be used to fill the database. I just changed it from mythfilldatabase to my script (which I called mythfillfromsd). I didn't change anything using mythtv-setup other than deleting all my channels and letting mythfilldatabase repoplulate the list.

There are many snippts of SQL scattered thoughout these forums and on Mythtv's trac site to fix the programid records. Mainly they fix just the programid's for the recorded and oldrecorded tables. I went a few steps further and applied the same logic to fix-up all programid's and seriesid's throughout the entire database, so as well as recorded and oldrecorded, I also fixed up record, and any other table that had a programid or seriesid.

Just keep in mind that your record table might have Power Searches saved where you make use of a programid within the stored SQL, and you'll have to updates those as well.

Now I just need to patch my mythweb, as it's cropping programids to 12 chars breaking the video streaming links.

mazda01
Posts: 22
Joined: Mon Aug 20, 2007 10:58 am

Re: MythTV Howto?

Post by mazda01 »

imorgan wrote:In MythTV settings, under General I believe, is where you set the program to be used to fill the database. I just changed it from mythfilldatabase to my script (which I called mythfillfromsd). I didn't change anything using mythtv-setup other than deleting all my channels and letting mythfilldatabase repoplulate the list.

There are many snippts of SQL scattered thoughout these forums and on Mythtv's trac site to fix the programid records. Mainly they fix just the programid's for the recorded and oldrecorded tables. I went a few steps further and applied the same logic to fix-up all programid's and seriesid's throughout the entire database, so as well as recorded and oldrecorded, I also fixed up record, and any other table that had a programid or seriesid.

Just keep in mind that your record table might have Power Searches saved where you make use of a programid within the stored SQL, and you'll have to updates those as well.

Now I just need to patch my mythweb, as it's cropping programids to 12 chars breaking the video streaming links.
Well I updated my last post to say that I got it. I didn't change anything with my mythconverg database however and it still worked. All my recording schedules are intact, meaning that it still will always record Scrubs on a certian day and time etc etc. Is there something else I should be worried about? You answered one of my questions regarding what command should be run by mythtv but I can't get into that at this current time. I am ssh'd in and then start an X11vnc session, than open tightvncviewer, but when I run the Mythtv frontend, and try to go to settings, it's just not working, I am guessing it's because I am using an OpenGL theme. ANyway, hopefully the place to change whether mythfilldatabase gets run is in there because it's definitely not in the backend setup.
So questions that you haven't answered yet:
-what do I do with the current zap2it source within mythtv-setup? delete it? change it to no grabber?
I didn't create the script or do it thru cron, I did it manually for now and per mythweb, the last mythfilldatabase was run at 11:13 today and finished at 11:14, this was immediately after I ran the commands above manually as root.

I do notice that thru mythweb, under settings, then under mythtv table settings, there's a place where it states, Mythfilldatabase location, then it says /usr/bin/mythfilldatabase. could I change that there? what does yours say within that place under mythweb mythtv table settings?
This is what it looks like: Image

marc.aronson
Posts: 18
Joined: Wed Aug 22, 2007 7:50 am

Re: MythTV Howto?

Post by marc.aronson »

and I had to patch libmythtv's creation of temp tables used during the database filling to increase the programid field length from 12 to 14.
I am on mythtv 0.19 (knoppmyth R5D1). I did a check and the series ID field in my database is varchar(12); my programid field is varchar(20). I'm trying to understand if I actually need to make any database changes, or if I can just use the latest xmltv software and my existing system without problems. Any help would be appreciated, thanks!

Marc

gmdubois
Posts: 11
Joined: Mon Aug 20, 2007 5:45 pm

Re: MythTV Howto?

Post by gmdubois »

Every path I look at point me to upgrading tons of packages.

If only "yum update xmltv" worked (for that, I would need a FC3 package).

The setup I have has both linux, windows (+ vmware, samba, etc...). What's special about the Windows .EXE file so that it cannot run under Wine?

rmeden
SD Board Member
Posts: 1563
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX
Contact:

Re: MythTV Howto?

Post by rmeden »

I've never tried to run xmltv.exe under wine. It may work. Give it a shot.

You may want to post on the XMLTV users list. I think a Debian package is built for it.

Robert

sinepaw
Posts: 8
Joined: Fri Aug 17, 2007 6:43 am

Re: MythTV Howto?

Post by sinepaw »

marc.aronson wrote: I am on mythtv 0.19 (knoppmyth R5D1). I did a check and the series ID field in my database is varchar(12); my programid field is varchar(20). I'm trying to understand if I actually need to make any database changes, or if I can just use the latest xmltv software and my existing system without problems.
The database itself is fine but the previous poster was referring to temporary table creation in libmythtv. Looking at libs/libmythtv/datadirect.cpp, I see temporary table creation stanzas for dd_schedule, dd_program, dd_v_program, dd_productioncrew and dd_genre that specify a 12 character programid field. This will need to be increased and the library rebuilt, as the programids will otherwise be truncated during the import.

I also see references to a 12-char programid in dbcheck.cpp, but those should only be used when upgrading the schema and should not affect a current database. Someone can correct me if I'm wrong on this.

Note that you'll also want to do the update queries (metioned in the forums a few times) on recorded and oldrecorded to fix previous programids and prevent you from re-recording a bunch of old shows.

Man, does this info sound ripe for a Myth Wiki update or what? ;)

Post Reply