Skip to content

Commit

Permalink
Remove Torrent search
Browse files Browse the repository at this point in the history
  • Loading branch information
Hafitz Setya authored Aug 29, 2021
1 parent c491005 commit 4ed0c36
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 365 deletions.
26 changes: 12 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@
- View Link button
- Shell and Executor
- Speedtest
- Torrent search Supported:
```
nyaa.si, sukebei, 1337x, piratebay,
tgx, yts, eztv, torlock, rarbg
```
- Direct links Supported:
```
letsupload.io, hxfile.co, anonfiles.com, bayfiles.com, antfiles,
Expand Down Expand Up @@ -83,7 +78,9 @@ For Debian based distros
```
sudo apt install python3
```
Install Docker by following the [official Docker docs](https://docs.docker.com/engine/install/debian/), or:
Install Docker by following the [official Docker docs](https://docs.docker.com/engine/install/debian/)

OR
```
sudo snap install docker
```
Expand All @@ -110,7 +107,7 @@ pip3 install -r requirements-cli.txt
- Copy your database url, and fill to `DATABASE_URL` in config

**2. Using Heroku PostgreSQL**
<p><a href="https://dev.to/prisma/how-to-setup-a-free-postgresql-database-on-heroku-1dc1"> <img src="https://img.shields.io/badge/See%20Dev.to-black?style=for-the-badge&logo=dev.to" width="170""/></a></p>
<p><a href="https://dev.to/prisma/how-to-setup-a-free-postgresql-database-on-heroku-1dc1"> <img src="https://img.shields.io/badge/See%20Dev.to-black?style=for-the-badge&logo=dev.to" width="160""/></a></p>

</details>

Expand Down Expand Up @@ -149,7 +146,7 @@ Fill up rest of the fields. Meaning of each fields are discussed below:
- `MEGA_PASSWORD`: Your password for your mega.nz account
- `BLOCK_MEGA_FOLDER`: If you want to remove mega.nz folder support, set it to `True`.
- `BLOCK_MEGA_LINKS`: If you want to remove mega.nz mirror support, set it to `True`.
- `STOP_DUPLICATE`: (Leave empty if unsure) if this field is set to `True`, bot will check file in Drive, if it is present in Drive, downloading or cloning will be stopped. (**Note**: File will be checked using filename, not using filehash, so this feature is not perfect yet)
- `STOP_DUPLICATE`: (Leave empty if unsure) if this field is set to `True`, bot will check file in Drive, if it is present in Drive, downloading or cloning will be stopped. (**NOTE**: File will be checked using filename, not using filehash, so this feature is not perfect yet)
- `CLONE_LIMIT`: To limit cloning Google Drive (leave space between number and unit, Available units is (gb or GB, tb or TB), Examples: `100 gb, 100 GB, 10 tb, 10 TB`
- `MEGA_LIMIT`: To limit downloading Mega (leave space between number and unit, Available units is (gb or GB, tb or TB), Examples: `100 gb, 100 GB, 10 tb, 10 TB`
- `TORRENT_DIRECT_LIMIT`: To limit the Torrent/Direct mirror size, Leave space between number and unit. Available units is (gb or GB, tb or TB), Examples: `100 gb, 100 GB, 10 tb, 10 TB`
Expand All @@ -163,7 +160,7 @@ Fill up rest of the fields. Meaning of each fields are discussed below:
- `STATUS_LIMIT`: Status limit with buttons (**NOTE**: Recommend limit status to `4` tasks max).
- `IS_VPS`: (Only for VPS) Don't set this to `True` even if you are using VPS, unless facing error with web server. Also go to start.sh and replace `$PORT` by `80` or any port you want to use.
- `SERVER_PORT`: (Only if IS_VPS is `True`) Base URL Port
- `BASE_URL_OF_BOT`: (Required for Heroku) Valid BASE URL of where the bot is deploy. Ip/domain of your bot like `http://myip` or if you have chosen other port then `80` then `http://myip:port`, for Heroku fill `https://yourappname.herokuapp.com` (**NOTE**: No slash at the end)
- `BASE_URL_OF_BOT`: (Required for Heroku to avoid sleep) Valid BASE URL of where the bot is deploy. Ip/domain of your bot like `http://myip` or if you have chosen other port then `80` then `http://myip:port`, for Heroku fill `https://yourappname.herokuapp.com` (**NOTE**: No slash at the end), still got idling? You can use http://cron-job.org to ping you Heroku app.
- `SHORTENER_API`: Fill your Shortener api key if you are using Shortener.
- `SHORTENER`: if you want to use Shortener in Gdrive and index link, fill Shortener url here. Examples:
```
Expand Down Expand Up @@ -199,7 +196,7 @@ python3 generate_drive_token.py

## Deploying

**IMPORTANT NOTE**: In start.sh you must replace $PORT with 80 or any other port you want to use
**IMPORTANT NOTE**: In start.sh you must replace `$PORT` with 80 or any other port you want to use

- Start Docker daemon (skip if already running):
```
Expand All @@ -215,7 +212,7 @@ sudo docker run -p 80:80 mirrorbot
```
OR

**NOTE**: If you want to use port other than 80, so change it in docker-compose.yml
**NOTE**: If you want to use port other than 80, so change it in [docker-compose.yml](https://github.com/SlamDevs/slam-mirrorbot/blob/master/docker-compose.yml)

- Using Docker-compose so you can edit and build your image in seconds:
```
Expand All @@ -230,11 +227,11 @@ sudo docker-compose up
sudo docker-compose build
sudo docker-compose up
```
or
OR
```
sudo docker-compose up --build
```
- To stop docker run
- To stop Docker run
```
sudo docker ps
```
Expand All @@ -249,7 +246,8 @@ sudo docker container prune
```
sudo docker image prune -a
```
## [Video From Tortoolkit Repo](https://youtu.be/c8_TU1sPK08)
- Video from Tortoolkit repo
<p><a href="https://youtu.be/c8_TU1sPK08"> <img src="https://img.shields.io/badge/See%20Video-black?style=for-the-badge&logo=YouTube" width="160""/></a></p>

## Deploying on Heroku
- Deploying on Heroku with Github Workflow
Expand Down
9 changes: 2 additions & 7 deletions bot/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from .helper.ext_utils.bot_utils import get_readable_file_size, get_readable_time
from .helper.telegram_helper.filters import CustomFilters
from bot.helper.telegram_helper import button_build
from .modules import authorize, list, cancel_mirror, mirror_status, mirror, clone, watch, shell, eval, torrent_search, delete, speedtest, count, reboot
from .modules import authorize, list, cancel_mirror, mirror_status, mirror, clone, watch, shell, eval, delete, speedtest, count, reboot


def stats(update, context):
Expand Down Expand Up @@ -136,8 +136,6 @@ def bot_help(update, context):
/{BotCommands.ShellCommand}: Run commands in Shell (Terminal)
/{BotCommands.ExecHelpCommand}: Get help for Executor module (Only Owner)
/{BotCommands.TsHelpCommand}: Get help for Torrent search module
'''

help_string = f'''
Expand Down Expand Up @@ -168,8 +166,6 @@ def bot_help(update, context):
/{BotCommands.StatsCommand}: Show Stats of the machine the bot is hosted on
/{BotCommands.PingCommand}: Check how long it takes to Ping the Bot
/{BotCommands.TsHelpCommand}: Get help for Torrent search module
'''

if CustomFilters.sudo_user(update) or CustomFilters.owner_filter(update):
Expand All @@ -196,8 +192,7 @@ def bot_help(update, context):
(f'{BotCommands.StatsCommand}','Bot Usage Stats'),
(f'{BotCommands.PingCommand}','Ping the Bot'),
(f'{BotCommands.RestartCommand}','Restart the bot [owner/sudo only]'),
(f'{BotCommands.LogCommand}','Get the Bot Log [owner/sudo only]'),
(f'{BotCommands.TsHelpCommand}','Get help for Torrent search module')
(f'{BotCommands.LogCommand}','Get the Bot Log [owner/sudo only]')
]


Expand Down
1 change: 0 additions & 1 deletion bot/helper/telegram_helper/bot_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,5 @@ def __init__(self):
self.DeleteCommand = 'del'
self.ShellCommand = 'shell'
self.ExecHelpCommand = 'exechelp'
self.TsHelpCommand = 'tshelp'

BotCommands = _BotCommands()
Loading

0 comments on commit 4ed0c36

Please sign in to comment.