Sorting by a field whose declared type is nullable (its null value is
`None`, e.g. `NullInteger`/`NullFloat`) raised `TypeError: '<' not
supported between instances of ...` when the field was present on some
objects but missing on others, because `FieldSort.sort` compared `None`
against real values.
Group missing values together in the sort key so they are never compared
against present ones: they are ordered first when sorting ascending and
last when descending, matching SQLite's default ordering of NULLs used by
the fast `FixedFieldSort` path.
Fixes#3461.
Co-Authored-By: Claude <noreply@anthropic.com>
Enable fetching art for imports even when as-is is selected as the
metadata source. Allows for the case when files with good metadata
but without album art are being imported (e.g. digital download store).
Signed-off-by: Ross Williams <ross@ross-williams.net>
When `formats` includes `link`, importfeeds creates a symlink per imported
item. A failed symlink (lacking privilege on Windows, a read-only directory, or
a filesystem without symlink support) raised beets.util.FilesystemError out of
the import pipeline and aborted the whole `beet import` run, even though the
tracks were already imported.
Catch FilesystemError around the link() call, log a per-item warning, and
continue with the remaining items. Add regression tests for the
warn-and-continue behaviour, that only FilesystemError is caught, and that a
successful link still creates the symlink. Add a changelog entry.
Fixes#840.
- Fix mypy: avoid {} default in relationships.get() that creates Never type
- Fix doc build: use :doc:\etchart\ instead of :doc:\plugins/fetchart\ from within plugins/ directory
Album.store(inherit=True) copied artpath onto items as a flexible
attribute, defeating its exclusion from item_keys and persisting it as
an absolute path that bypasses relative-path storage. Skip fixed album
fields that aren't inheritable instead of treating them as flex attrs.