beetbox / beetbox/beets

list Exact Matches

Open
#4,371 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
15.7k
Forks
2.1k
Avg merge
4d 21h
Merged PRs (30d)
31

Description

### Problem
I'm trying to figure out how to use "exact matches"
I only want the path to be displayed for the exact album name

ex.
`beet ls -f '$path' album:"Record"`

```
/media/musica/Lossless4/Amon Tobin/Solid Steel Presents Amon Tobin_ Recorded Live/11. Interlude_ You's a Jaco Pastorius Looking Motherfucker.flac
/media/musica/Lossless4/John Abercrombie/Rarum XIV Selected Recordings/01 Timeless.flac
/media/musica/Lossless4/John Abercrombie/Rarum XIV Selected Recordings/02 Sorcery I.flac
/media/musica/Lossless4/John Abercrombie/Rarum XIV Selected Recordings/03 Avenue.flac
/media/musica/Lossless4/John Abercrombie/Rarum XIV Selected Recordings/04 Memoir.flac
.......
/media/musica/Lossless4/Zero 7/Record/1. Futures.flac
/media/musica/Lossless4/Zero 7/Record/2. I Have Seen.flac
/media/musica/Lossless4/Zero 7/Record/3. You’re My Flame.flac
/media/musica/Lossless4/Zero 7/Record/4. Destiny.flac
```
......

I am only interested in obtaining the Zero7 'Record' paths

So i try:

`beet ls -f '$path' album:=Record`

**But this gives no results**

```
beet -vv ls -f '$path' album:="Record"
user configuration: /home/filippo/.config/beets/config.yaml
data directory: /home/filippo/.config/beets
plugin paths:
lastgenre: Loading canonicalization tree ~/.config/beets/genres/genres-tree.yaml
Sending event: pluginload
library database: /home/filippo/.config/beets/library.db
library directory: /home/filippo/Musica
Sending event: library_opened
Sending event: cli_exit
```

Record is the right name for the album:

```
beet info -l 'You’re My Flame' | awk '{$1=$1};1' | grep -E "^album:"
album: Record
```

### Setup

* OS: Gentoo
* Python version: 3.9.13
* beets version: 1.6.0
* Plugin: acousticbrainz, chroma, info, lastgenre, missing, play, types
* Turning off plugins made problem go away (yes/no):

My configuration (output of `beet config`) is:

```yaml
plugins: play info acousticbrainz chroma lastgenre missing types
directory: /home/filippo/Musica/

import:
copy: no
write: no
log: /home/filippo/.config/beets/import.log
default_action: apply
languages: en de it
play:
command: gst-play-1.0 --gapless --audiosink='alsasink device=hw:CARD=DirettaAlsa,DEV=0'
raw: yes
use_folders: no
relative_to:
warning_threshold: 100
bom: no
acoustid:
apikey: REDACTED
chroma:
auto: yes
acousticbrainz:
auto: yes
force: yes
tags: []
lastgenre:
auto: yes
canonical: ~/.config/beets/genres/genres-tree.yaml
whitelist: ~/.config/beets/genres/genres.txt
count: 5
fallback: Pop/Rock
separator: '; '
force: no
min_weight: 10
prefer_specific: no
source: track
title_case: yes
verbose: no

ui:
color: yes
colors:
text_success: green
text_warning: blue
text_error: red
text_highlight: blue
text_highlight_minor: lightgray
action_default: darkblue
action: purple
hook:
hooks:
- event: album_imported
command: echo "\"{album}\""
- event: import
command: echo "imported from {paths}"
- event: art_set
command: echo "Coverart saved"
- event: import_begin
command: echo "GP import started..."
- event: import_task_apply
command: echo "Metadata applied"
- event: item_copied
command: echo "\"{item}\" copied from \"{source}\" to \"{destination}\""
- event: item_moved
command: echo "Moved \"{item}\""
- event: write
command: echo "Writing to {path}"
- event: cli_exit
command: echo "All tasks finished!"
missing:
count: no
total: no
album: no
```

Contributor guide

Open the contributing guide

Research direction

Start with the `beet ls` query used in the report and compare it with `beet info -l`, using the provided `album:"Record"` and `album:=Record` examples. Done means the exact-match query returns only the Zero7 `Record` tracks and their paths, while the broader query behavior remains understandable.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.