[mythtv] [Patch] graboptions : was SQL errors with mythfilldatabase --graboptions and tv_grab_au

David myth at dgreaves.com
Sat Jun 5 02:27:38 EDT 2004

Jon Whitear wrote:

>I have recently discovered that I can use the -slow option with
>tv_grab_au to grab descriptions of each show. Unfortunately, if I use
>the --graboptions switch with mythfilldatabase to pass "--slow", I get
>an error for every show that mythfilldatabase tries to put in the
>DB Error (programrating insert):
>Query was:
>INSERT INTO programrating (chanid,starttime,system,rating) VALUES (9,
>"20040604231500", "CTVA", "G");
>Driver error was [2/1062]:
>QMYSQL3: Unable to execute query
>Database error was:
>Duplicate entry '9-20040604231500-CTVA-G' for key 1
>Adjusting program database end times...
>0 replacements made.
>Looking at the program table after running mythfilldatabase, I find the
>description field is populated, so it seems that something _is_ going
>into the database. However, mythfrontend's program guide has got
>completely confused, and shows everything as <unknown>. I deleted every
>row in the table, and re-ran mythfilldatabase without any options, and
>I'm back to square one.
>Has anybody got this working? I'm running MythTV 0.15.1, xmltv 0.5.34,
>and tv_grab_au 0.5. Any help is much appreciated.
Hi Jon
I saw a potential bug with --graboptions. I'm not sure exactly what it's 
supposed to do but take a look here:



--graboptions means: "additional options to pass to grabber after 
compiled in options"

--- mythtv/programs/mythfilldatabase/filldata.cpp.orig  2004-06-05 
07:20:22.000000000 +0100
+++ mythtv/programs/mythfilldatabase/filldata.cpp       2004-06-05 
07:22:58.000000000 +0100
@@ -2212,7 +2212,7 @@

 bool grabData(Source source, int offset, QDate *qCurrentDate = 0)
-    QString xmltv_grabber = source.xmltvgrabber + graboptions;
+    QString xmltv_grabber = source.xmltvgrabber;

     if (xmltv_grabber == "datadirect")
         return grabDDData(source, offset, *qCurrentDate);
@@ -2309,6 +2309,7 @@
          xmltv_grabber == "tv_grab_jp"))
          command += " --quiet";

+    command+= graboptions;

     if (!quiet)
          cout << "----------------- Start of XMLTV output 
-----------------" << endl;
@@ -3024,7 +3025,7 @@
             cout << "   <xawtvrcfile> = file to read\n";
             cout << "\n";
             cout << "--graboptions <\"options\">\n";
-            cout << "   Pass options to grabber\n";
+            cout << "   additional options to pass to grabber after 
compiled in options\n";
             cout << "\n";
             cout << "--refresh-today\n";
             cout << "--refresh-second\n";

More information about the mythtv-dev mailing list