Index: i18n/mythgallery_es.ts
===================================================================
--- i18n/mythgallery_es.ts (revision 10276)
+++ i18n/mythgallery_es.ts (working copy)
@@ -116,6 +116,14 @@
Este directorio tiene que existir y se necesita permiso de lectura.
+
+ Filtro por nombre
+
+
+
+ Excluye ficheros que no complen el patron. Es sensible a mayusculas. Ejemplo: HI_* LOW_* [0-9]* *.tiff
+
+
Ruta desde donde se importan las imágenes
Index: mythgallery/gallerysettings.cpp
===================================================================
--- mythgallery/gallerysettings.cpp (revision 10276)
+++ mythgallery/gallerysettings.cpp (working copy)
@@ -8,6 +8,7 @@
#include
#include "config.h"
+#include "constants.h"
// General Settings
@@ -21,6 +22,20 @@
return gc;
};
+static HostLineEdit *MythGalleryFileFilter(void)
+{
+ HostLineEdit *gc = new HostLineEdit("GalleryFileFilter");
+ gc->setLabel(QObject::tr("Filename Filter"));
+ gc->setValue(MEDIA_FILENAMES);
+ gc->setHelpText(
+ QObject::tr(
+ "Files which do not match any filter are "
+ "exluded from the gallery views. The "
+ "filters are case sensitive."));
+
+ return gc;
+};
+
static HostCheckBox *MythGalleryThumbnailLocation()
{
HostCheckBox *gc = new HostCheckBox("GalleryThumbnailLocation");
@@ -173,6 +188,7 @@
setUseLabel(false);
addChild(MythGalleryDir());
+ addChild(MythGalleryFileFilter());
addChild(MythGalleryThumbnailLocation());
addChild(MythGallerySortOrder());
addChild(MythGalleryImportDirs());
Index: mythgallery/main.cpp
===================================================================
--- mythgallery/main.cpp (revision 10276)
+++ mythgallery/main.cpp (working copy)
@@ -119,6 +119,11 @@
settings.load();
settings.save();
+/* this shouldn't be needed because of the settings load/save above
+ if (gContext->GetSetting("GalleryFileFilter", "").isEmpty())
+ gContext->SaveSetting("GalleryFileFilter", MEDIA_FILENAMES);
+*/
+
setupKeys();
return 0;
Index: mythgallery/thumbgenerator.cpp
===================================================================
--- mythgallery/thumbgenerator.cpp (revision 10276)
+++ mythgallery/thumbgenerator.cpp (working copy)
@@ -200,6 +200,8 @@
{
QDir dir(fi.absFilePath());
dir.setFilter(QDir::Files);
+ dir.setNameFilter(gContext->GetSetting("GalleryFileFilter"));
+
const QFileInfoList *list = dir.entryInfoList();
if (!list)
return;
Index: mythgallery/galleryutil.cpp
===================================================================
--- mythgallery/galleryutil.cpp (revision 10276)
+++ mythgallery/galleryutil.cpp (working copy)
@@ -156,7 +156,7 @@
if (thumbGen)
thumbGen->getThumbcacheDir(currDir);
- d.setNameFilter(MEDIA_FILENAMES);
+ d.setNameFilter(gContext->GetSetting("GalleryFileFilter"));
d.setSorting(sortorder);
d.setMatchAllDirs(true);