Compare commits

...

3 Commits

Author SHA1 Message Date
Matthew Stern
741164de3e switch from apt-get to apt 2026-01-28 08:51:33 +01:00
Matthew Stern
d25f48f5be Align to code standards 2026-01-28 08:51:33 +01:00
Matthew Stern
ad48c14cf3 feat: add isponsorblocktv 2026-01-28 08:51:33 +01:00
3 changed files with 215 additions and 0 deletions

74
ct/isponsorblocktv.sh Normal file
View File

@ -0,0 +1,74 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: Matthew Stern (sternma)
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://github.com/dmunozv04/iSponsorBlockTV
APP="iSponsorBlockTV"
var_tags="${var_tags:-media;automation}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-1024}"
var_disk="${var_disk:-4}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/isponsorblocktv ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV"; then
msg_info "Stopping Service"
systemctl stop isponsorblocktv
msg_ok "Stopped Service"
if [[ -d /var/lib/isponsorblocktv ]]; then
msg_info "Backing up Data"
cp -r /var/lib/isponsorblocktv /var/lib/isponsorblocktv_data_backup
msg_ok "Backed up Data"
fi
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV"
msg_info "Setting up iSponsorBlockTV"
$STD python3 -m venv /opt/isponsorblocktv/venv
$STD /opt/isponsorblocktv/venv/bin/pip install --upgrade pip
$STD /opt/isponsorblocktv/venv/bin/pip install /opt/isponsorblocktv
msg_ok "Set up iSponsorBlockTV"
if [[ -d /var/lib/isponsorblocktv_data_backup ]]; then
msg_info "Restoring Data"
rm -rf /var/lib/isponsorblocktv
cp -r /var/lib/isponsorblocktv_data_backup /var/lib/isponsorblocktv
rm -rf /var/lib/isponsorblocktv_data_backup
msg_ok "Restored Data"
fi
msg_info "Starting Service"
systemctl start isponsorblocktv
msg_ok "Started Service"
msg_ok "Updated successfully!"
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} Run the setup wizard inside the container with:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}iSponsorBlockTV setup${CL}"

View File

@ -0,0 +1,44 @@
{
"name": "iSponsorBlockTV",
"slug": "isponsorblocktv",
"categories": [
13
],
"date_created": "2026-01-25",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": null,
"documentation": "https://github.com/dmunozv04/iSponsorBlockTV/wiki",
"website": "https://github.com/dmunozv04/iSponsorBlockTV",
"logo": "https://raw.githubusercontent.com/ajayyy/SponsorBlock/master/public/icons/IconSponsorBlocker512px.png",
"config_path": "/var/lib/isponsorblocktv/config.json",
"description": "iSponsorBlockTV connects to YouTube TV clients and automatically skips SponsorBlock segments, mutes ads, and presses the Skip Ad button when available.",
"install_methods": [
{
"type": "default",
"script": "ct/isponsorblocktv.sh",
"resources": {
"cpu": 1,
"ram": 1024,
"hdd": 4,
"os": "debian",
"version": "13"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "No web UI; run `iSponsorBlockTV setup` inside the container to configure.",
"type": "info"
},
{
"text": "SSDP auto-discovery requires multicast on your bridge; manual pairing works without it.",
"type": "info"
}
]
}

View File

@ -0,0 +1,97 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: Matthew Stern (sternma)
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://github.com/dmunozv04/iSponsorBlockTV
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
INSTALL_DIR="/opt/isponsorblocktv"
DATA_DIR="/var/lib/isponsorblocktv"
msg_info "Installing Dependencies"
$STD apt install -y \
python3 \
python3-venv \
python3-pip
msg_ok "Installed Dependencies"
fetch_and_deploy_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV"
msg_info "Setting up iSponsorBlockTV"
$STD python3 -m venv "$INSTALL_DIR/venv"
$STD "$INSTALL_DIR/venv/bin/pip" install --upgrade pip
$STD "$INSTALL_DIR/venv/bin/pip" install "$INSTALL_DIR"
msg_ok "Set up iSponsorBlockTV"
msg_info "Creating data directory"
install -d "$DATA_DIR"
msg_ok "Created data directory"
msg_info "Creating Service"
cat <<EOT >/etc/systemd/system/isponsorblocktv.service
[Unit]
Description=iSponsorBlockTV
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=root
Group=root
WorkingDirectory=$INSTALL_DIR
Environment=iSPBTV_data_dir=$DATA_DIR
ExecStart=$INSTALL_DIR/venv/bin/iSponsorBlockTV
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOT
systemctl enable -q --now isponsorblocktv
msg_ok "Created Service"
msg_info "Creating CLI wrapper"
install -d /usr/local/bin
cat <<'EOT' >/usr/local/bin/iSponsorBlockTV
#!/usr/bin/env bash
export iSPBTV_data_dir="/var/lib/isponsorblocktv"
set +e
/opt/isponsorblocktv/venv/bin/iSponsorBlockTV "$@"
status=$?
set -e
case "${1:-}" in
setup|setup-cli)
systemctl restart isponsorblocktv >/dev/null 2>&1 || true
;;
esac
exit $status
EOT
chmod +x /usr/local/bin/iSponsorBlockTV
ln -sf /usr/local/bin/iSponsorBlockTV /usr/bin/iSponsorBlockTV
msg_ok "Created CLI wrapper"
msg_info "Setting default data dir for shells"
cat <<'EOT' >/etc/profile.d/isponsorblocktv.sh
export iSPBTV_data_dir="/var/lib/isponsorblocktv"
EOT
if ! grep -q '^iSPBTV_data_dir=' /etc/environment 2>/dev/null; then
cat <<'EOT' >>/etc/environment
iSPBTV_data_dir=/var/lib/isponsorblocktv
EOT
fi
msg_ok "Set default data dir for shells"
motd_ssh
customize
cleanup_lxc