Page 1 of 1

Filter one Folder by Category - not complete Database

Posted: Wed Oct 01, 2014 5:15 am
by andros.roja
Hi,
I am just replacing DigiKam with XnViewMP for Photo-Organization and so far it seems to be the better Alternative.

But what drives me Crazy is that i can not:
-select a certain folder (e.g. vacation_2014)
-filter all picture in THIS folder for a certain category (e.g. dog)
--> Thus I want to select all Pictures of a folderr that have a certain tag

But when you click on a Category you always get the "Database-Results", meaning all pictures on your computer that wear that tag.


I tried everything but could not achive that. Please tell me how i can do it - cant imagine that this feature does not exist.

Still, a great peace of software!

Re: Filter one Folder by Category - not complete Database

Posted: Thu Oct 02, 2014 7:46 am
by m.Th.
I ask YOU how to do it! :) :)

The feature isn't implemented yet but from coding perspective is dead simple. Instead of 'SELECT 'foo' FROM Images {JOIN etc...} WHERE TagID IN (bar, baz, blah)' (the tag filter supports multi-selection) one can add yet another condition like this:

'SELECT 'foo' FROM Images {JOIN etc...} WHERE TagID IN (bar, baz, blah) AND FolderID in (myCrtFolder)'

I choose the IN operator instead of = (equal) because it would be very nice in the future to specify multiple folders (for example an entire subtree) for filtering.

Of course myCrtFolder is the FolderID of the current folder.

The problem is the GUI:

How do you think that we must specify:

Now do the tags filter with the current directory and now do it without?

I would propose an on/off menu item under Folder Filter button like this one:
Categories-Filter.jpg
When is ON then the Categories Filter will take in account the current folder.

What do you say?

Re: Filter one Folder by Category - not complete Database

Posted: Thu Oct 02, 2014 3:20 pm
by m.Th.
Having an (optional) folder filtering cross-linked with the Categories Filter has much more advantages:
  • To see how many files are uncategorized in the current folder
  • To see how many files are rated with 5 (best) and/or with 4, and/or 3, and/or 2, and/or 1 in the current folder.
  • To see how many files are "To Do", "Done", "Important" or any other color state in the current folder
All these with a single menu entry and (almost) a single line of code.

I think that this would be very good to implement and not only because many users from digiKam requested it in the past.

Re: Filter one Folder by Category - not complete Database

Posted: Mon Oct 06, 2014 1:47 pm
by xnview
See Issue 492 for current status and details.

Re: Filter one Folder by Category - not complete Database

Posted: Tue Oct 07, 2014 6:42 am
by m.Th.
It seems that a better solution for GUI would an addition in the drop-down menu of the Match button (top-left in the Category Filter pane). The menu should be like this:


Match
Any //these already exists
All
------------
Globally
Current Folder
Crt Folder (recursive) //only one option can be active