Repository navigation
Plugin AlbumMerger
Derrik Diener edited this page Jul 16, 2026
·
1 revision
Enabled by Default: Yes (Disable via SUPERNOVA_PLUGIN_ALBUMMERGER=false)
Metadata is rarely perfect. Often, an album rip might have tracks scattered across two separate logical "albums" in the database because of slight variations in the Release Year tag, or trailing whitespace in the Album tag.
The Album Merger runs in the background and consolidates duplicate albums into a single, canonical record.
- Identification: The plugin queries the database for albums that have the exact same title (case-insensitive) belonging to the same artist.
- Canonical Selection: It selects the album with the earliest created date (or the one containing the most tracks) as the "canonical" album.
-
Transaction Safety: It opens a strict SQLite transaction (
db.BeginTx). -
Reassignment: It executes
UPDATE tracks SET album_id = ? WHERE album_id = ?to move all tracks from the duplicate to the canonical album. -
Heart Migration: It migrates user favorites. If a user "hearted" the duplicate album, that heart is safely transferred to the canonical album (or ignored if they already hearted the canonical one) via
UPDATE OR IGNORE hearts. -
Purge: The duplicate album is deleted. Because SQLite is configured with
ON DELETE CASCADE, this automatically cleans up thealbum_artistsjunction table.
You can manually trigger this plugin from the web UI Settings page or via:
POST /api/plugins/albummerger/run