New directories are not added
-
@PunkRockJW
I tested this on both Linux, macOS and Windows, unable to reproduce the issue.
What OS is it? -
I'm currently on Linux Mint 21.1 but I've had it happen on several earlier version of Mint as well.
Interestingly enough, I had this same issue when I was using Clementine earlier in the year before switching over to Strawberry.
My library is held on an external disk and originally I thought it had something to do with that or some sort of weird file system permissions but no matter what I did, the issue persisted. The only thing I could figure out was to blow away the library database and start fresh.
I have a few ideas of reorganizing the library structure so I don't have over 1,400 directories in the top level but that will take time I don't feel like spending.
Is there any way to log the directory scanning process so I can try to chase this down? -
I also experience this issue on Arch Linux. The library scan will detect new albums in existing artist folders but not new artist folders.
My general fix is the same as the other user mentioned -- deleting the Strawberry database and then rebuilding the library. However, this is suboptimal because I lose play counts etc. and the it takes a long time to rescan the library. My files are on an NFS share. In <share>/music, there are ~770 artist folders, with varying amounts of subfolders.
I tried running Strawberry from terminal with verbose flags, doing a full collection scan, and dumping the output to a file (which ended up quite large). When I searched the file, there weren't any entries for the new artist folders that weren't getting added -- meaning, there were not any errors produced by the scanner for those files. Additionally, once I've deleted the database and performed a rescan, the files are then added correctly and function correctly, so I don't believe that the files are an issue.
I've had to do this workaround a number of times to get new artists added, so I went looking for some troubleshooting or a fix. When I had the files stored on a local drive rather than NFS, I did not encounter this issue. There were a few less artist folders at that time, but still in excess of 725 or so.
-
A full re-scan should iterate all files and directories, except hidden files and directories. When new directories are found it should immediately find songs in those directories.
So even if you ran out of watch descriptors, a full re-scan should find the songs, even though the "monitor collection" feature won't fully work, ie.: will not find songs in a all directories.
So this sounds to me like a Strawberry bug, unfortunately, it's probably not something I'd be able to fix without debugging in an environment where the problem occurs.
I suggest to open a bug report about this on GitHub (https://github.com/strawberrymusicplayer/strawberry/issues) with as much details as possible, OS, filesystem, audio filetype, how the directory hierarchy looks like, i.e.: (Music / Artist / Album), etc.
Someone else should debug this, shouldn't be too hard to fix if you can reproduce the problem on a full scan with adding a new artist dir.
Here is a place to start, this is where it finds new directories:
https://github.com/strawberrymusicplayer/strawberry/blob/dd72fb4ca590062cfe886c88ad098adc91deb161/src/collection/collectionwatcher.cpp#L463
Here is where it iterates the new found subdirs:
https://github.com/strawberrymusicplayer/strawberry/blob/dd72fb4ca590062cfe886c88ad098adc91deb161/src/collection/collectionwatcher.cpp#L698
It will probably be easiest to try and debug this by moving a new artist directory in and out from the music directory, instead of a full re-scan, since a full scan will take long and iterate all subdirs in the music dir. -
I ran into an issue on my work computer where I use an external HDD mounted through udisks2, the watcher isn't working at all. If I manually mount the disk with mount it works fine. Maybe this is the same issue.
How did you mount the disk? Through udisks2 (removable disk), or through mount / fstabs? -
@jonas My apologies, I meant to follow up on this on GitHub and hadn't found time. I took a look at the code links, I have some background in reading code at least, but I was out of my depth to be honest.
So, I've tried this a couple of different ways. I have the NAS server in the closet, and I can access it on my Linux PC via NFS (which is set up to automount on demand via autofs, and unmount after inactivity), as well as a more traditional SMB. The SMB I have set up to mount in fstab. I've tried setting my full library to one or the other and I do see the same issue via both protocols. Well, with subsequently added folders since changing the mount point results in a new library.
To add some more confusion: I recently shrunk my Linux partition and installed Windows in a dual-boot configuration since I had need for it. I decided to try Strawberry on Windows, accessing the share via SMB. I have it set as a networked drive (M:), and my library is pointed to M:. I do not encounter the issue on Windows -- it seems to add new directories just fine on startup when set to scan for changes.
-
I just wanted to add that I have this on my machine too, using strawberry 1.0.18 compiled from gentoo repository. I believe the reason why this happens is because my music files are on a mergerfs mountpoint and this behaves in some ways similar to your nfs/smb mounts. not sure what exactly is different for those "non block devices", for the moment I do full database rebuilds from time to time when I add new music
-
to respond to my own post: the solution was to include -o func.getattr=newest in mergerfs mount options so mtime is used. now all changes in the music folder get picked up like it should
-
Hello,
New install 1.1.3 from last week on a Debian machine,
I have this exact same problem, all new folders are not seen, doesn't show in the mainFolder mounted Samba, Strawberry stock/default
Where should I look ? a config file through console or something ?
-
@MarieSophieSG
Check thatstrawberry-tagreader
is running withps -xua | grep strawberry