[mythtv] Patch: tv_grab_fi

Alex Wilbur alex at neuon.com
Mon Mar 10 21:20:28 EST 2003


Hello,

First patch ever for linux, so be gentle ;-)

I based it upon the CVS from this morning. Its very trivial really, but
I'm sure there is still scope for me to mess it up :)

I wasn't quite sure how the --days stuff worked for the uk and de
grabbers so I just went with the default which tv_grab_fi supports (10
days). I'm not sure if it might be best to change this.

Glad for all feedback

Regards

Alex
-------------- next part --------------

Index: libs/libmythtv/videosource.cpp
===================================================================
RCS file: /var/lib/cvs/MC/libs/libmythtv/videosource.cpp,v
retrieving revision 1.16
diff -u -d -r1.16 videosource.cpp
--- libs/libmythtv/videosource.cpp	1 Mar 2003 19:27:08 -0000	1.16
+++ libs/libmythtv/videosource.cpp	10 Mar 2003 19:04:49 -0000
@@ -149,7 +149,7 @@
     if (ret != 0)
         cout << command << endl << "exited with status " << ret << endl;

-    if (grabber == "tv_grab_de" || grabber == "tv_grab_sn") {
+    if (grabber == "tv_grab_de" || grabber == "tv_grab_sn" || grabber == "tv_grab_fi") {
         cout << "You _MUST_ run 'mythfilldatabase --manual the first time, "
              << "instead\n";
         cout << "of just 'mythfilldatabase'.  Your grabber does not provide\n";
Index: libs/libmythtv/videosource.h
===================================================================
RCS file: /var/lib/cvs/MC/libs/libmythtv/videosource.h,v
retrieving revision 1.24
diff -u -d -r1.24 videosource.h
--- libs/libmythtv/videosource.h	2 Mar 2003 13:31:08 -0000	1.24
+++ libs/libmythtv/videosource.h	10 Mar 2003 19:04:49 -0000
@@ -153,6 +153,9 @@

         addTarget("tv_grab_nz", new XMLTV_generic_config(parent, "tv_grab_nz"));
         grabber->addSelection("New Zealand", "tv_grab_nz");
+
+        addTarget("tv_grab_fi", new XMLTV_generic_config(parent, "tv_grab_fi"));
+        grabber->addSelection("Finland", "tv_grab_fi");
     };
 };

Index: programs/mythfilldatabase/filldata.cpp
===================================================================
RCS file: /var/lib/cvs/MC/programs/mythfilldatabase/filldata.cpp,v
retrieving revision 1.45
diff -u -d -r1.45 filldata.cpp
--- programs/mythfilldatabase/filldata.cpp	7 Mar 2003 19:35:12 -0000	1.45
+++ programs/mythfilldatabase/filldata.cpp	10 Mar 2003 19:04:50 -0000
@@ -911,6 +912,11 @@
         command.sprintf("nice -19 %s --days 7 --output %s",
                         xmltv_grabber.ascii(),
                         filename.ascii());
+    else if (xmltv_grabber == "tv_grab_fi")
+        // Use the default of 10 days for Finland's grabber
+        command.sprintf("nice -19 %s --offset %d --config-file %s --output %s",
+                        xmltv_grabber.ascii(), offset,
+                        configfile.ascii(), filename.ascii());
     else
         command.sprintf("nice -19 %s --days 1 --offset %d --config-file %s "
                         "--output %s", xmltv_grabber.ascii(),
@@ -954,7 +963,7 @@
     int failures = 0;
     for (it = sourcelist.begin(); it != sourcelist.end(); ++it) {
         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_de" || xmltv_grabber == "tv_grab_fi")
         {
             // tv_grab_uk|de doesn't support the --offset option, so just grab a 
             // week.


More information about the mythtv-dev mailing list