diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a598e5424..cdc4d7723 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -101,4 +101,17 @@ jobs: - template: .azure-pipelines/addon-template.yml parameters: addon: 'radarr' + arch: '--all' + +- job: 'jellyfin' + condition: and(eq(variables['Build.SourceBranchName'], 'master'), succeeded('Hadolint'), succeeded('JQ')) + dependsOn: + - 'Hadolint' + - 'JQ' + pool: + vmImage: 'ubuntu-16.04' + steps: + - template: .azure-pipelines/addon-template.yml + parameters: + addon: 'jellyfin' arch: '--all' \ No newline at end of file diff --git a/jellyfin/CHANGELOG.md b/jellyfin/CHANGELOG.md new file mode 100644 index 000000000..158960c73 --- /dev/null +++ b/jellyfin/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.1.0 + + - jellyfin 10.4.1 (linuxserver/jellyfin:v10.4.1-ls24) \ No newline at end of file diff --git a/jellyfin/Dockerfile b/jellyfin/Dockerfile new file mode 100644 index 000000000..ad703368c --- /dev/null +++ b/jellyfin/Dockerfile @@ -0,0 +1,15 @@ +FROM linuxserver/jellyfin:v10.4.1-ls24 + +RUN sed -i "s|/config/data|/share/jellyfin/data|g" /etc/services.d/jellyfin/run \ + && sed -i "s|/config/log|/share/jellyfin/log|g" /etc/services.d/jellyfin/run \ + && sed -i "s|/config/cache|/share/jellyfin/cache|g" /etc/services.d/jellyfin/run \ + && sed -i "s|/config|/config/jellyfin|g" /etc/services.d/jellyfin/run \ + && sed -i "s|/config/{log,data,cache}|/xxx/jellyfin|g" /etc/cont-init.d/30-config \ + && sed -i "s|/config|/config/jellyfin|g" /etc/cont-init.d/30-config \ + && sed -i "s|/xxx|/config|g" /etc/cont-init.d/30-config \ + && sed -i "s|/data|/share/jellyfin/data|g" /etc/cont-init.d/30-config + +RUN cat /etc/services.d/jellyfin/run && cat /etc/cont-init.d/30-config + +# copy local files +COPY root/ / diff --git a/jellyfin/README.md b/jellyfin/README.md new file mode 100644 index 000000000..d6367bf1d --- /dev/null +++ b/jellyfin/README.md @@ -0,0 +1,27 @@ +# Hassio Add-ons by petersendev: Jellyfin + +## About + +[Jellyfin](https://jellyfin.github.io/) is a Free Software Media System that puts you in control of managing and streaming your media. It is an alternative to the proprietary Emby and Plex, to provide media from a dedicated server to end-user devices via multiple apps. Jellyfin is descended from Emby's 3.5.2 release and ported to the .NET Core framework to enable full cross-platform support. There are no strings attached, no premium licenses or features, and no hidden agendas: just a team who want to build something better and work together to achieve it. + +This addon is based on the [docker image](https://github.com/linuxserver/docker-jellyfin) from linuxserver.io. + +## Installation + +The installation of this add-on is pretty straightforward and not different in +comparison to installing any other Hass.io add-on. + +1. [Add my Hass.io add-ons repository][repository] to your Hass.io instance. +1. Install this add-on. +1. Click the `Save` button to store your configuration. +1. Start the add-on. +1. Check the logs of the add-on to see if everything went well. +1. Carefully configure the add-on to your preferences, see the official documentation for for that. + + +## Configuration + +Webui can be found at `:8989`. + + +[repository]: https://github.com/petersendev/hassio-addons \ No newline at end of file diff --git a/jellyfin/config.json b/jellyfin/config.json new file mode 100644 index 000000000..022459c5a --- /dev/null +++ b/jellyfin/config.json @@ -0,0 +1,41 @@ +{ + "name": "jellyfin", + "version": "0.1.0", + "slug": "jellyfin", + "legacy": true, + "maintenance": { + "github_release": "https://github.com/linuxserver/docker-jellyfin", + "version_regex": "v(\\d+\\.\\d+\\.\\d+)-(ls\\d+)" + }, + "description": "A Free Software Media System that puts you in control of managing and streaming your media.", + "url": "https://github.com/petersendev/hassio-addons/jellyfin", + "startup": "services", + "arch": [ + "aarch64", + "amd64", + "armhf" + ], + "ports": { + "8096/tcp": 8096 + }, + "ports_description": { + "8096/tcp": "web interface" + }, + "map": [ + "config:rw", + "share:rw", + "ssl" + ], + "webui": "http://[HOST]:[PORT:8096]", + "boot": "auto", + "options": { + "PUID": 1001, + "PGID": 1001 + }, + "schema": { + "PUID": "int", + "PGID": "int", + "TZ": "str?" + }, + "image": "petersendev/hassio-jellyfin-{arch}" +} diff --git a/jellyfin/icon.png b/jellyfin/icon.png new file mode 100644 index 000000000..2d57e82b7 Binary files /dev/null and b/jellyfin/icon.png differ diff --git a/jellyfin/logo.png b/jellyfin/logo.png new file mode 100644 index 000000000..2d57e82b7 Binary files /dev/null and b/jellyfin/logo.png differ diff --git a/jellyfin/root/etc/cont-init.d/20-folders b/jellyfin/root/etc/cont-init.d/20-folders new file mode 100644 index 000000000..40dfa87f8 --- /dev/null +++ b/jellyfin/root/etc/cont-init.d/20-folders @@ -0,0 +1,37 @@ +#!/usr/bin/with-contenv bash + +if [ ! -d /share/storage/tv ]; then + echo "Creating /share/storage/tv" + mkdir -p /share/storage/tv + chown -R abc:abc /share/storage/tv +fi + +if [ ! -d /share/storage/movies ]; then + echo "Creating /share/storage/movies" + mkdir -p /share/storage/movies + chown -R abc:abc /share/storage/movies +fi + +if [ ! -d /share/jellyfin/data ]; then + echo "Creating /share/jellyfin/data" + mkdir -p /share/jellyfin/data + chown -R abc:abc /share/jellyfin/data +fi + +if [ ! -d /share/jellyfin/cache ]; then + echo "Creating /share/jellyfin/cache" + mkdir -p /share/jellyfin/cache + chown -R abc:abc /share/jellyfin/cache +fi + +if [ ! -d /share/jellyfin/log ]; then + echo "Creating /share/jellyfin/log" + mkdir -p /share/jellyfin/log + chown -R abc:abc /share/jellyfin/log +fi + +if [ ! -d /config/jellyfin ]; then + echo "Creating /config/jellyfin" + mkdir -p /config/jellyfin + chown -R abc:abc /config/jellyfin +fi