Give podcast queue items fail-safe negative ids

TrackItem::podcast_episode used id 0, release_id 0 and artist id 0, which
clients treat as library rows. Podcast items now get a negative id derived
from the episode id (TrackItem::podcast_track_id, at most
PODCAST_TRACK_ID_MAX, below pending federated ids) and release/artist id -1,
so existing id < 0 / release_id < 0 checks skip them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
sanapachandClaude Opus 5.5 committed 2026-11-19 17:02:31 +02:00
1 parent 49ae6423f6
commit e627be51d4
4 files changed
+64 -20

No files matched your search

+2 -1
View File
@@ -53,7 +53,8 @@ converges independently of delivery order. Migrations follow
`PRAGMA user_version`; the prototype podcast database is imported and its
tables are kept as `legacy_*`; newer or foreign files are refused unchanged.
`TrackItem.podcast` marks episode queue items, which music-only code must
skip. See the "SQLite reference store" section of [PODCASTS.md](PODCASTS.md).
skip; their negative ids (`release_id` and artist id -1) keep code written
for library tracks (`id >= 0`) away from them. See the "SQLite reference store" section of [PODCASTS.md](PODCASTS.md).
Filesystem scanning schedules, playback, federation lifecycle, and UI state
remain application responsibilities. Database and metadata work must stay off