Serve album covers from the service, show and sort by dates

Covers are stored with the assignment and served by the service, since Music Assistant's plain-http image URLs are blocked on an https page. Search results load covers through a signed /covers proxy. Adds a fetch-covers command for imported assignments, a migration for existing databases, and sorting assignments by artist, recently assigned or recently scanned, with both dates shown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-25 21:21:05 +00:00
co-authored by Claude Opus 5.5
parent 8b8a3f6184
commit 1abba34cfe
11 changed files with 388 additions and 28 deletions
+20
View File
@@ -101,6 +101,26 @@ env DB_PATH=/var/db/tag_albums/tag_albums.sqlite3 \
su -m tagalbums -c '.venv/bin/tag-albums import-yaml /path/to/tag_albums.yaml'
```
### Album covers
The service stores each assignment's cover and serves it itself. Music Assistant's image URLs are plain http on another host, which browsers block on an https page. Albums assigned from the web page get their cover right away. Imported assignments have none, so fetch them once (this reads the env file for HA access):
```sh
cd /usr/local/tag-albums
su -m tagalbums -c 'set -a; . /usr/local/etc/tag_albums.env; set +a; .venv/bin/tag-albums fetch-covers'
```
It lists the albums Music Assistant has no cover for; those keep the grey placeholder. Running it again only looks at assignments still missing a cover.
### Updating
```sh
cd /usr/local/tag-albums && git pull && uv sync --no-dev
service tag_albums restart
```
Database changes are applied automatically at startup.
## Home Assistant side
These pieces live in the `home-assistant-config` repo: