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

Switching the active device by Car Thing #59

Closed
vakst opened this issue Dec 13, 2024 · 3 comments
Closed

Switching the active device by Car Thing #59

vakst opened this issue Dec 13, 2024 · 3 comments

Comments

@vakst
Copy link

vakst commented Dec 13, 2024

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:

const device = devicesData.devices[0];

@itsnebulalol
Copy link
Member

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

@itsnebulalol itsnebulalol closed this as not planned Won't fix, can't repro, duplicate, stale Dec 14, 2024
@github-project-automation github-project-automation bot moved this from Needs triage to Done in Nocturne Triage Dec 14, 2024
@vakst
Copy link
Author

vakst commented Dec 14, 2024

It's not a feature that is described in #21. It's a bug. I fixed it in #60

@itsnebulalol
Copy link
Member

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

@itsnebulalol itsnebulalol reopened this Dec 14, 2024
@github-project-automation github-project-automation bot moved this from Done to Needs triage in Nocturne Triage Dec 14, 2024
@github-project-automation github-project-automation bot moved this from Needs triage to Done in Nocturne Triage Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

3 participants