Commit Graph

211 Commits

Author SHA1 Message Date
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
jaskaranSM 997e572b69 Enable TeamDrive support for clone 2020-03-24 14:17:50 +05:30
lzzy12 94b6be4c03 Add licensing and authorship information for direct_link_generator.py
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-23 15:41:53 +05:30
lzzy12 f50981b3a2 Implement cancel downloads of tg mirrors
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-23 15:21:54 +05:30
lzzy12 9369c7dc98 Allow mirroring tg file again once file download is complete
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-23 14:49:57 +05:30
lzzy12 7d74cf29d8 Fixed support for mirror of video and audio telegram files
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-22 16:30:57 +05:30
lzzy12 d6a513e77b Fix typo in direct_link_generator.py
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-22 15:48:14 +05:30
lzzy12 b4b0dcd3f8 Improve logic for parsing id from gdrive url
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-22 15:05:12 +05:30
lzzy12 49fe46bad3 Add gid method in Status class for download classes
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-22 15:05:12 +05:30
jaskaranSM a44d0da9f6 Implement cancellation of downloads by gid 2020-03-22 15:05:11 +05:30
jaskaranSM 6b60ca4491 Squash of clone command
Implement clone feature
- clones a public/driveAccountAccessible Drive Link to bot G-Drive

use BotCommands for clone command trigger
2020-03-22 15:05:11 +05:30
lzzy12 94ccdcbeef Add support for mirror of telegram files
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>

Add a script to generate string session for user

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

Some fix ups

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

Fix telegram download

Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-22 15:04:31 +05:30
lzzy12 898977df97 Use proper url-encoding methods to replace special characters from url
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-20 17:03:33 +05:30
lzzy12 4207f139e4 Revert "Dockerfile: Move to smaller alpine base image"
This reverts commit 697017fb86.
2020-03-19 16:22:27 +05:30
lzzy12 cfe6f2fad4 Revert "Dockerfile: Fix lxml package name"
This reverts commit d5cfa793aa.
2020-03-19 16:22:03 +05:30
lzzy12 d5cfa793aa Dockerfile: Fix lxml package name
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-19 15:58:57 +05:30
jaskaranSM afc2808acc Rewrite tar function
- shutil changes pwd while archiving. as some functions of bot require relative paths, it is neccesary to keep pwd as bot root dir.

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

# Conflicts:
#	bot/helper/ext_utils/fs_utils.py
2020-03-19 15:43:04 +05:30
lzzy12 36df3aa2b4 Improve logic for determining true/false from config.env
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>

# Conflicts:
#	bot/modules/mirror.py
2020-03-19 15:40:43 +05:30
lzzy12 ae9d972add Tag the author of replied message of mirror command
This closes #24

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

# Conflicts:
#	bot/modules/mirror.py
2020-03-19 15:36:11 +05:30
lzzy12 697017fb86 Dockerfile: Move to smaller alpine base image
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-19 15:33:03 +05:30
lzzy12 57afb01b63 Dockerfile: Add missing dependencies
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-19 15:26:57 +05:30
lzzy12 7ba7bc92ac Add support for Direct Download generation
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-03-19 14:22:33 +05:30
Shivam Jha 1ebd416f42
[HOTFIX] Remove pinning of httplib2
Google fixed their shit, see https://github.com/googleapis/google-api-python-client/issues/803
2020-03-14 11:26:24 +05:30
lzzy12 2fddd06178 Fixed upload of empty files for Team Drive
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-02-05 02:49:54 -08:00
jaskaranSM 8cbe2c29e4 Added peers and seeders count for bittorent downloads
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-02-05 02:45:38 -08:00
Shivam Jha 96e623ef57
UploadStatus: Handle exception ZeroDivisionError 2020-02-05 01:52:43 -08:00
jaskaranSM 05468196e3
Fix Status Message 2020-01-20 09:19:49 +05:30
Shivam Jha 5c1a9c71b7
gdriveTools: Hardcode interval for updating progress 2020-01-17 01:34:52 -08:00
Shivam Jha 38348fc2aa
Revert "Set logging level to debug"
This reverts 687321ac72
2020-01-17 01:14:54 -08:00
Shivam Jha 641197bbca
Force httplib2 to v0.15.0
The new version breaks, google's client api. Force it to use older version until google fixes their shit
2020-01-17 00:20:29 -08:00
Shivam Jha 687321ac72
Set logging level to debug 2020-01-16 10:46:50 -08:00
Aki 351d4030a8 fs_utils.py: Use python-magic for guessing mimetype (#31)
1. mimetypes is not a reliable way to know the mime type of a file.

2. python-magic uses libmagic which identifies file types by checking their headers according to a predefined list of file types.

	https://github.com/ahupp/python-magic
2020-01-16 09:06:55 -08:00
Shivam Jha 00a8e57467
Fixed error in gdrivetools 2020-01-10 17:36:51 +05:30
lzzy12 e982c47252 Drop official support for heroku
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-01-10 17:29:12 +05:30
lzzy12 2d1cbe0695 Change the roadmap of the project
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-01-04 07:55:55 +05:30
jaskaranSM 5598159626
Refactor parse logic 2020-01-04 07:46:23 +05:30
lzzy12 326129fdeb Make Oauth Scope a list as it should be
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-01-04 07:42:55 +05:30
lzzy12 e5f997d1f3 Revert "Fixed potential race conditions in GoogleDriveHelper class"
This reverts commit 20dae25dc9.

Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
2020-01-03 10:41:54 +05:30
jaskaranSM 7b2d5d50ab Implement Exponential Backoff
- for handling Google Drive API errors such as 5xx,4xx
2020-01-03 10:15:40 +05:30
jaskaranSM 1543da735c Fixed bugs in MirrorListener 2020-01-02 13:41:39 +05:30
jaskaranSM b84ffcc416 prevent cleaning of uploading/archiving downloads 2020-01-02 10:25:45 +05:30
jaskaranSM f11e9a206c
give execution permissions to aria.sh 2020-01-01 10:44:39 +05:30
jaskaranSM 22d5797942 Fixed variable assignment 2019-12-29 20:20:16 +05:30
jaskaranSM a64b1b5346 Fixed stucked downloads when stopped via aria bt-stop-timeout 2019-12-29 19:50:01 +05:30