Hello,
I have a quite frequent issue with Subsonic/Airsonic: from time to time, some albums are missing in the DB after scan.
Both Subsonic and Airsonic are installed on a RPI4 running raspbian. The files are flac/mp3 files, on a ext4 file system, on a USB HDD. File system is clean.
It looks to me that this is not a DB issue, as my Subsonic instance (6.1.6) is a attached to MariaDB, while Airsonic uses its own DB. But both encounter the same kind of issues.
I frequently add albums (every week more or less). A scan is planned weekly on both Subsonic and Airsonic. Everything works fine, except that, from time to time, one or several albums are missing.
More things: the way I build my music library is the following: each "new" album is stored in one single directory, and I always add two symlinks to this album, to have "faster access" to new albums.
Example:
The "physical" album:
03-Baroque/Archangelo Corelli/F_Bruggen-G_Leonhardt-A_Bylsma-Corelli_-_Sonata_Op.5_No.7-12_La_Follia
The 2 symlinks:
000_NEWS-2022/2022-02-14-F_Bruggen-G_Leonhardt-A_Bylsma-Corelli_-_Sonata_Op.5_No.7-12_La_Follia -> ./F_Bruggen-G_Leonhardt-A_Bylsma-Corelli_-_Sonata_Op.5_No.7-12_La_Follia
000_NEWS-2022/F_Bruggen-G_Leonhardt-A_Bylsma-Corelli_-_Sonata_Op.5_No.7-12_La_Follia -> ../03-Baroque/Archangelo Corelli/F_Bruggen-G_Leonhardt-A_Bylsma-Corelli_-_Sonata_Op.5_No.7-12_La_Follia
For this album, after scanning the DB, it appears that the 2 symlinks are present, but not the "physical" one.
I have exactly the same kind of issue on several other albums. On the file system, everything seems to be fine, but not in Subsonic/Airsonic.
I found two ways to solve this:
- delete and rebuild the complete DB (which is the "nuclear" solution)
- copy the "physical" album (cp -r <old-album> <new-album>, and just update the DB. This generally works...
Using the second solution copies all the files of the old album to the new directory (I generally just change a bit the name of the directory), and gives them "today's date". Generally, this works. More over, after having done this, I usually see the two albums in Subsonic...
For me, the issue comes from the way Subsonic/Airsonic detects new files on the file system during scan. For an obscure reason, this operation sometimes "misses" some files/directories.
Does anybody know how the check is made in Subsonic to "detect" new albums?
Is there something to be checked at the "album" level (the flac files? the album directory?), or even at the parent directory level?
Any hint to understand this issue?
Denis