Update readme, fix minor config bugs
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,6 +1,5 @@
|
|||||||
data/
|
data/
|
||||||
config.json
|
config.json
|
||||||
docker-compose.yml
|
|
||||||
.idea/
|
.idea/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
*.torrent
|
*.torrent
|
||||||
|
|||||||
50
README.md
50
README.md
@@ -15,7 +15,7 @@ This is an implementation of QbitTorrent with a **Multiple Debrid service suppor
|
|||||||
- [Connecting to Sonarr/Radarr](#connecting-to-sonarrradarr)
|
- [Connecting to Sonarr/Radarr](#connecting-to-sonarrradarr)
|
||||||
- [Sample Config](#sample-config)
|
- [Sample Config](#sample-config)
|
||||||
- [Config Notes](#config-notes)
|
- [Config Notes](#config-notes)
|
||||||
- [Log Level](#log-level)
|
- [Log Level]()
|
||||||
- [Max Cache Size](#max-cache-size)
|
- [Max Cache Size](#max-cache-size)
|
||||||
- [Debrid Config](#debrid-config)
|
- [Debrid Config](#debrid-config)
|
||||||
- [Proxy Config](#proxy-config)
|
- [Proxy Config](#proxy-config)
|
||||||
@@ -23,19 +23,19 @@ This is an implementation of QbitTorrent with a **Multiple Debrid service suppor
|
|||||||
- [Arrs Config](#arrs-config)
|
- [Arrs Config](#arrs-config)
|
||||||
- [Proxy](#proxy)
|
- [Proxy](#proxy)
|
||||||
- [Repair Worker](#repair-worker)
|
- [Repair Worker](#repair-worker)
|
||||||
|
- [WebDAV](#webdav)
|
||||||
|
- [WebDAV Config](#webdav-config)
|
||||||
- [Changelog](#changelog)
|
- [Changelog](#changelog)
|
||||||
- [TODO](#todo)
|
- [TODO](#todo)
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
- Mock Qbittorent API that supports the Arrs(Sonarr, Radarr, etc)
|
- Mock Qbittorent API that supports the Arrs(Sonarr, Radarr, Lidarr etc)
|
||||||
- A Full-fledged UI for managing torrents
|
- A Full-fledged UI for managing torrents
|
||||||
- Proxy support for the Arrs
|
- Proxy support for the Arrs
|
||||||
- Real Debrid Support
|
- Multiple Debrid providers
|
||||||
- Torbox Support
|
- WebDAV server support for each debrid provider
|
||||||
- Debrid Link Support
|
- Repair Worker for missing files
|
||||||
- Multi-Debrid Providers support
|
|
||||||
- Repair Worker for missing files (**BETA**)
|
|
||||||
|
|
||||||
The proxy is useful for filtering out un-cached Debrid torrents
|
The proxy is useful for filtering out un-cached Debrid torrents
|
||||||
|
|
||||||
@@ -61,7 +61,8 @@ You can use either hub.docker.com or ghcr.io to pull the image. The image is ava
|
|||||||
- `latest`: The latest stable release
|
- `latest`: The latest stable release
|
||||||
- `beta`: The latest beta release
|
- `beta`: The latest beta release
|
||||||
- `vX.Y.Z`: A specific version (e.g `v0.1.0`)
|
- `vX.Y.Z`: A specific version (e.g `v0.1.0`)
|
||||||
- `nightly`: The latest nightly build. This is highly unstable
|
- `nightly`: The latest nightly build. This is usually unstable
|
||||||
|
- `experimental`: The latest experimental build. This is highly unstable!!
|
||||||
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@@ -139,7 +140,7 @@ This is the default config file. You can create a `config.json` file in the root
|
|||||||
"qbittorrent": {
|
"qbittorrent": {
|
||||||
"port": "8282",
|
"port": "8282",
|
||||||
"download_folder": "/mnt/symlinks/",
|
"download_folder": "/mnt/symlinks/",
|
||||||
"categories": ["sonarr", "radarr"],
|
"categories": ["sonarr", "radarr"]
|
||||||
},
|
},
|
||||||
"repair": {
|
"repair": {
|
||||||
"enabled": false,
|
"enabled": false,
|
||||||
@@ -164,22 +165,27 @@ Full config are [here](doc/config.full.json)
|
|||||||
- The `allowed_file_types` key is an array of allowed file types that can be downloaded. By default, all movie, tv show and music file types are allowed
|
- The `allowed_file_types` key is an array of allowed file types that can be downloaded. By default, all movie, tv show and music file types are allowed
|
||||||
- The `use_auth` is used to enable basic authentication for the UI. The default value is `false`
|
- The `use_auth` is used to enable basic authentication for the UI. The default value is `false`
|
||||||
- The `discord_webhook_url` is used to send notifications to discord
|
- The `discord_webhook_url` is used to send notifications to discord
|
||||||
|
- The `min_file_size` and `max_file_size` keys are used to set the minimum and maximum file size of the torrents that can be downloaded. The default value is `0` and `0` respectively. No min/max file size will be set
|
||||||
|
|
||||||
##### Debrid Config
|
##### Debrid Config
|
||||||
- The `debrids` key is an array of debrid providers
|
- The `debrids` key is an array of debrid providers
|
||||||
- The `name` key is the name of the debrid provider
|
- The `name` key is the name of the debrid provider
|
||||||
- The `host` key is the API endpoint of the debrid provider
|
- The `host` key is the API endpoint of the debrid provider
|
||||||
- The `api_key` key is the API key of the debrid provider
|
- The `api_key` key is the API key of the debrid provider. This can be comma separated for multiple API keys
|
||||||
- The `folder` key is the folder where your debrid folder is mounted(webdav, rclone, zurg etc). e.g `data/realdebrid/torrents/`, `/media/remote/alldebrid/magnets/`
|
- The `folder` key is the folder where your debrid folder is mounted(webdav, rclone, zurg etc). e.g `data/realdebrid/torrents/`, `/media/remote/alldebrid/magnets/`
|
||||||
- The `rate_limit` key is the rate limit of the debrid provider(null by default)
|
- The `rate_limit` key is the rate limit of the debrid provider(null by default)
|
||||||
- The `download_uncached` bool key is used to download uncached torrents(disabled by default)
|
- The `download_uncached` bool key is used to download uncached torrents(disabled by default)
|
||||||
- The `check_cached` bool key is used to check if the torrent is cached(disabled by default)
|
- The `check_cached` bool key is used to check if the torrent is cached(disabled by default)
|
||||||
|
- The `use_webdav` is used to create a webdav server for the debrid Read the [webdav](#webdav) section for more information
|
||||||
|
|
||||||
##### Repair Config (**BETA**)
|
- The `use_webdav` bool key is used to create a webdav server for the debrid provider. The default value is `false`. Read the [webdav](#webdav) section for more information
|
||||||
|
|
||||||
|
##### Repair Config
|
||||||
The `repair` key is used to enable the repair worker
|
The `repair` key is used to enable the repair worker
|
||||||
- The `enabled` key is used to enable the repair worker
|
- The `enabled` key is used to enable the repair worker
|
||||||
- The `interval` key is the interval in either minutes, seconds, hours, days. Use any of this format, e.g 12:00, 5:00, 1h, 1d, 1m, 1s.
|
- The `interval` key is the interval in either minutes, seconds, hours, days. Use any of this format, e.g 12:00, 5:00, 1h, 1d, 1m, 1s.
|
||||||
- The `run_on_start` key is used to run the repair worker on start
|
- The `run_on_start` key is used to run the repair worker on start
|
||||||
|
- The `use_webdav` key is used to enable the webdav server for the repair worker. The default value is `false`. Read the [webdav](#webdav) section for more information
|
||||||
- The `zurg_url` is the url of the zurg server. Typically `http://localhost:9999` or `http://zurg:9999`
|
- The `zurg_url` is the url of the zurg server. Typically `http://localhost:9999` or `http://zurg:9999`
|
||||||
- The `auto_process` is used to automatically process the repair worker. This will delete broken symlinks and re-search for missing files
|
- The `auto_process` is used to automatically process the repair worker. This will delete broken symlinks and re-search for missing files
|
||||||
|
|
||||||
@@ -219,6 +225,28 @@ The repair worker is a simple worker that checks for missing files in the Arrs(S
|
|||||||
- Search for deleted/unreadable files
|
- Search for deleted/unreadable files
|
||||||
|
|
||||||
|
|
||||||
|
### WebDAV
|
||||||
|
|
||||||
|
URL: `http://localhost:8282/webdav` or `http://<ip>:8080/webdav`
|
||||||
|
The webdav server is a simple webdav server that allows you to access your debrid files over the web.While most(if not all) debrid providers have their own webdav server, this is useful for fast access to your debrid files. The webdav server is disabled by default. You can disable it by setting the `use_webdav` key to `false` in the config file of the debrid provider. The webdav server listens on port `8080` by default.
|
||||||
|
##### WebDAV Config
|
||||||
|
You can set per-debrid provider webdav config in the debrid provider config or globally in the config file using "webdav" key
|
||||||
|
|
||||||
|
You can use the webdav server with media players like Infuse, VidHub or mount it locally with Rclone(See [here](https://rclone.org/webdav/)). A sample rclone file is [here](doc/rclone.conf)
|
||||||
|
|
||||||
|
- The `torrents_refresh_interval` key is used to set the interval in to refresh the torrents. The default value is `15s`. E,g `15s`, `1m`, `1h`, `1d`
|
||||||
|
- The `download_links_refresh_interval` key is used to set the interval in to refresh the download links. The default value is `40m`. E,g `15s`, `1m`, `1h`, `1d`
|
||||||
|
- The `workers` key is the maximum number of goroutines for the webdav server. The default value is your CPU cores x 50. This is useful for limiting the number of concurrent requests to the webdav server.
|
||||||
|
- The `folder_naming` key is used to set the folder naming convention. The default value is `original_no_ext`. The available options are:
|
||||||
|
- `original_no_ext`: The original file name without the extension
|
||||||
|
- `original`: The original file name with the extension
|
||||||
|
- `filename`: The torrent filename
|
||||||
|
- `filename_no_ext`: The torrent filename without the extension
|
||||||
|
- `id`: The torrent id
|
||||||
|
- The `auto_expire_links_after` Download links are deemed old after this time. The default value is `3d`. E,g `15s`, `1m`, `1h`, `1d`
|
||||||
|
- The `rc_url`, `rc_user`, `rc_pass` keys are used to trigger a vfs refresh on your rclone. This speeds up the process of getting the files. This is useful for rclone users. T
|
||||||
|
|
||||||
|
|
||||||
### Proxy
|
### Proxy
|
||||||
|
|
||||||
#### **Note**: Proxy has stopped working for Real Debrid, Debrid Link, and All Debrid. It still works for Torbox. This is due to the changes in the API of the Debrid Providers.
|
#### **Note**: Proxy has stopped working for Real Debrid, Debrid Link, and All Debrid. It still works for Torbox. This is due to the changes in the API of the Debrid Providers.
|
||||||
|
|||||||
20
doc/compose.yml
Normal file
20
doc/compose.yml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
services:
|
||||||
|
decypharr:
|
||||||
|
image: cy01/blackhole:latest # or cy01/blackhole:beta
|
||||||
|
container_name: decypharr
|
||||||
|
ports:
|
||||||
|
- "8282:8282" # qBittorrent
|
||||||
|
- "8181:8181" # Proxy
|
||||||
|
user: "1000:1000"
|
||||||
|
volumes:
|
||||||
|
- /mnt/:/mnt
|
||||||
|
- ~/plex/configs/decypharr/:/app # config.json must be in this directory
|
||||||
|
environment:
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
- UMASK=002
|
||||||
|
- QBIT_PORT=8282
|
||||||
|
- PORT=8181
|
||||||
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
- rclone # If you are using rclone with docker
|
||||||
@@ -1,14 +1,5 @@
|
|||||||
{
|
{
|
||||||
"debrids": [
|
"debrids": [
|
||||||
{
|
|
||||||
"name": "torbox",
|
|
||||||
"host": "https://api.torbox.app/v1",
|
|
||||||
"api_key": "torbox_api_key",
|
|
||||||
"folder": "/mnt/remote/torbox/torrents/",
|
|
||||||
"rate_limit": "250/minute",
|
|
||||||
"download_uncached": false,
|
|
||||||
"check_cached": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "realdebrid",
|
"name": "realdebrid",
|
||||||
"host": "https://api.real-debrid.com/rest/1.0",
|
"host": "https://api.real-debrid.com/rest/1.0",
|
||||||
@@ -17,7 +8,19 @@
|
|||||||
"rate_limit": "250/minute",
|
"rate_limit": "250/minute",
|
||||||
"download_uncached": false,
|
"download_uncached": false,
|
||||||
"check_cached": false,
|
"check_cached": false,
|
||||||
"use_webdav": true
|
"use_webdav": true,
|
||||||
|
"torrents_refresh_interval": "15s",
|
||||||
|
"folder_naming": "original_no_ext",
|
||||||
|
"auto_expire_links_after": "3d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "torbox",
|
||||||
|
"host": "https://api.torbox.app/v1",
|
||||||
|
"api_key": "torbox_api_key",
|
||||||
|
"folder": "/mnt/remote/torbox/torrents/",
|
||||||
|
"rate_limit": "250/minute",
|
||||||
|
"download_uncached": false,
|
||||||
|
"check_cached": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "debridlink",
|
"name": "debridlink",
|
||||||
|
|||||||
6
doc/rclone.conf
Normal file
6
doc/rclone.conf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[realdebrid]
|
||||||
|
|
||||||
|
type = webdav
|
||||||
|
url = http://your-ip-address/webdav/realdebrid
|
||||||
|
vendor = other
|
||||||
|
pacer_min_sleep = 0
|
||||||
@@ -7,6 +7,7 @@ import (
|
|||||||
"github.com/goccy/go-json"
|
"github.com/goccy/go-json"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -89,7 +90,6 @@ type WebDav struct {
|
|||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
LogLevel string `json:"log_level"`
|
LogLevel string `json:"log_level"`
|
||||||
Debrid Debrid `json:"debrid"`
|
|
||||||
Debrids []Debrid `json:"debrids"`
|
Debrids []Debrid `json:"debrids"`
|
||||||
Proxy Proxy `json:"proxy"`
|
Proxy Proxy `json:"proxy"`
|
||||||
MaxCacheSize int `json:"max_cache_size"`
|
MaxCacheSize int `json:"max_cache_size"`
|
||||||
@@ -128,12 +128,8 @@ func (c *Config) loadConfig() error {
|
|||||||
return fmt.Errorf("error unmarshaling config: %w", err)
|
return fmt.Errorf("error unmarshaling config: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.Debrid.Name != "" {
|
|
||||||
c.Debrids = append(c.Debrids, c.Debrid)
|
|
||||||
}
|
|
||||||
|
|
||||||
for i, debrid := range c.Debrids {
|
for i, debrid := range c.Debrids {
|
||||||
c.Debrids[i] = c.GetDebridWebDav(debrid)
|
c.Debrids[i] = c.updateDebrid(debrid)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(c.AllowedExt) == 0 {
|
if len(c.AllowedExt) == 0 {
|
||||||
@@ -312,7 +308,17 @@ func (c *Config) NeedsSetup() bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Config) GetDebridWebDav(d Debrid) Debrid {
|
func (c *Config) updateDebrid(d Debrid) Debrid {
|
||||||
|
|
||||||
|
apiKeys := strings.Split(d.APIKey, ",")
|
||||||
|
newApiKeys := make([]string, 0, len(apiKeys))
|
||||||
|
for _, key := range apiKeys {
|
||||||
|
key = strings.TrimSpace(key)
|
||||||
|
if key != "" {
|
||||||
|
newApiKeys = append(newApiKeys, key)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
d.APIKey = strings.Join(newApiKeys, ",")
|
||||||
|
|
||||||
if !d.UseWebDav {
|
if !d.UseWebDav {
|
||||||
return d
|
return d
|
||||||
@@ -331,7 +337,7 @@ func (c *Config) GetDebridWebDav(d Debrid) Debrid {
|
|||||||
d.FolderNaming = cmp.Or(c.WebDav.FolderNaming, "original_no_ext")
|
d.FolderNaming = cmp.Or(c.WebDav.FolderNaming, "original_no_ext")
|
||||||
}
|
}
|
||||||
if d.AutoExpireLinksAfter == "" {
|
if d.AutoExpireLinksAfter == "" {
|
||||||
d.AutoExpireLinksAfter = cmp.Or(c.WebDav.AutoExpireLinksAfter, "24h")
|
d.AutoExpireLinksAfter = cmp.Or(c.WebDav.AutoExpireLinksAfter, "3d") // 2 days
|
||||||
}
|
}
|
||||||
return d
|
return d
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user