mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-04-25 11:00:53 +08:00
19
.github/workflows/build.yml
vendored
19
.github/workflows/build.yml
vendored
@@ -226,7 +226,7 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Download artifact
|
||||
- name: Download artifact webui
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: dist
|
||||
@@ -236,6 +236,22 @@ jobs:
|
||||
run: |
|
||||
cd webui && ls -al && tree && zip -r dist.zip dist
|
||||
|
||||
- name: Download artifact app
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: dist
|
||||
path: backend/src/dist
|
||||
|
||||
- name: Create Version info via tag
|
||||
working-directory: ./backend/src
|
||||
run: |
|
||||
echo ${{ needs.version-info.outputs.version }}
|
||||
echo "VERSION='${{ needs.version-info.outputs.version }}'" >> module/__version__.py
|
||||
|
||||
- name: Zip app
|
||||
run: |
|
||||
cd backend && zip -r app-v${{ needs.version-info.outputs.version }}.zip src
|
||||
|
||||
- name: Generate Release info
|
||||
id: release-info
|
||||
run: |
|
||||
@@ -257,6 +273,7 @@ jobs:
|
||||
prerelease: ${{ steps.release-info.outputs.pre_release == 'true' }}
|
||||
files: |
|
||||
webui/dist.zip
|
||||
backend/app-v${{ needs.version-info.outputs.version }}.zip
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
|
||||
@@ -14,10 +14,11 @@ COPY backend/requirements.txt .
|
||||
RUN set -ex && \
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
busybox-suid \
|
||||
python3 \
|
||||
py3-aiohttp \
|
||||
py3-bcrypt \
|
||||
py3-pip \
|
||||
py3-aiohttp \
|
||||
su-exec \
|
||||
shadow \
|
||||
tini \
|
||||
|
||||
@@ -55,6 +55,9 @@ class RequestContent(RequestURL):
|
||||
def post_data(self, _url, data: dict) -> dict:
|
||||
return self.post_url(_url, data)
|
||||
|
||||
def post_form(self, _url, data: dict, files: dict) -> dict:
|
||||
return self.post_form(_url, data, files)
|
||||
|
||||
def get_html(self, _url):
|
||||
return self.get_url(_url).text
|
||||
|
||||
|
||||
@@ -72,10 +72,10 @@ class RequestURL:
|
||||
logger.debug(f"[Network] Cannot connect to {url}.")
|
||||
return False
|
||||
|
||||
def post_form(self, url: str, data: dict):
|
||||
def post_form(self, url: str, data: dict, files):
|
||||
try:
|
||||
req = self.session.post(
|
||||
url=url, headers=self.header, data=data, timeout=5
|
||||
url=url, headers=self.header, data=data, files=files, timeout=5
|
||||
)
|
||||
req.raise_for_status()
|
||||
return req
|
||||
|
||||
@@ -2,6 +2,7 @@ import logging
|
||||
|
||||
from module.models import Notification
|
||||
from module.network import RequestContent
|
||||
from module.utils import load_image
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -24,9 +25,14 @@ class TelegramNotification(RequestContent):
|
||||
data = {
|
||||
"chat_id": self.chat_id,
|
||||
"caption": text,
|
||||
"photo": notify.poster_path,
|
||||
"disable_notification": True,
|
||||
}
|
||||
resp = self.post_data(self.notification_url, data)
|
||||
photo = load_image(notify.poster_path)
|
||||
if photo:
|
||||
resp = self.post_form(
|
||||
self.notification_url, data, files={"photo": photo}
|
||||
)
|
||||
else:
|
||||
resp = self.post_data(self.notification_url, data)
|
||||
logger.debug(f"Telegram notification: {resp.status_code}")
|
||||
return resp.status_code == 200
|
||||
|
||||
@@ -10,5 +10,5 @@ def save_image(img, suffix):
|
||||
|
||||
|
||||
def load_image(img_path):
|
||||
with open(f"data/images/{img_path}", "rb") as f:
|
||||
with open(f"data/{img_path}", "rb") as f:
|
||||
return f.read()
|
||||
|
||||
30
docs/resource/unraid.xml
Normal file
30
docs/resource/unraid.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<Container version="2">
|
||||
<Name Default="AutoBangumi">AutoBangumi</Name>
|
||||
<Repository>estrellaxd/auto_bangumi:latest</Repository>
|
||||
<Registry>https://registry.hub.docker.com/r/estrellaxd/auto_bangumi</Registry>
|
||||
<Network Default="bridge">bridge</Network>
|
||||
<Category>MediaServer:Video Tools Productivity</Category>
|
||||
<MyIP/>
|
||||
<Shell>sh</Shell>
|
||||
<Privileged>false</Privileged>
|
||||
<Support>https://github.com/EstrellaXD/Auto_Bangumi/issues</Support>
|
||||
<Project/>
|
||||
<Overview>
|
||||
AutoBangumi 是基于 Mikan Project、qBittorrent 的全自动追番整理下载工具。只需要在 Mikan Project 上订阅番剧,就可以全自动追番。并且整理完成的名称和目录可以直接被 Plex、Jellyfin 等媒体库软件识别,无需二次刮削。
|
||||
</Overview>
|
||||
<Category/>
|
||||
<WebUI>http://[IP]:[PORT:7892]/</WebUI>
|
||||
<TemplateURL/>
|
||||
<Icon>https://quantil.jsdelivr.net/gh/9bingyin/static@main/images/AutoBangumi.png</Icon>
|
||||
<ExtraParams>--dns 8.8.8.8 --dns 223.5.5.5</ExtraParams>
|
||||
<PostArgs/>
|
||||
<CPUset/>
|
||||
<DonateText/>
|
||||
<DonateLink/>
|
||||
<Requires/>
|
||||
<Config Name="WebUI" Target="7892" Default="7892" Mode="tcp" Description="" Type="Port" Display="always" Required="false" Mask="false">7892</Config>
|
||||
<Config Name="Config" Target="/app/config" Default="" Mode="rw" Description="" Type="Path" Display="always" Required="false" Mask="false">/mnt/user/appdata/AutoBangumi/config</Config>
|
||||
<Config Name="Data" Target="/app/data" Default="" Mode="rw" Description="" Type="Path" Display="always" Required="false" Mask="false">/mnt/user/appdata/AutoBangumi/data</Config>
|
||||
</Container>
|
||||
Reference in New Issue
Block a user