From e4e38add5e9f871a3bb9db3bf4dee86ee3e60bf0 Mon Sep 17 00:00:00 2001 From: 5hojib Date: Wed, 22 Jan 2025 20:57:24 +0600 Subject: [PATCH 01/17] test new Dockerfile with python3.14 open alpha 4 --- Dockerfile | 2 +- bot/core/config_manager.py | 2 -- bot/modules/bot_settings.py | 9 ++------- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5ff0c0e01..ea7ac8658 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM 5hojib/aeon:latest +FROM 5hojib/aeon:beta WORKDIR /usr/src/app RUN chmod 777 /usr/src/app diff --git a/bot/core/config_manager.py b/bot/core/config_manager.py index c63815e04..ca45c9ade 100644 --- a/bot/core/config_manager.py +++ b/bot/core/config_manager.py @@ -111,7 +111,6 @@ def load(cls): "BASE_URL", "RCLONE_SERVE_URL", "INDEX_URL", - "SEARCH_API_LINK", ] and value ): @@ -130,7 +129,6 @@ def load_dict(cls, config_dict): "BASE_URL", "RCLONE_SERVE_URL", "INDEX_URL", - "SEARCH_API_LINK", ] and value ): diff --git a/bot/modules/bot_settings.py b/bot/modules/bot_settings.py index 7bcf66621..5376648c2 100644 --- a/bot/modules/bot_settings.py +++ b/bot/modules/bot_settings.py @@ -53,7 +53,6 @@ "DOWNLOAD_DIR": "/usr/src/app/downloads/", "LEECH_SPLIT_SIZE": TgClient.MAX_SPLIT_SIZE, "RSS_DELAY": 600, - "SEARCH_LIMIT": 0, "UPSTREAM_BRANCH": "main", "DEFAULT_UPLOAD": "rc", } @@ -204,9 +203,7 @@ async def edit_variable(_, message, pre_message, key): await update_buttons(pre_message, "var") await delete_message(message) await database.update_config({key: value}) - if key in ["SEARCH_PLUGINS", "SEARCH_API_LINK"]: - await initiate_search_tools() - elif key in ["QUEUE_ALL", "QUEUE_DOWNLOAD", "QUEUE_UPLOAD"]: + if key in ["QUEUE_ALL", "QUEUE_DOWNLOAD", "QUEUE_UPLOAD"]: await start_from_queued() elif key in [ "RCLONE_SERVE_URL", @@ -392,9 +389,7 @@ async def edit_bot_settings(client, query): if data[2] == "DATABASE_URL": await database.disconnect() await database.update_config({data[2]: value}) - if data[2] in ["SEARCH_PLUGINS", "SEARCH_API_LINK"]: - await initiate_search_tools() - elif data[2] in ["QUEUE_ALL", "QUEUE_DOWNLOAD", "QUEUE_UPLOAD"]: + if data[2] in ["QUEUE_ALL", "QUEUE_DOWNLOAD", "QUEUE_UPLOAD"]: await start_from_queued() elif data[2] in [ "RCLONE_SERVE_URL", From d4a5982ca21bc2d6ff402f6a78221b9f08bf4b86 Mon Sep 17 00:00:00 2001 From: 5hojib Date: Wed, 22 Jan 2025 22:57:57 +0600 Subject: [PATCH 02/17] update Dockerfile --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index ea7ac8658..6e0a7405d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ WORKDIR /usr/src/app RUN chmod 777 /usr/src/app COPY requirements.txt . +RUN pip install --no-cache-dir uv RUN uv pip install --break-system-packages --system --no-cache-dir -r requirements.txt COPY . . From fce93960eadba5f03700039a22f3af777f68cda2 Mon Sep 17 00:00:00 2001 From: 5hojib Date: Wed, 22 Jan 2025 23:02:39 +0600 Subject: [PATCH 03/17] update --- Dockerfile | 2 +- start.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6e0a7405d..7e1fd54bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ WORKDIR /usr/src/app RUN chmod 777 /usr/src/app COPY requirements.txt . -RUN pip install --no-cache-dir uv +RUN /usr/bin/pip3.14 install --no-cache-dir uv RUN uv pip install --break-system-packages --system --no-cache-dir -r requirements.txt COPY . . diff --git a/start.sh b/start.sh index b6a631e49..d3530c79e 100644 --- a/start.sh +++ b/start.sh @@ -1 +1,2 @@ -python3 update.py && python3 -m bot \ No newline at end of file +/usr/bin/python3.14 update.py +/usr/bin/python3.14 -m bot \ No newline at end of file From c8f49d923b497e54009e6cfc6384f00951e6c6ae Mon Sep 17 00:00:00 2001 From: 5hojib Date: Thu, 23 Jan 2025 09:27:17 +0600 Subject: [PATCH 04/17] update --- Dockerfile | 3 +-- start.sh | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7e1fd54bc..dc75de55e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,7 @@ WORKDIR /usr/src/app RUN chmod 777 /usr/src/app COPY requirements.txt . -RUN /usr/bin/pip3.14 install --no-cache-dir uv -RUN uv pip install --break-system-packages --system --no-cache-dir -r requirements.txt +RUN pip install --no-cache-dir -r requirements.txt COPY . . CMD ["bash", "start.sh"] diff --git a/start.sh b/start.sh index d3530c79e..22904f9f8 100644 --- a/start.sh +++ b/start.sh @@ -1,2 +1,2 @@ -/usr/bin/python3.14 update.py -/usr/bin/python3.14 -m bot \ No newline at end of file +python update.py +python -m bot \ No newline at end of file From 55c16c8be584ea69fda8722d1c7538a36b2d6932 Mon Sep 17 00:00:00 2001 From: 5hojib Date: Thu, 23 Jan 2025 11:10:44 +0600 Subject: [PATCH 05/17] revert --- Dockerfile | 2 +- start.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index dc75de55e..ea7ac8658 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ WORKDIR /usr/src/app RUN chmod 777 /usr/src/app COPY requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt +RUN uv pip install --break-system-packages --system --no-cache-dir -r requirements.txt COPY . . CMD ["bash", "start.sh"] diff --git a/start.sh b/start.sh index 22904f9f8..1decaa631 100644 --- a/start.sh +++ b/start.sh @@ -1,2 +1,2 @@ -python update.py -python -m bot \ No newline at end of file +python3 update.py +python3 -m bot \ No newline at end of file From 77a781b4cae6052c94de00f0963eb75ed0c8cdb0 Mon Sep 17 00:00:00 2001 From: 5hojib Date: Thu, 23 Jan 2025 14:49:13 +0600 Subject: [PATCH 06/17] update requirements.txt --- requirements.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 2660eaa19..546aaa709 100644 --- a/requirements.txt +++ b/requirements.txt @@ -38,8 +38,6 @@ qbittorrent-api requests speedtest-cli telegraph -tenacity uv uvloop -xattr yt-dlp[default,curl-cffi] From 3f8e54ffb8df4086205f7736b49c1863496804e1 Mon Sep 17 00:00:00 2001 From: 5hojib Date: Thu, 23 Jan 2025 14:53:53 +0600 Subject: [PATCH 07/17] update requirements.txt --- requirements.txt | 44 +------------------------------------------- 1 file changed, 1 insertion(+), 43 deletions(-) diff --git a/requirements.txt b/requirements.txt index 546aaa709..ce2357185 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,43 +1 @@ -aiohttp -aiofiles -aioshutil -anytree==2.8.0 -apscheduler -aria2p -asyncio -beautifulsoup4 -bencoding -cinemagoer -cloudscraper -config -dnspython -electrogram -feedparser -flask -gevent -google-api-python-client -google-auth-httplib2 -google-auth-oauthlib -gunicorn -httpx -langcodes -lxml -motor -mutagen -markdown -natsort -pillow -psutil -pybase64 -pycountry -python-dotenv -pyshorteners -python-magic -pytz -qbittorrent-api -requests -speedtest-cli -telegraph -uv -uvloop -yt-dlp[default,curl-cffi] +aiohttp \ No newline at end of file From 61b0690fea1c30b0cf06f3d64f68a761d6aa9bc9 Mon Sep 17 00:00:00 2001 From: 5hojib Date: Thu, 23 Jan 2025 17:03:56 +0600 Subject: [PATCH 08/17] revert --- requirements.txt | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ce2357185..2660eaa19 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,45 @@ -aiohttp \ No newline at end of file +aiohttp +aiofiles +aioshutil +anytree==2.8.0 +apscheduler +aria2p +asyncio +beautifulsoup4 +bencoding +cinemagoer +cloudscraper +config +dnspython +electrogram +feedparser +flask +gevent +google-api-python-client +google-auth-httplib2 +google-auth-oauthlib +gunicorn +httpx +langcodes +lxml +motor +mutagen +markdown +natsort +pillow +psutil +pybase64 +pycountry +python-dotenv +pyshorteners +python-magic +pytz +qbittorrent-api +requests +speedtest-cli +telegraph +tenacity +uv +uvloop +xattr +yt-dlp[default,curl-cffi] From 4fccfe992edbe59f75032045f1fa34565128fc70 Mon Sep 17 00:00:00 2001 From: 5hojib Date: Thu, 23 Jan 2025 19:47:25 +0600 Subject: [PATCH 09/17] disable mega for a while --- bot/modules/mirror_leech.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bot/modules/mirror_leech.py b/bot/modules/mirror_leech.py index 6b6b4a4fd..03c46a5bc 100644 --- a/bot/modules/mirror_leech.py +++ b/bot/modules/mirror_leech.py @@ -20,7 +20,7 @@ is_gdrive_id, is_gdrive_link, is_magnet, - is_mega_link, + # is_mega_link, is_rclone_path, is_telegram_link, is_url, @@ -36,9 +36,9 @@ direct_link_generator, ) from bot.helper.mirror_leech_utils.download_utils.gd_download import add_gd_download -from bot.helper.mirror_leech_utils.download_utils.mega_download import ( - add_mega_download, -) +# from bot.helper.mirror_leech_utils.download_utils.mega_download import ( +# add_mega_download, +# ) from bot.helper.mirror_leech_utils.download_utils.qbit_download import add_qb_torrent from bot.helper.mirror_leech_utils.download_utils.rclone_download import ( add_rclone_download, @@ -386,8 +386,8 @@ async def new_event(self): create_task(add_qb_torrent(self, path, ratio, seed_time)) elif is_rclone_path(self.link): create_task(add_rclone_download(self, f"{path}/")) - elif is_mega_link(self.link): - create_task(add_mega_download(self, f"{path}/")) + # elif is_mega_link(self.link): + # create_task(add_mega_download(self, f"{path}/")) elif is_gdrive_link(self.link) or is_gdrive_id(self.link): create_task(add_gd_download(self, path)) else: From 27beb8607b284ad952fb377870d7c49cee4d4cf7 Mon Sep 17 00:00:00 2001 From: 5hojib Date: Thu, 23 Jan 2025 13:47:46 +0000 Subject: [PATCH 10/17] Auto-format code [skip actions] --- bot/modules/mirror_leech.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bot/modules/mirror_leech.py b/bot/modules/mirror_leech.py index 03c46a5bc..957723a84 100644 --- a/bot/modules/mirror_leech.py +++ b/bot/modules/mirror_leech.py @@ -36,6 +36,7 @@ direct_link_generator, ) from bot.helper.mirror_leech_utils.download_utils.gd_download import add_gd_download + # from bot.helper.mirror_leech_utils.download_utils.mega_download import ( # add_mega_download, # ) From 10c88e43b1ab31b07ce8a76d012dc634f819d5eb Mon Sep 17 00:00:00 2001 From: Mehedi Hasan Shojib Date: Sat, 25 Jan 2025 00:06:14 +0600 Subject: [PATCH 11/17] Update start.sh --- start.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/start.sh b/start.sh index 1decaa631..9b2bf653c 100644 --- a/start.sh +++ b/start.sh @@ -1,2 +1 @@ -python3 update.py -python3 -m bot \ No newline at end of file +python3 update.py && python3 -m bot From fb5d7cc64d61e22212302513c8e34a40efb6219b Mon Sep 17 00:00:00 2001 From: Mehedi Hasan Shojib Date: Sat, 25 Jan 2025 00:10:33 +0600 Subject: [PATCH 12/17] Update update.py --- update.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/update.py b/update.py index 1d11cdbab..ad399a4fd 100644 --- a/update.py +++ b/update.py @@ -71,7 +71,7 @@ def format(self, record: LogRecord) -> str: key: value.strip() if isinstance(value, str) else value for key, value in vars(settings).items() } -except ModuleNotFoundError: +except Exception: log_error( "The 'config.py' file is missing! Falling back to environment variables.", ) @@ -109,9 +109,9 @@ def format(self, record: LogRecord) -> str: UPSTREAM_REPO = config_file.get( "UPSTREAM_REPO", "https://github.com/AeonOrg/Aeon-MLTB", -) +) or os.getenv("UPSTREAM_REPO", "") -UPSTREAM_BRANCH = config_file.get("UPSTREAM_BRANCH", "") or "main" +UPSTREAM_BRANCH = config_file.get("UPSTREAM_BRANCH", "") or os.getenv("UPSTREAM_BRANCH", "") or "main" if UPSTREAM_REPO: if path.exists(".git"): From 9169119dae2938e59a2679f6dcf56593e46a824f Mon Sep 17 00:00:00 2001 From: 5hojib Date: Fri, 24 Jan 2025 18:10:46 +0000 Subject: [PATCH 13/17] Auto-format code [skip actions] --- update.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/update.py b/update.py index ad399a4fd..35f5c169a 100644 --- a/update.py +++ b/update.py @@ -111,7 +111,11 @@ def format(self, record: LogRecord) -> str: "https://github.com/AeonOrg/Aeon-MLTB", ) or os.getenv("UPSTREAM_REPO", "") -UPSTREAM_BRANCH = config_file.get("UPSTREAM_BRANCH", "") or os.getenv("UPSTREAM_BRANCH", "") or "main" +UPSTREAM_BRANCH = ( + config_file.get("UPSTREAM_BRANCH", "") + or os.getenv("UPSTREAM_BRANCH", "") + or "main" +) if UPSTREAM_REPO: if path.exists(".git"): From fac2df8fbf7e890fda3b143ce3a3326ccd0834d9 Mon Sep 17 00:00:00 2001 From: 5hojib Date: Sun, 26 Jan 2025 10:13:38 +0600 Subject: [PATCH 14/17] minor fix --- bot/helper/ext_utils/status_utils.py | 2 ++ bot/modules/mirror_leech.py | 13 ++++++------- update.py | 5 +---- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/bot/helper/ext_utils/status_utils.py b/bot/helper/ext_utils/status_utils.py index 47c1f402e..756a954a1 100644 --- a/bot/helper/ext_utils/status_utils.py +++ b/bot/helper/ext_utils/status_utils.py @@ -256,6 +256,8 @@ async def get_readable_message(sid, is_user, page_no=1, status="All", page_step= if status != "All" or tasks_no > 20: for label, status_value in list(STATUSES.items()): if status_value != status: + if not buttons: + buttons = ButtonMaker() buttons.data_button(label, f"status {sid} st {status_value}") button = buttons.build_menu(8) if buttons else None msg += f"CPU: {cpu_percent()}% | FREE: {get_readable_file_size(disk_usage(Config.DOWNLOAD_DIR).free)}" diff --git a/bot/modules/mirror_leech.py b/bot/modules/mirror_leech.py index 957723a84..6b6b4a4fd 100644 --- a/bot/modules/mirror_leech.py +++ b/bot/modules/mirror_leech.py @@ -20,7 +20,7 @@ is_gdrive_id, is_gdrive_link, is_magnet, - # is_mega_link, + is_mega_link, is_rclone_path, is_telegram_link, is_url, @@ -36,10 +36,9 @@ direct_link_generator, ) from bot.helper.mirror_leech_utils.download_utils.gd_download import add_gd_download - -# from bot.helper.mirror_leech_utils.download_utils.mega_download import ( -# add_mega_download, -# ) +from bot.helper.mirror_leech_utils.download_utils.mega_download import ( + add_mega_download, +) from bot.helper.mirror_leech_utils.download_utils.qbit_download import add_qb_torrent from bot.helper.mirror_leech_utils.download_utils.rclone_download import ( add_rclone_download, @@ -387,8 +386,8 @@ async def new_event(self): create_task(add_qb_torrent(self, path, ratio, seed_time)) elif is_rclone_path(self.link): create_task(add_rclone_download(self, f"{path}/")) - # elif is_mega_link(self.link): - # create_task(add_mega_download(self, f"{path}/")) + elif is_mega_link(self.link): + create_task(add_mega_download(self, f"{path}/")) elif is_gdrive_link(self.link) or is_gdrive_id(self.link): create_task(add_gd_download(self, path)) else: diff --git a/update.py b/update.py index 35f5c169a..bee5848e2 100644 --- a/update.py +++ b/update.py @@ -106,10 +106,7 @@ def format(self, record: LogRecord) -> str: except Exception as e: log_error(f"Database ERROR: {e}") -UPSTREAM_REPO = config_file.get( - "UPSTREAM_REPO", - "https://github.com/AeonOrg/Aeon-MLTB", -) or os.getenv("UPSTREAM_REPO", "") +UPSTREAM_REPO = config_file.get("UPSTREAM_REPO", "") or os.getenv("UPSTREAM_REPO", "") or "https://github.com/AeonOrg/Aeon-MLTB" UPSTREAM_BRANCH = ( config_file.get("UPSTREAM_BRANCH", "") From dfda035e391a5235aa67cdaa63aa6329feb61ff2 Mon Sep 17 00:00:00 2001 From: 5hojib Date: Sun, 26 Jan 2025 04:13:58 +0000 Subject: [PATCH 15/17] Auto-format code [skip actions] --- update.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/update.py b/update.py index bee5848e2..6e7973053 100644 --- a/update.py +++ b/update.py @@ -106,7 +106,11 @@ def format(self, record: LogRecord) -> str: except Exception as e: log_error(f"Database ERROR: {e}") -UPSTREAM_REPO = config_file.get("UPSTREAM_REPO", "") or os.getenv("UPSTREAM_REPO", "") or "https://github.com/AeonOrg/Aeon-MLTB" +UPSTREAM_REPO = ( + config_file.get("UPSTREAM_REPO", "") + or os.getenv("UPSTREAM_REPO", "") + or "https://github.com/AeonOrg/Aeon-MLTB" +) UPSTREAM_BRANCH = ( config_file.get("UPSTREAM_BRANCH", "") From a863f9170b6f1fec342a37aaf8e3d5fb68790ce4 Mon Sep 17 00:00:00 2001 From: 5hojib Date: Sun, 26 Jan 2025 10:15:57 +0600 Subject: [PATCH 16/17] update --- Dockerfile | 2 +- start.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index ea7ac8658..5ff0c0e01 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM 5hojib/aeon:beta +FROM 5hojib/aeon:latest WORKDIR /usr/src/app RUN chmod 777 /usr/src/app diff --git a/start.sh b/start.sh index 9b2bf653c..b6a631e49 100644 --- a/start.sh +++ b/start.sh @@ -1 +1 @@ -python3 update.py && python3 -m bot +python3 update.py && python3 -m bot \ No newline at end of file From 2aa33b02c0d015b03a60127d8013e2f5915b021c Mon Sep 17 00:00:00 2001 From: 5hojib Date: Sun, 26 Jan 2025 10:18:39 +0600 Subject: [PATCH 17/17] changelog is bad idea --- CHANGELOG.md | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 6d6579a32..000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,42 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## v2.0.2 - 2025-01-22 - -### Fixed - -- Resolved case sensitivity issue in document type extension checks. -- Fixed channel-related issues for mirror and leech operations. -- Addressed the issue where thumbnails were removed after a restart. - -## v2.0.1 - 2025-01-20 - -### Fixed - -- Token generation issues caused by the command suffix. - -### Removed - -- The "refresh status" and "overview status" buttons, simplifying the status interface. - -## v2.0.0 - 2025-01-18 - -### Breaking Changes - -- Rebased the project on the latest MLTB version. - -### Added - -- Integrated all new features from MLTB, excluding NZB and jDownloader. -- Introduced watermark support for videos. -- Enabled the ability to use a user session string to download private media from Telegram. -- Reintroduced RSS feed support. -- Added versioning system. -- Added `CHANGELOG.md` to track changes. - -### Removed - -- Removed certain limit-related variables such as `MIRROR LIMIT` and `LEECH LIMIT`.