Skip to content

Commit 5d1ab70

Browse files
author
Thibaud MATHIEU
committed
add files
1 parent 664aaf7 commit 5d1ab70

File tree

15 files changed

+613
-1
lines changed

15 files changed

+613
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

CODE_OF_CONDUCT.md

+133
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
- Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
- The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
- Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
64+
65+
All complaints will be reviewed and investigated promptly and fairly.
66+
67+
All community leaders are obligated to respect the privacy and security of the
68+
reporter of any incident.
69+
70+
## Enforcement Guidelines
71+
72+
Community leaders will follow these Community Impact Guidelines in determining
73+
the consequences for any action they deem in violation of this Code of Conduct:
74+
75+
### 1. Correction
76+
77+
**Community Impact**: Use of inappropriate language or other behavior deemed
78+
unprofessional or unwelcome in the community.
79+
80+
**Consequence**: A private, written warning from community leaders, providing
81+
clarity around the nature of the violation and an explanation of why the
82+
behavior was inappropriate. A public apology may be requested.
83+
84+
### 2. Warning
85+
86+
**Community Impact**: A violation through a single incident or series
87+
of actions.
88+
89+
**Consequence**: A warning with consequences for continued behavior. No
90+
interaction with the people involved, including unsolicited interaction with
91+
those enforcing the Code of Conduct, for a specified period of time. This
92+
includes avoiding interactions in community spaces as well as external channels
93+
like social media. Violating these terms may lead to a temporary or
94+
permanent ban.
95+
96+
### 3. Temporary Ban
97+
98+
**Community Impact**: A serious violation of community standards, including
99+
sustained inappropriate behavior.
100+
101+
**Consequence**: A temporary ban from any sort of interaction or public
102+
communication with the community for a specified period of time. No public or
103+
private interaction with the people involved, including unsolicited interaction
104+
with those enforcing the Code of Conduct, is allowed during this period.
105+
Violating these terms may lead to a permanent ban.
106+
107+
### 4. Permanent Ban
108+
109+
**Community Impact**: Demonstrating a pattern of violation of community
110+
standards, including sustained inappropriate behavior, harassment of an
111+
individual, or aggression toward or disparagement of classes of individuals.
112+
113+
**Consequence**: A permanent ban from any sort of public interaction within
114+
the community.
115+
116+
## Attribution
117+
118+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119+
version 2.0, available at
120+
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
121+
122+
Community Impact Guidelines were inspired by
123+
[Mozilla's code of conduct enforcement ladder][mozilla coc].
124+
125+
For answers to common questions about this code of conduct, see the FAQ at
126+
[https://www.contributor-covenant.org/faq][faq]. Translations are available
127+
at [https://www.contributor-covenant.org/translations][translations].
128+
129+
[homepage]: https://www.contributor-covenant.org
130+
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
131+
[mozilla coc]: https://github.com/mozilla/diversity
132+
[faq]: https://www.contributor-covenant.org/faq
133+
[translations]: https://www.contributor-covenant.org/translations

CONTRIBUTING.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Contributing
2+
3+
When contributing to this repository, please first discuss the change you wish
4+
to make via issue, email, or any other method with the owners of this repository
5+
before making a change.
6+
7+
Please note we have a code of conduct, please follow it in all your interactions
8+
with the project.
9+
10+
## Issues and feature requests
11+
12+
You've found a bug in the source code, a mistake in the documentation or maybe
13+
you'd like a new feature? You can help us by submitting an issue to our
14+
[GitHub Repository][github]. Before you create an issue, make sure you search
15+
the archive, maybe your question was already answered.
16+
17+
Even better: You could submit a pull request with a fix / new feature!
18+
19+
## Pull request process
20+
21+
1. Search our repository for open or closed [pull requests][prs] that relates
22+
to your submission. You don't want to duplicate effort.
23+
24+
1. You may merge the pull request in once you have the sign-off of two other
25+
developers, or if you do not have permission to do that, you may request
26+
the second reviewer to merge it for you.
27+
28+
[github]: https://github.com/hassio-addons/addon-spotify-connect/issues
29+
[prs]: https://github.com/hassio-addons/addon-spotify-connect/pulls

README.md

+80-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,80 @@
1-
# hassio-snapserver-addon
1+
# Home Assistant Community Add-on: Snapcast
2+
3+
[![GitHub Release][releases-shield]][releases]
4+
![Project Stage][project-stage-shield]
5+
[![License][license-shield]](LICENSE.md)
6+
7+
![Supports armhf Architecture][armhf-shield]
8+
![Supports armv7 Architecture][armv7-shield]
9+
![Supports aarch64 Architecture][aarch64-shield]
10+
![Supports amd64 Architecture][amd64-shield]
11+
![Supports i386 Architecture][i386-shield]
12+
13+
## Contributing
14+
15+
This is an active open-source project. We are always open to people who want to
16+
use the code or contribute to it.
17+
18+
We have set up a separate document containing our
19+
[contribution guidelines](.github/CONTRIBUTING.md).
20+
21+
Thank you for being involved! :heart_eyes:
22+
23+
## We have got some Home Assistant add-ons for you
24+
25+
Want some more functionality to your Home Assistant instance?
26+
27+
We have created multiple add-ons for Home Assistant. For a full list, check out
28+
our [GitHub Repository][repository].
29+
30+
## License
31+
32+
MIT License
33+
34+
Permission is hereby granted, free of charge, to any person obtaining a copy
35+
of this software and associated documentation files (the "Software"), to deal
36+
in the Software without restriction, including without limitation the rights
37+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
38+
copies of the Software, and to permit persons to whom the Software is
39+
furnished to do so, subject to the following conditions:
40+
41+
The above copyright notice and this permission notice shall be included in all
42+
copies or substantial portions of the Software.
43+
44+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
45+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
46+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
47+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
48+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
49+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
50+
SOFTWARE.
51+
52+
[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg
53+
[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg
54+
[armhf-shield]: https://img.shields.io/badge/armhf-no-red.svg
55+
[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg
56+
[commits-shield]: https://img.shields.io/github/commit-activity/y/hassio-addons/addon-spotify-connect.svg
57+
[commits]: https://github.com/enlight3d/hassio-snapserver-addon"/commits/main
58+
[contributors]: https://github.com/enlight3d/hassio-snapserver-addon"/graphs/contributors
59+
[discord-ha]: https://discord.gg/c5DvZ4e
60+
[discord-shield]: https://img.shields.io/discord/478094546522079232.svg
61+
[discord]: https://discord.me/hassioaddons
62+
[docs]: https://github.com/enlight3d/hassio-snapserver-addon"/blob/main/spotify/DOCS.md
63+
[forum-shield]: https://img.shields.io/badge/community-forum-brightgreen.svg
64+
[forum]: https://community.home-assistant.io/t/home-assistant-community-add-on-spotify-connect/61210?u=frenck
65+
[frenck]: https://github.com/frenck
66+
[github-actions-shield]: https://github.com/enlight3d/hassio-snapserver-addon"/workflows/CI/badge.svg
67+
[github-actions]: https://github.com/enlight3d/hassio-snapserver-addon"/actions
68+
[github-sponsors-shield]: https://frenck.dev/wp-content/uploads/2019/12/github_sponsor.png
69+
[github-sponsors]: https://github.com/sponsors/frenck
70+
[i386-shield]: https://img.shields.io/badge/i386-yes-green.svg
71+
[issue]: https://github.com/enlight3d/hassio-snapserver-addon"/issues
72+
[license-shield]: https://img.shields.io/github/license/hassio-addons/addon-spotify-connect.svg
73+
[maintenance-shield]: https://img.shields.io/maintenance/yes/2022.svg
74+
[patreon-shield]: https://frenck.dev/wp-content/uploads/2019/12/patreon.png
75+
[patreon]: https://www.patreon.com/frenck
76+
[project-stage-shield]: https://img.shields.io/badge/project%20stage-experimental-yellow.svg
77+
[reddit]: https://reddit.com/r/homeassistant
78+
[releases-shield]: https://img.shields.io/github/release/hassio-addons/addon-spotify-connect.svg
79+
[releases]: https://github.com/enlight3d/hassio-snapserver-addon/releases
80+
[repository]: https://github.com/hassio-addons/repository

repository.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "Hassio Snapserver Addon",
3+
"url": "https://github.com/enlight3d/hassio-snapserver-addon",
4+
"maintainer": "ME"
5+
}

snapserver/Dockerfile

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
ARG BUILD_FROM
2+
# hadolint ignore=DL3006
3+
FROM ${BUILD_FROM}
4+
# Add env
5+
ENV LANG C.UTF-8
6+
7+
# Set shell
8+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
9+
10+
# Setup base
11+
RUN sed -i -e 's/v[[:digit:]]\..*\//edge\//g' /etc/apk/repositories
12+
RUN echo 'https://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories
13+
14+
# Add packages
15+
RUN apk add --no-cache \
16+
coreutils \
17+
wget \
18+
snapcast \
19+
librespot
20+
21+
# Cleanup
22+
RUN rm -rf /etc/ssl /var/cache/apk/* /lib/apk/db/*
23+
24+
# Copy root filesystem
25+
COPY rootfs /
26+
27+
# Build arguments
28+
ARG BUILD_ARCH
29+
ARG BUILD_DATE
30+
ARG BUILD_DESCRIPTION
31+
ARG BUILD_NAME
32+
ARG BUILD_REF
33+
ARG BUILD_REPOSITORY
34+
ARG BUILD_VERSION
35+
36+
# Labels
37+
LABEL \
38+
io.hass.name="${BUILD_NAME}" \
39+
io.hass.description="${BUILD_DESCRIPTION}" \
40+
io.hass.arch="${BUILD_ARCH}" \
41+
io.hass.type="addon" \
42+
io.hass.version=${BUILD_VERSION} \
43+
maintainer="grunjol <[email protected]>" \
44+
org.opencontainers.image.title="${BUILD_NAME}" \
45+
org.opencontainers.image.description="${BUILD_DESCRIPTION}" \
46+
org.opencontainers.image.vendor="grunjol Add-ons" \
47+
org.opencontainers.image.authors="grunjol <[email protected]>" \
48+
org.opencontainers.image.licenses="MIT" \
49+
org.opencontainers.image.url="https://github.com/grunjol" \
50+
org.opencontainers.image.source="https://github.com/${BUILD_REPOSITORY}" \
51+
org.opencontainers.image.documentation="https://github.com/${BUILD_REPOSITORY}/blob/main/README.md" \
52+
org.opencontainers.image.created=${BUILD_DATE} \
53+
org.opencontainers.image.revision=${BUILD_REF} \
54+
org.opencontainers.image.version=${BUILD_VERSION}

snapserver/build.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"build_from": {
3+
"aarch64": "ghcr.io/hassio-addons/base/aarch64:12.2.4",
4+
"amd64": "ghcr.io/hassio-addons/base/amd64:12.2.4",
5+
"armhf": "ghcr.io/hassio-addons/base/armhf:12.2.4",
6+
"armv7": "ghcr.io/hassio-addons/base/armv7:12.2.4",
7+
"i386": "ghcr.io/hassio-addons/base/i386:12.2.4"
8+
}
9+
}

snapserver/config.json

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"name": "Snapcast Server",
3+
"version": "latest",
4+
"slug": "snapserver",
5+
"description": "Snapcast server with librespot support",
6+
"url": "https://github.com/enlight3d/hassio-snapserver-addon",
7+
"startup": "system",
8+
"boot": "auto",
9+
"host_network": true,
10+
"init": false,
11+
"map": ["share:rw"],
12+
"options": {
13+
"stream": {
14+
"sources": [
15+
"pipe:///share/snapfifo/librespot?name=SpotifyConnect&sampleformat=44100:16:2",
16+
"pipe:///share/snapfifo/mopidy?name=Mopidy&sampleformat=44100:16:2"
17+
],
18+
"buffer": "1000",
19+
"codec": "flac",
20+
"send_to_muted": "false",
21+
"sampleformat": "48000:16:2"
22+
},
23+
"http": {
24+
"enabled": "true",
25+
"doc_root": " "
26+
},
27+
"tcp": {
28+
"enabled": "true"
29+
},
30+
"logging": {
31+
"filter": "*:info"
32+
},
33+
"server": {
34+
"threads": "-1",
35+
"datadir": "/share/snapcast/"
36+
}
37+
},
38+
"schema": {
39+
"stream": {
40+
"sources": ["str"],
41+
"buffer": "int",
42+
"codec": "str",
43+
"send_to_muted": "str",
44+
"sampleformat": "str"
45+
},
46+
"http": {
47+
"enabled": "str",
48+
"doc_root": "str"
49+
},
50+
"tcp": {
51+
"enabled": "str"
52+
},
53+
"logging": {
54+
"filter": "str?"
55+
},
56+
"server": {
57+
"threads": "int",
58+
"datadir": "str"
59+
}
60+
},
61+
"ports": {
62+
"1704/tcp": 1704,
63+
"1705/tcp": 1705,
64+
"1780/tcp": 1780
65+
},
66+
"ports_description": {
67+
"1704/tcp": "Snapcast Server",
68+
"1705/tcp": "Snapcast Control",
69+
"1780/tcp": "SnapWeb interface"
70+
},
71+
"arch": ["armhf", "armv7", "aarch64", "amd64", "i386"]
72+
}

snapserver/icon.png

11.8 KB
Loading

snapserver/logo.png

7.63 KB
Loading

0 commit comments

Comments
 (0)