-
Notifications
You must be signed in to change notification settings - Fork 48
Add NetEase Cloud Music API add-on #16
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
Open
xiasi0
wants to merge
2
commits into
music-assistant:main
Choose a base branch
from
xiasi0:add-netease-cloud-music-api
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| ARG BUILD_FROM=ghcr.io/home-assistant/amd64-base:3.20 | ||
| ARG NCM_API_REF=2c36daf07a4a092df3e5dc66f3acc9e1a9b4c91f | ||
| FROM ${BUILD_FROM} | ||
|
|
||
| SHELL ["/bin/ash", "-o", "pipefail", "-c"] | ||
|
|
||
| RUN apk add --no-cache nodejs npm git | ||
|
|
||
| WORKDIR /opt/netease-api | ||
|
|
||
| ENV HUSKY=0 \ | ||
| npm_config_ignore_scripts=1 | ||
|
|
||
| RUN git clone --depth=1 https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git . \ | ||
|
xiasi0 marked this conversation as resolved.
|
||
| && git checkout ${NCM_API_REF} \ | ||
| && npm install --omit=dev --no-fund --no-audit \ | ||
| && npm cache clean --force | ||
|
|
||
| COPY rootfs / | ||
|
|
||
| RUN chmod +x /run.sh | ||
|
|
||
| EXPOSE 3000 | ||
|
|
||
| CMD ["/run.sh"] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # NetEase Cloud Music API | ||
|
|
||
| This add-on runs NeteaseCloudMusicApiEnhanced as a local HTTP API service. | ||
|
|
||
| Default endpoint: | ||
|
|
||
| - `http://<home-assistant-host>:3000` | ||
|
|
||
| Use this URL in the Music Assistant NetEase provider configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| build_from: | ||
| aarch64: ghcr.io/home-assistant/aarch64-base:3.20 | ||
| amd64: ghcr.io/home-assistant/amd64-base:3.20 | ||
| armhf: ghcr.io/home-assistant/armhf-base:3.20 | ||
| armv7: ghcr.io/home-assistant/armv7-base:3.20 | ||
| i386: ghcr.io/home-assistant/i386-base:3.20 | ||
| labels: | ||
| org.opencontainers.image.title: "Home Assistant Add-on: NetEase Cloud Music API" | ||
| org.opencontainers.image.description: "Run NeteaseCloudMusicApiEnhanced API service for Music Assistant." | ||
| org.opencontainers.image.source: "https://github.com/xiasi0/ha-addon-netease-cloud-music-api" | ||
| org.opencontainers.image.licenses: "MIT" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| name: NetEase Cloud Music API | ||
| version: "0.1.1" | ||
| slug: netease_cloud_music_api | ||
| description: NetEase Cloud Music API service for Music Assistant. | ||
| url: https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced | ||
| startup: services | ||
| boot: auto | ||
| init: false | ||
| arch: | ||
| - aarch64 | ||
| - amd64 | ||
| - armhf | ||
| - armv7 | ||
| - i386 | ||
| ports: | ||
| 3000/tcp: 3000 | ||
| ports_description: | ||
| 3000/tcp: NetEase API HTTP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #!/usr/bin/with-contenv bashio | ||
| set -euo pipefail | ||
|
|
||
| export NODE_ENV=production | ||
| export PORT=3000 | ||
|
|
||
| bashio::log.info "Starting NetEase Cloud Music API on 0.0.0.0:${PORT}" | ||
|
|
||
| cd /opt/netease-api | ||
| exec npm run start |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.