janbar / noson-app

The essential to control music from your SONOS devices on Linux platforms
GNU General Public License v3.0
334 stars 28 forks source link

This Device Artist discovery does not complete #213

Open dimpase opened 4 months ago

dimpase commented 4 months ago

I am trying to use the current release (the current Gentoo GURU package version 5.6.3) of noson-app to play music on a CIFS mount:

# mount
...
//192.168.86.219/music on /mnt/data type cifs (rw,relatime,vers=3.1.1,cache=strict,username=root,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.86.219,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1,closetimeo=5)

It has about 90 artists, but noson stops listing them after finding 21 (it also goes kind of slow, as if it queries a remote database (for thumbnails?)). E.g. it finds Bob Dylan:

# ls -al data/Bob\ Dylan/
total 0
drwxr-xr-x 2 root root 0 Mar 21  2023  .
drwxr-xr-x 2 root root 0 Jan 12 14:04  ..
drwxr-xr-x 2 root root 0 Mar 24  2023 'The Bootleg Series, Vol. 7- No Direction Home- The Soundtrack CD1'
drwxr-xr-x 2 root root 0 Nov  3 23:38 'The Bootleg Series, Vol. 7- No Direction Home- The Soundtrack CD2'

but does not find Can

# ls -al data/Can
total 0
drwxr-xr-x 2 root root 0 May  8  2023  .
drwxr-xr-x 2 root root 0 Jan 12 14:04  ..
drwxr-xr-x 2 root root 0 Mar 23  2023  CAN
drwxr-xr-x 2 root root 0 Mar 23  2023 'Delay 1968'
drwxr-xr-x 2 root root 0 Mar 23  2023 'Ege Bamyası'
drwxr-xr-x 2 root root 0 Mar 23  2023 'Flow Motion CD1'
drwxr-xr-x 2 root root 0 Mar 23  2023  Landed
drwxr-xr-x 2 root root 0 May  8  2023 'Live in Cuxhaven 1976'
drwxr-xr-x 2 root root 0 May  8  2023 'Live in Stuttgart 1975 CD1'
drwxr-xr-x 2 root root 0 May  8  2023 'Live in Stuttgart 1975 CD2'
drwxr-xr-x 2 root root 0 Mar 23  2023 'Out of Reach'
drwxr-xr-x 2 root root 0 Mar 23  2023 'Saw Delight CD2'
drwxr-xr-x 2 root root 0 Mar 23  2023 'Soon Over Babaluma'
drwxr-xr-x 2 root root 0 Mar 23  2023 'Tago Mago'
drwxr-xr-x 2 root root 0 Mar 23  2023 'The Peel Sessions'
drwxr-xr-x 2 root root 0 Mar 23  2023 'Unlimited Edition'

It plays the discovered artists just fine, but how to get the rest of them?

Here is what I see in the log

