Skip to content

Commit

Permalink
fixes and typos
Browse files Browse the repository at this point in the history
  • Loading branch information
kaif-00z committed Jan 20, 2023
1 parent b7d7a46 commit 82d4db2
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM python:3.10.4-slim-buster
RUN mkdir /bot && chmod 777 /bot
WORKDIR /bot
ENV DEBIAN_FRONTEND=noninteractive
RUN apt -qq update && apt -qq install -y git wget pv jq python3-dev ffmpeg mediainfo qbittorrent-nox qbittorrent
COPY . .
RUN pip3 install -U -r requirements.txt
CMD ["bash","run.sh"]
4 changes: 2 additions & 2 deletions bot/rename.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ def _rename(name, og=None):
data = anitopy.parse(name)
anime_name = data.get("anime_title")
if anime_name and data.get("episode_number"):
return f"[S{data.get('anime_season') or 1}-{data.get('episode_number') or ''}] {get_english(anime_name)} [{data.get('video_resolution').replace('p', 'px246' if og else 'px256') or ''}] @ensembly.{data.get('file_extension') or 'mkv'}"
return f"[S{data.get('anime_season') or 1}-{data.get('episode_number') or ''}] {get_english(anime_name)} [{data.get('video_resolution').replace('p', 'px246' if og else 'px256') or ''}].{data.get('file_extension') or 'mkv'}"
if anime_name:
return f"{get_english(anime_name)} [{data.get('video_resolution').replace('p', 'px264' if og else 'px256') or ''}] @ensembly.{data.get('file_extension') or 'mkv'}"
return f"{get_english(anime_name)} [{data.get('video_resolution').replace('p', 'px264' if og else 'px256') or ''}].{data.get('file_extension') or 'mkv'}"
return name
except BaseException:
return name
2 changes: 1 addition & 1 deletion pkg.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sudo apt install -y qbittorrent-nox qbittorrent mediainfo wget
sudo apt install -y qbittorrent-nox qbittorrent mediainfo ffmpeg wget
pip3 install -U -r requirements.txt
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ tgcrypto
qbittorrent-api
pymalscraper
anitopy
pillow
git+https://github.com/kaif-00z/html-telegraph-poster
1 change: 0 additions & 1 deletion run.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
git pull
python3 -m bot --samedb

0 comments on commit 82d4db2

Please sign in to comment.