unoffical-sonos-controller-for-linux
unoffical-sonos-controller-for-linux copied to clipboard
Local music server does not handle symlinks
My Music folder is a symbolic link to a network drive, but symlinks don't appear in the file browser?
Originally posted by @hobleyd in https://github.com/pascalopitz/unoffical-sonos-controller-for-linux/issues/14#issuecomment-657818701
@hobleyd I'm dealing with symlinks in v0.2.1-alpha5. Not sure about network drives though.
Sorry - should have posted my last comment here - v0.2.1-alpha6 shows the Music folder, but it is greyed out. Presumably because it is a link to an NFS share.
Right, so selection happens via showOpenDialog here.
const choice = await dialog.showOpenDialog({
properties: ['openDirectory'],
});
I guess an NFS share isn't interpreted as directory by the Electron filter.
To make this even more complicated, i don't think I can change the way that selector is working:
https://www.electronjs.org/docs/api/dialog
Note: On Windows and Linux an open dialog can not be both a file selector and a directory selector, so if you set properties to ['openFile', 'openDirectory'] on these platforms, a directory selector will be shown.
Maybe you could create a dummy folder and symlink the share inside of it? Does that work from thereon?
OK, I tried that, but get:
$ sonos-controller-unofficial Handle new path /home/me/Local Music Server starting <-- POST /smapi [Error: ENOENT: no such file or directory, stat '/home/me/Local Music/James'] { errno: -2, code: 'ENOENT', syscall: 'stat', path: '/home/me/Local Music/James' }
@hobleyd Is this still a problem using 0.2.9+?
All my Music is on NFS, so can't tell for local playing, sorry.