[mythtv] [PATCH] changing the german XMLTV grabber to the only working

Andreas Oeldenberger geflist at gmx.net
Tue Mar 29 19:01:27 UTC 2005


Marcel Meier <linux at meiersos.ch> writes:

> Hi,
> the attached Patch changes only the call to the german XMLTV grabber from the old,
> obsolet one (tv_grab_de) to the working (tv_grab_tvtoday_de) so the german users
> don't need to rename/symlink the one to the other.
>
> If there is a problem, please let me know.

the tvtoday grabber works a little different to the old grabber. This is my
Version of the Patch using single Day grabbing.

cu,
Andi

-------------- next part --------------
Index: libs/libmythtv/videosource.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/videosource.cpp,v
retrieving revision 1.72
diff -u -b -B -w -p -r1.72 videosource.cpp
--- libs/libmythtv/videosource.cpp	29 Mar 2005 05:59:00 -0000	1.72
+++ libs/libmythtv/videosource.cpp	29 Mar 2005 18:52:45 -0000
@@ -449,15 +449,11 @@ void XMLTV_generic_config::save() {
     pdlg.show();
 
     QString command;
-    if (grabber == "tv_grab_de") {
-        command = "tv_grab_de --configure";
-    } else {
         QString filename = QString("%1/%2.xmltv")
             .arg(MythContext::GetConfDir()).arg(parent.getSourceName());
 
         command = QString("%1 --config-file '%2' --configure")
             .arg(grabber).arg(filename);
-    }
 
     pdlg.setProgress(1);
 
@@ -477,7 +473,7 @@ void XMLTV_generic_config::save() {
                                               "information"));
     }
 
-    if (grabber == "tv_grab_de" || grabber == "tv_grab_se_swedb" || 
+    if (grabber == "tv_grab_de_tvtoday" || grabber == "tv_grab_se_swedb" || 
         grabber == "tv_grab_fi" || grabber == "tv_grab_es" ||
         grabber == "tv_grab_nl" || grabber == "tv_grab_jp" ||
         grabber == "tv_grab_no" || grabber == "tv_grab_pt")
@@ -516,8 +512,8 @@ XMLTVConfig::XMLTVConfig(const VideoSour
     addTarget("datadirect", new DataDirect_config(parent));
     grabber->addSelection("North America (DataDirect)", "datadirect");
 
-    addTarget("tv_grab_de", new XMLTV_generic_config(parent, "tv_grab_de"));
-    grabber->addSelection("Germany/Austria", "tv_grab_de");
+    addTarget("tv_grab_de_tvtoday", new XMLTV_generic_config(parent, "tv_grab_de_tvtoday"));
+    grabber->addSelection("Germany TVTODAY", "tv_grab_de_tvtoday");
 
     addTarget("tv_grab_se_swedb", new XMLTV_generic_config(parent, "tv_grab_se_swedb"));
     grabber->addSelection("Sweden (tv.swedb.se)","tv_grab_se_swedb");
Index: programs/mythfilldatabase/filldata.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythfilldatabase/filldata.cpp,v
retrieving revision 1.162
diff -u -b -B -w -p -r1.162 filldata.cpp
--- programs/mythfilldatabase/filldata.cpp	5 Mar 2005 00:00:39 -0000	1.162
+++ programs/mythfilldatabase/filldata.cpp	29 Mar 2005 18:52:46 -0000
@@ -2540,10 +2540,10 @@ bool grabData(Source source, int offset,
         command.sprintf("nice %s -n 1 -f %d -o '%s'",
                         xmltv_grabber.ascii(), offset,
                         filename.ascii());
-    else if (xmltv_grabber == "tv_grab_de")
-        command.sprintf("nice %s --days 7 --output %s",
-                        xmltv_grabber.ascii(),
-                        filename.ascii());
+    else if (xmltv_grabber == "tv_grab_de_tvtoday")
+        command.sprintf("nice %s --slow --days 1 --config-file '%s' --offset %d --output %s",
+                        xmltv_grabber.ascii(), configfile.ascii(),
+                        offset, filename.ascii());
     else if (xmltv_grabber == "tv_grab_fr")
         command.sprintf("nice %s --days 7 '%s' --output %s",
                         xmltv_grabber.ascii(), configfile.ascii(),
@@ -2598,7 +2598,7 @@ bool grabData(Source source, int offset,
 
     if (quiet &&
         (xmltv_grabber == "tv_grab_na" ||
-         xmltv_grabber == "tv_grab_de" ||
+         xmltv_grabber == "tv_grab_de_tvtoday" ||
          xmltv_grabber == "tv_grab_fi" ||
          xmltv_grabber == "tv_grab_es" ||
          xmltv_grabber == "tv_grab_nz" ||
@@ -2750,7 +2750,7 @@ bool fillData(QValueList<Source> &source
     for (it = sourcelist.begin(); it != sourcelist.end(); ++it) {
         int chancnt = 0;
         QString xmltv_grabber = (*it).xmltvgrabber;
-        if (xmltv_grabber == "tv_grab_uk" || xmltv_grabber == "tv_grab_de" ||
+        if (xmltv_grabber == "tv_grab_uk" ||
             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" ||
@@ -2806,6 +2806,7 @@ bool fillData(QValueList<Source> &source
             grabData(*it, 0, &qCurrentDate);
         }
         else if (xmltv_grabber == "datadirect" ||
+                 xmltv_grabber == "tv_grab_de_tvtoday" ||
                  xmltv_grabber == "tv_grab_se_swedb" ||
                  xmltv_grabber == "tv_grab_no")
         {
@@ -2846,6 +2847,8 @@ bool fillData(QValueList<Source> &source
                 maxday = 7;
             else if (xmltv_grabber == "tv_grab_se_swedb")
                 maxday = 10;
+            else if (xmltv_grabber == "tv_grab_de_tvtoday")
+                maxday = 7;
 
             for (int i = 0; i < maxday; i++)
             {


More information about the mythtv-dev mailing list