v4.8.0
- Some modification in /start command - Added multiple tracker - Change to yt-dlp for more supported site (memory executed is fixed when yt-dlp) - Tidying up Co-authored-by: Sreeraj V R <SVR666@users.noreply.github.com> Co-authored-by: Ncode2014 <Ncode2014@users.noreply.github.com>
This commit is contained in:
parent
e67971855d
commit
53403b2df4
|
|
@ -23,10 +23,12 @@
|
|||
- Speedtest with picture results
|
||||
- Limiting Torrent size support
|
||||
- Sudo with Database support
|
||||
- Multiple Trackers support
|
||||
- Check Heroku dynos stats
|
||||
- Custom image support
|
||||
- Racaty.net support
|
||||
- Shell and Executor
|
||||
- Change to YT-DLP
|
||||
- Stickers module
|
||||
|
||||
## From Original Repos
|
||||
|
|
@ -111,7 +113,7 @@ cp config_sample.env config.env
|
|||
_____REMOVE_THIS_LINE_____=True
|
||||
```
|
||||
Fill up rest of the fields. Meaning of each fields are discussed below:
|
||||
### Required field
|
||||
### Required Field
|
||||
- **BOT_TOKEN**: The Telegram bot token that you get from [@BotFather](https://t.me/BotFather)
|
||||
- **TELEGRAM_API**: This is to authenticate to your Telegram account for downloading Telegram files. You can get this from https://my.telegram.org DO NOT put this in quotes.
|
||||
- **TELEGRAM_HASH**: This is to authenticate to your Telegram account for downloading Telegram files. You can get this from https://my.telegram.org
|
||||
|
|
@ -121,7 +123,7 @@ Fill up rest of the fields. Meaning of each fields are discussed below:
|
|||
- **DOWNLOAD_DIR**: The path to the local folder where the downloads should be downloaded to
|
||||
- **DOWNLOAD_STATUS_UPDATE_INTERVAL**: A short interval of time in seconds after which the Mirror progress message is updated. (I recommend to keep it `5` seconds at least)
|
||||
- **AUTO_DELETE_MESSAGE_DURATION**: Interval of time (in seconds), after which the bot deletes it's message (and command message) which is expected to be viewed instantly. (**Note**: Set to `-1` to never automatically delete messages)
|
||||
### Optional field
|
||||
### Optional Field
|
||||
- **AUTHORIZED_CHATS**: Fill user_id and chat_id of you want to authorize.
|
||||
- **IS_TEAM_DRIVE**: (Optional field) Set to `True` if `GDRIVE_FOLDER_ID` is from a Team Drive else `False` or Leave it empty.
|
||||
- **USE_SERVICE_ACCOUNTS**: (Optional field) (Leave empty if unsure) Whether to use Service Accounts or not. For this to work see [Using service accounts](https://github.com/breakdowns/slam-mirrorbot#generate-service-accounts-what-is-service-account) section below.
|
||||
|
|
|
|||
2
aria.sh
2
aria.sh
|
|
@ -1,5 +1,5 @@
|
|||
export MAX_DOWNLOAD_SPEED=0
|
||||
tracker_list=$(curl -Ns https://raw.githubusercontent.com/XIU2/TrackersListCollection/master/all.txt | awk '$1' | tr '\n' ',')
|
||||
tracker_list=$(curl -Ns https://raw.githubusercontent.com/XIU2/TrackersListCollection/master/all.txt --next https://ngosang.github.io/trackerslist/trackers_all_http.txt --next https://newtrackon.com/api/all --next https://raw.githubusercontent.com/DeSireFire/animeTrackerList/master/AT_all.txt | awk '$1' | tr '\n\n' ',')
|
||||
export MAX_CONCURRENT_DOWNLOADS=7
|
||||
|
||||
aria2c --enable-rpc --rpc-listen-all=false --rpc-listen-port 6800 --check-certificate=false \
|
||||
|
|
|
|||
|
|
@ -60,7 +60,14 @@ Type /{BotCommands.HelpCommand} to get a list of available commands
|
|||
buttons.buildbutton("Repo", "https://github.com/breakdowns/slam-mirrorbot")
|
||||
buttons.buildbutton("Support Group", "https://t.me/SlamMirrorSupport")
|
||||
reply_markup = InlineKeyboardMarkup(buttons.build_menu(2))
|
||||
update.effective_message.reply_photo(IMAGE_URL, start_string, parse_mode=ParseMode.MARKDOWN, reply_markup=reply_markup)
|
||||
LOGGER.info('UID: {} - UN: {} - MSG: {}'.format(update.message.chat.id, update.message.chat.username, update.message.text))
|
||||
if CustomFilters.authorized_user(update) or CustomFilters.authorized_chat(update):
|
||||
if update.message.chat.type == "private" :
|
||||
sendMessage(f"Hey I'm Alive 🙂", context.bot, update)
|
||||
else :
|
||||
update.effective_message.reply_photo(IMAGE_URL, start_string, parse_mode=ParseMode.MARKDOWN, reply_markup=reply_markup)
|
||||
else :
|
||||
sendMessage(f"Oops! not a Authorized user.", context.bot, update)
|
||||
|
||||
|
||||
@run_async
|
||||
|
|
@ -211,8 +218,7 @@ def main():
|
|||
remove('restart.pickle')
|
||||
bot.set_my_commands(botcmds)
|
||||
|
||||
start_handler = CommandHandler(BotCommands.StartCommand, start,
|
||||
filters=CustomFilters.authorized_chat | CustomFilters.authorized_user)
|
||||
start_handler = CommandHandler(BotCommands.StartCommand, start)
|
||||
ping_handler = CommandHandler(BotCommands.PingCommand, ping,
|
||||
filters=CustomFilters.authorized_chat | CustomFilters.authorized_user)
|
||||
restart_handler = CommandHandler(BotCommands.RestartCommand, restart,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from .download_helper import DownloadHelper
|
||||
import time
|
||||
from youtube_dl import YoutubeDL, DownloadError
|
||||
from yt_dlp import YoutubeDL, DownloadError
|
||||
from bot import download_dict_lock, download_dict
|
||||
from ..status_utils.youtube_dl_download_status import YoutubeDLDownloadStatus
|
||||
import logging
|
||||
|
|
|
|||
|
|
@ -33,21 +33,21 @@ def cancel_mirror(update, context):
|
|||
if BotCommands.MirrorCommand in update.message.text or \
|
||||
BotCommands.TarMirrorCommand in update.message.text or \
|
||||
BotCommands.UnzipMirrorCommand in update.message.text:
|
||||
msg = "Mirror Already Have Been Cancelled"
|
||||
msg = "Mirror already have been cancelled"
|
||||
sendMessage(msg, context.bot, update)
|
||||
return
|
||||
else:
|
||||
msg = "Please reply to the /mirror message which was used to start the download or /cancel gid to cancel it!"
|
||||
msg = f"Please reply to the /{BotCommands.MirrorCommand} message which was used to start the download or /{BotCommands.CancelMirror} GID to cancel it!"
|
||||
sendMessage(msg, context.bot, update)
|
||||
return
|
||||
if dl.status() == "Uploading...📤":
|
||||
sendMessage("Upload in Progress, You Can't Cancel It.", context.bot, update)
|
||||
sendMessage("Upload in Progress, You Can't Cancel it.", context.bot, update)
|
||||
return
|
||||
elif dl.status() == "Archiving...🔐":
|
||||
sendMessage("Archival in Progress, You Can't Cancel It.", context.bot, update)
|
||||
sendMessage("Archival in Progress, You Can't Cancel it.", context.bot, update)
|
||||
return
|
||||
elif dl.status() == "Extracting...📂":
|
||||
sendMessage("Extract in Progress, You Can't Cancel It.", context.bot, update)
|
||||
sendMessage("Extract in Progress, You Can't Cancel it.", context.bot, update)
|
||||
return
|
||||
else:
|
||||
dl.download().cancel_download()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import math
|
||||
import os
|
||||
import urllib.request as urllib
|
||||
from PIL import Image
|
||||
from html import escape
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ google-auth-httplib2
|
|||
google-auth-oauthlib
|
||||
heroku3
|
||||
html-telegraph-poster
|
||||
https://raw.githubusercontent.com/Ncode2014/nekadok/req/heroku-dlp-master.zip
|
||||
js2py
|
||||
lxml
|
||||
messages
|
||||
|
|
@ -26,4 +27,3 @@ speedtest-cli
|
|||
telegraph
|
||||
tenacity
|
||||
TgCrypto
|
||||
youtube_dl
|
||||
|
|
|
|||
Loading…
Reference in New Issue