diff --git a/core/executors.py b/core/executors.py index e8ef5fe..7109851 100644 --- a/core/executors.py +++ b/core/executors.py @@ -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 @@ -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 @@ -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) diff --git a/functions/config.py b/functions/config.py index caf320b..0419b32 100644 --- a/functions/config.py +++ b/functions/config.py @@ -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" ) diff --git a/libs/logger.py b/libs/logger.py index 0ca86ad..4d70319 100644 --- a/libs/logger.py +++ b/libs/logger.py @@ -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`" diff --git a/requirements.txt b/requirements.txt index 8e769a3..cffdf85 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,4 +11,5 @@ tgcrypto AnilistPython==0.1.3 anitopy git+https://github.com/kaif-00z/html-telegraph-poster -pytz \ No newline at end of file +pytz +aniplease \ No newline at end of file