path queries not returning all results #4954
Replies: 3 comments 4 replies
-
Not tested if it matters, but the docs specify this as the correct way to use modify Other then that, I unfortunately do not have much to come with her. My next course of action would be to maybe check the path of all the items with |
Beta Was this translation helpful? Give feedback.
-
Try using quotes around the path. |
Beta Was this translation helpful? Give feedback.
-
Duplicate of #4955 |
Beta Was this translation helpful? Give feedback.
-
Hello,
I'm not confident this is a bug, so asking for some help here rather than make a bug report.
Some background on the problem. My music collection is separated into 3 categories:
Artists
,Composers
&Scores
. The Directory structure reflects the categories. Years ago I accomplished this by using 3 separate beets configs, one for each category. I always thought this was convoluted so I dug into the doc looking for a more sane approach - Using flexible attributes appears to be what I was looking for.The relevant part of my config now looks like:
I first tried to tag all the files in each category by doing:
But this was not finding any files. To be sure:
beet ls path:/mnt/TARS/Media/Music/Artists
would not return anything.
By a happy accident typo I noticed prepending
path::
to the filepath instead ofpath:
would return all the files. I know the double::
is for regex, but not sure why this finds the files when the single:
does not.Perhaps wrecklessly, I ran the
beet modify category="foobar" path::/foo/bar
for each category and everything looks correct, e.g,beet ls category:artists | wc -l
return the expected count of files,24878
So that's the background, this is the issue I cannot figure out - Running:
beet ls path:/mnt/TARS/Media/Music/Artists | wc -l
returns
5871
, the correct count being24878
. I expected it to find either none, like the above issue or hopefully24878
after having run the modify commandUsing the
path::/foo/bar
regex returns the correct count. The same issue happens on each category, eg,scores
,composers
.Do any of have an idea what could be going on here? It's possible there is something wrong with the database, but querying the db directly with sql works fine. Any ideas would be very appreciated!
EDIT:
So if I run
beet info -l
on a file that is not returned frombeet ls path:/foo/bar
- the command also returns nothing. So it's apparent beets thinks most files are not in the library. This I find confusing because when examining the database directly or querying the database directly, everything is there. Am I overlooking something obvious?Beta Was this translation helpful? Give feedback.
All reactions