diff --git a/.dockerignore b/.dockerignore index f535c9c7..742c4925 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,8 @@ .git .github .gitignore +contrib +init-scripts +pylintrc *.md !CHANGELOG*.md diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml new file mode 100644 index 00000000..2874e9ba --- /dev/null +++ b/.github/workflows/publish-docker.yml @@ -0,0 +1,83 @@ +name: Publish Docker +on: + push: + branches: [master, beta, nightly, python3] + tags: [v*] +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Prepare + id: prepare + run: | + if [[ $GITHUB_REF == refs/tags/* ]]; then + echo ::set-output name=tag::${GITHUB_REF#refs/tags/} + elif [[ $GITHUB_REF == refs/heads/master ]]; then + echo ::set-output name=tag::latest + else + echo ::set-output name=tag::${GITHUB_REF#refs/heads/} + fi + if [[ $GITHUB_REF == refs/tags/* ]]; then + echo ::set-output name=branch::master + else + echo ::set-output name=branch::${GITHUB_REF#refs/heads/} + fi + echo ::set-output name=commit::${GITHUB_SHA} + echo ::set-output name=build_date::$(date -u +'%Y-%m-%dT%H:%M:%SZ') + echo ::set-output name=docker_platforms::linux/amd64,linux/arm64,linux/arm + echo ::set-output name=docker_image::tautulli/tautulli + + - name: Set up Docker Buildx + id: buildx + uses: crazy-max/ghaction-docker-buildx@v1 + with: + version: latest + + - name: Checkout + uses: actions/checkout@v2 + + - name: Docker Buildx (no push) + run: | + docker buildx build \ + --platform ${{ steps.prepare.outputs.docker_platforms }} \ + --output "type=image,push=false" \ + --build-arg "TAG=${{ steps.prepare.outputs.tag }}" \ + --build-arg "BRANCH=${{ steps.prepare.outputs.branch }}" \ + --build-arg "COMMIT=${{ steps.prepare.outputs.commit }}" \ + --build-arg "BUILD_DATE=${{ steps.prepare.outputs.build_date }}" \ + --tag "${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.tag }}" \ + --file Dockerfile . + + - name: Docker Login + if: success() + env: + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + run: | + echo "${DOCKER_PASSWORD}" | docker login --username "${{ secrets.DOCKER_USERNAME }}" --password-stdin + + - name: Docker Buildx (push) + if: success() + run: | + docker buildx build \ + --platform ${{ steps.prepare.outputs.docker_platforms }} \ + --output "type=image,push=true" \ + --build-arg "TAG=${{ steps.prepare.outputs.tag }}" \ + --build-arg "BRANCH=${{ steps.prepare.outputs.branch }}" \ + --build-arg "COMMIT=${{ steps.prepare.outputs.commit }}" \ + --build-arg "BUILD_DATE=${{ steps.prepare.outputs.build_date }}" \ + --tag "${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.tag }}" \ + --file Dockerfile . + + - name: Clear + if: always() + run: | + rm -f ${HOME}/.docker/config.json + + - name: Post Status to Discord + uses: sarisia/actions-status-discord@v1 + if: always() + with: + webhook: ${{ secrets.DISCORD_WEBHOOK }} + status: ${{ job.status }} + job: ${{ github.workflow }} + nofail: true diff --git a/.github/workflows/publishrelease.yml b/.github/workflows/publish-release.yml similarity index 87% rename from .github/workflows/publishrelease.yml rename to .github/workflows/publish-release.yml index f5e0b5d9..8834af3f 100644 --- a/.github/workflows/publishrelease.yml +++ b/.github/workflows/publish-release.yml @@ -1,8 +1,7 @@ -name: Create Release +name: Publish Release on: push: - tags: - - 'v*' + tags: [v*] jobs: build: runs-on: ubuntu-latest @@ -10,7 +9,7 @@ jobs: - name: Checkout Code uses: actions/checkout@master - name: Get Release Version - run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF/refs\/tags\//} + run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF#refs/tags/} - name: Get Changelog run: echo ::set-env name=CHANGELOG::"$( sed -n '/^## /{p; :loop n; p; /^## /q; b loop}' CHANGELOG.md | sed '$d' | sed '$d' | sed '$d' | sed ':a;N;$!ba;s/\n/%0A/g' )" - name: Create Release diff --git a/.github/workflows/publishdocker-branch.yml b/.github/workflows/publishdocker-branch.yml deleted file mode 100644 index d8693681..00000000 --- a/.github/workflows/publishdocker-branch.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Publish Docker Branch -on: - push: - branches: [master, beta, nightly, python3] -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@master - - name: Get Branch - run: echo ::set-env name=BRANCH::${GITHUB_REF#refs/heads/} - - name: Publish to Registry - uses: elgohr/Publish-Docker-Github-Action@master - env: - VERSION: ${{ github.sha }} - with: - name: tautulli/tautulli - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - dockerfile: Dockerfile - buildargs: VERSION, BRANCH - - name: Post Status to Discord - uses: sarisia/actions-status-discord@v1 - if: always() - with: - webhook: ${{ secrets.DISCORD_WEBHOOK }} - status: ${{ job.status }} - job: ${{ github.workflow }} - nofail: true diff --git a/.github/workflows/publishdocker-release.yml b/.github/workflows/publishdocker-release.yml deleted file mode 100644 index 96f5bb66..00000000 --- a/.github/workflows/publishdocker-release.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Publish Docker Release -on: - push: - tags: - - 'v*' -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@master - - name: Get Branch - run: echo ::set-env name=BRANCH::${GITHUB_REF/refs\/tags\//} - - name: Publish to Registry - uses: elgohr/Publish-Docker-Github-Action@master - env: - VERSION: ${{ github.sha }} - with: - name: tautulli/tautulli - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - dockerfile: Dockerfile - buildargs: VERSION, BRANCH - tags: ${{ env.BRANCH }} - - name: Post Status to Discord - uses: sarisia/actions-status-discord@v1 - if: always() - with: - webhook: ${{ secrets.DISCORD_WEBHOOK }} - status: ${{ job.status }} - job: ${{ github.workflow }} - nofail: true diff --git a/Dockerfile b/Dockerfile index 37a6940e..c3798c2d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ -FROM python:3.8.2-slim +FROM tautulli/tautulli-baseimage:python3 -LABEL maintainer="TheMeanCanEHdian" +LABEL maintainer="Tautulli" -ARG VERSION ARG BRANCH +ARG COMMIT ENV TAUTULLI_DOCKER=True ENV TZ=UTC @@ -11,16 +11,8 @@ ENV TZ=UTC WORKDIR /app RUN \ -apt-get -q -y update --no-install-recommends && \ -apt-get install -q -y --no-install-recommends \ - curl && \ -rm -rf /var/lib/apt/lists/* && \ -pip install --no-cache-dir --upgrade pip && \ -pip install --no-cache-dir --upgrade \ - pycryptodomex \ - pyopenssl && \ -echo ${VERSION} > /app/version.txt && \ -echo ${BRANCH} > /app/branch.txt + echo ${BRANCH} > /app/branch.txt && \ + echo ${COMMIT} > /app/version.txt COPY . /app diff --git a/README.md b/README.md index 554f6654..cb26743f 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ This project is based on code from [Headphones](https://github.com/rembo10/headp | Status | Branch: `master` | Branch: `beta` | Branch: `nightly` | | --- | --- | --- | --- | | Release | [![Release@master](https://img.shields.io/github/v/release/Tautulli/Tautulli?style=flat-square)](https://github.com/Tautulli/Tautulli/releases/latest)
[![Release Date@master](https://img.shields.io/github/release-date/Tautulli/Tautulli?style=flat-square&color=blue)](https://github.com/Tautulli/Tautulli/releases/latest) | [![Release@beta](https://img.shields.io/github/v/release/Tautulli/Tautulli?include_prereleases&style=flat-square)](https://github.com/Tautulli/Tautulli/releases)
[![Commits@nightly](https://img.shields.io/github/commits-since/Tautulli/Tautulli/latest/beta?style=flat-square&color=blue)](https://github.com/Tautulli/Tautulli/commits/beta) | [![Last Commits@nightly](https://img.shields.io/github/last-commit/Tautulli/Tautulli/nightly?style=flat-square&color=blue)](https://github.com/Tautulli/Tautulli/commits/nightly)
[![Commits@nightly](https://img.shields.io/github/commits-since/Tautulli/Tautulli/latest/nightly?style=flat-square&color=blue)](https://github.com/Tautulli/Tautulli/commits/nightly) | -| Docker | [![Docker@master](https://img.shields.io/badge/tautulli-tautulli:latest-blue?style=flat-square)](https://hub.docker.com/r/tautulli/tautulli)
[![Docker Build@master](https://img.shields.io/github/workflow/status/Tautulli/Tautulli/Publish%20Docker%20Branch/master?style=flat-square)](https://github.com/Tautulli/Tautulli/actions?query=branch%3Amaster) | [![Docker@beta](https://img.shields.io/badge/tautulli-tautulli:beta-blue?style=flat-square)](https://hub.docker.com/r/tautulli/tautulli)
[![Docker Build@beta](https://img.shields.io/github/workflow/status/Tautulli/Tautulli/Publish%20Docker%20Branch/beta?style=flat-square)](https://github.com/Tautulli/Tautulli/actions?query=branch%3Abeta) | [![Docker@nightly](https://img.shields.io/badge/tautulli-tautulli:nightly-blue?style=flat-square)](https://hub.docker.com/r/tautulli/tautulli)
[![Docker Build@nightly](https://img.shields.io/github/workflow/status/Tautulli/Tautulli/Publish%20Docker%20Branch/nightly?style=flat-square)](https://github.com/Tautulli/Tautulli/actions?query=branch%3Anightly) | +| Docker | [![Docker@master](https://img.shields.io/badge/tautulli-tautulli:latest-blue?style=flat-square)](https://hub.docker.com/r/tautulli/tautulli)
[![Docker Build@master](https://img.shields.io/github/workflow/status/Tautulli/Tautulli/Publish%20Docker/master?style=flat-square)](https://github.com/Tautulli/Tautulli/actions?query=workflow%3A"Publish+Docker"+branch%3Amaster) | [![Docker@beta](https://img.shields.io/badge/tautulli-tautulli:beta-blue?style=flat-square)](https://hub.docker.com/r/tautulli/tautulli)
[![Docker Build@master](https://img.shields.io/github/workflow/status/Tautulli/Tautulli/Publish%20Docker/beta?style=flat-square)](https://github.com/Tautulli/Tautulli/actions?query=workflow%3A"Publish+Docker"+branch%3Abeta) | [![Docker@nightly](https://img.shields.io/badge/tautulli-tautulli:nightly-blue?style=flat-square)](https://hub.docker.com/r/tautulli/tautulli)
[![Docker Build@master](https://img.shields.io/github/workflow/status/Tautulli/Tautulli/Publish%20Docker/nightly?style=flat-square)](https://github.com/Tautulli/Tautulli/actions?query=workflow%3A"Publish+Docker"+branch%3Anightly) | [![Wiki](https://img.shields.io/badge/github-wiki-black?style=flat-square)](https://github.com/Tautulli/Tautulli-Wiki/wiki) [![Discord](https://img.shields.io/discord/183396325142822912?label=discord&style=flat-square&color=7289DA)](https://tautulli.com/discord) diff --git a/data/interfaces/default/css/tautulli.css b/data/interfaces/default/css/tautulli.css index 50e387c8..12113551 100644 --- a/data/interfaces/default/css/tautulli.css +++ b/data/interfaces/default/css/tautulli.css @@ -1034,13 +1034,13 @@ a .users-poster-face:hover { } .dashboard-activity-container:hover .progress-bar { color: rgba(255, 255, 255, 1); - background-image: -webkit-linear-gradient(left,rgba(0,0,0,0.25),0%,rgba(0,0,0,0),50px); + background-image: -webkit-linear-gradient(left,rgba(0,0,0,0.25) 0%,rgba(0,0,0,0) 50px); background-image: -moz-linear-gradient(left,rgba(0,0,0,0.25) 0%,rgba(0,0,0,0) 50px); background-image: linear-gradient(to left,rgba(0,0,0,0.25) 0%,rgba(0,0,0,0) 50px); } .dashboard-activity-container:hover .buffer-bar { color: rgba(255, 255, 255, 1); - background-image: -webkit-linear-gradient(left,rgba(0,0,0,0.25),0%,rgba(0,0,0,0),50px); + background-image: -webkit-linear-gradient(left,rgba(0,0,0,0.25) 0%,rgba(0,0,0,0) 50px); background-image: -moz-linear-gradient(left,rgba(0,0,0,0.25) 0%,rgba(0,0,0,0) 50px); background-image: linear-gradient(to left,rgba(0,0,0,0.25) 0%,rgba(0,0,0,0) 50px); } @@ -1740,7 +1740,7 @@ a:hover .dashboard-recent-media-cover { top: 0; bottom: 0; background-image: -webkit-gradient(linear,left 0,left 100%,from(rgba(0,0,0,.7)),to(rgba(0,0,0,.9))); - background-image: -webkit-linear-gradient(top,rgba(0,0,0,.7),0,rgba(0,0,0,.9),100%); + background-image: -webkit-linear-gradient(top,rgba(0,0,0,.7) 0,rgba(0,0,0,.9) 100%); background-image: -moz-linear-gradient(top,rgba(0,0,0,.7) 0,rgba(0,0,0,.9) 100%); background-image: linear-gradient(to bottom,rgba(0,0,0,.7) 0,rgba(0,0,0,.9) 100%); background-repeat: repeat-x; @@ -3932,7 +3932,7 @@ a:hover .overlay-refresh-image:hover { } .platform-xbmc { background-color: #3b4872; - background-image: url(../images/platforms/xbmc.svg); + background-image: url(../images/platforms/kodi.svg); } .platform-xbox { background-color: #107c10; diff --git a/data/interfaces/default/images/favicon/browserconfig.xml b/data/interfaces/default/images/favicon/browserconfig.xml index 58f4aee7..7244b771 100644 --- a/data/interfaces/default/images/favicon/browserconfig.xml +++ b/data/interfaces/default/images/favicon/browserconfig.xml @@ -2,7 +2,7 @@ - + #282a2d diff --git a/data/interfaces/default/images/favicon/manifest.json b/data/interfaces/default/images/favicon/manifest.json index 98ba817a..cd68328c 100644 --- a/data/interfaces/default/images/favicon/manifest.json +++ b/data/interfaces/default/images/favicon/manifest.json @@ -1,18 +1,23 @@ { - "name": "Tautulli", + "name": "Tautulli: Monitor your Plex Media Server", + "short_name": "Tautulli", + "Description": "A Python based monitoring and tracking tool for Plex Media Server.", + "start_url": "../../", + "scope": "../../", "icons": [ { - "src": "${http_root}images/favicon/android-chrome-192x192.png?v=2.0.5", + "src": "android-chrome-192x192.png?v=2.0.5", "sizes": "192x192", "type": "image/png" }, { - "src": "${http_root}images/favicon/android-chrome-256x256.png?v=2.0.5", + "src": "android-chrome-256x256.png?v=2.0.5", "sizes": "256x256", "type": "image/png" } ], "theme_color": "#282a2d", "background_color": "#282a2d", - "display": "standalone" + "display": "standalone", + "orientation": "any" } \ No newline at end of file