In a previous post, I’ve been exploring the
structure of the
mediaserver database which is the media database on the Synology NAS.
In some cases, tracks and folders that are moved or removed on the NAS filesystem (especially from CIFS/Samba) are not reflected in the Audio Station app - this is because the stale paths are not removed from the
Here is a recipe to clean them up - I’ll show the live steps but please practice standard backup
procedure before doing so:
ssh your-nas-hostnameto get into the NAS
sudo su -to become root
su - postgresto become the Postgres user
psql mediaserverto connect to the media database
select * from track where path like '%path/to/old/files%';to identify the tracks that you want to remove - make sure you get that right!
delete from track where path like '%path/to/old/files%';to remove those entries and their children records in related tables
- Repeat the above
deleteinstructions for tables
directorywith the same
- Refresh your audio app: the files and folders should be gone!
That’s it! Don’t nuke your data