Bug 325317

Summary: Feature request: Allow filtering by lack of tag, or empty tag.
Product: [Applications] amarok Reporter: sparhawk <kdebugs>
Component: Collection BrowserAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: wishlist CC: robert, tuomas
Priority: NOR    
Version: 2.8.0   
Target Milestone: 2.9   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description sparhawk 2013-09-26 02:34:04 UTC
I sort my collection by album artist tags. I'd like to be able to see which of my tracks lack this tag.

Reproducible: Always

Steps to Reproduce:
1. Attempt to search for empty or no tags, e.g. with albumartist:=""

Actual Results:  
Search results don't reflect the query.

Expected Results:  
Tracks with no album artist set should be displayed.
Comment 1 Tuomas Nurmi 2024-08-10 10:54:47 UTC
*** Bug 491516 has been marked as a duplicate of this bug. ***
Comment 2 Tuomas Nurmi 2024-08-10 10:55:56 UTC
Goes also for other tags in collection search, I believe. Would be useful; I'll try to have a look sometime and see if this would be simple enough to implement.
Comment 3 Bug Janitor Service 2024-12-07 09:49:25 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/amarok/-/merge_requests/131
Comment 4 Tuomas Nurmi 2024-12-07 17:10:45 UTC
Git commit cc18201d922e02a7caf7ec56a20119d552134876 by Tuomas Nurmi.
Committed on 07/12/2024 at 14:29.
Pushed by nurmi into branch 'master'.

Allow filtering collection by lack of tag / empty tag

To use: fieldname="", or -fieldname="".
Should work for most of the fields queriable. Exceptions are date fields, and
file size, type, length etc. related fields.

M  +1    -0    ChangeLog
M  +8    -0    src/core-impl/collections/db/sql/SqlQueryMaker.cpp
M  +1    -1    src/core-impl/collections/support/Expression.cpp
M  +16   -2    src/core-impl/collections/support/TextualQueryFilter.cpp
M  +24   -0    tests/core-impl/collections/db/sql/TestSqlQueryMaker.cpp
M  +3    -0    tests/core-impl/collections/db/sql/TestSqlQueryMaker.h

https://invent.kde.org/multimedia/amarok/-/commit/cc18201d922e02a7caf7ec56a20119d552134876