Navidrome DB Corruption #57

Closed
opened 2026-03-25 19:02:51 -04:00 by sickprodigy · 1 comment
Owner

Having issues with media_file db and tags table within. also participants.

Having issues with media_file db and tags table within. also participants.
Author
Owner

Navidrome issues:

i ran the following command

SELECT id, album_id, title, participants
FROM media_file
WHERE participants NOT LIKE '{%' AND participants NOT LIKE '[%';

or

SELECT id, album_id, title, participants
FROM media_file
WHERE json_valid(participants) = 0;

then ran this
UPDATE media_file SET participants = '[]' WHERE id = '0f2a81a506f95758208a8cdf08ba220b';

navidrome didn't like [] so need {}

UPDATE media_file SET participants = '{}' WHERE id = '0f2a81a506f95758208a8cdf08ba220b';

Now something wrong in media_file tags table

-- Find problematic rows:
SELECT id, tags FROM media_file WHERE tags NOT LIKE '{%';

-- Fix them (replace YOUR_ID with the actual id, or remove the WHERE clause to update all):
UPDATE media_file SET tags = '{}' WHERE tags NOT LIKE '{%';

UPDATE media_file SET tags = '{}' WHERE id = '0f2a81a506f95758208a8cdf08ba220b';

And now we are good it seems. Able to scan all folders within navidrome again.

Navidrome issues: i ran the following command ``` SELECT id, album_id, title, participants FROM media_file WHERE participants NOT LIKE '{%' AND participants NOT LIKE '[%'; ``` or ``` SELECT id, album_id, title, participants FROM media_file WHERE json_valid(participants) = 0; ``` then ran this `UPDATE media_file SET participants = '[]' WHERE id = '0f2a81a506f95758208a8cdf08ba220b';` navidrome didn't like [] so need {} `UPDATE media_file SET participants = '{}' WHERE id = '0f2a81a506f95758208a8cdf08ba220b';` Now something wrong in media_file tags table -- Find problematic rows: `SELECT id, tags FROM media_file WHERE tags NOT LIKE '{%';` -- Fix them (replace YOUR_ID with the actual id, or remove the WHERE clause to update all): `UPDATE media_file SET tags = '{}' WHERE tags NOT LIKE '{%';` `UPDATE media_file SET tags = '{}' WHERE id = '0f2a81a506f95758208a8cdf08ba220b';` And now we are good it seems. Able to scan all folders within navidrome again.
Sign in to join this conversation.