unoffical-sonos-controller-for-linux icon indicating copy to clipboard operation
unoffical-sonos-controller-for-linux copied to clipboard

Local music server does not handle symlinks

Open pascalopitz opened this issue 5 years ago • 8 comments
trafficstars

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

pascalopitz avatar Jul 14 '20 00:07 pascalopitz

@hobleyd I'm dealing with symlinks in v0.2.1-alpha5. Not sure about network drives though.

pascalopitz avatar Jul 14 '20 11:07 pascalopitz

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.

hobleyd avatar Jul 18 '20 10:07 hobleyd

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.

pascalopitz avatar Jul 18 '20 11:07 pascalopitz

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.

pascalopitz avatar Jul 18 '20 11:07 pascalopitz

Maybe you could create a dummy folder and symlink the share inside of it? Does that work from thereon?

pascalopitz avatar Jul 18 '20 11:07 pascalopitz

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 avatar Jul 18 '20 23:07 hobleyd

@hobleyd Is this still a problem using 0.2.9+?

s1037989 avatar Dec 30 '21 17:12 s1037989

All my Music is on NFS, so can't tell for local playing, sorry.

hobleyd avatar Jan 08 '22 01:01 hobleyd