Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't play Web Radio in Jukebox mode: error creating playlist items: find track by id: not found #481

Closed
frabnet opened this issue Mar 11, 2024 · 4 comments

Comments

@frabnet
Copy link

frabnet commented Mar 11, 2024

Hi everyone, I'm trying to use Gonic in Jukebox mode to play Internet Radio streams locally on the server.

gonic version: v0.16.3

Built with docker-compose.yml:

version: "2.4"
services:
  gonic:
    image: sentriz/gonic:latest
    environment:
      - TZ = Europe/Rome
      - GONIC_JUKEBOX_ENABLED=true
      - GONIC_JUKEBOX_MPV_EXTRA_ARGS='--audio-device=alsa/default:CARD=Set"
      #force the correct audio card if multiple are present, found running mpv --audio-device=help inside the container
    ports:
      - 4747:80
    volumes:
      - ./data:/data # gonic db etc
      - ./music:/music:ro # your music
      - ./podcasts:/podcasts # your podcasts
      - ./playlists:/playlists # your playlists
      - ./cache:/cache # transcode / covers / etc cache dir
    group_add:
      - audio
    devices:
      - /dev/snd:/dev/snd

Added two radio stations on the Gonic web interface:

Using DSub Android Client, local music is played correctly, but when I play Web Radio it doesn't ouput any audio, and following error is logged:

gonic-1  | 2024/03/11 13:51:13 response  200  GET /jukeboxControl?u=admin&s=xxxxxxxxxxxxxxxxxxxxxxxxxx&t=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&v=1.2.0&c=DSub&action=status
gonic-1  | 2024/03/11 13:52:08 response  200  GET /jukeboxControl?u=admin&s=xxxxxxxxxxxxxxxxxxxxxxxxxx&t=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&v=1.2.0&c=DSub&action=status
gonic-1  | 2024/03/11 13:52:13 response  200  GET /jukeboxControl?u=admin&s=xxxxxxxxxxxxxxxxxxxxxxxxxx&t=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&v=1.2.0&c=DSub&action=set
gonic-1  | 2024/03/11 13:52:13 subsonic error code 0: error creating playlist items: find track by id: not found

Things I've tried:

  • Without Jukebox mode the radio streams are played correcly in DSub
  • Changed a lot of internet radio urls with no success
  • Run MPV direclty inside the container and it outputs music correctly # mpv -audio-device=alsa/default:CARD=Set http://onair18.xdevel.com:8136/

Any clue if this is a Gonic bug or other test to do?

@dweymouth
Copy link

Internet radio stations cannot be played in jukebox mode due to a design flaw in the Subsonic API. The jukeboxControl endpoint only allows clients to pass song IDs, and internet radio stations are not a regular song. The solution would be to propose an OpenSubsonic extension that allows radio IDs to be passed to jukeboxControl, and for Gonic as well as the clients to implement the extension.

@sentriz
Copy link
Owner

sentriz commented Mar 11, 2024

@dweymouth the jukebox can set any sort of ID, be it podcast IDs or song IDs or whatever . much like setRating its a bit polymorphic

looks like i just never implemented internet radio IDs where, but now you can jukeboxControl?action=set&id=ir-1

@dweymouth
Copy link

dweymouth commented Mar 11, 2024

https://www.subsonic.org/pages/api.jsp#jukeboxControl

The spec for ID says

ID of song to add to the jukebox playlist.

It's nice that Gonic supports an extended version of the API (now after your fix). And DSub does too I guess. I still think an OpenSubsonic extension is needed though as the API does not guarantee that IDs are unique across media types (a radio station ID could be the same as a song ID for some servers) so clients shouldn't assume they can pass a radio ID to jukeboxControl. When I implement jukebox in Supersonic, I will probably fall back to local playback for radio stations.

@dweymouth
Copy link

started opensubsonic/open-subsonic-api#86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants