Index: mythtv/libs/libmythtv/videosource.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/videosource.cpp,v
retrieving revision 1.80
diff -u -r1.80 videosource.cpp
--- mythtv/libs/libmythtv/videosource.cpp 10 May 2005 23:33:56 -0000 1.80
+++ mythtv/libs/libmythtv/videosource.cpp 18 Jun 2005 08:20:38 -0000
@@ -559,6 +559,9 @@
addTarget("tv_grab_jp", new XMLTV_generic_config(parent, "tv_grab_jp"));
grabber->addSelection("Japan", "tv_grab_jp");
+
+ addTarget("tv_grab_kr", new XMLTV_generic_config(parent, "tv_grab_kr"));
+ grabber->addSelection("South Korea", "tv_grab_kr");
addTarget("tv_grab_pt", new XMLTV_generic_config(parent, "tv_grab_pt"));
grabber->addSelection("Portugal", "tv_grab_pt");
Index: mythtv/programs/mythfilldatabase/filldata.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythfilldatabase/filldata.cpp,v
retrieving revision 1.177
diff -u -r1.177 filldata.cpp
--- mythtv/programs/mythfilldatabase/filldata.cpp 3 May 2005 21:56:29 -0000
1.177
+++ mythtv/programs/mythfilldatabase/filldata.cpp 18 Jun 2005 08:20:38 -0000
@@ -43,6 +43,7 @@
bool no_delete = false;
bool isNorthAmerica = false;
bool isJapan = false;
+bool isKorea = false;
bool interrupted = false;
bool refresh_today = false;
bool refresh_tomorrow = true;
@@ -57,6 +58,7 @@
QString lastdduserid;
DataDirectProcessor ddprocessor;
QString graboptions = "";
+QString koreamovie = "";
class ChanInfo
{
@@ -189,6 +191,7 @@
int id;
QString name;
QString xmltvgrabber;
+ QString xmltvgrabberoptions;
QString userid;
QString password;
QString lineupid;
@@ -1355,6 +1358,11 @@
// Hack for tv_grab_uk_rt
pginfo->catType = "movie";
}
+
+ if( isKorea && cat.contains(koreamovie) )
+ {
+ pginfo->catType = "movie";
+ }
}
else if (info.tagName() == "date" && pginfo->airdate == "")
{
@@ -2485,6 +2493,7 @@
bool grabData(Source source, int offset, QDate *qCurrentDate = 0)
{
QString xmltv_grabber = source.xmltvgrabber;
+ QString xmltv_options = source.xmltvgrabberoptions;
if (xmltv_grabber == "datadirect")
return grabDDData(source, offset, *qCurrentDate, DD_ZAP2IT);
@@ -2508,78 +2517,87 @@
QString command;
if (xmltv_grabber == "tv_grab_uk")
- command.sprintf("nice %s --days 7 --config-file '%s' --output %s",
- xmltv_grabber.ascii(), configfile.ascii(),
+ command.sprintf("nice %s %s --days 7 --config-file '%s' --output %s",
+ xmltv_grabber.ascii(), xmltv_options.ascii(),
configfile.ascii(),
filename.ascii());
else if (xmltv_grabber == "tv_grab_uk_rt")
- command.sprintf("nice %s --days 14 --config-file '%s' --output %s",
- xmltv_grabber.ascii(),
+ command.sprintf("nice %s %s --days 14 --config-file '%s' --output
%s",
+ xmltv_grabber.ascii(), xmltv_options.ascii(),
configfile.ascii(), filename.ascii());
else if (xmltv_grabber == "tv_grab_au")
- command.sprintf("nice %s --days 7 --config-file '%s' --output %s",
- xmltv_grabber.ascii(), configfile.ascii(),
+ command.sprintf("nice %s %s --days 7 --config-file '%s' --output %s",
+ xmltv_grabber.ascii(), xmltv_options.ascii(),
configfile.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(),
+ command.sprintf("nice %s %s --slow --days 1 --config-file
'%s' --offset %d --output %s",
+ xmltv_grabber.ascii(), xmltv_options.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(),
+ command.sprintf("nice %s %s --days 7 '%s' --output %s",
+ xmltv_grabber.ascii(), xmltv_options.ascii(),
configfile.ascii(),
filename.ascii());
else if (xmltv_grabber == "tv_grab_nl")
- command.sprintf("nice %s --output %s",
- xmltv_grabber.ascii(),
+ command.sprintf("nice %s %s --output %s",
+ xmltv_grabber.ascii(), xmltv_options.ascii(),
filename.ascii());
else if (xmltv_grabber == "tv_grab_fi")
// Use the default of 10 days for Finland's grabber
- command.sprintf("nice %s --offset %d --config-file '%s' --output %s",
- xmltv_grabber.ascii(), offset,
+ command.sprintf("nice %s %s --offset %d --config-file '%s' --output
%s",
+ xmltv_grabber.ascii(), xmltv_options.ascii(), offset,
configfile.ascii(), filename.ascii());
else if (xmltv_grabber == "tv_grab_es")
// Use fixed interval of 3 days for Spanish grabber
- command.sprintf("nice %s --days=4 --config-file '%s' --output %s",
- xmltv_grabber.ascii(),
+ command.sprintf("nice %s %s --days=4 --config-file '%s' --output
%s",
+ xmltv_grabber.ascii(), xmltv_options.ascii(),
configfile.ascii(), filename.ascii());
else if (xmltv_grabber == "tv_grab_jp")
{
// Use fixed interval of 7 days for Japanese grabber
- command.sprintf("nice %s --days 7 --enable-readstr --config-file
'%s' --output %s",
- xmltv_grabber.ascii(), configfile.ascii(),
+ command.sprintf("nice %s %s --days 7 --enable-readstr --config-file
'%s' --output %s",
+ xmltv_grabber.ascii(), xmltv_options.ascii(),
configfile.ascii(),
filename.ascii());
isJapan = true;
}
+ else if (xmltv_grabber == "tv_grab_kr")
+ {
+ // Use fixed interval of 7 days for Korean grabber
+ command.sprintf("nice %s %s --output %s",
+ xmltv_grabber.ascii(), xmltv_options.ascii(),
+ filename.ascii());
+ isKorea = true;
+ koreamovie = QString::fromUtf8("�화");
+ }
else if (xmltv_grabber == "tv_grab_no")
- command.sprintf("nice %s --days 1 --offset %d --config-file
'%s' --output %s",
- xmltv_grabber.ascii(), offset, configfile.ascii(),
+ command.sprintf("nice %s %s --days 1 --offset %d --config-file
'%s' --output %s",
+ xmltv_grabber.ascii(), xmltv_options.ascii(), offset,
configfile.ascii(),
filename.ascii());
else if (xmltv_grabber == "tv_grab_se_swedb")
- command.sprintf("nice %s --days 1 --offset %d --config-file
'%s' --output %s",
- xmltv_grabber.ascii(), offset, configfile.ascii(),
+ command.sprintf("nice %s %s --days 1 --offset %d --config-file
'%s' --output %s",
+ xmltv_grabber.ascii(), xmltv_options.ascii(),
offset, configfile.ascii(),
filename.ascii());
else if (xmltv_grabber == "tv_grab_dk")
// Use fixed interval of 7 days for Danish grabber
- command.sprintf("nice %s --days 7 --config-file '%s' --output %s",
- xmltv_grabber.ascii(), configfile.ascii(),
+ command.sprintf("nice %s %s --days 7 --config-file '%s' --output %s",
+ xmltv_grabber.ascii(), xmltv_options.ascii(),
configfile.ascii(),
filename.ascii());
else if (xmltv_grabber == "tv_grab_pt")
// Use fixed interval of 3 days for Portuguese grabber
- command.sprintf("nice %s --days=4 --config-file '%s' --output %s",
- xmltv_grabber.ascii(),
+ command.sprintf("nice %s %s --days=4 --config-file '%s' --output
%s",
+ xmltv_grabber.ascii(), xmltv_options.ascii(),
configfile.ascii(), filename.ascii());
else if (xmltv_grabber == "tv_grab_be_tvb")
- command.sprintf("nice %s --days 1 --offset %d --config-file
'%s' --output %s",
- xmltv_grabber.ascii(), offset, configfile.ascii(),
+ command.sprintf("nice %s %s --days 1 --offset %d --config-file
'%s' --output %s",
+ xmltv_grabber.ascii(), xmltv_options.ascii(), offset,
configfile.ascii(),
filename.ascii());
else if (xmltv_grabber == "tv_grab_be_tlm")
- command.sprintf("nice %s --days 1 --offset %d --config-file
'%s' --output %s",
- xmltv_grabber.ascii(), offset, configfile.ascii(),
+ command.sprintf("nice %s %s --days 1 --offset %d --config-file
'%s' --output %s",
+ xmltv_grabber.ascii(), xmltv_options.ascii(), offset,
configfile.ascii(),
filename.ascii());
else
{
isNorthAmerica = true;
- command.sprintf("nice %s --days 1 --offset %d --config-file '%s' "
- "--output %s", xmltv_grabber.ascii(),
+ command.sprintf("nice %s %s --days 1 --offset %d --config-file '%s' "
+ "--output %s", xmltv_grabber.ascii(),
xmltv_options.ascii(),
offset, configfile.ascii(), filename.ascii());
}
@@ -2596,6 +2614,7 @@
xmltv_grabber == "tv_grab_nl" ||
xmltv_grabber == "tv_grab_fr" ||
xmltv_grabber == "tv_grab_fi" ||
+ xmltv_grabber == "tv_grab_kr" ||
xmltv_grabber == "tv_grab_jp" ||
xmltv_grabber == "tv_grab_pt" ||
xmltv_grabber == "tv_grab_be_tvb" ||
@@ -2746,7 +2765,7 @@
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_pt")
+ xmltv_grabber == "tv_grab_pt" || xmltv_grabber == "tv_grab_kr" )
{
// These don't support the --offset option, so just grab the max.
if (!grabData(*it, -1))
@@ -3520,7 +3539,7 @@
MSqlQuery sourcequery(MSqlQuery::InitCon());
QString querystr = QString("SELECT sourceid,name,xmltvgrabber,userid,"
- "password,lineupid "
+ "password,lineupid,xmltvgrabberoptions "
"FROM videosource ORDER BY sourceid;");
sourcequery.exec(querystr);
@@ -3535,6 +3554,7 @@
newsource.id = sourcequery.value(0).toInt();
newsource.name = sourcequery.value(1).toString();
newsource.xmltvgrabber =
sourcequery.value(2).toString();
+ newsource.xmltvgrabberoptions = sourcequery.value(6).toString();
newsource.userid = sourcequery.value(3).toString();
newsource.password = sourcequery.value(4).toString();
newsource.lineupid = sourcequery.value(5).toString();