Skip to content

Commit

Permalink
chore: integrated repo with new site for upload
Browse files Browse the repository at this point in the history
  • Loading branch information
kaif-00z committed Jun 26, 2024
1 parent 4b7ce01 commit e0794c6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions core/executors.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from traceback import format_exc

from telethon import Button
from aniplease import AsyncAniPlease, Types

from core.bot import LOGS, Bot, Var
from database import DataBase
Expand All @@ -50,6 +51,7 @@ def __init__(
self.tools = Tools()
self.db = dB
self.reporter = reporter
self.aniplease = AsyncAniPlease(Var.API_KEY)
self.msg_id = None
self.output_file = None

Expand Down Expand Up @@ -141,6 +143,8 @@ async def further_work(self):
]
)
await msg.edit(buttons=btn)
await self.reporter.started_uploading_on_aniplease()
await self.aniplease.upload_file(self.output_file, Types.ENGLISH_SUBBED, "Encoded By The00z")
await self.reporter.all_done()
try:
shutil.rmtree(_hash)
Expand Down
1 change: 1 addition & 0 deletions functions/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class Var:

# Other Configs

API_KEY = config("API_KEY", cast=str)
THUMB = config(
"THUMBNAIL", default="https://graph.org/file/ad1b25807b81cdf1dff65.jpg"
)
Expand Down
6 changes: 6 additions & 0 deletions libs/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ async def started_gen_ss(self):
f"**Successfully Uploaded The Anime**\n\n **File Name:** ```{self.file_name}```\n\n**STATUS:** `Generating Sample And Screen Shot...`"
)

async def started_uploading_on_aniplease(self):
self.msg = await self.msg.edit(
f"**Successfully Uploaded Sample And Screen Shots**\n\n **File Name:** ```{self.file_name}```\n\n**STATUS:** `Uploading On AniPlease Site...`"
)


async def all_done(self):
self.msg = await self.msg.edit(
f"**Successfully Completed All Task Related To The Anime**\n\n **File Name:** ```{self.file_name}```\n\n**STATUS:** `DONE`"
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ tgcrypto
AnilistPython==0.1.3
anitopy
git+https://github.com/kaif-00z/html-telegraph-poster
pytz
pytz
aniplease

0 comments on commit e0794c6

Please sign in to comment.