[mythtv-theming] coverfile vs screenshot

Greg Estabrooks greg at phaze.org
Thu Aug 20 10:56:50 UTC 2009


> Will this still work if the there is a season sub folder?


 No it will not, but if you add the attached patch it will. I have mine in 
seasonnumbered subfolders as well :)


-------------- next part --------------
Index: mythvideo/videodlg.cpp
===================================================================
--- mythvideo/videodlg.cpp      (revision 21371)
+++ mythvideo/videodlg.cpp      (working copy)
@@ -2254,8 +2254,9 @@

     if ((parent) && (metadata))
     {
-        if (QString::compare(parent->getString(),
-                             metadata->GetTitle(), Qt::CaseInsensitive) == 0)
+        if ((QString::compare(parent->getString(),
+                             metadata->GetTitle(), Qt::CaseInsensitive) == 0) ||
+            parent->getString().startsWith("Season", Qt::CaseInsensitive))
             item->SetText(metadata->GetSubtitle());
     }
     else
@@ -2267,8 +2268,9 @@
        (QFileInfo(imgFilename).exists() || imgFilename.startsWith("myth://")))
     {   
         if ((parent) && (metadata) &&
-            (QString::compare(parent->getString(),
-                              metadata->GetTitle(), Qt::CaseInsensitive) == 0) &&
+            ((QString::compare(parent->getString(),
+                              metadata->GetTitle(), Qt::CaseInsensitive) == 0) ||
+             parent->getString().startsWith("Season", Qt::CaseInsensitive)) &&
             !GetScreenshot(node).isEmpty())
         {   
             QString screenshot = GetScreenshot(node);



More information about the mythtv-theming mailing list