├── .github └── workflows │ ├── build-playwright.yml │ ├── build.yml │ └── release.yml ├── LICENSE.txt ├── README.txt └── playwright ├── playwright.Dockerfile └── playwright.sh /.github/workflows/build-playwright.yml: -------------------------------------------------------------------------------- 1 | name: MoviePilot Playwright Builder 2 | on: 3 | workflow_dispatch: 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | name: Build Docker Image 9 | steps: 10 | - 11 | name: Checkout 12 | uses: actions/checkout@v3 13 | 14 | - name: Docker meta 15 | id: meta 16 | uses: docker/metadata-action@v5 17 | with: 18 | images: ${{ secrets.DOCKER_USERNAME }}/moviepilot 19 | 20 | - 21 | name: Set Up QEMU 22 | uses: docker/setup-qemu-action@v3 23 | 24 | - 25 | name: Set Up Buildx 26 | uses: docker/setup-buildx-action@v3 27 | 28 | - 29 | name: Login DockerHub 30 | uses: docker/login-action@v3 31 | with: 32 | username: ${{ secrets.DOCKER_USERNAME }} 33 | password: ${{ secrets.DOCKER_PASSWORD }} 34 | 35 | - 36 | name: Build Image 37 | uses: docker/build-push-action@v5 38 | with: 39 | context: playwright 40 | file: playwright/playwright.Dockerfile 41 | platforms: | 42 | linux/amd64 43 | linux/arm64 44 | push: true 45 | tags: | 46 | ${{ secrets.DOCKER_USERNAME }}/moviepilot:playwright 47 | labels: ${{ steps.meta.outputs.labels }} 48 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: MoviePilot Builder 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: 6 | - main 7 | paths: 8 | - version.py 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | name: Build Docker Image 14 | steps: 15 | - 16 | name: Checkout 17 | uses: actions/checkout@v3 18 | 19 | - name: Docker meta 20 | id: meta 21 | uses: docker/metadata-action@v5 22 | with: 23 | images: ${{ secrets.DOCKER_USERNAME }}/moviepilot 24 | 25 | - 26 | name: Release version 27 | id: release_version 28 | run: | 29 | app_version=$(cat version.py |sed -ne "s/APP_VERSION\s=\s'v\(.*\)'/\1/gp") 30 | echo "app_version=$app_version" >> $GITHUB_ENV 31 | 32 | - 33 | name: Set Up QEMU 34 | uses: docker/setup-qemu-action@v3 35 | 36 | - 37 | name: Set Up Buildx 38 | uses: docker/setup-buildx-action@v3 39 | 40 | - 41 | name: Login DockerHub 42 | uses: docker/login-action@v3 43 | with: 44 | username: ${{ secrets.DOCKER_USERNAME }} 45 | password: ${{ secrets.DOCKER_PASSWORD }} 46 | 47 | - 48 | name: Build Image 49 | uses: docker/build-push-action@v5 50 | with: 51 | context: . 52 | file: Dockerfile 53 | platforms: | 54 | linux/amd64 55 | push: true 56 | build-args: | 57 | MOVIEPILOT_VERSION=${{ env.app_version }} 58 | tags: | 59 | ${{ secrets.DOCKER_USERNAME }}/moviepilot:latest 60 | ${{ secrets.DOCKER_USERNAME }}/moviepilot:${{ env.app_version }} 61 | labels: ${{ steps.meta.outputs.labels }} -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: MoviePilot Release 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: 6 | - main 7 | paths: 8 | - version.py 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | name: Build Docker Image 14 | steps: 15 | - 16 | name: Checkout 17 | uses: actions/checkout@v3 18 | 19 | - 20 | name: Release Version 21 | id: release_version 22 | run: | 23 | app_version=$(cat version.py |sed -ne "s/APP_VERSION\s=\s'v\(.*\)'/\1/gp") 24 | echo "app_version=$app_version" >> $GITHUB_ENV 25 | 26 | - 27 | name: Generate Release 28 | uses: softprops/action-gh-release@v1 29 | with: 30 | tag_name: v${{ env.app_version }} 31 | name: v${{ env.app_version }} 32 | draft: false 33 | prerelease: false 34 | env: 35 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 DDSRem 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | MoviePilot Packages 2 | 3 | Copyright (C) 2023, DDSRem 4 | 5 | LICENSE 6 | 7 | MIT, see COPYING. 8 | 9 | Docs: https://github.com/DDS-Derek/MoviePilot/tree/docs -------------------------------------------------------------------------------- /playwright/playwright.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.11.4-slim-bullseye 2 | 3 | ENV PLAYWRIGHT_BROWSERS_PATH=/data \ 4 | PUID=1000 \ 5 | PGID=1000 \ 6 | UMASK=022 7 | 8 | RUN pip install --upgrade pip && \ 9 | pip install playwright~=1.37.0 && \ 10 | playwright install chromium && \ 11 | pip uninstall -y playwright && \ 12 | rm -rf \ 13 | /tmp/* \ 14 | /moviepilot/.cache \ 15 | /var/lib/apt/lists/* \ 16 | /var/tmp/* 17 | 18 | COPY --chmod=755 playwright.sh /playwright.sh 19 | 20 | ENTRYPOINT [ "/playwright.sh" ] 21 | 22 | VOLUME [ "/downloads" ] -------------------------------------------------------------------------------- /playwright/playwright.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | Green="\033[32m" 4 | Red="\033[31m" 5 | Yellow='\033[33m' 6 | Font="\033[0m" 7 | INFO="[${Green}INFO${Font}]" 8 | ERROR="[${Red}ERROR${Font}]" 9 | WARN="[${Yellow}WARN${Font}]" 10 | function INFO() { 11 | echo -e "${INFO} ${1}" 12 | } 13 | function ERROR() { 14 | echo -e "${ERROR} ${1}" 15 | } 16 | function WARN() { 17 | echo -e "${WARN} ${1}" 18 | } 19 | 20 | umask ${UMASK} 21 | 22 | shopt -s dotglob 23 | 24 | if [ -d /downloads/.cache ]; then 25 | mkdir -p /downloads/.cache/ms-playwright 26 | mv /data/* /downloads/.cache/ms-playwright 27 | ls -al /downloads/.cache/ms-playwright 28 | INFO '浏览器内核下载成功' 29 | else 30 | rm -rf /downloads/* 31 | mv /data/* /downloads 32 | ls -al /downloads 33 | INFO '浏览器内核下载成功' 34 | fi 35 | 36 | INFO '设置权限中...' 37 | chown -R ${PUID}:${PGID} /downloads 38 | INFO '权限设置成功' 39 | 40 | shopt -u dotglob 41 | 42 | tail -f /dev/null --------------------------------------------------------------------------------