$ noson-app
Signal handler is enabled.
"using file ':/i18n/noson_en.qm ' for translations."
thumbnailer: register API [LASTFM]
thumbnailer: register API [DEEZER]
installing thumbnails cache in folder "/home/dima/.local/share/janbar/io.github.janbar.noson/QML/OfflineStorage"
thumbnailer is initialized
qml: LANG=en_GB
thumbnailer: configure API [DEEZER]
qml: register account: type=51463 sn=0 token=1...
qml: register account: type=72711 sn=0 token=...
registerContent: 0x558c18218020 ()
registerContent: 0x558c18215450 (FV:2)
registerContent: 0x558c18217090 ()
registerContent: 0x558c182144d0 (SQ:)
registerContent: 0x558c1808e980 (R:0/0)
registerContent: 0x558c18216100 ()
registerContent: 0x558c18029f10 ()
scanner engine started
(SONOS)FindDeviceDescription: starting new context
(SONOS)FindDeviceDescription: location url found (http://192.168.86.22:1400/xml/device_description.xml)
(SONOS)FindDeviceDescription: server string found (Linux UPnP/1.0 Sonos/77.4-49290 (ZPS12))
(SONOS)FindDeviceDescription: search target matches
(SONOS)ParseZoneGroupState: new group 'RINCON_F0F6C130BBE201400:3482689064' with coordinator 'RINCON_7828CAA4DFB401400'
(SONOS)ParseZoneGroupState: new group member 'RINCON_7828CAA4DFB401400' (Kitchen)
(SONOS)ParseZoneGroupState: new group 'RINCON_38420B1E3F2001400:485951612' with coordinator 'RINCON_38420B1E3F2001400'
(SONOS)ParseZoneGroupState: new group member 'RINCON_38420B1E3F2001400' (Den)
(SONOS)ParseZoneGroupState: new group 'RINCON_F0F6C130BBE201400:3482689065' with coordinator 'RINCON_F0F6C130BBE201400'
(SONOS)ParseZoneGroupState: new group member 'RINCON_F0F6C130BBE201400' (Sonos Roam SL)
(SONOS)ParseZoneGroupState: topology key 150140245
loadContent: 0x558c18218020 ()
handleRenderingControlChange: sig=7 volume: 0.990 [1]
create player 1 [Den]
handleRenderingControlChange: sig=7 volume: 0.990 [1]
create player 2 [Kitchen]
handleRenderingControlChange: sig=7 volume: 0.990 [1]
create player 3 [Sonos Roam SL]
installing network cache of 97656 KB in folder "/home/dima/.cache/janbar/io.github.janbar.noson"
qml: Reloading the zone ...
qml: Connecting zone 'Den'
handleRenderingControlChange: [RINCON_7828CAA4DFB401400] sig=4 volume: 38.000 [38]
handleRenderingControlChange: sig=6 volume: 38.000 [38]
Succeeded to register "org.mpris.MediaPlayer2.noson.Den" on the session bus
registerContent: 0x558c18024640 ()
loadContent: 0x558c18024640 (Q:0)
playerEventCB: container [S:] has being updated to 11
handleRenderingControlChange: [RINCON_F0F6C130BBE201400] sig=4 volume: 100.000 [100]
handleRenderingControlChange: sig=6 volume: 100.000 [100]
systemEventCB: container [S:] has being updated to 11
loadContent: 0x558c18029f10 ()
handleRenderingControlChange: [RINCON_38420B1E3F2001400] sig=4 volume: 10.000 [10]
handleRenderingControlChange: sig=6 volume: 10.000 [10]
(SONOS)ParseZoneGroupState: new group 'RINCON_F0F6C130BBE201400:3482689064' with coordinator 'RINCON_7828CAA4DFB401400'
(SONOS)ParseZoneGroupState: new group member 'RINCON_7828CAA4DFB401400' (Kitchen)
(SONOS)ParseZoneGroupState: new group 'RINCON_38420B1E3F2001400:485951612' with coordinator 'RINCON_38420B1E3F2001400'
(SONOS)ParseZoneGroupState: new group member 'RINCON_38420B1E3F2001400' (Den)
(SONOS)ParseZoneGroupState: new group 'RINCON_F0F6C130BBE201400:3482689065' with coordinator 'RINCON_F0F6C130BBE201400'
(SONOS)ParseZoneGroupState: new group member 'RINCON_F0F6C130BBE201400' (Sonos Roam SL)
(SONOS)ParseZoneGroupState: topology key 150140245
qrc:/controls2/components/CoverGrid.qml:100:23: QML Image: Thumbnailer: No image found
qrc:/controls2/components/CoverGrid.qml:100:23: QML Image: Thumbnailer: No image found
janbar commented 4 months ago

The section "This device" allows to presents the local audio files (i.e ~/Music), and supposing it is a small/medium set. As I read in the comments, you try to achieve the scan of a large (may be very large) set of audio files stored in a remote server. It is good to know that the app succeeded to scan lot of files. But at a particular point, the memory and other resources are probably overloaded to complete the process.

When guys ask me to add an option to setup an other location, other than ~/Music, I understood that some guys will try to do this type of thing ;-).

I suggest you use the "configure a share" option (Microsoft or Samba share), available from your SONOS device, as I do myself. It will scan files from your remote server (requires few minutes or hours). Internally, it will store data in dedicated database, then you could browse and play your media quickly.

dimpase commented 4 months ago

The share in question holds the tracks from about 190 audio CDs, and occupies about 90Gb (cause it's mostly flac format). Not sure it is "large" in your book, or not.

I actually expected this feature to be available ftom the CLI, not GUI. It need not run fast, and can do searching for the thumbnails after an initial sweep of data is done. What you're doing there now appears to be harder to implement right.

dimpase commented 4 months ago

from the point of view of useability, thumbnails appear nice to have, but not necessary for playing the music...

dimpase commented 4 months ago

I suggest you use the "configure a share" option (Microsoft or Samba share), available from your SONOS device, as I do myself. It will scan files from your remote server (requires few minutes or hours). Internally, it will store data in dedicated database, then you could browse and play your media quickly.

I just did this. And it shows the same, incomplete list of Artists.

Well, Sonos Android app is really bad, its search function drops the WiFi connection very often, but this is something weird. Perhaps hitting the same API bug somewhere?