spl0k / supysonic

Supysonic is a Python implementation of the Subsonic server API.
https://supysonic.readthedocs.io
GNU Affero General Public License v3.0
264 stars 58 forks source link

search 2 get folder ID for artist #198

Closed vincentDcmps closed 3 years ago

vincentDcmps commented 3 years ago

hi not really an issue but I try to work on mopidy-subidy and I notice that Id number return in artist result for search2 is the folder ID it is normal behavior?

spl0k commented 3 years ago

Yes, search and search2 allow to search the library using the folder hierarchy. What artist and album mean here depends on where the media files are stored and are to be considered from the media file level; for a give media file, its album is the folder it's in and the artist is this folder's parent. Take this poorly drawn example:

Root
+-Folder
| +-Subfolder
| | +-Audio.ogg
| *-File.mp3

Here Audio.ogg has artist Folder and album Subfolder, but Folder is also the album for File.mp3. My guess is that Subsonic was first designed with the assumption that all users properly stored their media in a Artist/Album/Track file system structure.

If you want to search using the media files' metadata, where artist and album really match their meaning (as long as the files are properly tagged) you should use search3.

vincentDcmps commented 3 years ago

yes I have but search3 in the API call and it's work now thanks