[mythtv] Video listings view, sort by filename

Robin Neatherway robthebob at gmail.com
Thu Mar 16 00:04:17 UTC 2006


I would really like to be able to sort by filename in the listings
view. To this end I have added this as an extra option in the filter
options (alongside title, year etc). Here is a patch for my change:

Index: videofilter.h
===================================================================
--- videofilter.h       (revision 9356)
+++ videofilter.h       (working copy)
@@ -35,6 +35,7 @@
             kOrderByYearDescending = 1,
             kOrderByUserRatingDescending = 2,
             kOrderByLength = 3,
+            kOrderByFilename = 4,
         };

         int getCategory(void){return category;};

Index: videofilter.cpp
===================================================================
--- videofilter.cpp     (revision 9356)
+++ videofilter.cpp     (working copy)
@@ -186,6 +186,8 @@
             return " ORDER BY userrating DESC";
         case kOrderByLength :
             return " ORDER BY length";
+        case kOrderByFilename :
+            return " ORDER BY filename";
         default:
             return "";
     }
@@ -377,6 +379,7 @@
         orderby_select->addItem(1,"year");
         orderby_select->addItem(2,"userrating");
         orderby_select->addItem(3,"runtime");
+        orderby_select->addItem(4,"filename");
         orderby_select->setToItem(currentSettings->getOrderby());
     }
 }

Let me know if anything else has to be done for this to get accepted.

Thanks,
Robin


More information about the mythtv-dev mailing list