Skip tracks that have missing fields when using as-is

Hi, so I’m attempting to batch match a large number of albums/tracks. I’ve set up beets to match with a fairly high threshold. What I want it to do on a failure of this matching is to just sort the albums as is. However, some of these tracks have no tags for artist/album. They generally have a track number and are in a folder with the name of the album.
These will need to be manually sorted, that said beets still tries to process them, and we get something like this
“Permission denied while moving /hdd1/Music/Album1/AMagicalAlbum/01_Logo.mp3 to //00 -.mp3”
I suppose what I’m after is some way to have beets skip a folder entirely if it thinks that it can’t sort it correctly.

Is this possible?

This will be tricky because, in beets, “as-is” typically really means “as-is” with no other processing. You could try the ihate plugin to filter out some albums, but that would apply before you decide whether to apply a metadata match.

Another alternative would be to figure out why that’s leading to a “permission denied” error and fix that instead. It’s pretty surprising to me that the destination path starts with / instead of /hdd1/Music. Maybe it’s possible to fiddle with your directory and paths configurations to give these unlabeled tracks a sensible home; then you could just beet rm them all later, once the import is done.

Yeah it’s a tricky one. With the ihate plugin is it possible to have it see if the artist/album are empty instead of matching against a specific string?
In regards to the path, I guess it’s because the default path strings expects you to at least have an artist/album?
I’ll see if I can mess around with the inline plugin, it looks like I could maybe check for an empty album/artist there and then substitute in some fake values

What I’ve come up with is a small bash script to filter out the “bad” albums, I’ll import the albums that don’t match against musicbrainz that do have artists/album names asis then deal with the “bad” albums later.

#!/usr/bin/env bash
shopt -s nullglob
mkdir -p …/NoArtist
for d in */; do
FILES=(d*.{mp3,flac,m4a}) FIRSTFILE="{FILES[0]}"
if [ -z "FIRSTFILE" ] then echo "Could not find any files" else ARTIST=(exiftool “${FIRSTFILE}” -s -s -s -Artist)
if [ -z “$ARTIST” ]
mv “$d” …/NoArtist/