Tidying up
This commit is contained in:
parent
3589065196
commit
8935a0e27d
|
|
@ -26,6 +26,7 @@
|
|||
- Multiple Trackers support
|
||||
- Check Heroku dynos stats
|
||||
- Custom image support
|
||||
- Counting file/folders
|
||||
- Racaty.net support
|
||||
- Shell and Executor
|
||||
- Stickers module
|
||||
|
|
@ -117,7 +118,7 @@ Fill up rest of the fields. Meaning of each fields are discussed below:
|
|||
- **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
|
||||
- **OWNER_ID**: The Telegram user ID (not username) of the Owner of the bot
|
||||
- **DATABASE_URL**: Your Database URL. See [Generate Database](https://github.com/breakdowns/slam-mirrorbot/tree/master#generate-database) to generate database. (**NOTE**: If you deploying on Heroku, no need to generate database manually, because it will automatic generate database when first deploying)
|
||||
- **DATABASE_URL**: Your Database URL. See [Generate Database](https://github.com/breakdowns/slam-mirrorbot/tree/master#generate-database) to generate database. (**NOTE**: Leave this empty if You deploying on Heroku with PostgreSQL, for using another database with Heroku just make the name of the var (DATABASE_URL), for vps You must fill database url here)
|
||||
- **GDRIVE_FOLDER_ID**: This is the folder ID of the Google Drive Folder to which you want to upload all the mirrors.
|
||||
- **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)
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ def bot_help(update, context):
|
|||
|
||||
/{BotCommands.CloneCommand}: Copy file/folder to Google Drive
|
||||
|
||||
/{BotCommands.CountCommand}: Count files/folders of G-Drive Links
|
||||
/{BotCommands.CountCommand}: Count file/folder of Google Drive Links
|
||||
|
||||
/{BotCommands.DeleteCommand} [link]: Delete file from Google Drive (Only Owner & Sudo)
|
||||
|
||||
|
|
@ -161,7 +161,7 @@ def bot_help(update, context):
|
|||
|
||||
/{BotCommands.CloneCommand}: Copy file/folder to Google Drive
|
||||
|
||||
/{BotCommands.CountCommand}: Count files/folders of G-Drive Links
|
||||
/{BotCommands.CountCommand}: Count file/folder of Google Drive Links
|
||||
|
||||
/{BotCommands.WatchCommand} [youtube-dl supported link]: Mirror through youtube-dl. Click /{BotCommands.WatchCommand} for more help.
|
||||
|
||||
|
|
@ -197,6 +197,7 @@ BotCommand(f'{BotCommands.MirrorCommand}', 'Start Mirroring'),
|
|||
BotCommand(f'{BotCommands.TarMirrorCommand}','Upload tar (zipped) file'),
|
||||
BotCommand(f'{BotCommands.UnzipMirrorCommand}','Extract files'),
|
||||
BotCommand(f'{BotCommands.CloneCommand}','Copy file/folder to Drive'),
|
||||
BotCommand(f'{BotCommands.CountCommand}','Count file/folder of Drive Links'),
|
||||
BotCommand(f'{BotCommands.WatchCommand}','Mirror YT-DL support link'),
|
||||
BotCommand(f'{BotCommands.TarWatchCommand}','Mirror Youtube playlist link as tar'),
|
||||
BotCommand(f'{BotCommands.CancelMirror}','Cancel a task'),
|
||||
|
|
|
|||
|
|
@ -323,9 +323,9 @@ class GoogleDriveHelper:
|
|||
dir_id = self.create_directory(meta.get('name'), parent_id)
|
||||
result = self.cloneFolder(meta.get('name'), meta.get('name'), meta.get('id'), dir_id)
|
||||
msg += f'<b>Filename: </b><code>{meta.get("name")}</code>\n<b>Size: </b><code>{get_readable_file_size(self.transferred_size)}</code>'
|
||||
msg += f"\n\n<b>Type : </b>Folder"
|
||||
msg += f"\n<b>SubFolders : </b>{self.total_folders}"
|
||||
msg += f"\n<b>Files : </b>{self.total_files}"
|
||||
msg += f'\n\n<b>Type: </b>Folder'
|
||||
msg += f'\n<b>SubFolders: </b>{self.total_folders}'
|
||||
msg += f'\n<b>Files: </b>{self.total_files}'
|
||||
durl = self.__G_DRIVE_DIR_BASE_DOWNLOAD_URL.format(dir_id)
|
||||
buttons = button_build.ButtonMaker()
|
||||
if SHORTENER is not None and SHORTENER_API is not None:
|
||||
|
|
@ -363,7 +363,7 @@ class GoogleDriveHelper:
|
|||
typeee = 'File'
|
||||
try:
|
||||
msg += f'\n<b>Size: </b><code>{get_readable_file_size(int(meta.get("size")))}</code>'
|
||||
msg += f"\n\n<b>Type : </b>{typeee}"
|
||||
msg += f'\n\n<b>Type: </b>{typeee}'
|
||||
except TypeError:
|
||||
pass
|
||||
if INDEX_URL is not None:
|
||||
|
|
@ -612,13 +612,13 @@ class GoogleDriveHelper:
|
|||
LOGGER.info(f"Counting: {name}")
|
||||
if drive_file['mimeType'] == self.__G_DRIVE_DIR_MIME_TYPE:
|
||||
self.gDrive_directory(**drive_file)
|
||||
msg += f'<b>Filename : </b><code>{name}</code>'
|
||||
msg += f'\n\n<b>Size : </b>{get_readable_file_size(self.total_bytes)}'
|
||||
msg += f"\n\n<b>Type : </b>Folder"
|
||||
msg += f"\n<b>SubFolders : </b>{self.total_folders}"
|
||||
msg += f"\n<b>Files : </b>{self.total_files}"
|
||||
msg += f'<b>Filename: </b><code>{name}</code>'
|
||||
msg += f'\n<b>Size: </b>{get_readable_file_size(self.total_bytes)}'
|
||||
msg += f'\n\n<b>Type: </b>Folder'
|
||||
msg += f'\n<b>SubFolders: </b>{self.total_folders}'
|
||||
msg += f'\n<b>Files: </b>{self.total_files}'
|
||||
else:
|
||||
msg += f'<b>Filename : </b><code>{name}</code>'
|
||||
msg += f'<b>Filename: </b><code>{name}</code>'
|
||||
try:
|
||||
typee = drive_file['mimeType']
|
||||
except:
|
||||
|
|
@ -626,9 +626,9 @@ class GoogleDriveHelper:
|
|||
try:
|
||||
self.total_files += 1
|
||||
self.gDrive_file(**drive_file)
|
||||
msg += f'\n\n<b>Size : </b><code>{get_readable_file_size(self.total_bytes)}</code>'
|
||||
msg += f"\n\n<b>Type : </b>{typee}"
|
||||
msg += f"\n<b>Files : </b>{self.total_files}"
|
||||
msg += f'\n<b>Size: </b><code>{get_readable_file_size(self.total_bytes)}</code>'
|
||||
msg += f'\n\n<b>Type: </b>{typee}'
|
||||
msg += f'\n<b>Files: </b>{self.total_files}'
|
||||
except TypeError:
|
||||
pass
|
||||
except Exception as err:
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ AUTO_DELETE_MESSAGE_DURATION = 20
|
|||
IS_TEAM_DRIVE = ""
|
||||
TELEGRAM_API =
|
||||
TELEGRAM_HASH = ""
|
||||
DATABASE_URL = "" #Leave this empty if You deploying on heroku with PostgreSQL, for using another database with Heroku just make the name of the var (DATABASE_URL), for vps You must fill database url here
|
||||
DATABASE_URL = "" #Leave this empty if You deploying on Heroku with PostgreSQL, for using another database with Heroku just make the name of the var (DATABASE_URL), for vps You must fill database url here
|
||||
# Optional config
|
||||
AUTHORIZED_CHATS = ""
|
||||
USE_SERVICE_ACCOUNTS = ""
|
||||
|
|
|
|||
Loading…
Reference in New Issue