Minor Change
- Change logo, thanks to instagram.com/by__faqih for logo - Add copyright - Add new command in help Signed-off-by: breakdowns <hafitz666@outlook.co.id>
This commit is contained in:
parent
452eb3635b
commit
11ce564932
|
|
@ -15,6 +15,6 @@ jobs:
|
|||
usedocker: true
|
||||
docker_heroku_process_type: web
|
||||
stack: "container"
|
||||
region: "us"
|
||||
region: "eu"
|
||||
env:
|
||||
HD_CONFIG_FILE_URL: ${{secrets.CONFIG_FILE_URL}}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[](https://youtu.be/Pk_TthHfLeE)
|
||||
[](https://t.me/SlamDevs)
|
||||
|
||||
# Slam Mirror Bot
|
||||

|
||||
|
|
@ -8,7 +8,7 @@
|
|||

|
||||
[](https://t.me/SlamMirrorUpdates)
|
||||
|
||||
**Slam Mirror Bot** is a _multipurpose_ Telegram Bot written in Python for mirroring files on the Internet to our beloved Google Drive. Based on [python-aria-mirror-bot](https://github.com/lzzy12/python-aria-mirror-bot)
|
||||
**Slam Mirror Bot** is a _multipurpose_ Telegram Bot written in Python for mirroring/leeching files on the Internet to our beloved Google Drive. Based on [python-aria-mirror-bot](https://github.com/lzzy12/python-aria-mirror-bot)
|
||||
|
||||
# Features:
|
||||
<details>
|
||||
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
## By Slam Devs
|
||||
- qBittorrent
|
||||
- Leach supported
|
||||
- Thumbnail supported
|
||||
- Size limiting for Torrent/Direct, Tar/Unzip, Mega and clone
|
||||
- Stop duplicates for all tasks except for qBittorrent and youtube-dl tasks
|
||||
- Tar/Unzip G-Drive link
|
||||
|
|
@ -169,6 +171,8 @@ Fill up rest of the fields. Meaning of each field is discussed below:
|
|||
- `SERVER_PORT`: Only For VPS even if `IS_VPS` is `False` --> Base URL Port
|
||||
- `BASE_URL_OF_BOT`: (Required for Heroku to avoid sleep/idling) Valid BASE URL of app where the bot is deployed. Format of URL should be `http://myip` (where `myip` is the IP/Domain of your bot) or if you have chosen other port than `80` then fill in this format `http://myip:port`, for Heroku fill `https://yourappname.herokuapp.com` (**NOTE**: Do not put slash at the end), still got idling? You can use http://cron-job.org to ping your Heroku app.
|
||||
- `RECURSIVE_SEARCH`: Set this to `True` to search in sub-folders with `/list` (**NOTE**: This will only work with shared-drive ID or fill `root` for main drive. Folder IDs are not compatible with it.)
|
||||
- `TG_SPLIT_SIZE`: Size Telegram split, leave it empty for max size `2GB`
|
||||
- `AS_DOCUMENT`: Should all the upload to telegram be forced as documents or not, set it `True` or `False`
|
||||
- `SHORTENER_API`: Fill your Shortener API key if you are using Shortener.
|
||||
- `SHORTENER`: if you want to use Shortener in G-Drive and index link, fill Shortener URL here. Examples:
|
||||
```
|
||||
|
|
|
|||
|
|
@ -105,6 +105,22 @@ help_string_telegraph = f'''<br>
|
|||
<br><br>
|
||||
<b>/{BotCommands.QbUnzipMirrorCommand}</b> [magnet_link]: Starts mirroring using qBittorrent and if downloaded file is any archive, extracts it to Google Drive
|
||||
<br><br>
|
||||
<b>/{BotCommands.LeechCommand}</b> This command should be used as reply to Magnet link, Torrent link, or Direct link. [this command will SPAM the chat and send the downloads a seperate files, if there is more than one file, in the specified Torrent]
|
||||
<br><br>
|
||||
<b>/{BotCommands.TarLeechCommand}</b> This command should be used as reply to Magnet link, Torrent link, or Direct link and upload it as (.tar). [this command will SPAM the chat and send the downloads a seperate files, if there is more than one file, in the specified Torrent]
|
||||
<br><br>
|
||||
<b>/{BotCommands.ZipLeechCommand}</b> This command should be used as reply to Magnet link, Torrent link, or Direct link and upload it as (.zip). [this command will SPAM the chat and send the downloads a seperate files, if there is more than one file, in the specified Torrent]
|
||||
<br><br>
|
||||
<b>/{BotCommands.UnzipLeechCommand}</b> This command should be used as reply to Magnet link, Torrent link, or Direct link and if file is any archive, extracts it. [this command will SPAM the chat and send the downloads a seperate files, if there is more than one file, in the specified Torrent]
|
||||
<br><br>
|
||||
<b>/{BotCommands.QbLeechCommand}</b> This command should be used as reply to Magnet link, Torrent link, or Direct link using qBittorrent. [this command will SPAM the chat and send the downloads a seperate files, if there is more than one file, in the specified Torrent]
|
||||
<br><br>
|
||||
<b>/{BotCommands.QbTarLeechCommand}</b> This command should be used as reply to Magnet link, Torrent link, or Direct link and upload it as (.tar) using qBittorrent. [this command will SPAM the chat and send the downloads a seperate files, if there is more than one file, in the specified Torrent]
|
||||
<br><br>
|
||||
<b>/{BotCommands.QbZipLeechCommand}</b> This command should be used as reply to Magnet link, Torrent link, or Direct link and upload it as (.zip) using qBittorrent. [this command will SPAM the chat and send the downloads a seperate files, if there is more than one file, in the specified Torrent]
|
||||
<br><br>
|
||||
<b>/{BotCommands.QbUnzipLeechCommand}</b> This command should be used as reply to Magnet link, Torrent link, or Direct link and if file is any archive, extracts it using qBittorrent. [this command will SPAM the chat and send the downloads a seperate files, if there is more than one file, in the specified Torrent]
|
||||
<br><br>
|
||||
<b>/{BotCommands.CloneCommand}</b> [drive_url]: Copy file/folder to Google Drive
|
||||
<br><br>
|
||||
<b>/{BotCommands.CountCommand}</b> [drive_url]: Count file/folder of Google Drive Links
|
||||
|
|
@ -117,6 +133,16 @@ help_string_telegraph = f'''<br>
|
|||
<br><br>
|
||||
<b>/{BotCommands.ZipWatchCommand}</b> [youtube-dl supported link]: Mirror through youtube-dl and zip before uploading
|
||||
<br><br>
|
||||
<b>/{BotCommands.LeechWatchCommand}</b> Leech through youtube-dl
|
||||
<br><br>
|
||||
<b>/{BotCommands.LeechTarWatchCommand}</b> Leech through youtube-dl and tar before uploading
|
||||
<br><br>
|
||||
<b>/{BotCommands.LeechTarWatchCommand}</b> Leech through youtube-dl and zip before uploading
|
||||
<br><br>
|
||||
<b>/{BotCommands.LeechSetCommand}</b> Leech Settings
|
||||
<br><br>
|
||||
<b>/{BotCommands.SetThumbCommand}</b> Reply to photo to set it as thumbnail for next uploads
|
||||
<br><br>
|
||||
<b>/{BotCommands.CancelMirror}</b>: Reply to the message by which the download was initiated and that download will be cancelled
|
||||
<br><br>
|
||||
<b>/{BotCommands.CancelAllCommand}</b>: Cancel all running tasks
|
||||
|
|
|
|||
|
|
@ -137,20 +137,20 @@ def get_readable_message():
|
|||
]:
|
||||
msg += f"\n<code>{get_progress_bar_string(download)}</code> {download.progress()}"
|
||||
if download.status() == MirrorStatus.STATUS_CLONING:
|
||||
msg += f"\n<b>Cloned:</b> {get_readable_file_size(download.processed_bytes())} of {download.size()}"
|
||||
msg += f"\n<b>Cloned:</b> <code>{get_readable_file_size(download.processed_bytes())}</code> of <code>{download.size()}</code>"
|
||||
elif download.status() == MirrorStatus.STATUS_UPLOADING:
|
||||
msg += f"\n<b>Uploaded:</b> {get_readable_file_size(download.processed_bytes())} of {download.size()}"
|
||||
msg += f"\n<b>Uploaded:</b> <code>{get_readable_file_size(download.processed_bytes())}</code> of <code>{download.size()}</code>"
|
||||
else:
|
||||
msg += f"\n<b>Downloaded:</b> {get_readable_file_size(download.processed_bytes())} of {download.size()}"
|
||||
msg += f"\n<b>Speed:</b> {download.speed()} <b>ETA:</b> {download.eta()}"
|
||||
msg += f"\n<b>Downloaded:</b> <code>{get_readable_file_size(download.processed_bytes())}</code> of <code>{download.size()}</code>"
|
||||
msg += f"\n<b>Speed:</b> <code>{download.speed()}</code> <b>ETA:</b> <code>{download.eta()}</code>"
|
||||
try:
|
||||
msg += f"\n<b>Seeders:</b> {download.aria_download().num_seeders}" \
|
||||
f" | <b>Peers:</b> {download.aria_download().connections}"
|
||||
msg += f"\n<b>Seeders:</b> <code>{download.aria_download().num_seeders}</code>" \
|
||||
f" | <b>Peers:</b> <code>{download.aria_download().connections}</code>"
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
msg += f"\n<b>Seeders:</b> {download.torrent_info().num_seeds}" \
|
||||
f" | <b>Leechers:</b> {download.torrent_info().num_leechs}"
|
||||
msg += f"\n<b>Seeders:</b> <code>{download.torrent_info().num_seeds}</code>" \
|
||||
f" | <b>Leechers:</b> <code>{download.torrent_info().num_leechs}</code>"
|
||||
except:
|
||||
pass
|
||||
msg += f"\n<b>To Stop:</b> <code>/{BotCommands.CancelMirror} {download.gid()}</code>"
|
||||
|
|
@ -159,7 +159,7 @@ def get_readable_message():
|
|||
break
|
||||
if STATUS_LIMIT is not None:
|
||||
if dick_no > STATUS_LIMIT:
|
||||
msg += f"<b>Page:</b> {PAGE_NO}/{pages} | <b>Tasks:</b> {dick_no}\n"
|
||||
msg += f"<b>Page:</b> <code>{PAGE_NO}</code>/<code>{pages}</code> | <b>Tasks:</b> <code>{dick_no}</code>\n"
|
||||
buttons = button_build.ButtonMaker()
|
||||
buttons.sbutton("Previous", "pre")
|
||||
buttons.sbutton("Next", "nex")
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
# Implement By - @anasty17 (https://github.com/SlamDevs/slam-mirrorbot/commit/d888a1e7237f4633c066f7c2bbfba030b83ad616)
|
||||
# (c) https://github.com/SlamDevs/slam-mirrorbot
|
||||
# All rights reserved
|
||||
|
||||
from .status import Status
|
||||
from bot.helper.ext_utils.bot_utils import get_readable_file_size, MirrorStatus
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
# Implement By - @anasty17 (https://github.com/SlamDevs/slam-mirrorbot/commit/d888a1e7237f4633c066f7c2bbfba030b83ad616)
|
||||
# (c) https://github.com/SlamDevs/slam-mirrorbot
|
||||
# All rights reserved
|
||||
|
||||
from .status import Status
|
||||
from bot.helper.ext_utils.bot_utils import MirrorStatus, get_readable_file_size, get_readable_time
|
||||
from bot import DOWNLOAD_DIR
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
# Implement By - @anasty17 (https://github.com/SlamDevs/slam-mirrorbot/commit/d888a1e7237f4633c066f7c2bbfba030b83ad616)
|
||||
# (c) https://github.com/SlamDevs/slam-mirrorbot
|
||||
# All rights reserved
|
||||
|
||||
import os
|
||||
import logging
|
||||
import time
|
||||
|
|
@ -146,5 +150,3 @@ class TgUploader:
|
|||
self.is_cancelled = True
|
||||
LOGGER.info(f"Cancelling Upload: {self.name}")
|
||||
self.__listener.onUploadError('your upload has been stopped!')
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -71,9 +71,9 @@ def update_all_messages():
|
|||
free = get_readable_file_size(free)
|
||||
currentTime = get_readable_time(time.time() - botStartTime)
|
||||
msg, buttons = get_readable_message()
|
||||
msg += f"<b>CPU:</b> {psutil.cpu_percent()}%" \
|
||||
f" <b>RAM:</b> {psutil.virtual_memory().percent}%" \
|
||||
f" <b>DISK:</b> {psutil.disk_usage('/').percent}%"
|
||||
msg += f"<b>CPU:</b> <code>{psutil.cpu_percent()}%</code>" \
|
||||
f" <b>RAM:</b> <code>{psutil.virtual_memory().percent}%</code>" \
|
||||
f" <b>DISK:</b> <code>{psutil.disk_usage('/').percent}%</code>"
|
||||
with download_dict_lock:
|
||||
dlspeed_bytes = 0
|
||||
uldl_bytes = 0
|
||||
|
|
@ -91,7 +91,7 @@ def update_all_messages():
|
|||
uldl_bytes += float(speedy.split('M')[0]) * 1048576
|
||||
dlspeed = get_readable_file_size(dlspeed_bytes)
|
||||
ulspeed = get_readable_file_size(uldl_bytes)
|
||||
msg += f"\n<b>FREE:</b> {free} | <b>UPTIME:</b> {currentTime}\n<b>DL:</b> {dlspeed}/s 🔻 | <b>UL:</b> {ulspeed}/s 🔺\n"
|
||||
msg += f"\n<b>FREE:</b> <code>{free}</code> | <b>UPTIME:</b> <code>{currentTime}</code>\n<b>DL:</b> <code>{dlspeed}/s</code> 🔻 | <b>UL:</b> <code>{ulspeed}/s</code> 🔺\n"
|
||||
with status_reply_dict_lock:
|
||||
for chat_id in list(status_reply_dict.keys()):
|
||||
if status_reply_dict[chat_id] and msg != status_reply_dict[chat_id].text:
|
||||
|
|
@ -112,9 +112,9 @@ def sendStatusMessage(msg, bot):
|
|||
free = get_readable_file_size(free)
|
||||
currentTime = get_readable_time(time.time() - botStartTime)
|
||||
progress, buttons = get_readable_message()
|
||||
progress += f"<b>CPU:</b> {psutil.cpu_percent()}%" \
|
||||
f" <b>RAM:</b> {psutil.virtual_memory().percent}%" \
|
||||
f" <b>DISK:</b> {psutil.disk_usage('/').percent}%"
|
||||
progress += f"<b>CPU:</b> <code>{psutil.cpu_percent()}%</code>" \
|
||||
f" <b>RAM:</b> <code>{psutil.virtual_memory().percent}%</code>" \
|
||||
f" <b>DISK:</b> <code>{psutil.disk_usage('/').percent}%</code>"
|
||||
with download_dict_lock:
|
||||
dlspeed_bytes = 0
|
||||
uldl_bytes = 0
|
||||
|
|
@ -132,7 +132,7 @@ def sendStatusMessage(msg, bot):
|
|||
uldl_bytes += float(speedy.split('M')[0]) * 1048576
|
||||
dlspeed = get_readable_file_size(dlspeed_bytes)
|
||||
ulspeed = get_readable_file_size(uldl_bytes)
|
||||
progress += f"\n<b>FREE:</b> {free} | <b>UPTIME:</b> {currentTime}\n<b>DL:</b> {dlspeed}/s 🔻 | <b>UL:</b> {ulspeed}/s 🔺\n"
|
||||
progress += f"\n<b>FREE:</b> <code>{free}</code> | <b>UPTIME:</b> <code>{currentTime}</code>\n<b>DL:</b> <code>{dlspeed}/s</code> 🔻 | <b>UL:</b> <code>{ulspeed}/s</code> 🔺\n"
|
||||
with status_reply_dict_lock:
|
||||
if msg.message.chat.id in list(status_reply_dict.keys()):
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
# Implement By - @anasty17 (https://github.com/SlamDevs/slam-mirrorbot/commit/d888a1e7237f4633c066f7c2bbfba030b83ad616)
|
||||
# (c) https://github.com/SlamDevs/slam-mirrorbot
|
||||
# All rights reserved
|
||||
|
||||
import os
|
||||
import threading
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@ IGNORE_PENDING_REQUESTS = ""
|
|||
USE_SERVICE_ACCOUNTS = ""
|
||||
INDEX_URL = ""
|
||||
STATUS_LIMIT = "" # Recommend limit status to 4 tasks
|
||||
TG_SPLIT_SIZE = "" # leave it empty for max size(2GB)
|
||||
# Leech
|
||||
TG_SPLIT_SIZE = "" # leave it empty for max size (2GB)
|
||||
AS_DOCUMENT = ""
|
||||
UPTOBOX_TOKEN = ""
|
||||
MEGA_API_KEY = ""
|
||||
|
|
|
|||
Loading…
Reference in New Issue