Normally mythfilldatabase is run automatically by [[mythbackend]] every 24 hours. For most people allowing mythfilldatabase to run automatically will be sufficient, however in areas with no XMLTV grabber or an unusual channel setup it may be run manually.

= Manual use of mythfilldatabase =

= Manual use of mythfilldatabase =

+

To run an extra time out of sequence (for example, because your subscription had run out, and you just renewed it), use no command line options:

If you are in a country where mythfilldatabase will not work the normal way you will need to use the --file flag (e.g. XMLTV does not have a grabber included, or the grabber options are not fully supported by MythTV).

If you are in a country where mythfilldatabase will not work the normal way you will need to use the --file flag (e.g. XMLTV does not have a grabber included, or the grabber options are not fully supported by MythTV).

−

=== 1. Obtain xml file of tv guide ===

+

=== Obtain xml file of tv guide ===

Here in Belgium, I use [http://pytvgrab.sourceforge.net pytvgrab] to get my tv guide and output to an xml file:

Here in Belgium, I use [http://pytvgrab.sourceforge.net pytvgrab] to get my tv guide and output to an xml file:

Line 122:

Line 87:

</nowiki></pre>

</nowiki></pre>

−

=== 2. Find out the source id of your card ===

+

=== Find out the source id of your card ===

This is normally '1' if you have only one input card, but it is best to check it out because I have found if I have run mythtv setup more than once it can end up being something other than 1. To check, you need to look at the database:

This is normally '1' if you have only one input card, but it is best to check it out because I have found if I have run mythtv setup more than once it can end up being something other than 1. To check, you need to look at the database:

Line 137:

Line 102:

Remember the source id

Remember the source id

−

=== 3. Run mythfilldatabase with the --file flag ===

+

You can find another set of instruction on [[XMLTV_CH#Find_input_sourceid|how to find the sourceid here]].

−

The -1 means to replace all data, belgium.xml is the file name for the output of the grabber as above:

+

=== Run mythfilldatabase with the --file flag ===

−

<pre><nowiki>

+

−

$ mythfilldatabase --file <sourceid> -1 belgium.xml

+

−

</nowiki></pre>

+

−

The first time you will need to use the --manual flag, but this is better explained on the [[XmlTv]] page.

+

−

== Troubleshooting ==

+

The --file argument allows to directly import XMLTV files. This is useful if you are using programs like [http://nxtvepg.sourceforge.net/ nxtvepg] to grab your EPG data.

−

=== 1. LinkSys or Fedora Core ===

+

−

I spent the past 3 weeks trying to troubleshoot a problem I was having with mythfilldatabase. I would run it and it would download between 5K and 3K and then just timeout.

+

−

I found this solution [http://www.gossamer-threads.com/lists/engine?do=post_view_flat;post=219553;page=1;sb=post_latest_reply;so=ASC;mh=25;list=mythtv http://www.gossamer-threads.com]

+

Note that Schedules Direct members should not use the <code>--file</code> argument with mythfilldatabase. They should instead use --dd-file with data obtained by running <code>tv_grab_na_dd</code> using the <code>--dd-data</code> argument.

−

which says to do this:

+

'''From 0.21 on:'''

−

add this line in /etc/sysctl.conf

+

From version 0.21 on the arguments of this command changed. The offset argument has been removed and the command changed to:

+

<pre><nowiki>

+

$ mythfilldatabase --file <sourceid> belgium.xml

+

</nowiki></pre>

−

net.ipv4.tcp_window_scaling = 0

+

'''From 0.25 on:'''

+

+

From version 0.25, the arguments of this command changed:

+

<pre><nowiki>

+

$ mythfilldatabase --file --sourceid <sourceid> --xmlfile belgium.xml

+

</nowiki></pre>

−

execute sysctl -p /etc/sysctl.conf

−

or restart your computer

−

Weeks of frustration fixed. Hope this helps someone.

+

The first time you will need to use the --manual flag, but this is better explained on the [[XMLTV]] page.

−

Note from a network techie.... Please be aware that disabling tcp window scaling has a system wide impact and will probably result in much slower bulk transfer speeds. Just thought you should be aware.

+

= Troubleshooting =

−

=== 2. INSERT IGNORE INTO SQL Errors ===

+

=== mythfilldatabase causes the system to hang===

−

If you find in mythfilldatabase's logs something like:

+

This is probably an I/O saturation issue. mythfilldatabase and [[MySQL]] can cause hard disk or ATA bus saturation, causing [[Mythbackend]] to starve. Read more about [[Troubleshooting:Mythfilldatabase_IO_bottleneck]].

Automatic use of mythfilldatabase

Normally mythfilldatabase is run automatically by mythbackend every 24 hours. For most people allowing mythfilldatabase to run automatically will be sufficient, however in areas with no XMLTV grabber or an unusual channel setup it may be run manually.

Manual use of mythfilldatabase

To run an extra time out of sequence (for example, because your subscription had run out, and you just renewed it), use no command line options:

External XMLTV

If you are in a country where mythfilldatabase will not work the normal way you will need to use the --file flag (e.g. XMLTV does not have a grabber included, or the grabber options are not fully supported by MythTV).

Obtain xml file of tv guide

Here in Belgium, I use pytvgrab to get my tv guide and output to an xml file:

Find out the source id of your card

This is normally '1' if you have only one input card, but it is best to check it out because I have found if I have run mythtv setup more than once it can end up being something other than 1. To check, you need to look at the database: