-
-
Notifications
You must be signed in to change notification settings - Fork 300
Added AriaCast Receiver plugin for Music Assistant #3061
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
base: dev
Are you sure you want to change the base?
Changes from all commits
0a37bfb
8ec4fb8
181f753
80a8b81
fee5f31
e8936d9
6f1466f
4b062b5
237738f
a5e7f98
0aeef1d
801a0e1
cf7f8eb
1b4e69c
4e6cd17
1628367
cd5669b
adaf046
f8c37c7
05a7464
4804e47
9c2362b
b89e441
73e9de7
d1c7b37
84a2067
f15405d
8c55334
aade5ff
3a874a8
95beac3
6a87362
1009c03
7b66501
bccc12b
65cb75c
7638987
4f52a43
0150e24
9f1f1e1
9843368
bfd5aaf
9ece85f
7a93b49
36962fd
3b085fe
322d639
fe43392
c003c90
2e0d582
49ccf73
e1cc22c
51e1e66
192a499
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| """Helpers/utils for Ariacast Receiver plugin.""" | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| import os | ||
| import platform | ||
| import stat | ||
| from pathlib import Path | ||
|
|
||
|
|
||
| async def _get_binary_path() -> str: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this is async? |
||
| """Locate the correct binary for the current OS/Arch.""" | ||
| base_dir = os.path.join(os.path.dirname(__file__), "bin") | ||
| system = platform.system().lower() | ||
| machine = platform.machine().lower() | ||
|
|
||
| if machine in ("x86_64", "amd64"): | ||
| arch = "amd64" | ||
| elif machine in ("aarch64", "arm64"): | ||
| arch = "arm64" | ||
| else: | ||
| raise RuntimeError(f"Unsupported architecture: {machine}") | ||
|
|
||
| binary_name = f"ariacast_{system}_{arch}" | ||
| binary_path = os.path.join(base_dir, binary_name) | ||
|
|
||
| if not os.path.exists(binary_path): | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is blocking IO and should be wrapped in |
||
| raise FileNotFoundError(f"Binary not found at {binary_path}") | ||
|
|
||
| Path(binary_path).chmod(Path(binary_path).stat().st_mode | stat.S_IEXEC) | ||
|
|
||
| return binary_path | ||
AirPlr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "type": "plugin", | ||
| "domain": "ariacast_receiver", | ||
| "name": "AriaCast Receiver", | ||
| "stage": "alpha", | ||
| "description": "Receive AriaCast audio streams over WebSocket and use them as a source in Music Assistant.", | ||
| "codeowners": ["@music-assistant"], | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be |
||
| "documentation": "https://github.com/music-assistant/server/tree/main/music_assistant/providers/ariacast_receiver", | ||
AirPlr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "multi_instance": false | ||
| } | ||
AirPlr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Uh oh!
There was an error while loading. Please reload this page.