diff --git a/.env.example b/.env.example index 8988edf..b63be36 100644 --- a/.env.example +++ b/.env.example @@ -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 diff --git a/.replit b/.replit deleted file mode 100644 index b857cc1..0000000 --- a/.replit +++ /dev/null @@ -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" diff --git a/app.json b/app.json index d73780c..34c8e7f 100644 --- a/app.json +++ b/app.json @@ -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": { @@ -57,7 +63,7 @@ "required": false }, "REDLIB_ROBOTS_DISABLE_INDEXING": { - "required": false + "required": false }, "REDLIB_DEFAULT_SUBSCRIPTIONS": { "required": false diff --git a/contrib/redlib.conf b/contrib/redlib.conf index 43c1d86..073466f 100644 --- a/contrib/redlib.conf +++ b/contrib/redlib.conf @@ -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) diff --git a/src/instance_info.rs b/src/instance_info.rs index 7d1c9d9..361ddc4 100644 --- a/src/instance_info.rs +++ b/src/instance_info.rs @@ -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,