Commit Graph

315 Commits

Author SHA1 Message Date
Hafitz Setya 35e636cc23
Update gdriveTools.py 2021-02-14 20:43:34 +07:00
Hafitz Setya cffd94501a
Fix TG unzipmirror 2021-02-14 11:03:53 +07:00
Hafitz Setya a999fe00c2
Fix restart if user has not mirrored anything 2021-02-14 10:52:24 +07:00
Hafitz Setya fbd77ae313
Session String (#2)
* Update README.md

* Update README.md

* Update gdriveTools.py
2021-02-14 09:57:29 +07:00
Hafitz Setya 8f94e54696
Update gdriveTools.py 2021-02-14 04:17:31 +07:00
Hafitz Setya cf506b283a
Change to English 2021-02-13 19:29:02 +07:00
4amparaboy 884b653cc6
Update __main__.py 2021-02-13 19:10:36 +07:00
4amparaboy ec85e8e4c1
Update bot_commands.py 2021-02-13 19:10:12 +07:00
4amparaboy 91b796e20d
Update gdriveTools.py 2021-02-13 19:09:26 +07:00
4amparaboy c6df641282
Create delete.py 2021-02-13 19:07:59 +07:00
4amparaboy 6bb946b6b6
Update clone.py 2021-02-13 19:07:18 +07:00
Hafitz Setya 2b0681001d
Update stickers.py 2021-02-11 19:23:05 +07:00
Hafitz Setya 71e705ffe3
Update anime.py 2021-02-11 19:21:54 +07:00
Hafitz Setya 990d244e81
Update __main__.py 2021-02-11 19:20:46 +07:00
blank x 11bd13a756 add nyaa and sukebei torrent search function 2020-11-28 21:31:05 +05:30
jaskaranSM 9fd1269dd9 add shell and executor 2020-11-13 18:26:33 +05:30
DragSama 250a0155f7 add anime and stickers mod 2020-11-13 18:21:53 +05:30
Chizuru 22e38bb099 few changes 2020-11-13 18:12:58 +05:30
lzzy12 952a661b62 Merge remote-tracking branch 'origin/staging-4.0' into master
# Conflicts:
#	Dockerfile
#	bot/helper/ext_utils/bot_utils.py
#	bot/helper/mirror_utils/download_utils/aria2_download.py
#	bot/modules/mirror.py
#	requirements.txt
2020-09-13 22:38:45 +05:30
Dev Singh Rajput 009746aa01 added ability of extracting .7z files (#144) 2020-07-31 20:21:42 +05:30
Shubham dubey 10593d8a66 Fix /list if fileName string contains multiple quotes (#141) 2020-07-31 20:06:01 +05:30
jaskaranSM 0096b6328c Revert "Implement mega.nz support"
This reverts commit 45f75fb7a6.
2020-07-31 20:06:01 +05:30
lzzy12 1aed50a5f4 Fixed multiple /unzipmirror commands gets all the mirrors stuck
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-06-28 14:51:55 +05:30
lzzy12 b5a162f15d Use subprocess.run to call extract shell script
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-06-27 23:40:47 +05:30
lzzy12 e77290528e Fixed downloads from torrent files won't show seeders and peers
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>

# Conflicts:
#	bot/helper/mirror_utils/download_utils/aria2_download.py
2020-06-27 20:28:30 +05:30
jaskaranSM b042030760 Implement Centralized Aria Websocket Listener
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-06-23 18:39:15 +05:30
jaskaranSM e4ecc60407 Optimize Clone implementation 2020-06-23 17:09:49 +05:30
jaskaranSM 53c34db027 Added cpu and ram usage in stats 2020-06-21 14:02:24 +05:30
jaskaranSM 1b79bbda6e Fix error extraction 2020-06-21 13:39:15 +05:30
lzzy12 45f75fb7a6 Fix crash if Mega API key is not provided
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-06-19 15:34:18 +05:30
jaskaranSM c6a430a44d Handle more exceptions 2020-06-18 12:59:52 +05:30
jaskaranSM 3720eacf13 Optimize Clone implementation 2020-06-18 12:57:31 +05:30
lzzy12 c4c7575000 Generate our own gid for mega mirrors
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-06-05 14:01:36 +05:30
lzzy12 c791b39785 Revert "Improved upload progress implementation"
This reverts commit 0f7b79f7a4.
2020-06-05 13:20:40 +05:30
lzzy12 3217b67df0 Fixup for meganz login
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-06-05 13:15:00 +05:30
lzzy12 8bd01276be Add ability to login to mega account for premium accounts
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-06-03 11:32:09 +05:30
lzzy12 df655a356c Import mega api key from config.env file
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-05-28 21:03:15 +05:30
jaskaranSM 578eeb4004 Implement Mega.nz mirror support.
- Co-authored by - lzzy12 (github.com/lzzy12)
2020-05-28 15:17:19 +05:30
Yash Garg 3f45ba6a73
Fix start message using f strings (#94)
Fixes #90
2020-05-28 08:23:02 +05:30
Nageen Chand b6b8a416e9
add ability to unzip files (#93)
handle unsupported request

use shell utils to extract archives

use shell utils to extract archives

update mirror calls for unzipmirror

fix extract location of files

install deps

handling if archive is not extracted correctly

typo fix

implement Extract Status

handle filenames with spaces

handle special character
2020-05-28 00:26:22 +05:30
Adnan Ahmad 9f5942deaa
Fixed Start message after changing HelpCommand (#90) 2020-05-23 16:57:02 +05:30
lzzy12 f3a3ed05f4 Fixed cancel by gid after f4290210b1
- This fixes #77

Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-05-21 17:25:11 +05:30
lzzy12 0f7b79f7a4 Improved upload progress implementation
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-05-21 13:08:50 +05:30
jaskaranSM cdefe12348 Implement Centralized Aria Websocket Listener 2020-05-15 13:34:09 +05:30
lzzy12 f4290210b1 Implemented mirror ownership
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-05-14 19:02:33 +05:30
jaskaranSM 3c04dc4a6c handle exception in onUploadError 2020-05-12 14:34:07 +05:30
jaskaranSM 1670b619ae Fix deadlock 2020-05-12 14:27:24 +05:30
jaskaranSM a196ce5b93 Handle TG exceptions 2020-05-12 13:56:57 +05:30
jaskaranSM c4e81d5ab1 start Aria2 Websocket listener before adding download in queue. 2020-05-12 13:50:16 +05:30
lzzy12 d3938784ac Remove broken direct download link extracters
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-05-09 00:10:09 +05:30
lzzy12 1d8c8ce954 restart: Clean downloads before restarting
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-05-09 00:05:35 +05:30
jaskaranSM 315108e7d1 patch regex for more links 2020-05-05 10:51:55 +05:30
jaskaranSM 4d964b6e29 use regex to extract fileId from GDrive links 2020-05-04 12:25:40 +05:30
Youssif Shaaban Alsager b02990d9eb
restart: inform the user that restarting is complete (#67)
Signed-off-by: yshalsager <ysh-alsager@hotmail.com>
2020-04-25 21:13:25 +05:30
Arsalan 4410f4e8aa
fixed hardcoded /watch for custom command users (#66) 2020-04-22 11:41:51 +05:30
Youssif Shaaban Alsager 63a67d7a14
Add restart command (#53)
* Add restart command

This is handy when you need to restart the bot when something goes wrong.

Currently, the bot restarts but doesn't send a message after restarting
is done, feel free to improve this. It'll need something like storing
bot status locally then on bot start, if restart status exists send
a message.

Signed-off-by: yshalsager <ysh-alsager@hotmail.com>

* restart: switch to context based callbacks

* restart: restrict the command to owner only

Co-authored-by: Shivam Jha <jhashivam2020@gmail.com>
2020-04-21 15:33:05 +05:30
jaskaranSM 78b60d6715
import threading lib 2020-04-19 14:58:35 +05:30
jaskaranSM 8624e0174b Fix IO Block on Large Playlists 2020-04-18 14:32:01 +05:30
jaskaranSM 236b6eb30e use args from CallbackContext 2020-04-16 13:28:44 +05:30
jaskaranSM 8341fe08c8 watch: context based callbacks 2020-04-16 13:00:35 +05:30
jaskaranSM 120ca7538d clone: remove forward slash 2020-04-16 12:39:46 +05:30
jaskaranSM e5bb8e55ef Clone fix and added index link support 2020-04-16 12:38:12 +05:30
jaskaranSM d7bc8f3c9a switch to context based callbacks 2020-04-16 12:26:28 +05:30
lzzy12 c6b4c542b7 fixup after e0f4c4347c
- Also fixed copying of netrc file in the container

Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-04-15 14:47:33 +05:30
lzzy12 e0f4c4347c Separate out youtube-dl command
- /watch [youtube-dl supported link]

Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-04-14 23:20:52 +05:30
lzzy12 e5364f96e1 Revert "Handle rare bug when download is not deleted from download_dict on error"
This reverts commit 136924ffd4.

Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-04-13 13:32:39 +05:30
lzzy12 76e3db1946 [Hotfix] Fix bug where the link have 302 request are treated as torrents
Download.is_torrent introduced in aria2p v0.9.0
https://github.com/pawamoy/aria2p/issues/53

Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-04-08 19:29:59 +05:30
Arsalan ed60afa9d6
fix typo in INDEX_URL (#54) 2020-04-07 20:36:04 +05:30
lzzy12 b2f2ee4335 Fix aria downloads cancellation after b58eb87b11
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-04-06 13:14:40 +05:30
lzzy12 47dd3c2b6f gdriveTools: Handle unhandled exception in clone method
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-04-05 14:12:13 +05:30
lzzy12 0536472e28 Expose message object from Status objects
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-04-05 13:28:35 +05:30
lzzy12 b58eb87b11 Improvements in cancelling mirrors
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-04-05 12:34:08 +05:30
jaskaranSM 708e6df87a youtube-dl: use best format 2020-04-01 12:07:29 +05:30
lzzy12 50ab740219 Correct filename if ffmpeg conversion is invoked by yt-dl
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-31 17:56:57 +05:30
lzzy12 a54fc42e1e Handle some exceptions
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-31 15:42:13 +05:30
lzzy12 e2c5c8beaf Log youtube-dl warnings and errors in bot log
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-31 11:15:09 +05:30
lzzy12 85d4005c16 Use netrc by default for youtube-dl
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-31 10:50:53 +05:30
lzzy12 9fa41f68c1 Some minor Fix-ups
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-30 18:16:54 +05:30
lzzy12 136924ffd4 Handle rare bug when download is not deleted from download_dict on error
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-30 17:46:56 +05:30
jaskaranSM 52e8fbec11 Fixed direct link torrent mirroring
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-30 17:05:55 +05:30
lzzy12 3754e8b3ce Fix tg torrent file mirror broken
since 7d74cf29d8

Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-30 17:02:31 +05:30
lzzy12 0ec499ff4a Handle weird path naming of youtube_dl
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-30 16:36:12 +05:30
lzzy12 141b13b52d Make ydl object local to the methods
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-30 14:55:29 +05:30
lzzy12 3bf9e0ea31 Use default quality provided by youtube-dl for now
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-28 20:14:43 +05:30
jaskaranSM 6262b26fe5 youtube-dl: fixed downloading from sites that provide encrypted content (m3u8) 2020-03-28 18:44:02 +05:30
lzzy12 7c304d449a Fix uploading for YT-DL
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-28 14:38:08 +05:30
lzzy12 9057d3fc4e Fixed yt-dl support
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-28 13:47:19 +05:30
jaskaranSM 3a06458609 Added Youtube-dl support
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-27 20:04:13 +05:30
lzzy12 2254444378 Handle KeyError exception in Telegram download error
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-27 16:00:37 +05:30
lzzy12 0de6915222 Remove redundant exception classes and fix existing ones
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-27 14:35:51 +05:30
Shivam Jha 6d07c3c8c4
Stop trying to generate sourceforge direct links 2020-03-26 16:02:36 +05:30
jaskaranSM be9c64a9aa Use Service Accounts for Cloning if availble.
- increase default timeout for network socket interface

Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-25 18:00:33 +05:30
jaskaranSM 08a71e4bd4 TeamDrive List fix
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-24 18:57:10 +05:30
lzzy12 6ca2f479d5 Fix up errors after porting service accounts from develop
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-24 16:30:03 +05:30
lzzy12 25856bfac0 gdrive: Stop spamming logs at INFO log level
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-24 15:49:04 +05:30
jaskaranSM 8d1bf5aa92 recursively try again instead of handling switch with backoff
- Handling service account switching with exponential backoff implementation limits the number of service accounts to be used. recursively retrying again after switch doesnt effect backoff.

Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-24 15:41:59 +05:30
jaskaranSM 6cd59d5a15 Cleanup drive_list and minor fixes
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-24 15:39:57 +05:30
jaskaranSM 681b8bd47d Added missing property 2020-03-24 15:07:45 +05:30
jaskaranSM 2bbfca0496 Refactor service account implementation
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-24 15:07:23 +05:30
lzzy12 7ad7d9388a Add support for service account
Adding support service accounts

Signed-off-by: lzzy12 <jhashivam2020@gmail.com>

Added scripts and docs for generating service accounts

Signed-off-by: lzzy12 <jhashivam2020@gmail.com>

gen_sa_accounts: Save credentials with indexed file name

Signed-off-by: lzzy12 <jhashivam2020@gmail.com>

gdriveTools: Avoid using oauth2 library for service accounts

oauth2 library is deprecated

Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-24 15:04:24 +05:30