mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-04-19 13:58:06 +00:00
Migrate yt-dlp-webui to ProxmoxVE (#3364)
* 'Add new script' * Update yt-dlp-webui-install.sh * Update yt-dlp-webui.sh * Update yt-dlp-webui.json --------- Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
This commit is contained in:
parent
42f376c072
commit
a03dd43e6e
63
ct/yt-dlp-webui.sh
Normal file
63
ct/yt-dlp-webui.sh
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: CrazyWolf13
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://github.com/marcopiovanello/yt-dlp-web-ui
|
||||||
|
|
||||||
|
APP="yt-dlp-webui"
|
||||||
|
var_tags="downloads;yt-dlp"
|
||||||
|
var_cpu="2"
|
||||||
|
var_ram="1024"
|
||||||
|
var_disk="4"
|
||||||
|
var_os="debian"
|
||||||
|
var_version="12"
|
||||||
|
var_unprivileged="1"
|
||||||
|
|
||||||
|
header_info "$APP"
|
||||||
|
variables
|
||||||
|
color
|
||||||
|
catch_errors
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
if [[ ! -f /usr/local/bin/yt-dlp-webui ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg_info "Updating yt-dlp"
|
||||||
|
$STD yt-dlp -U
|
||||||
|
msg_ok "Updated yt-dlp"
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/marcopiovanello/yt-dlp-web-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
if [[ "${RELEASE}" != "$(cat /opt/yt-dlp-webui_version.txt)" ]] || [[ ! -f /opt/yt-dlp-webui_version.txt ]]; then
|
||||||
|
|
||||||
|
msg_info "Stopping $APP"
|
||||||
|
systemctl stop yt-dlp-webui
|
||||||
|
msg_ok "Stopped $APP"
|
||||||
|
|
||||||
|
msg_info "Updating $APP to v${RELEASE}"
|
||||||
|
rm -rf /usr/local/bin/yt-dlp-webui
|
||||||
|
wget -q "https://github.com/marcopiovanello/yt-dlp-web-ui/releases/download/v${RELEASE}/yt-dlp-webui_linux-amd64" -O /usr/local/bin/yt-dlp-webui
|
||||||
|
chmod +x /usr/local/bin/yt-dlp-webui
|
||||||
|
msg_ok "Updated $APP LXC"
|
||||||
|
|
||||||
|
msg_info "Starting $APP"
|
||||||
|
systemctl start yt-dlp-webui
|
||||||
|
msg_ok "Started $APP"
|
||||||
|
else
|
||||||
|
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||||
|
fi
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
start
|
||||||
|
build_container
|
||||||
|
description
|
||||||
|
|
||||||
|
msg_ok "Completed Successfully!\n"
|
||||||
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||||
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3033${CL}"
|
47
frontend/public/json/yt-dlp-webui.json
Normal file
47
frontend/public/json/yt-dlp-webui.json
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
"name": "yt-dlp-webui",
|
||||||
|
"slug": "yt-dlp-webui",
|
||||||
|
"categories": [
|
||||||
|
14
|
||||||
|
],
|
||||||
|
"date_created": "2025-03-21",
|
||||||
|
"type": "ct",
|
||||||
|
"updateable": true,
|
||||||
|
"privileged": false,
|
||||||
|
"interface_port": 3033,
|
||||||
|
"documentation": "https://github.com/marcopiovanello/yt-dlp-web-ui",
|
||||||
|
"website": "https://github.com/marcopiovanello/yt-dlp-web-ui",
|
||||||
|
"logo": "https://raw.githubusercontent.com/marcopiovanello/yt-dlp-web-ui/refs/heads/master/frontend/src/assets/favicon.ico",
|
||||||
|
"description": "A not so terrible web ui for yt-dlp.\nHigh performance extendeable web ui and RPC server for yt-dlp with low impact on resources.\nCreated for the only purpose of fetching videos from my server/nas and monitor upcoming livestreams.",
|
||||||
|
"install_methods": [
|
||||||
|
{
|
||||||
|
"type": "default",
|
||||||
|
"script": "ct/yt-dlp-webui.sh",
|
||||||
|
"resources": {
|
||||||
|
"cpu": 2,
|
||||||
|
"ram": 1024,
|
||||||
|
"hdd": 4,
|
||||||
|
"os": "Debian",
|
||||||
|
"version": "12"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default_credentials": {
|
||||||
|
"username": "admin",
|
||||||
|
"password": null
|
||||||
|
},
|
||||||
|
"notes": [
|
||||||
|
{
|
||||||
|
"text": "Show password: `cat ~/yt-dlp-webui.creds`",
|
||||||
|
"type": "info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "The config file is located in `/opt/yt-dlp-webui/config.conf`",
|
||||||
|
"type": "info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "Make sure to either mount an external path or increase the Disk space afterwards",
|
||||||
|
"type": "info"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
103
install/yt-dlp-webui-install.sh
Normal file
103
install/yt-dlp-webui-install.sh
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: CrazyWolf13
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://github.com/marcopiovanello/yt-dlp-web-ui
|
||||||
|
|
||||||
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
|
color
|
||||||
|
verb_ip6
|
||||||
|
catch_errors
|
||||||
|
setting_up_container
|
||||||
|
network_check
|
||||||
|
update_os
|
||||||
|
|
||||||
|
msg_info "Installing Dependencies"
|
||||||
|
$STD apt-get install -y \
|
||||||
|
sudo \
|
||||||
|
mc \
|
||||||
|
curl \
|
||||||
|
ffmpeg
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Installing ${APPLICATION}"
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/marcopiovanello/yt-dlp-web-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
wget -q "https://github.com/marcopiovanello/yt-dlp-web-ui/releases/download/v${RELEASE}/yt-dlp-webui_linux-amd64" -O /usr/local/bin/yt-dlp-webui
|
||||||
|
chmod +x /usr/local/bin/yt-dlp-webui
|
||||||
|
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||||
|
msg_ok "Installed ${APPLICATION}"
|
||||||
|
|
||||||
|
msg_info "Installing yt-dlp"
|
||||||
|
wget -q https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O /usr/local/bin/yt-dlp
|
||||||
|
chmod a+rx /usr/local/bin/yt-dlp
|
||||||
|
msg_ok "Installed yt-dlp"
|
||||||
|
|
||||||
|
msg_info "Setting up ${APPLICATION}"
|
||||||
|
mkdir -p /opt/yt-dlp-webui
|
||||||
|
mkdir /downloads
|
||||||
|
RPC_PASSWORD=$(openssl rand -base64 16)
|
||||||
|
{
|
||||||
|
echo "yt-dlp-webui-Credentials"
|
||||||
|
echo "Username: admin"
|
||||||
|
echo "Password: ${RPC_PASSWORD}"
|
||||||
|
} >> ~/yt-dlp-webui.creds
|
||||||
|
|
||||||
|
cat <<EOF > /opt/yt-dlp-webui/config.conf
|
||||||
|
# Host where server will listen at (default: "0.0.0.0")
|
||||||
|
#host: 0.0.0.0
|
||||||
|
|
||||||
|
# Port where server will listen at (default: 3033)
|
||||||
|
port: 3033
|
||||||
|
|
||||||
|
# Directory where downloaded files will be stored (default: ".")
|
||||||
|
downloadPath: /downloads
|
||||||
|
|
||||||
|
# [optional] Enable RPC authentication (requires username and password)
|
||||||
|
require_auth: true
|
||||||
|
username: admin
|
||||||
|
password: ${RPC_PASSWORD}
|
||||||
|
|
||||||
|
# [optional] The download queue size (default: logical cpu cores)
|
||||||
|
queue_size: 4 # min. 2
|
||||||
|
|
||||||
|
# [optional] Full path to the yt-dlp (default: "yt-dlp")
|
||||||
|
downloaderPath: /usr/local/bin/yt-dlp
|
||||||
|
|
||||||
|
# [optional] Enable file based logging with rotation (default: false)
|
||||||
|
#enable_file_logging: false
|
||||||
|
|
||||||
|
# [optional] Directory where the log file will be stored (default: ".")
|
||||||
|
#log_path: .
|
||||||
|
|
||||||
|
# [optional] Directory where the session database file will be stored (default: ".")
|
||||||
|
#session_file_path: .
|
||||||
|
|
||||||
|
# [optional] Path where the sqlite database will be created/opened (default: "./local.db")
|
||||||
|
#local_database_path
|
||||||
|
|
||||||
|
# [optional] Path where a custom frontend will be loaded (instead of the embedded one)
|
||||||
|
#frontend_path: ./web/solid-frontend
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat <<EOF > /etc/systemd/system/yt-dlp-webui.service
|
||||||
|
[Unit]
|
||||||
|
Description=yt-dlp-webui service file
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/local/bin/yt-dlp-webui --conf /opt/yt-dlp-webui/config.conf
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
systemctl enable -q --now yt-dlp-webui
|
||||||
|
msg_ok "Set up ${APPLICATION}"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
Loading…
x
Reference in New Issue
Block a user