[mythtv] Mythvideo and UTF8 filenames
Lutz Mändle
lmaendle at gmx.net
Thu Jun 3 21:23:15 EDT 2004
I've made some investigations in source code and found a way, that
works for me, here comes a patch:
diff -Naur ./orig/main.cpp ./patched/main.cpp
--- ./orig/main.cpp 2004-05-10 00:53:26.000000000 +0200
+++ ./patched/main.cpp 2004-06-04 02:55:04.000000000 +0200
@@ -356,7 +356,7 @@
QString querystr;
querystr.sprintf("DELETE FROM videometadata WHERE "
- "filename=\"%s\"", name.ascii());
+ "filename=\"%s\"",
name.local8Bit().data());
query.exec(querystr);
}
diff -Naur ./orig/metadata.cpp ./patched/metadata.cpp
--- ./orig/metadata.cpp 2004-05-26 21:58:03.000000000 +0200
+++ ./patched/metadata.cpp 2004-06-04 02:52:08.000000000 +0200
@@ -173,7 +173,7 @@
{
query.next();
- title = QString::fromUtf8(query.value(0).toString());
+/* title = QString::fromUtf8(query.value(0).toString());
director = QString::fromUtf8(query.value(1).toString());
plot = QString::fromUtf8(query.value(2).toString());
rating = QString::fromUtf8(query.value(3).toString());
@@ -187,6 +187,22 @@
inetref = QString::fromUtf8(query.value(11).toString());
childID = query.value(12).toUInt();
browse = query.value(13).toBool();
+ playcommand = query.value(14).toString();*/
+
+ title = query.value(0).toString();
+ director = query.value(1).toString();
+ plot = query.value(2).toString();
+ rating = query.value(3).toString();
+ year = query.value(4).toInt();
+ userrating = (float)query.value(5).toDouble();
+ length = query.value(6).toInt();
+ filename = query.value(7).toString();
+ showlevel = query.value(8).toInt();
+ id = query.value(9).toUInt();
+ coverfile = query.value(10).toString();
+ inetref = query.value(11).toString();
+ childID = query.value(12).toUInt();
+ browse = query.value(13).toBool();
playcommand = query.value(14).toString();
}
}
@@ -211,7 +227,7 @@
{
query.next();
- title = QString::fromUtf8(query.value(0).toString());
+/* title = QString::fromUtf8(query.value(0).toString());
director = QString::fromUtf8(query.value(1).toString());
plot = QString::fromUtf8(query.value(2).toString());
rating = query.value(3).toString();
@@ -225,8 +241,24 @@
childID = query.value(11).toUInt();
browse = query.value(12).toBool();
playcommand = query.value(13).toString();
+ category = query.value(14).toString();*/
+
+ title = query.value(0).toString();
+ director = query.value(1).toString();
+ plot = query.value(2).toString();
+ rating = query.value(3).toString();
+ year = query.value(4).toInt();
+ userrating = (float)query.value(5).toDouble();
+ length = query.value(6).toInt();
+ filename = query.value(7).toString();
+ showlevel = query.value(8).toInt();
+ coverfile = query.value(9).toString();
+ inetref = query.value(10).toString();
+ childID = query.value(11).toUInt();
+ browse = query.value(12).toBool();
+ playcommand = query.value(13).toString();
category = query.value(14).toString();
-
+
// Genres
fillGenres(db);
I'm not sure, how this works on a non UTF8 system.
--
Lutz Mändle Internet: lmaendle at gmx.net
Berlin/Germany
More information about the mythtv-dev
mailing list