[mythtv] Micropatch to mythvideo to allow case mismatch with helper application

Leandro Dardini ldardini at tiscali.it
Sat Feb 22 21:53:11 EST 2003


Hi,
I found mythvideo unable to show and play "AVI" file when only the "avi"
movie extension and helper application are set in mythexplorer-settings.txt.

The patch is very trivial... but it was the first time I touch cpp code :)

Isaac, a big thank you for mythtv from Italy.

Leandro


Index: mythvideo/databasebox.cpp
===================================================================
RCS file: /var/lib/cvs/mythvideo/mythvideo/databasebox.cpp,v
retrieving revision 1.5
diff -u -d -r1.5 databasebox.cpp
--- mythvideo/databasebox.cpp   5 Feb 2003 19:48:13 -0000       1.5
+++ mythvideo/databasebox.cpp   22 Feb 2003 20:43:32 -0000
@@ -128,7 +128,7 @@
         QString title = mdata->Filename().section('/',-1);
         QString ext = mdata->Filename().section('.',-1);

-        QString handler =
gContext->GetSetting(QString("%1_helper").arg(ext));
+        QString handler =
gContext->GetSetting(QString("%1_helper").arg(ext.lower()));
  //     cout << "handler for" << ext.ascii() << ":" << handler.ascii() <<
endl;
         QString command = handler.replace(QRegExp("%s"),
                                           QString("'%1'").arg(filename));
Index: mythvideo/dirlist.cpp
===================================================================
RCS file: /var/lib/cvs/mythvideo/mythvideo/dirlist.cpp,v
retrieving revision 1.3
diff -u -d -r1.3 dirlist.cpp
--- mythvideo/dirlist.cpp       5 Feb 2003 19:48:13 -0000       1.3
+++ mythvideo/dirlist.cpp       22 Feb 2003 20:43:32 -0000
@@ -66,7 +66,7 @@

//printf("profile:%s\n",gContext->GetSetting("Profile").ascii());
            QString prof = gContext->GetSetting("Profile");
            QString prof_name = "profile_" + prof;
-           if (gContext->GetSetting(prof_name).contains(ext))
+           if (gContext->GetSetting(prof_name).contains(ext,FALSE))
             {
                 data = CheckFile(filename);
                 playlist.append(*data);



More information about the mythtv-dev mailing list