fix some default options #7

This commit is contained in:
ayaka 2024-06-28 13:33:14 +12:00
parent f22f7841a8
commit f5d4cc49fb
5 changed files with 16 additions and 5 deletions

View File

@ -34,6 +34,8 @@ REDLIB_DEFAULT_SHOW_NSFW=off
REDLIB_DEFAULT_BLUR_NSFW=off
# Enable HLS video format by default
REDLIB_DEFAULT_USE_HLS=off
# Enable audio+video downloads with ffmpeg.wasm
REDLIB_DEFAULT_FFMPEG_VIDEO_DOWNLOADS=off
# Hide HLS notification by default
REDLIB_DEFAULT_HIDE_HLS_NOTIFICATION=off
# Disable autoplay videos by default

View File

@ -1,2 +0,0 @@
run = "while :; do set -ex; nix-env -iA nixpkgs.unzip; curl -o./redlib.zip -fsSL -- https://nightly.link/redlib-org/redlib/workflows/main-rust/main/redlib.zip; unzip -n redlib.zip; mv target/x86_64-unknown-linux-musl/release/redlib .; chmod +x redlib; set +e; ./redlib -H 63115200; sleep 1; done"
language = "bash"

View File

@ -1,5 +1,5 @@
{
"name": "Redlib",
"name": "Redsunlib",
"description": "Private front-end for Reddit",
"buildpacks": [
{
@ -14,6 +14,9 @@
"REDLIB_DEFAULT_THEME": {
"required": false
},
"REDLIB_DEFAULT_MASCOT": {
"required": false
},
"REDLIB_DEFAULT_FRONT_PAGE": {
"required": false
},
@ -38,7 +41,10 @@
"REDLIB_DEFAULT_BLUR_NSFW": {
"required": false
},
"REDLIB_USE_HLS": {
"REDLIB_DEFAULT_USE_HLS": {
"required": false
},
"REDLIB_DEFAULT_FFMPEG_VIDEO_DOWNLOADS": {
"required": false
},
"REDLIB_HIDE_HLS_NOTIFICATION": {

View File

@ -1,6 +1,7 @@
ADDRESS=0.0.0.0
PORT=12345
#REDLIB_DEFAULT_THEME=default
#REDLIB_DEFAULT_MASCOT=none
#REDLIB_DEFAULT_FRONT_PAGE=default
#REDLIB_DEFAULT_LAYOUT=card
#REDLIB_DEFAULT_WIDE=off
@ -10,6 +11,7 @@ PORT=12345
#REDLIB_DEFAULT_SHOW_NSFW=off
#REDLIB_DEFAULT_BLUR_NSFW=off
#REDLIB_DEFAULT_USE_HLS=off
#REDLIB_DEFAULT_FFMPEG_VIDEO_DOWNLOADS=off
#REDLIB_DEFAULT_HIDE_HLS_NOTIFICATION=off
#REDLIB_DEFAULT_AUTOPLAY_VIDEOS=off
#REDLIB_DEFAULT_SUBSCRIPTIONS=off (sub1+sub2+sub3)

View File

@ -146,6 +146,7 @@ impl InstanceInfo {
["Show NSFW", &convert(&self.config.default_show_nsfw)],
["Blur NSFW", &convert(&self.config.default_blur_nsfw)],
["Use HLS", &convert(&self.config.default_use_hls)],
["Use FFmpeg", &convert(&self.config.default_ffmpeg_video_downloads)],
["Hide HLS notification", &convert(&self.config.default_hide_hls_notification)],
["Subscriptions", &convert(&self.config.default_subscriptions)],
["Filters", &convert(&self.config.default_filters)],
@ -181,6 +182,7 @@ impl InstanceInfo {
Default show NSFW: {:?}\n
Default blur NSFW: {:?}\n
Default use HLS: {:?}\n
Default use FFmpeg: {:?}\n
Default hide HLS notification: {:?}\n
Default subscriptions: {:?}\n
Default filters: {:?}\n",
@ -206,6 +208,7 @@ impl InstanceInfo {
self.config.default_show_nsfw,
self.config.default_blur_nsfw,
self.config.default_use_hls,
self.config.default_ffmpeg_video_downloads,
self.config.default_hide_hls_notification,
self.config.default_subscriptions,
self.config.default_filters,