kagemomiji / airsonic-advanced

airsonic-advanced
GNU General Public License v3.0
166 stars 14 forks source link

[Bug]: Subsonic API: Endpoint "getArtists" ignoring Parameter "musicFolderId" #293

Closed verybadsoldier closed 1 year ago

verybadsoldier commented 1 year ago

What happened?

I am in contact with Symfonium (https://symfonium.app/) developer Tolriq, and he wants to add support for media folders in Symfonium and when testing with my server he discovered that there seems to be a bug in the API of Airsonic:

When using endpoint "getArtists" and filtering the data by providing query parameter "musicFolderId", then this parameter is being ignored and always all artists from all media folders are returned.

The musicFolderId is working when using endpoint "getIndexes" https:///rest/getIndexes?musicFolderId=

In this case, the musicFolderId is respected.

PS. Having support for endpoint "search3" would be really awesome! Is there a chance to support it? Asking for a friend :)

Steps to reproduce

  1. Query for media folders: https:///rest/getMusicFolders
  2. Query for artists filtering by a specific media folder: https:///rest/getArtists?musicFolderId=

Expectation is that only artists are returned belonging to that media folder. What happens is that regardless of the provided media folder ID, always all artists are being returned.

It happens on docker image: ghcr.io/kagemomiji/airsonic-advanced:11.1.2

But I also tried with latest image from today, but it is the same behavior: ghcr.io/kagemomiji/airsonic-advanced:gitrun-632635567

Version

11.1.2 (Stable)

Version Detail

ghcr.io/kagemomiji/airsonic-advanced:11.1.2

Operating System

Docker

Java Version

Apache Tomcat/9.0.74, java 17.0.5, Linux

Database

Other

DB Detail

whatever is in the container :)

Configuration paramter

EncryptionKeyPassword= EncryptionKeySalt= SettingsChanged= JWTKey= IndexCreationInterval=1 IndexCreationHour=3 FastCacheEnabled=false OrganizeByFolderStructure=true UploadsFolder=%{['USER_MUSIC_FOLDERS'][0]}/Incoming ExcludePattern= IgnoreSymLinks=false FullScan=false ClearFullScanSettingAfterScan=false GettingStartedEnabled=false HideIndexedFiles=true SplitOptions=-ss %o -t %d SplitCommand=ffmpeg %S -i %s -vcodec copy -acodec copy -f %f - DownsamplingCommand4=ffmpeg %S -i %s -map 0:0 -b:a %bk -v 0 -f mp3 - HlsCommand4=ffmpeg -ss %o -i %s -s %wx%h -async 1 -c:v libx264 -flags +cgop -b:v %vk -maxrate %bk -preset superfast -copyts -b:a %rk -bufsize 256k -map 0:0 -map 0:%i -ac 2 -ar 44100 -v 0 -threads 0 -force_key_frames expr:gte(t,n_forced*10) -start_number %j -hls_time %d -hls_list_size 0 -hls_segment_filename %n %p JukeboxCommand2=ffmpeg -ss %o -i %s -map 0:0 -v 0 -ar 44100 -ac 2 -f s16be - VideoImageCommand=ffmpeg -r 1 -ss %o -t 1 -i %s -s %wx%h -v 0 -f mjpeg - SubtitlesExtractionCommand=ffmpeg -i %s -map 0:%i -f %f - TranscodeEstimateTimePadding=2000 TranscodeEstimateBytePadding=0

Proxy Server

No response

client detail

No response

language

English

Relevant log output

No response

kagemomiji commented 1 year ago

@verybadsoldier Could you try ghcr.io/kagemomiji/airsonic-advanced:pr-298

verybadsoldier commented 1 year ago

Yes! I tried that and it seems fine! Thanks!

awsms commented 1 year ago

@verybadsoldier you've got issues with symfonium only displaying 92 albums once the airsonic-advanced library has finished scanning? not sure if it's an airsonic or symfonium bug

verybadsoldier commented 1 year ago

No, seems to work fine here.