[mythtv] [PATCH] tv_grab_uk_rt changed behavior - Patch to update
mythfilldatabase
Allan Stirling
Dibblahmythml0015 at pendor.org
Wed Jan 12 14:43:35 EST 2005
tv_grab_uk_rt used to be able to be run with the --days parameter. This
is no longer required or honored by the grabber.
The result of this was the XML file (which contains 14 days of
information anyway) was downloaded by mythfilldatabase 14 times for each
channel.
The first run was reasonably fast - 7-8 minutes. The other 13 minutes
(due to logging / db overhead I think) took a further 6 hours for me.
This patch removes the special case for the _rt grabber.
I've tested this with a database that had 9 days of data left. It's now
showing 14 and the data appears to be valid.
Cheers,
Allan.
-------------- next part --------------
Index: programs/mythfilldatabase/filldata.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythfilldatabase/filldata.cpp,v
retrieving revision 1.143
diff -u -r1.143 filldata.cpp
--- programs/mythfilldatabase/filldata.cpp 1 Jan 2005 23:36:17 -0000 1.143
+++ programs/mythfilldatabase/filldata.cpp 12 Jan 2005 19:29:53 -0000
@@ -2329,8 +2329,8 @@
xmltv_grabber.ascii(), configfile.ascii(),
filename.ascii());
else if (xmltv_grabber == "tv_grab_uk_rt")
- command.sprintf("nice %s --days 1 --offset %d --config-file '%s' --output %s",
- xmltv_grabber.ascii(), offset,
+ command.sprintf("nice %s --days 14 --config-file '%s' --output %s",
+ xmltv_grabber.ascii(),
configfile.ascii(), filename.ascii());
else if (xmltv_grabber == "tv_grab_au")
command.sprintf("nice %s --days 7 --config-file '%s' --output %s",
@@ -2523,10 +2523,11 @@
if (xmltv_grabber == "tv_grab_uk" || xmltv_grabber == "tv_grab_de" ||
xmltv_grabber == "tv_grab_fi" || xmltv_grabber == "tv_grab_es" ||
xmltv_grabber == "tv_grab_nl" || xmltv_grabber == "tv_grab_au" ||
- xmltv_grabber == "tv_grab_fr" || xmltv_grabber == "tv_grab_jp")
+ xmltv_grabber == "tv_grab_fr" || xmltv_grabber == "tv_grab_jp" ||
+ xmltv_grabber == "tv_grab_uk_rt")
{
- // tv_grab_uk|de doesn't support the --offset option, so just grab a
- // week.
+ // These grabbers don't support the --offset option, so just grab
+ // the maximum interval
if (!grabData(*it, -1))
++failures;
}
@@ -2577,7 +2578,6 @@
}
else if (xmltv_grabber == "datadirect" ||
//xmltv_grabber == "tv_grab_na" ||
- xmltv_grabber == "tv_grab_uk_rt" ||
xmltv_grabber == "tv_grab_se" ||
xmltv_grabber == "tv_grab_no")
{
@@ -2613,8 +2613,7 @@
int maxday = 9;
- if (xmltv_grabber == "tv_grab_uk_rt" ||
- xmltv_grabber == "tv_grab_se" ||
+ if (xmltv_grabber == "tv_grab_se" ||
xmltv_grabber == "tv_grab_no")
maxday = 14;
@@ -3155,7 +3154,7 @@
cout << "\n";
cout << "--refresh-today\n";
cout << "--refresh-second\n";
- cout << " (Only valid for grabbers: na/uk_rt/sn)\n";
+ cout << " (Only valid for grabbers: na/sn)\n";
cout << " Force a refresh today or two days from now, to catch the latest changes\n";
cout << "--dont-refresh-tomorrow\n";
cout << " Tomorrow will be refreshed always unless this argument is used\n";
More information about the mythtv-dev
mailing list