Closed rholveck closed 6 months ago
Confirmed, I made the same observation. This is a problem since I have to disable transcoding totally in gonic's backend, otherwise tracks don't play back correctly in a web browser (cf. https://github.com/sentriz/gonic/issues/452).
ooops
thanks for reporting 👍
No problem, thanks for the quick fix :)
gonic version: v0.16.3
Hi ! First of all : Great job with gonic, I've been using it since a few weeks and I love it :)
Playback isn't working anymore since 0.16.3 if one wants to play a raw file (=not transcoded) in DSub.
This issue has been introduced in This commit
To reproduce :
What happens :
When fetching a song while configured with unlimited bitrate, DSub sets the maxBitRate parameter to the original file actual bitrate. Example for a MP3 v0 file :
Mar 20 13:55:50 host.domain.tld gonic[3355641]: 2024/03/20 13:55:50 response 200 GET /stream?u=user&s=xxxxxxxxxxxxxx&v=1.2.0&c=DSub&id=tr-821&maxBitRate=275
This triggers the check made in the commit indicated above and results in this error :
subsonic error code 0: maxBitRate requested and no user transcode preferences found for user "user" and client "DSub"
I think the problem here is the order in which the checks are made in the section of code below : first "pref" is checked for a gonic transcoding profile and then the requested bitrate is compared to the actual file bitrate. In my understanding these check should be done the other way around so that the raw file is served as soon as the requested bitrate is higher than the raw file bitrate, no matter if a transcoding profile is configured or not in gonic.
Tell me what you think ! Have a great day :)