Skip to content

Commit d5fa983

Browse files
committed
Version [2.0.0]
1 parent 1edfd9c commit d5fa983

21 files changed

+725
-366
lines changed

CHANGELOG.md

+36-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88

99

10+
## Version [2.0.0] - 2024-25-07
11+
12+
### Breaking Changes
13+
14+
- Riven: Directory structure has changed to allow for split riven instances - backend and frontend - please update your compose file volumes accordingly
15+
- RIVEN_BRANCH: Is now split into RIVEN_FRONTEND_BRANCH and RIVEN_BACKEND_BRANCH
16+
- RIVEN_ENABLED: Environment variable will enable the Riven backend and frontend without the need to set the RIVEN_FRONTEND_ENABLED and RIVEN_BACKEND_ENABLED variables
17+
- RIVEN_UPDATE: Environment variable to update the Riven backend and frontend; Default is false
18+
19+
### Added
20+
21+
- RIVEN_BACKEND_ENABLED: Environment variable to enable the Riven backend; Default is false
22+
- RIVEN_FRONTEND_ENABLED: Environment variable to enable the Riven frontend; Default is false
23+
- RIVEN_BACKEND_BRANCH: Environment variable to set the Riven backend branch; Default is main
24+
- RIVEN_FRONTEND_BRANCH: Environment variable to set the Riven frontend branch; Default is main
25+
- RIVEN_BACKEND_UPDATE: Environment variable to update the Riven backend; Default is false
26+
- RIVEN_FRONTEND_UPDATE: Environment variable to update the Riven frontend; Default is false
27+
- RIVEN_BACKEND_VERSION: Environment variable to set the Riven backend version; Default is latest
28+
- RIVEN_FRONTEND_VERSION: Environment variable to set the Riven frontend version; Default is latest
29+
- BACKEND_URL: Environment variable to set the Riven backend URL; Default is http://127.0.0.1:8080
30+
- RIVEN_DATABASE_HOST: Environment variable to set the Riven database host; Default is sqlite:////riven/backend/data/media.db
31+
- COLOR_LOG_ENABLED: Environment variable to enable color logging; Default is false
32+
- ffmpeg: Added ffmpeg to the Dockerfile for Zurg use of ffprobe to extract media information from files, enhancing media metadata accuracy.
33+
34+
35+
### Notes
36+
37+
- **Delete all Riven files and directories within the data directory before starting the new version of Riven!**
38+
- **Automatic updates for Riven backend and frontend are not funtioal yet; will be fixed in a follow-on release.**
39+
- **Other features may also not be functional yet; will be fixed in a follow-on release.**
40+
- This release resolves [Issue #19](https://github.com/I-am-PUID-0/DMB/issues/19), [Issue #20](https://github.com/I-am-PUID-0/DMB/issues/20), and [Issue #10](https://github.com/I-am-PUID-0/DMB/issues/10)
41+
42+
43+
1044
## Version [1.2.0] - 2024-19-07
1145

1246
### Added
@@ -53,7 +87,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5387

5488
### Changed
5589

56-
- [Issue #5](https://github.com/I-am-PUID-0/DMB/issues/5): Added intital sleep time to allow for services to start
90+
- [Issue #5](https://github.com/I-am-PUID-0/DMB/issues/5): Added initial sleep time to allow for services to start
5791
- [Issue #6](https://github.com/I-am-PUID-0/DMB/issues/6): Disabled Zurg plex_update.sh - not needed
5892
- [Issue #7](https://github.com/I-am-PUID-0/DMB/issues/7): Cleanup Riven logging
5993

@@ -64,7 +98,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6498

6599
### Removed
66100

67-
- [Issue #3](https://github.com/I-am-PUID-0/DMB/issues/3): Removed Jellyfin enviornement variables
101+
- [Issue #3](https://github.com/I-am-PUID-0/DMB/issues/3): Removed Jellyfin environment variables
68102
- [Issue #2](https://github.com/I-am-PUID-0/DMB/issues/2): Removed PLEX_REFRESH environment variable
69103

70104

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ENV \
1313
TERM=xterm
1414

1515
RUN \
16-
apk add --update --no-cache gcompat libstdc++ libxml2-utils curl tzdata nano ca-certificates wget fuse3 build-base linux-headers py3-cffi libffi-dev rust cargo openssl openssl-dev pkgconfig git npm && \
16+
apk add --update --no-cache gcompat libstdc++ libxml2-utils curl tzdata nano ca-certificates wget fuse3 build-base linux-headers py3-cffi libffi-dev rust cargo openssl openssl-dev pkgconfig git npm ffmpeg && \
1717
mkdir /log && \
1818
python3 -m venv /venv && \
1919
source /venv/bin/activate && \

README.md

+42-23
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ services:
4949
- /DMB/Zurg/AD:/zurg/AD
5050
## Location for rclone mount to host
5151
- /DMB/Zurg/mnt:/data:shared
52-
## Location for Riven data
53-
- /DMB/Riven/data:/riven/data
52+
## Location for Riven backend data
53+
- /DMB/Riven/data:/riven/backend/data
5454
## Location for Riven symlinks
5555
- /DMB/Riven/mnt:/mnt
5656
environment:
@@ -80,16 +80,24 @@ services:
8080
# - RCLONE_VFS_CACHE_MAX_SIZE=100G
8181
# - RCLONE_BUFFER_SIZE=32M
8282
# - RCLONE_VFS_CACHE_MAX_AGE=4h
83-
## Riven Required Settings
84-
- RIVEN_ENABLED=true
83+
## Riven Backend Required Settings
84+
- RIVEN_BACKEND_ENABLED=true
85+
## Riven Frontend Required Settings
86+
- RIVEN_FRONTEND_ENABLED=true
8587
- ORIGIN=http://0.0.0.0:3000 # See Riven documentation for more details
86-
- BACKEND_URL=http://127.0.0.1:8080 # Required to be left as is
8788
## Riven Optional Settings
89+
# - RIVEN_ENABLED=true
90+
# - RIVEN_BACKEND_BRANCH=main
91+
# - RIVEN_FRONTEND_BRANCH=main
92+
# - RIVEN_BACKEND_VERSION=v0.8.4
93+
# - RIVEN_FRONTEND_VERSION=v0.2.5
94+
# - RIVEN_BACKEND_UPDATE=true
95+
# - RIVEN_FRONTEND_UPDATE=true
96+
# - RIVEN_LOG_LEVEL=DEBUG
97+
# - BACKEND_URL=http://127.0.0.1:8080 # Default is http://127.0.0.1:8080 when not enabled
98+
# - RIVEN_DATABASE_HOST=sqlite:////riven/backend/data/media.db # Default is sqlite:////riven/backend/data/media.db when not enabled
8899
# - PLEX_TOKEN=
89100
# - PLEX_ADDRESS=
90-
# - RIVEN_UPDATE=true
91-
# - RIVEN_BRANCH=main
92-
# - RIVEN_LOG_LEVEL=DEBUG
93101
# - SEERR_API_KEY=
94102
# - SEERR_ADDRESS=
95103
## Special Features
@@ -99,6 +107,7 @@ services:
99107
# - DMB_LOG_LEVEL=DEBUG # Master log level for all program logs in DMB
100108
# - DMB_LOG_COUNT=2
101109
# - DMB_LOG_SIZE=10M
110+
# - COLOR_LOG_ENABLED=true
102111
# Example to attach to gluetun vpn container if realdebrid blocks IP address
103112
# network_mode: container:gluetun
104113
ports:
@@ -151,35 +160,45 @@ of this parameter has the format `<VARIABLE_NAME>=<VALUE>`.
151160
| Variable | Description | Default | Used w/ rclone| Used w/ Riven| Used w/ zurg|
152161
|----------------|----------------------------------------------|---------|:-:|:-:|:-:|
153162
|`TZ`| [TimeZone](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones) used by the container | |
154-
|`RD_API_KEY`| [RealDebrid API key](https://real-debrid.com/apitoken) | | | :heavy_check_mark:| :heavy_check_mark:|
155-
|`AD_API_KEY`| [AllDebrid API key](https://alldebrid.com/apikeys/) | | | :heavy_check_mark:| :heavy_check_mark:|
156-
|`RCLONE_MOUNT_NAME`| A name for the rclone mount | | :heavy_check_mark:|
163+
|`RD_API_KEY`| [RealDebrid API key](https://real-debrid.com/apitoken) | `none` | | :heavy_check_mark:| :heavy_check_mark:|
164+
|`AD_API_KEY`| [AllDebrid API key](https://alldebrid.com/apikeys/) | `none` | | :heavy_check_mark:| :heavy_check_mark:|
165+
|`RCLONE_MOUNT_NAME`| A name for the rclone mount | `none` | :heavy_check_mark:|
157166
|`RCLONE_LOG_LEVEL`| [Log level](https://rclone.org/docs/#log-level-level) for rclone | `NOTICE` | :heavy_check_mark:|
158-
|`RCLONE_LOG_FILE`| [Log file](https://rclone.org/docs/#log-file-file) for rclone | | :heavy_check_mark: |
167+
|`RCLONE_LOG_FILE`| [Log file](https://rclone.org/docs/#log-file-file) for rclone |`none` | :heavy_check_mark: |
159168
|`RCLONE_DIR_CACHE_TIME`| [How long a directory should be considered up to date and not refreshed from the backend](https://rclone.org/commands/rclone_mount/#vfs-directory-cache) #optional, but recommended is 10s. | `10s` | :heavy_check_mark:|
160-
|`RCLONE_CACHE_DIR`| [Directory used for caching](https://rclone.org/docs/#cache-dir-dir). | | :heavy_check_mark:|
161-
|`RCLONE_VFS_CACHE_MODE`| [Cache mode for VFS](https://rclone.org/commands/rclone_mount/#vfs-file-caching) | | :heavy_check_mark:|
162-
|`RCLONE_VFS_CACHE_MAX_SIZE`| [Max size of the VFS cache](https://rclone.org/commands/rclone_mount/#vfs-file-caching) | | :heavy_check_mark:|
163-
|`RCLONE_VFS_CACHE_MAX_AGE`| [Max age of the VFS cache](https://rclone.org/commands/rclone_mount/#vfs-file-caching) | | :heavy_check_mark:|
164-
|`PLEX_TOKEN`| The [Plex Token](https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/) associated with your Plex user | || :heavy_check_mark:|
165-
|`PLEX_ADDRESS`| The URL of your Plex server. Example: http://192.168.0.100:32400 or http://plex:32400 - format must include ```http://``` or ```https://``` and have no trailing characters after the port number (32400). E.g., ```/``` ||| :heavy_check_mark:|
166-
|`RIVEN_ENABLED`| Set the value "true" to enable the Riven process | `false ` | | :heavy_check_mark: | |
167-
|`RIVEN_BRANCH`| Set the value to the appropriate branch | `main` | | :heavy_check_mark: | |
169+
|`RCLONE_CACHE_DIR`| [Directory used for caching](https://rclone.org/docs/#cache-dir-dir). |`none` | :heavy_check_mark:|
170+
|`RCLONE_VFS_CACHE_MODE`| [Cache mode for VFS](https://rclone.org/commands/rclone_mount/#vfs-file-caching) |`none` | :heavy_check_mark:|
171+
|`RCLONE_VFS_CACHE_MAX_SIZE`| [Max size of the VFS cache](https://rclone.org/commands/rclone_mount/#vfs-file-caching) |`none` | :heavy_check_mark:|
172+
|`RCLONE_VFS_CACHE_MAX_AGE`| [Max age of the VFS cache](https://rclone.org/commands/rclone_mount/#vfs-file-caching) |`none` | :heavy_check_mark:|
173+
|`PLEX_TOKEN`| The [Plex Token](https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/) associated with your Plex user |`none` || :heavy_check_mark:|
174+
|`PLEX_ADDRESS`| The URL of your Plex server. Example: http://192.168.0.100:32400 or http://plex:32400 - format must include ```http://``` or ```https://``` and have no trailing characters after the port number (32400). E.g., ```/``` |`none`|| :heavy_check_mark:|
175+
|`RIVEN_ENABLED`| Set the value "true" to enable the Riven backend and frontend processes | `false ` | | :heavy_check_mark: | |
176+
|`RIVEN_BACKEND_ENABLED`| Set the value "true" to enable the Riven backend process | `false ` | | :heavy_check_mark: | |
177+
|`RIVEN_FRONTEND_ENABLED`| Set the value "true" to enable the Riven frontend process | `false ` | | :heavy_check_mark: | |
178+
|`RIVEN_BACKEND_BRANCH`| Set the value to the appropriate branch | `main` | | :heavy_check_mark: | |
179+
|`RIVEN_FRONTEND_BRANCH`| Set the value to the appropriate branch | `main` | | :heavy_check_mark: | |
180+
|`RIVEN_BACKEND_VERSION`| The version of Riven backend to use. If enabled, the value should contain v0.8.x format | `latest` | | :heavy_check_mark: | |
181+
|`RIVEN_FRONTEND_VERSION`| The version of Riven frontend to use. If enabled, the value should contain v0.8.x format | `latest` | | :heavy_check_mark: | |
168182
|`RIVEN_LOGFILE`| Log file for Riven. The log file will appear in the ```/config``` as ```Riven.log```. If used, the value must be ```true``` or ```false``` | `false` || :heavy_check_mark:| |
169-
|`RIVEN_UPDATE`| Enable automatic updates of Riven. Adding this variable will enable automatic updates to the latest version of Riven locally within the container.| `false` || :heavy_check_mark:|
183+
|`RIVEN_BACKEND_UPDATE`| Enable automatic updates of the Riven backend. Adding this variable will enable automatic updates to the latest version of Riven locally within the container.| `false` || :heavy_check_mark:|
184+
|`RIVEN_FRONTEND_UPDATE`| Enable automatic updates of the Riven frontend. Adding this variable will enable automatic updates to the latest version of Riven locally within the container.| `false` || :heavy_check_mark:|
185+
|`ORIGIN`| The origin URL for the Riven frontend | http://0.0.0.0:3000 | | :heavy_check_mark: | |
186+
|`BACKEND_URL`| The URL for the Riven backend | http://127.0.0.1:8080 | | :heavy_check_mark: | |
187+
|`RIVEN_DATABASE_HOST`| The database host for Riven | `sqlite:////riven/backend/data/media.db` | | :heavy_check_mark: | |
170188
|`AUTO_UPDATE_INTERVAL`| Interval between automatic update checks in hours. Vaules can be any positive [whole](https://www.oxfordlearnersdictionaries.com/us/definition/english/whole-number) or [decimal](https://www.oxfordreference.com/display/10.1093/oi/authority.20110803095705740;jsessionid=3FDC96CC0D79CCE69702661D025B9E9B#:~:text=The%20separator%20used%20between%20the,number%20expressed%20in%20decimal%20representation.) point based number. Ex. a value of .5 would yield thirty minutes, and 1.5 would yield one and a half hours | `24` || :heavy_check_mark:| :heavy_check_mark:|
171189
|`DUPLICATE_CLEANUP`| Automated cleanup of duplicate content in Plex. | `false` |
172190
|`CLEANUP_INTERVAL`| Interval between duplicate cleanup in hours. Values can be any positive [whole](https://www.oxfordlearnersdictionaries.com/us/definition/english/whole-number) or [decimal](https://www.oxfordreference.com/display/10.1093/oi/authority.20110803095705740;jsessionid=3FDC96CC0D79CCE69702661D025B9E9B#:~:text=The%20separator%20used%20between%20the,number%20expressed%20in%20decimal%20representation.) point based number. Ex. a value of .5 would yield thirty minutes and 1.5 would yield one and a half hours | `24` || :heavy_check_mark: | :heavy_check_mark:|
173191
|`DMB_LOG_LEVEL`| The level at which logs should be captured. See the python [Logging Levels](https://docs.python.org/3/library/logging.html#logging-levels) documentation for more details | `INFO` |
174192
|`DMB_LOG_COUNT`| The number logs to retain. Result will be value + current log | `2` |
175193
|`DMB_LOG_SIZE`| The size of the log file before it is rotated. Valid options are 'K' (kilobytes), 'M' (megabytes), and 'G' (gigabytes) | `10M` |
194+
|`COLOR_LOG_ENABLED`| Enable color logging for DMB. | `false` | | | |
176195
|`ZURG_ENABLED`| Set the value "true" to enable the Zurg process | `false ` | | | :heavy_check_mark:|
177196
|`GITHUB_TOKEN`| GitHub Personal Token for use with Zurg private repo. Requires Zurg [sponsorship](https://github.com/sponsors/debridmediamanager) | `false ` | | | :heavy_check_mark:|
178197
|`ZURG_VERSION`| The version of Zurg to use. If enabled, the value should contain v0.9.x or v0.9.x-hotfix.x format | `latest` | | | :heavy_check_mark: |
179198
|`ZURG_UPDATE`| Enable automatic updates of Zurg. Adding this variable will enable automatic updates to the latest version of Zurg locally within the container. | `false` | | | :heavy_check_mark:|
180199
|`ZURG_LOG_LEVEL`| Set the log level for Zurg | `INFO` | | | :heavy_check_mark:|
181-
|`SEERR_API_KEY`| The Overseerr API Key ||| :heavy_check_mark:||
182-
|`SEERR_ADDRESS`| The URL of your Overseerr server. Example: http://192.168.0.102:5055 or http://Overseerr:5055 - format must include ```http://``` or ```https://``` and have no trailing characters after the port number (5055). E.g., ```/``` || | :heavy_check_mark:|
200+
|`SEERR_API_KEY`| The Overseerr API Key |`none`|| :heavy_check_mark:||
201+
|`SEERR_ADDRESS`| The URL of your Overseerr server. Example: http://192.168.0.102:5055 or http://Overseerr:5055 - format must include ```http://``` or ```https://``` and have no trailing characters after the port number (5055). E.g., ```/``` |`none`| | :heavy_check_mark:|
183202
|`ZURG_USER`| The username to be used for protecting the Zurg endpoints. | `none `| | | :heavy_check_mark: |
184203
|`ZURG_PASS`| The password to be used for protecting the Zurg endpoints. | `none ` | | | :heavy_check_mark: |
185204
|`ZURG_PORT`| The port to be used for the Zurg server | `random ` | | | :heavy_check_mark: |

base/__init__.py

+13-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
import random
2323
import zipfile
2424
import platform
25+
import fnmatch
26+
from colorlog import ColoredFormatter
2527
from ruamel.yaml import YAML
2628

2729

@@ -42,7 +44,7 @@ def load_secret_or_env(secret_name, default=None):
4244
ADAPIKEY = load_secret_or_env('ad_api_key')
4345
ZURGUSER = load_secret_or_env('zurg_user')
4446
ZURGPASS = load_secret_or_env('zurg_pass')
45-
GHTOKEN = load_secret_or_env('GITHUB_TOKEN')
47+
GHTOKEN = load_secret_or_env('github_token')
4648
SEERRAPIKEY = load_secret_or_env('seerr_api_key')
4749
SEERRADD = load_secret_or_env('seerr_address')
4850
DUPECLEAN = os.getenv('DUPLICATE_CLEANUP')
@@ -55,6 +57,15 @@ def load_secret_or_env(secret_name, default=None):
5557
NFSMOUNT = os.getenv('NFS_ENABLED')
5658
NFSPORT = os.getenv('NFS_PORT')
5759
ZURGPORT = os.getenv('ZURG_PORT')
60+
RIVENBACKEND = os.getenv("RIVEN_BACKEND_ENABLED")
61+
RIVENFRONTEND = os.getenv("RIVEN_FRONTEND_ENABLED")
5862
RIVEN = os.getenv("RIVEN_ENABLED")
5963
RUPDATE = os.getenv('RIVEN_UPDATE')
60-
RBRANCH = os.getenv('RIVEN_BRANCH')
64+
BACKENDURL = os.getenv('BACKEND_URL')
65+
RIVENDATABASEHOST = os.getenv('RIVEN_DATABASE_HOST')
66+
RBBRANCH = os.getenv('RIVEN_BACKEND_BRANCH')
67+
RFBRANCH = os.getenv('RIVEN_FRONTEND_BRANCH')
68+
RBVERSION = os.getenv('RIVEN_BACKEND_VERSION')
69+
RFVERSION = os.getenv('RIVEN_FRONTEND_VERSION')
70+
RBUPDATE = os.getenv('RIVEN_BACKEND_UPDATE')
71+
RFUPDATE = os.getenv('RIVEN_FRONTEND_UPDATE')

cleanup/__init__.py

Whitespace-only changes.

healthcheck.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ def check_processes(process_info):
4040
"riven_frontend": {
4141
"regex": re.compile(r'node build'),
4242
"error_message": "The Riven frontend process is not running.",
43-
"should_run": str(RIVEN).lower() == 'true' and os.path.exists(f'/data/{RCLONEMN}/__all__')
43+
"should_run": str(RIVENFRONTEND).lower() == 'true' and os.path.exists(f'/data/{RCLONEMN}/__all__')
4444
},
4545
"riven_backend": {
46-
"regex": re.compile(r'/venv/bin/python backend/main.py'),
46+
"regex": re.compile(r'/venv/bin/python src/main.py'),
4747
"error_message": "The Riven backend process is not running.",
48-
"should_run": str(RIVEN).lower() == 'true' and os.path.exists(f'/data/{RCLONEMN}/__all__')
48+
"should_run": str(RIVENBACKEND).lower() == 'true' and os.path.exists(f'/data/{RCLONEMN}/__all__')
4949
},
5050
"rclonemn_rd": {
5151
"regex": re.compile(rf'rclone {mount_type} {re.escape(RCLONEMN_RD)}:'),

0 commit comments

Comments
 (0)