Skip to content

Commit

Permalink
[Sonos]: add an mvp for a sonos extension (raycast#10041)
Browse files Browse the repository at this point in the history
* add a sonos extension

wip

wip

simplify and make it ready to pr

* use a group as fallback if there's only one available and none explicit

* update extension icon

* add menubar command to show what is playing

* Update package.json

* refactor state management

* add volume commands and next/previous commands

* avoid multiple intervalled commands, play/pause is now the driver

* Update package.json

* Delete extensions/package-lock.json

* Update CHANGELOG.md

Co-authored-by: Per Nielsen Tikær <per@raycast.com>

* add two screenshots

* move useSonos to core/hooks

* add another screenshot for the 'no system' error

* handle 'no system present' gracefully

* use constant for keys in storage

* remove unused import

* update the readme

* disable skip commands by default

* tweak store categories

* improve error handling to support the 'no sonos' case a lot better

* introduce tryLaunchCommand and use it in all call-sites to launchCommand

* introduce prettier-plugin-organize-imports

* update changelog

* Update CHANGELOG.md and optimise images

---------

Co-authored-by: Per Nielsen Tikær <per@raycast.com>
Co-authored-by: raycastbot <bot@raycast.com>
  • Loading branch information
3 people authored Feb 7, 2024
1 parent 9c83112 commit 856961d
Show file tree
Hide file tree
Showing 23 changed files with 2,670 additions and 0 deletions.
4 changes: 4 additions & 0 deletions extensions/sonos/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"root": true,
"extends": ["@raycast"]
}
13 changes: 13 additions & 0 deletions extensions/sonos/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules

# Raycast specific files
raycast-env.d.ts
.raycast-swift-build
.swiftpm
compiled_raycast_swift

# misc
.DS_Store
5 changes: 5 additions & 0 deletions extensions/sonos/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"plugins": ["prettier-plugin-organize-imports"],
"printWidth": 120,
"singleQuote": false
}
3 changes: 3 additions & 0 deletions extensions/sonos/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Sonos Changelog

## [Initial Version] - 2024-02-06
6 changes: 6 additions & 0 deletions extensions/sonos/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Sonos

This extension will automatically try to detect your Sonos system. Make sure this computer is connected to the same local network
as the system you are intending to control.

If you have more than one group available in your system you need to explicitly pick which one to control. Use the `Set Active Group` command first, and then all the other actions will use that choice.
Binary file added extensions/sonos/assets/sonos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added extensions/sonos/metadata/screenshot-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added extensions/sonos/metadata/screenshot-02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added extensions/sonos/metadata/screenshot-03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 856961d

Please sign in to comment.