4
1
Fork 1
This repository has been archived on 2024-08-07. You can view files and clone it, but cannot push or open issues or pull requests.
qBitDownload-Bot/Readme.md

133 lines
3.9 KiB
Markdown
Raw Permalink Normal View History

2023-10-31 03:17:57 +00:00
# qBitDownload Bot
![](https://cloud.orudo.ru/apps/files_sharing/publicpreview/pgxm2mKT5KHEHFE?file=/&fileId=23795&x=1920&y=1200&a=true&etag=430e9d84364f13b79e42991fede6609a)
2023-10-31 23:16:30 +00:00
## Telegram bot designed to remotely add downloads to the queue on qBitTorrent server
2023-10-31 03:17:57 +00:00
| [**git.orudo.ru**](https://git.orudo.ru/OrudoCA/qBitDownload-Bot) | [**GitHub**](https://github.com/OrudoCA/qBitDownload-Bot) | [**DockerHub**](https://hub.docker.com/r/orudoca/qbitdownload-bot) |
| ---------------- | ---------- | ------------- |
| [![](https://cloud.orudo.ru/apps/files_sharing/publicpreview/AmggNTQWgR6KkyB?file=/&fileId=23836&x=1920&y=1200&a=true&etag=0ef9694cea6e4d85c05aef9be72b927a)](https://git.orudo.ru/OrudoCA/qBitDownload-Bot) | [![](https://cloud.orudo.ru/apps/files_sharing/publicpreview/ip5qtGcwKHMPMAG?file=/&fileId=23819&x=1920&y=1200&a=true&etag=c540068d990ac47217a31f7450afc0ee)](https://github.com/OrudoCA/qBitDownload-Bot) |[![](https://cloud.orudo.ru/apps/files_sharing/publicpreview/7AEeEAzHYikFd5B?file=/&fileId=23806&x=1920&y=1200&a=true&etag=59894ecdfa7aaa6fb832cc4bf99c418d)](https://hub.docker.com/r/orudoca/qbitdownload-bot) |
2023-10-31 23:16:30 +00:00
### Bot requires [**qBitTorrent**](https://www.qbittorrent.org/) server
2023-10-31 03:17:57 +00:00
---
2023-10-31 23:16:30 +00:00
### Current features:
2023-10-31 03:17:57 +00:00
---
2023-10-31 23:16:30 +00:00
- **Authorization by password**
- **Adding downloads to the queue via .torrent files / Magnet-links**
- **Add/Delete download directories**
- **Multiple language support**
2023-10-31 03:17:57 +00:00
---
2023-10-31 23:16:30 +00:00
### Image uses ["fedarovich/qbittorrent-cli"](https://github.com/fedarovich/qbittorrent-cli)
2023-10-31 03:17:57 +00:00
---
[![](https://cloud.orudo.ru/apps/files_sharing/publicpreview/rRcdSnCEaA85tWf?file=/&fileId=23784&x=1920&y=1200&a=true&etag=32928842bc4e76adaba194cdd9ec1351)](https://hub.docker.com/r/orudoca/qbitdownload-bot)
2023-10-31 23:16:30 +00:00
## Deploy with Docker
#### 1. Build image or clone it from [Dockerhub](https://hub.docker.com/r/orudoca/qbitdownload-bot)
2023-10-31 03:17:57 +00:00
2023-10-31 23:16:30 +00:00
**Clone a repository and go to its directory**
2023-10-31 03:17:57 +00:00
```bash
git clone https://git.orudo.ru/OrudoCA/qBitDownload-Bot.git && cd qBitDownload-Bot
```
2023-10-31 23:16:30 +00:00
**Build image**
2023-10-31 03:17:57 +00:00
```bash
docker build -t <IMAGE_NAME> .
```
2023-10-31 23:16:30 +00:00
#### 2. Deploy via docker-cli or docker-compose
2023-10-31 03:17:57 +00:00
**Docker-cli**
```bash
docker run \
--name qbitdl_bot \
--restart=unless-stopped \
-v /path/to/config:/etc/dbot \
-v /path/to/media:/path/to/media \
-e TOKEN="<YOUR_BOT_TOKEN_HERE>" \
-e PASS="change_me" \
2023-11-03 15:09:01 +00:00
-e QURL="http://<YOUR_QBIT_SERVER_IP_HERE>:<PORT>" \
-e QUSER="<YOUR_QBIT_USERNAME>" \
-e QPASS="<YOUR_QBIT_PASSWORD>" \
-e LANG="YOUR_LANG" \
-e TZ="Europe/Moscow" \
-d -it your_image_here
2023-10-31 03:17:57 +00:00
```
2023-10-31 23:16:30 +00:00
##### or
2023-10-31 03:17:57 +00:00
**docker-compose**
```yml
services:
qbitdl_bot:
image: <YOUR_IMAGE_HERE>
tty: true
2023-10-31 03:17:57 +00:00
container_name: qbitdl_bot
volumes:
- /path/to/config:/etc/bot
- /path/to/data/:/path/to/data
restart: 'unless-stopped'
environment:
TOKEN: "<YOUR_BOT_TOKEN_HERE>"
PASS: "change_me"
2023-11-03 15:09:01 +00:00
QURL: "http://<YOUR_QBIT_SERVER_IP_HERE>:<PORT>"
2023-10-31 03:17:57 +00:00
QUSER: "<YOUR_QBIT_USERNAME>"
QPASS: "<YOUR_QBIT_PASSWORD>"
LANG: "<YOUR_LANG>"
TZ: "Europe/Moscow"
2023-10-31 03:17:57 +00:00
```
```bash
docker compose up -d
```
2023-11-03 15:09:01 +00:00
---
![](https://cloud.orudo.ru/apps/files_sharing/publicpreview/ffSABnXQ3cQrLZG?file=/&fileId=23851&x=1920&y=1200&a=true&etag=d2d4704b2ab90afe5edee647a19a5540)
## Run natively:
### 1. Install deps:
- python3
- py3-pip
- [qbittorrent-cli](https://github.com/fedarovich/qbittorrent-cli)
2023-11-03 15:09:01 +00:00
### 2. Install TeleBot lib:
```bash
pip install telebot
```
### 3. Set system ENV
```bash
# Linux
export TOKEN="YOUR_BOT_TOKEN"
export PASS="change_me"
export QURL="http://<YOUR_QBIT_SERVER_IP_HERE>:<PORT>"
export QUSER="<YOUR_QBIT_USERNAME>"
export QPASS="<YOUR_QBIT_PASSWORD>"
export LANG="<YOUR_LANG>"
# Windows PS
set TOKEN="YOUR_BOT_TOKEN"
set PASS="change_me"
set QURL="http://<YOUR_QBIT_SERVER_IP_HERE>:<PORT>"
set QUSER="<YOUR_QBIT_USERNAME>"
set QPASS="<YOUR_QBIT_PASSWORD>"
set LANG="<YOUR_LANG>"
```
#### 3.1 On windows change PATH var in `db.py`
### 4. Run
```bash
python3 bot.py
```
---
### Available languages:
##### - **"ENG"** - English
##### - **"RU"** - Russian