83 lines
2.0 KiB
Bash
83 lines
2.0 KiB
Bash
#!/usr/bin/env sh
|
|
|
|
## Config
|
|
if [ ! -d "/root/.youtube-local" ]; then
|
|
# make dir
|
|
install -d /root/.youtube-local
|
|
|
|
# generate config
|
|
cat > /root/.youtube-local/settings.txt <<- EOF
|
|
# 0 - Off
|
|
# 1 - On, except video
|
|
# 2 - On, including video (see warnings)
|
|
route_tor = $ROUTE_TOR
|
|
|
|
tor_port = $TOR_PORT
|
|
|
|
tor_control_port = TOR_CONTROL_PORT
|
|
|
|
port_number = 8080
|
|
|
|
# This will allow others to connect to your Youtube Local instance as a website.
|
|
# For security reasons, enabling this is not recommended.
|
|
allow_foreign_addresses = $ALLOW_FOREIGN_ADDRESSES
|
|
|
|
# 0 - off by default
|
|
# 1 - only manually created subtitles on by default
|
|
# 2 - enable even if automatically generated is all that's available
|
|
subtitles_mode = $SUBTITLES_MODE
|
|
|
|
# ISO 639 language code: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
|
|
subtitles_language = $SUBTITLES_LANG
|
|
|
|
# 0 - Related videos disabled
|
|
# 1 - Related videos always shown
|
|
# 2 - Related videos hidden; shown by clicking a button
|
|
related_videos_mode = $RELATED_VIDEOS_MODE
|
|
|
|
# 0 - Video comments disabled
|
|
# 1 - Video comments always shown
|
|
# 2 - Video comments hidden; shown by clicking a button
|
|
comments_mode = $COMMENTS_MODE
|
|
|
|
enable_comment_avatars = $ENABLE_COMMENTS_AVATARS
|
|
|
|
# 0 to sort by top
|
|
# 1 to sort by newest
|
|
default_comment_sorting = $DEFAULT_COMMENT_SORTING
|
|
|
|
theater_mode = $THEATER_MODE
|
|
|
|
default_resolution = $DEFAULT_RESOLUTION
|
|
|
|
use_video_player = $USE_VIDEO_PLAYER
|
|
|
|
proxy_images = $PROXY_IMAGES
|
|
|
|
use_comments_js = $USE_COMMENTS_JS
|
|
|
|
use_sponsorblock_js = $USE_SPONSORBLOCK_JS
|
|
|
|
theme = $THEME
|
|
|
|
font = $FONT
|
|
|
|
embed_page_mode = $EMBED_PAGE_MODE
|
|
|
|
autocheck_subscriptions = $AUTOCHECK_SUBSCRIPTIONS
|
|
|
|
# Developer use to debug 403s
|
|
gather_googlevideo_domains = $GATHER_GOOGLEVIDEO_DOMAINS
|
|
|
|
# Save all responses from youtube for debugging
|
|
debugging_save_responses = $DEBUGGING_SAVE_RESPONSES
|
|
|
|
# Do not change, remove, or comment out this value, or else your settings may be lost or corrupted
|
|
settings_version = 3
|
|
EOF
|
|
fi
|
|
|
|
/entrypoint-tor.sh "$@" &
|
|
|
|
exec /usr/bin/python3 /srv/app/server.py
|