-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
%aunique fails if a disambiguation is a non-fixed field #2678
Comments
I've found responses like this
Notice the
|
This is my output after your suggestion: $ beet ls -f '$albumartist - $album %aunique{albumartist album year $albumformat, catalognum label} [$format]' album::^Franz Ferdinand
Franz Ferdinand - Franz Ferdinand <no such column: 'MP3'> [MP3]
Franz Ferdinand - Franz Ferdinand <no such column: 'MP3'> [MP3]
Franz Ferdinand - Franz Ferdinand <no such column: 'FLAC'> [FLAC] It could be something related to my setup though. |
Thanks for the detailed report. This is in fact a bug—I don't think even a flexible attribute would work as a disambiguator as it stands. The problem is indeed with the MatchQuery construction that you pointed to. Namely, the problem is that the FieldQuery base class constructor defaults to Line 102 in 34246a0
To read more about fast and slow queries, check out this blog post. We need to pass The right fix is probably a helper function that will automatically choose the fast parameter based on the kind of field being queried. |
I recently encountered this behaviour while trying out paths with
%aunique{}
and the below config.This will produce the below output (part of).
This means that different format, which already produce a different path, still get deduplicated by
%aunique
, which is intended behaviour.I would, however, want to avoid this and @sampsyo referred to #2610, from which I slightly adapted this snippet:
The snippet works for the
beet list
command, however it does not work as a disambiguator for%aunique
:And produces
_no such column∶ format_
in the file name.I believe this is caused by this piece:
found in
beets/library.py
.My understanding is that the
key
gets queried to the database but not with the fields generated by theinline
plugin. Would it be feasible to allowinline
fields to be queried?Setup
The text was updated successfully, but these errors were encountered: