[GH-ISSUE #59] Switching the active device by Car Thing #28

Closed
opened 2026-02-28 15:41:49 +03:00 by kerem · 3 comments
Owner

Originally created by @vakst on GitHub (Dec 13, 2024).
Original GitHub issue: https://github.com/usenocturne/nocturne-ui/issues/59

If you have 1+ devices and use physical buttons on the top to start playing the playlist, then Car Thing switch your active device to the first one (regardless of active/not active) from the list in endpoint https://api.spotify.com/v1/me/player/devices

Example:

{
  "devices": [
    {
      "id": "1111",
      "is_active": false,
      "is_private_session": false,
      "is_restricted": false,
      "name": "Web Player (Chrome)",
      "supports_volume": true,
      "type": "Computer",
      "volume_percent": 100
    },
    {
      "id": "2222",
      "is_active": false,
      "is_private_session": false,
      "is_restricted": false,
      "name": "KF",
      "supports_volume": false,
      "type": "Tablet",
      "volume_percent": 100
    },
    {
      "id": "3333",
      "is_active": true,
      "is_private_session": false,
      "is_restricted": false,
      "name": "I",
      "supports_volume": false,
      "type": "Smartphone",
      "volume_percent": 100
    },
    {
      "id": "4444",
      "is_active": false,
      "is_private_session": false,
      "is_restricted": false,
      "name": "Web Player (Chrome)",
      "supports_volume": true,
      "type": "Computer",
      "volume_percent": 100
    }
  ]
}

In this case, the active device was 3333, but after pushing a top button on Car Thing the active device was switched to 1111

How to fix it? Choose the active device instead of the first one:
github.com/usenocturne/nocturne-ui@5c8a21e288/src/pages/playlist/[playlistId].jsx (L319)

Originally created by @vakst on GitHub (Dec 13, 2024). Original GitHub issue: https://github.com/usenocturne/nocturne-ui/issues/59 If you have 1+ devices and use physical buttons on the top to start playing the playlist, then Car Thing switch your active device to the first one (regardless of active/not active) from the list in endpoint https://api.spotify.com/v1/me/player/devices Example: ``` { "devices": [ { "id": "1111", "is_active": false, "is_private_session": false, "is_restricted": false, "name": "Web Player (Chrome)", "supports_volume": true, "type": "Computer", "volume_percent": 100 }, { "id": "2222", "is_active": false, "is_private_session": false, "is_restricted": false, "name": "KF", "supports_volume": false, "type": "Tablet", "volume_percent": 100 }, { "id": "3333", "is_active": true, "is_private_session": false, "is_restricted": false, "name": "I", "supports_volume": false, "type": "Smartphone", "volume_percent": 100 }, { "id": "4444", "is_active": false, "is_private_session": false, "is_restricted": false, "name": "Web Player (Chrome)", "supports_volume": true, "type": "Computer", "volume_percent": 100 } ] } ``` In this case, the active device was 3333, but after pushing a top button on Car Thing the active device was switched to 1111 How to fix it? Choose the active device instead of the first one: https://github.com/usenocturne/nocturne-ui/blob/5c8a21e288566b6bec11eec3d0cf3843aa9d13bc/src/pages/playlist/%5BplaylistId%5D.jsx#L319
kerem closed this issue 2026-02-28 15:41:49 +03:00
Author
Owner

@itsnebulalol commented on GitHub (Dec 14, 2024):

Duplicate of #21. Please leave this as a comment on that issue as it is helpful nonetheless.

<!-- gh-comment-id:2543318249 --> @itsnebulalol commented on GitHub (Dec 14, 2024): Duplicate of #21. Please leave this as a comment on that issue as it is helpful nonetheless.
Author
Owner

@vakst commented on GitHub (Dec 14, 2024):

It's not a feature that is described in #21. It's a bug. I fixed it in https://github.com/usenocturne/nocturne-ui/pull/60

<!-- gh-comment-id:2543324159 --> @vakst commented on GitHub (Dec 14, 2024): It's not a feature that is described in #21. It's a bug. I fixed it in https://github.com/usenocturne/nocturne-ui/pull/60
Author
Owner

@itsnebulalol commented on GitHub (Dec 14, 2024):

Right, I see. I misread, will open this again so it’ll get closed when the PR is merged.

<!-- gh-comment-id:2543325357 --> @itsnebulalol commented on GitHub (Dec 14, 2024): Right, I see. I misread, will open this again so it’ll get closed when the PR is merged.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nocturne-ui#28
No description provided.