Jellyfin Forum
Help Needed: Sending “SetRepeatMode” Command via Jellyfin API - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: General Questions (https://forum.jellyfin.org/f-general-questions)
+--- Thread: Help Needed: Sending “SetRepeatMode” Command via Jellyfin API (/t-help-needed-sending-%E2%80%9Csetrepeatmode%E2%80%9D-command-via-jellyfin-api)



Help Needed: Sending “SetRepeatMode” Command via Jellyfin API - 10rounds - 2024-06-17

I’m trying to send the SetRepeatMode command to a client using the Jellyfin API but haven’t had any luck so far. I’ve followed the documentation and tried a few different approaches, but I can’t seem to get it to work.

I’ve tried sending the command to /Sessions/{sessionId}/Command/SetRepeatMode with the RepeatMode parameter set to RepeatOne, but it’s not working as expected. I’m not getting any response or indication that the repeat mode is being set.

Could someone please help me understand what I’m doing wrong or guide me on the correct way to send the SetRepeatMode command?


RE: Help Needed: Sending “SetRepeatMode” Command via Jellyfin API - pcm - 2024-06-18

what response do you get ?

Could you paste the request and response log/output ?


Your request should look like this
Request Endpoint:
Code:
POST /Sessions/{sessionId}/Command
Request Body:
Code:
{
    "Name": "SetRepeatMode",
    "ControllingUserId": "{your-user-id}",
    "Arguments": {
        "RepeatMode": "RepeatOne"
    }
}

If all goes well, you should get a HTTP 204 response.

Per the documentation, the endpoint /Sessions/{sessionId}/Command/{command} does not accept any request data payload.

So, passing a request body to /Sessions/{sessionId}/Command/SetRepeatMode probably won't do anything...


RE: Help Needed: Sending “SetRepeatMode” Command via Jellyfin API - 10rounds - 2024-06-19

Thanks for your reply. It looks like I misunderstood the endpoint capabilities. Based on your advice, I’m still having trouble:

Code:
curl -X POST 'http://192.168.8.189:8096/Sessions/a3ae737dd0cf133d8bc7a337c890xxxx/Command' -H 'Authorization: MediaBrowser Token="d27a9860d748492a8a6ea84d4159xxxx"' -H 'accept: application/json' --insecure -d '{"Name": "SetRepeatNone", "ControllingUserId": "68b3fbf4c76942e9aed2af49431exxxx", "Arguments": {"RepeatMode": "RepeatNone"}}' | jq .

The ControllingUserId value was copied from UserId in Sessions. Since I found no way to describe this, I’m not sure if it’s correct.

Here is the response I received:
Code:
{
  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.13",
  "title": "Unsupported Media Type",
  "status": 415,
  "traceId": "00-80e5258748cf0ed227f682f591b85157-8eeeeae371f487a8-00"
}

Thanks again.


RE: Help Needed: Sending “SetRepeatMode” Command via Jellyfin API - pcm - 2024-06-20

I think you meant to type "Name": "SetRepeatMode" but you instead typed "Name":"SetRepeatNone".

And we know that "SetRepeat*None*" is not a valid command. Hence, you got the response you did.


RE: Help Needed: Sending “SetRepeatMode” Command via Jellyfin API - 10rounds - 2024-06-21

Thank you for pointing out the mistake. I corrected the command to use "SetRepeatMode":

Code:
curl -X POST 'http://192.168.8.189:8096/Sessions/a3ae737dd0cf133d8bc7a337c890xxxx/Command' -H 'Authorization: MediaBrowser Token="d27a9860d748492a8a6ea84d4159xxxx"' -H 'accept: application/json' --insecure -d '{"Name": "SetRepeatMode", "ControllingUserId": "68b3fbf4c76942e9aed2af49431exxxx", "Arguments": {"RepeatMode": "RepeatNone"}}' | jq .

but I am still encountering issues with same response:

Code:
{
  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.13",
  "title": "Unsupported Media Type",
  "status": 415,
  "traceId": "00-1f37b376ce268fe67d4585288cc66338-6fce86d7f340ffa9-00"
}



RE: Help Needed: Sending “SetRepeatMode” Command via Jellyfin API - niels - 2024-06-21

It is not possible to set the repeat mode via the remote control API.


RE: Help Needed: Sending “SetRepeatMode” Command via Jellyfin API - 10rounds - 2024-06-21

Thank you for confirming that setting the repeat mode via the remote control API is not possible...