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

How to Browse #105

Closed
dgmltn opened this issue Jun 12, 2020 · 4 comments
Closed

How to Browse #105

dgmltn opened this issue Jun 12, 2020 · 4 comments

Comments

@dgmltn
Copy link

dgmltn commented Jun 12, 2020

Thanks for the updated documentation, it helped a bunch. I'm just still having trouble with the browsing commands. This one works:

{
  "command": "adv-command",
  "input": {
    "cmd": "GetFavorites",
    "reply": "GetFavoritesReply"
  }
}

And it looks like it's a shortcut to this one. But this one doesn't work (I've tried many variations on both BrowseParsed and BrowseParsedWithDefaults). I'm assuming once I figure this one out, searching by artist (like here) or searching for all playlists ("SQ:") will be obvious.

{
  "command": "adv-command",
  "input": {
    "cmd": "ContentDirectoryService.BrowseParsedWithDefaults",
    "input": {
      "ObjectID": "FV:2"
    },
    "reply": "GetFavoritesReply"
  }
}

=>

{"command":"adv-command","error":{"Action":"Browse","FaultCode":"s:Client","Fault":"UPnPError","UpnpErrorCode":701,"name":"SonosError"}}
@dgmltn
Copy link
Author

dgmltn commented Jun 12, 2020

Ok, here's the formula:

{
  "command": "adv-command",
  "input": {
    "cmd": "ContentDirectoryService.BrowseParsedWithDefaults",
    "val": "FV:2",
    "reply": "GetFavoritesReply"
  }
}

@dgmltn dgmltn closed this as completed Jun 12, 2020
@svrooij
Copy link
Owner

svrooij commented Jun 12, 2020

According to the code.
Both your calls should work.

{
  "command": "adv-command",
  "input": {
    "cmd": "GetFavorites",
    "reply": "GetFavoritesReply"
  }
}

should result in the same code being called as

{
  "command": "adv-command",
  "input": {
    "cmd": "ContentDirectoryService.BrowseParsedWithDefaults",
    "val": "FV:2",
    "reply": "GetFavoritesReply"
  }
}

Here you can find more on browsing https://github.com/svrooij/node-sonos-ts/blob/master/examples/content.js

svrooij pushed a commit that referenced this issue Jun 13, 2020
@github-actions
Copy link

🎉 This issue has been resolved in version 3.0.8-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This issue has been resolved in version 3.0.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

No branches or pull requests

2 participants