Skip to content

Commit

Permalink
2.0.0 (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
MainKronos authored Oct 1, 2023
1 parent 734e223 commit 6ae72ce
Show file tree
Hide file tree
Showing 99 changed files with 3,204 additions and 2,073 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.IMAGE_NAME }}
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
flavor: |
latest=${{ github.event_name != 'workflow_dispatch' || github.ref_name != 'dev' }}
latest=${{ env.RELEASE_VERSION != 'dev' }}
tags: |
type=raw,enable=true,value=dev
type=raw,enable=true,value=${{ env.RELEASE_VERSION }}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.vscode/
*.pyc
*.pyc
*.log
26 changes: 26 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,32 @@
"tag": "mainkronos/anime_downloader:latest",
// "customOptions": "--no-cache"
}
},
{
"label": "Type Check",
"type": "shell",
"command": "python -m mypy",
"args": [
"${workspaceFolder}/src",
"--show-column-numbers",
"--show-error-end",
"--no-incremental"
],
"problemMatcher": {
"owner": "mypy",
"fileLocation": ["relative", "${workspaceFolder}"],
"pattern": {
"regexp": "^(.*?):(\\d+):(\\d+):(\\d+):(\\d+):\\s+(warning|error|note):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"endLine": 4,
"endColumn": 5,
"severity": 6,
"message": 7
}
},
"group": "build"
}
]
}
39 changes: 20 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@ FROM python:3.9.5-slim

LABEL maintainer="MainKronos"


RUN export DEBIAN_FRONTEND=noninteractive; \
apt-get update; \
apt-get -y upgrade; \
apt-get -y install --no-install-recommends; \
apt-get -y install curl; \
apt-get update; \
apt-get -y upgrade; \
apt-get -y install --no-install-recommends; \
apt-get -y install curl; \
apt-get -y install ffmpeg; \
apt-get -y install rtmpdump; \
apt-get -y install tzdata; \
apt-get -y install tzdata; \
apt-get -y install build-essential; \
apt-get -y install locales && locale-gen it_IT.UTF-8; \
apt-get clean; \
apt-get autoclean; \
rm -rf /var/lib/apt/lists/*
apt-get -y install locales && locale-gen it_IT.UTF-8; \
apt-get clean; \
apt-get autoclean; \
rm -rf /var/lib/apt/lists/*

RUN groupadd --gid 1000 dockeruser
RUN useradd --no-log-init -r -m --gid dockeruser --uid 1000 dockeruser
Expand All @@ -29,23 +28,23 @@ COPY requirements.txt /tmp/
RUN pip3 install --no-cache-dir -r /tmp/requirements.txt

RUN mkdir /downloads
RUN mkdir /script
RUN mkdir /src

WORKDIR /script
WORKDIR /src

COPY config/ /script/
COPY src/ /src/

RUN chmod 777 /downloads -R
RUN chmod 777 /script -R
RUN chmod 777 /src -R

RUN gcc /script/start.c -o /start.bin
RUN rm /script/start.c
RUN gcc /src/start.c -o /start.bin
RUN rm /src/start.c
RUN chown root:root /start.bin
RUN chmod 6751 /start.bin

RUN sed -i -e 's/# it_IT.UTF-8 UTF-8/it_IT.UTF-8 UTF-8/' /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=it_IT.UTF-8
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=it_IT.UTF-8

ENV FLASK_DEBUG production
ENV PIP_ROOT_USER_ACTION ignore
Expand All @@ -58,6 +57,8 @@ ENV VERSION=$set_version

EXPOSE 5000

VOLUME [ "/downloads", "/script/json", "/script/connections" ]
VOLUME [ "/downloads", "/src/script", "/src/database" ]

HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD curl --fail http://localhost:5000 || exit 1

CMD ["/start.bin"]
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@

# ![wallpaper](docs/static/img/wallpaper.png)

<!-- [![forthebadge](https://forthebadge.com/images/badges/made-with-python.svg)](https://forthebadge.com) [![forthebadge](https://forthebadge.com/images/badges/built-with-love.svg)](https://forthebadge.com) -->

[![Version](https://img.shields.io/github/v/release/MainKronos/Sonarr-AnimeDownloader?color=90caf9&style=for-the-badge)](../../releases) [![Issues](https://img.shields.io/github/issues/MainKronos/Sonarr-AnimeDownloader?color=a5d6a7&style=for-the-badge)](../../issues) [![License](https://img.shields.io/github/license/MainKronos/Sonarr-AnimeDownloader?color=ffcc80&style=for-the-badge)](/LICENSE) [![Stars](https://img.shields.io/github/stars/MainKronos/Sonarr-AnimeDownloader?color=fff59d&style=for-the-badge)](../../stargazers)

_This documentation is in **Italian** because this program downloads anime with italian subtitles only._
Expand All @@ -15,6 +13,12 @@ Il _Docker Container_ di **Sonarr** può essere trovato [qui](https://github.com

Il progetto utilizza la libreria `animeworld`, il codice sorgente e la documentazione è reperibile [qui](../../../AnimeWorld-API).

> **WARNING**\
> **Aggiornamento da `1.x.x` a `2.x.x`**\
> Il volumi sono cambiati nel seguente modo:
> - `/script/connections` -> `/src/script`
> - `/script/json` -> `/src/database`
## Installazione

```yaml
Expand All @@ -23,10 +27,10 @@ services:
mainkronos:
container_name: AnimeDownloader
volumes:
- '/path/to/data:/script/json/'
- '/path/to/data:/src/database'
- '/path/to/animeSeries:/tv'
- '/path/to/downloads:/downloads'
- '/path/to/connections:/script/connections'
- '/path/to/connections:/src/script'
ports:
- 'port:5000'
environment:
Expand Down
28 changes: 0 additions & 28 deletions config/app/__init__.py

This file was deleted.

Loading

0 comments on commit 6ae72ce

Please sign in to comment.