From 2ec7001ff7ce0dcfd0d141a4271f582f573fc14c Mon Sep 17 00:00:00 2001 From: nnsense <2553412+nnsense@users.noreply.github.com> Date: Mon, 4 May 2026 00:10:49 +0000 Subject: [PATCH 01/19] feat: add pinchflat lxc script --- ct/pinchflat.sh | 141 ++++++++++++++++++++++++++++++++ install/pinchflat-install.sh | 150 +++++++++++++++++++++++++++++++++++ 2 files changed, 291 insertions(+) create mode 100644 ct/pinchflat.sh create mode 100644 install/pinchflat-install.sh diff --git a/ct/pinchflat.sh b/ct/pinchflat.sh new file mode 100644 index 00000000..63e7f209 --- /dev/null +++ b/ct/pinchflat.sh @@ -0,0 +1,141 @@ +#!/usr/bin/env bash +COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/nnsense/ProxmoxVED/main}" +source <(curl -fsSL "$COMMUNITY_SCRIPTS_URL/misc/build.func") + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: nnsense +# License: MIT | https://github.com/--full/ProxmoxVED/raw/main/LICENSE +# Source: https://github.com/kieraneglin/pinchflat + +APP="Pinchflat" +var_tags="${var_tags:-media;youtube;downloader}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-8}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + DOWNLOADS_PATH="/opt/pinchflat/downloads" + echo_default +} + +function advanced_settings() { + whiptail --backtitle "Proxmox VE Helper Scripts" --title "$APP LXC" --yesno "Use advanced settings?" 10 58 || return + + CT_TYPE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Container Type" --radiolist "Choose container type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF 3>&1 1>&2 2>&3) + + HN=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Hostname" 8 58 "$NSAPP" 3>&1 1>&2 2>&3) + CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "CPU cores" 8 58 "$var_cpu" 3>&1 1>&2 2>&3) + RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "RAM in MiB" 8 58 "$var_ram" 3>&1 1>&2 2>&3) + DISK_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Disk size in GiB" 8 58 "$var_disk" 3>&1 1>&2 2>&3) + + DOWNLOADS_PATH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Pinchflat Downloads" --inputbox \ +"Downloads path inside the LXC. + +Default: /opt/pinchflat/downloads +Example external mount path: /mnt/pinchflat + +If the path does not exist during installation, it will be created locally. +You can later stop the LXC, mount external storage at the same path, and start it again." \ +18 78 "/opt/pinchflat/downloads" 3>&1 1>&2 2>&3) + DOWNLOADS_PATH="${DOWNLOADS_PATH:-/opt/pinchflat/downloads}" + + BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Bridge" 8 58 "vmbr0" 3>&1 1>&2 2>&3) + + if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Network" --yesno "Use DHCP?" 8 58; then + NET="dhcp" + GATE="" + else + NET=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Static IP/CIDR" 8 58 "192.168.0.100/24" 3>&1 1>&2 2>&3) + GATE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Gateway" 8 58 "192.168.0.1" 3>&1 1>&2 2>&3) + fi + + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" +} + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -d /opt/pinchflat/app ]]; then + msg_error "No ${APP} installation found." + exit 1 + fi + + if check_for_gh_release "pinchflat" "kieraneglin/pinchflat"; then + msg_info "Stopping Service" + systemctl stop pinchflat + msg_ok "Stopped Service" + + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "pinchflat" "kieraneglin/pinchflat" "tarball" "latest" "/opt/pinchflat-src" + + msg_info "Building Pinchflat" + cd /opt/pinchflat-src || exit 1 + export MIX_ENV=prod + export ERL_FLAGS="+JPperf true" + $STD mix deps.get --only prod + $STD mix deps.compile + $STD yarn --cwd assets install + $STD mix assets.deploy + $STD mix compile + $STD mix release --overwrite + rm -rf /opt/pinchflat/app + cp -r _build/prod/rel/pinchflat /opt/pinchflat/app + msg_ok "Built Pinchflat" + + msg_info "Starting Service" + systemctl start pinchflat + msg_ok "Started Service" + msg_ok "Updated successfully!" + fi + exit +} + +export DOWNLOADS_PATH + +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}:8945${CL}" diff --git a/install/pinchflat-install.sh b/install/pinchflat-install.sh new file mode 100644 index 00000000..9ab440f1 --- /dev/null +++ b/install/pinchflat-install.sh @@ -0,0 +1,150 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: nnsense +# License: MIT | https://github.com/nnsense/ProxmoxVED/raw/main/LICENSE +# Source: https://github.com/kieraneglin/pinchflat + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" + +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt install -y \ + build-essential \ + elixir \ + erlang-dev \ + git \ + libsqlite3-dev \ + locales \ + openssh-client \ + openssl \ + pipx \ + pkg-config \ + procps \ + python3-mutagen \ + unzip \ + zip +msg_ok "Installed Dependencies" + +NODE_VERSION="20" NODE_MODULE="yarn" setup_nodejs +FFMPEG_TYPE="binary" setup_ffmpeg + +case "$(dpkg --print-architecture)" in + arm64) + DENO_ASSET="deno-aarch64-unknown-linux-gnu.zip" + YT_DLP_ASSET="yt-dlp_linux_aarch64" + ;; + *) + DENO_ASSET="deno-x86_64-unknown-linux-gnu.zip" + YT_DLP_ASSET="yt-dlp_linux" + ;; +esac +fetch_and_deploy_gh_release "deno" "denoland/deno" "prebuild" "latest" "/usr/local/bin" "$DENO_ASSET" +fetch_and_deploy_gh_release "yt-dlp" "yt-dlp/yt-dlp" "singlefile" "latest" "/usr/local/bin" "$YT_DLP_ASSET" + +msg_info "Installing Apprise" +export PIPX_HOME=/opt/pipx +export PIPX_BIN_DIR=/usr/local/bin +$STD pipx install apprise +msg_ok "Installed Apprise" + +msg_info "Setting Locale" +sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen +$STD locale-gen +msg_ok "Set Locale" + +fetch_and_deploy_gh_release "pinchflat" "kieraneglin/pinchflat" "tarball" "latest" "/opt/pinchflat-src" + +msg_info "Configuring Pinchflat" +CONFIG_PATH="/opt/pinchflat/config" +LOCAL_DOWNLOADS_PATH="/opt/pinchflat/downloads" +DOWNLOADS_PATH="${DOWNLOADS_PATH:-$LOCAL_DOWNLOADS_PATH}" +SECRET_KEY_BASE=$(openssl rand -base64 48) + +mkdir -p \ + /etc/elixir_tzdata_data \ + /etc/yt-dlp/plugins \ + /opt/pinchflat/app \ + "$CONFIG_PATH/db" \ + "$CONFIG_PATH/extras" \ + "$CONFIG_PATH/logs" \ + "$CONFIG_PATH/metadata" \ + "$DOWNLOADS_PATH" +ln -sfn "$CONFIG_PATH" /config +ln -sfn "$DOWNLOADS_PATH" /downloads +chmod ugo+rw /etc/elixir_tzdata_data /etc/yt-dlp /etc/yt-dlp/plugins + +cat </opt/pinchflat/.env +LANG=en_US.UTF-8 +LANGUAGE=en_US:en +LC_ALL=en_US.UTF-8 +MIX_ENV=prod +PHX_SERVER=true +PORT=8945 +RUN_CONTEXT=selfhosted +CONFIG_PATH=${CONFIG_PATH} +MEDIA_PATH=${DOWNLOADS_PATH} +TZ_DATA_PATH=/etc/elixir_tzdata_data +SECRET_KEY_BASE=${SECRET_KEY_BASE} +EOF +msg_ok "Configured Pinchflat" + +msg_info "Building Pinchflat" +cd /opt/pinchflat-src +export MIX_ENV=prod +export ERL_FLAGS="+JPperf true" +$STD mix local.hex --force +$STD mix local.rebar --force +$STD mix deps.get --only prod +$STD mix deps.compile +$STD yarn --cwd assets install +$STD mix assets.deploy +$STD mix compile +$STD mix release --overwrite +rm -rf /opt/pinchflat/app +cp -r _build/prod/rel/pinchflat /opt/pinchflat/app +msg_ok "Built Pinchflat" + +msg_info "Creating Service" +cat </etc/systemd/system/pinchflat.service +[Unit] +Description=Pinchflat +After=network.target + +[Service] +Type=simple +EnvironmentFile=/opt/pinchflat/.env +WorkingDirectory=/opt/pinchflat/app +UMask=0022 +ExecStartPre=/opt/pinchflat/app/bin/check_file_permissions +ExecStartPre=/opt/pinchflat/app/bin/migrate +ExecStart=/opt/pinchflat/app/bin/pinchflat start +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now pinchflat +msg_ok "Created Service" + +cat </opt/pinchflat/README +Pinchflat is installed as a systemd service. + +Web UI: http://:8945 +Config path: ${CONFIG_PATH} +Downloads path: ${DOWNLOADS_PATH} + +If an external downloads path was selected, mount it inside the LXC at the same path. +If the path did not exist during installation, it was created locally and can later be replaced by the mount. +EOF + +motd_ssh +customize +cleanup_lxc From cd618da48776e4dcff68db0cd14fe2f9ef83de40 Mon Sep 17 00:00:00 2001 From: nnsense <2553412+nnsense@users.noreply.github.com> Date: Mon, 4 May 2026 00:30:34 +0000 Subject: [PATCH 02/19] fix: add erlang syntax tools for pinchflat --- install/pinchflat-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/pinchflat-install.sh b/install/pinchflat-install.sh index 9ab440f1..6cb15da5 100644 --- a/install/pinchflat-install.sh +++ b/install/pinchflat-install.sh @@ -19,6 +19,7 @@ $STD apt install -y \ build-essential \ elixir \ erlang-dev \ + erlang-syntax-tools \ git \ libsqlite3-dev \ locales \ From 013e63d00f0b1176336b4afacbbd0b9c927f19d2 Mon Sep 17 00:00:00 2001 From: nnsense <2553412+nnsense@users.noreply.github.com> Date: Mon, 4 May 2026 00:38:19 +0000 Subject: [PATCH 03/19] fix: add erlang xmerl for pinchflat --- install/pinchflat-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/pinchflat-install.sh b/install/pinchflat-install.sh index 6cb15da5..b40f491b 100644 --- a/install/pinchflat-install.sh +++ b/install/pinchflat-install.sh @@ -20,6 +20,7 @@ $STD apt install -y \ elixir \ erlang-dev \ erlang-syntax-tools \ + erlang-xmerl \ git \ libsqlite3-dev \ locales \ From f06e17e68a3df9d76c09ec5c2a818ad8b323de5d Mon Sep 17 00:00:00 2001 From: nnsense <2553412+nnsense@users.noreply.github.com> Date: Mon, 4 May 2026 10:26:09 +0000 Subject: [PATCH 04/19] fix: add erlang runtime apps for pinchflat --- install/pinchflat-install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install/pinchflat-install.sh b/install/pinchflat-install.sh index b40f491b..32e8bd95 100644 --- a/install/pinchflat-install.sh +++ b/install/pinchflat-install.sh @@ -19,6 +19,9 @@ $STD apt install -y \ build-essential \ elixir \ erlang-dev \ + erlang-inets \ + erlang-os-mon \ + erlang-runtime-tools \ erlang-syntax-tools \ erlang-xmerl \ git \ From ebe0dc4e8ed68dd4c7f89b97b2d8b937212e4dc2 Mon Sep 17 00:00:00 2001 From: nnsense <2553412+nnsense@users.noreply.github.com> Date: Mon, 4 May 2026 21:04:28 +0000 Subject: [PATCH 05/19] fix: update func --- ct/pinchflat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/pinchflat.sh b/ct/pinchflat.sh index 63e7f209..b27003d5 100644 --- a/ct/pinchflat.sh +++ b/ct/pinchflat.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/nnsense/ProxmoxVED/main}" -source <(curl -fsSL "$COMMUNITY_SCRIPTS_URL/misc/build.func") + +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2026 community-scripts ORG # Author: nnsense From 4ddf5beaf87f79e71b11005eb2c8d324d71a8743 Mon Sep 17 00:00:00 2001 From: nnsense <2553412+nnsense@users.noreply.github.com> Date: Tue, 5 May 2026 17:21:06 +0000 Subject: [PATCH 06/19] fix: align pinchflat lxc settings --- ct/pinchflat.sh | 84 +++++------------------------------- install/pinchflat-install.sh | 9 ++-- 2 files changed, 14 insertions(+), 79 deletions(-) diff --git a/ct/pinchflat.sh b/ct/pinchflat.sh index b27003d5..76c04f31 100644 --- a/ct/pinchflat.sh +++ b/ct/pinchflat.sh @@ -1,10 +1,8 @@ #!/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: nnsense -# License: MIT | https://github.com/--full/ProxmoxVED/raw/main/LICENSE +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/kieraneglin/pinchflat APP="Pinchflat" @@ -21,76 +19,6 @@ variables color catch_errors -function default_settings() { - CT_TYPE="1" - PW="" - CT_ID=$NEXTID - HN=$NSAPP - DISK_SIZE="$var_disk" - CORE_COUNT="$var_cpu" - RAM_SIZE="$var_ram" - BRG="vmbr0" - NET="dhcp" - GATE="" - APT_CACHER="" - APT_CACHER_IP="" - DISABLEIP6="no" - MTU="" - SD="" - NS="" - MAC="" - VLAN="" - SSH="no" - VERB="no" - DOWNLOADS_PATH="/opt/pinchflat/downloads" - echo_default -} - -function advanced_settings() { - whiptail --backtitle "Proxmox VE Helper Scripts" --title "$APP LXC" --yesno "Use advanced settings?" 10 58 || return - - CT_TYPE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Container Type" --radiolist "Choose container type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF 3>&1 1>&2 2>&3) - - HN=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Hostname" 8 58 "$NSAPP" 3>&1 1>&2 2>&3) - CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "CPU cores" 8 58 "$var_cpu" 3>&1 1>&2 2>&3) - RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "RAM in MiB" 8 58 "$var_ram" 3>&1 1>&2 2>&3) - DISK_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Disk size in GiB" 8 58 "$var_disk" 3>&1 1>&2 2>&3) - - DOWNLOADS_PATH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Pinchflat Downloads" --inputbox \ -"Downloads path inside the LXC. - -Default: /opt/pinchflat/downloads -Example external mount path: /mnt/pinchflat - -If the path does not exist during installation, it will be created locally. -You can later stop the LXC, mount external storage at the same path, and start it again." \ -18 78 "/opt/pinchflat/downloads" 3>&1 1>&2 2>&3) - DOWNLOADS_PATH="${DOWNLOADS_PATH:-/opt/pinchflat/downloads}" - - BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Bridge" 8 58 "vmbr0" 3>&1 1>&2 2>&3) - - if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Network" --yesno "Use DHCP?" 8 58; then - NET="dhcp" - GATE="" - else - NET=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Static IP/CIDR" 8 58 "192.168.0.100/24" 3>&1 1>&2 2>&3) - GATE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Gateway" 8 58 "192.168.0.1" 3>&1 1>&2 2>&3) - fi - - APT_CACHER="" - APT_CACHER_IP="" - DISABLEIP6="no" - MTU="" - SD="" - NS="" - MAC="" - VLAN="" - SSH="no" - VERB="no" -} - function update_script() { header_info check_container_storage @@ -130,6 +58,16 @@ function update_script() { exit } +DOWNLOADS_PATH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Pinchflat Downloads" --inputbox \ +"Downloads path inside the LXC. + +Default: /opt/pinchflat/downloads +Example external mount path: /mnt/pinchflat + +If the path does not exist during installation, it will be created locally. +You can later stop the LXC, mount external storage at the same path, and start it again." \ +18 78 "${DOWNLOADS_PATH:-/opt/pinchflat/downloads}" 3>&1 1>&2 2>&3 || true) +DOWNLOADS_PATH="${DOWNLOADS_PATH:-/opt/pinchflat/downloads}" export DOWNLOADS_PATH start diff --git a/install/pinchflat-install.sh b/install/pinchflat-install.sh index 32e8bd95..903f001d 100644 --- a/install/pinchflat-install.sh +++ b/install/pinchflat-install.sh @@ -2,7 +2,7 @@ # Copyright (c) 2021-2026 community-scripts ORG # Author: nnsense -# License: MIT | https://github.com/nnsense/ProxmoxVED/raw/main/LICENSE +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/kieraneglin/pinchflat source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" @@ -33,7 +33,6 @@ $STD apt install -y \ pkg-config \ procps \ python3-mutagen \ - unzip \ zip msg_ok "Installed Dependencies" @@ -68,9 +67,7 @@ fetch_and_deploy_gh_release "pinchflat" "kieraneglin/pinchflat" "tarball" "lates msg_info "Configuring Pinchflat" CONFIG_PATH="/opt/pinchflat/config" -LOCAL_DOWNLOADS_PATH="/opt/pinchflat/downloads" -DOWNLOADS_PATH="${DOWNLOADS_PATH:-$LOCAL_DOWNLOADS_PATH}" -SECRET_KEY_BASE=$(openssl rand -base64 48) +DOWNLOADS_PATH="${DOWNLOADS_PATH:-/opt/pinchflat/downloads}" mkdir -p \ /etc/elixir_tzdata_data \ @@ -96,7 +93,7 @@ RUN_CONTEXT=selfhosted CONFIG_PATH=${CONFIG_PATH} MEDIA_PATH=${DOWNLOADS_PATH} TZ_DATA_PATH=/etc/elixir_tzdata_data -SECRET_KEY_BASE=${SECRET_KEY_BASE} +SECRET_KEY_BASE=$(openssl rand -base64 48) EOF msg_ok "Configured Pinchflat" From 8815335de7651700e2b19637c1cf0d5da0defc51 Mon Sep 17 00:00:00 2001 From: nnsense <2553412+nnsense@users.noreply.github.com> Date: Tue, 5 May 2026 17:27:21 +0000 Subject: [PATCH 07/19] feat: add pinchflat metadata --- json/pinchflat.json | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 json/pinchflat.json diff --git a/json/pinchflat.json b/json/pinchflat.json new file mode 100644 index 00000000..04339fd7 --- /dev/null +++ b/json/pinchflat.json @@ -0,0 +1,44 @@ +{ + "name": "Pinchflat", + "slug": "pinchflat", + "categories": [ + 13 + ], + "date_created": "2026-05-05", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8945, + "documentation": "https://github.com/kieraneglin/pinchflat/wiki", + "website": "https://github.com/kieraneglin/pinchflat", + "logo": "https://raw.githubusercontent.com/kieraneglin/pinchflat/master/priv/static/images/originals/logo-white-wordmark-with-background.png", + "description": "Pinchflat is a self-hosted YouTube media manager built with yt-dlp for automatically downloading and organizing content from channels and playlists.", + "install_methods": [ + { + "type": "default", + "script": "ct/pinchflat.sh", + "config_path": "/opt/pinchflat/.env", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 8, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "For large media libraries, use an external mount path such as `/mnt/pinchflat` for downloads.", + "type": "info" + }, + { + "text": "Pinchflat data is stored in `/opt/pinchflat/config`; downloaded media is stored in the selected downloads path.", + "type": "info" + } + ] +} From bc3db309a2ef301cd6f06adbfad736c2c617357a Mon Sep 17 00:00:00 2001 From: nnsense <2553412+nnsense@users.noreply.github.com> Date: Fri, 8 May 2026 12:55:27 +0000 Subject: [PATCH 08/19] Fix --- ct/pinchflat.sh | 13 +------------ install/pinchflat-install.sh | 29 ++++++----------------------- json/pinchflat.json | 8 ++++---- 3 files changed, 11 insertions(+), 39 deletions(-) diff --git a/ct/pinchflat.sh b/ct/pinchflat.sh index 76c04f31..86ad2fa9 100644 --- a/ct/pinchflat.sh +++ b/ct/pinchflat.sh @@ -58,22 +58,11 @@ function update_script() { exit } -DOWNLOADS_PATH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Pinchflat Downloads" --inputbox \ -"Downloads path inside the LXC. - -Default: /opt/pinchflat/downloads -Example external mount path: /mnt/pinchflat - -If the path does not exist during installation, it will be created locally. -You can later stop the LXC, mount external storage at the same path, and start it again." \ -18 78 "${DOWNLOADS_PATH:-/opt/pinchflat/downloads}" 3>&1 1>&2 2>&3 || true) -DOWNLOADS_PATH="${DOWNLOADS_PATH:-/opt/pinchflat/downloads}" -export DOWNLOADS_PATH - 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}:8945${CL}" diff --git a/install/pinchflat-install.sh b/install/pinchflat-install.sh index 903f001d..fb30981b 100644 --- a/install/pinchflat-install.sh +++ b/install/pinchflat-install.sh @@ -36,19 +36,11 @@ $STD apt install -y \ zip msg_ok "Installed Dependencies" -NODE_VERSION="20" NODE_MODULE="yarn" setup_nodejs +NODE_VERSION="24" NODE_MODULE="yarn" setup_nodejs FFMPEG_TYPE="binary" setup_ffmpeg +DENO_ASSET="deno-x86_64-unknown-linux-gnu.zip" +YT_DLP_ASSET="yt-dlp_linux" -case "$(dpkg --print-architecture)" in - arm64) - DENO_ASSET="deno-aarch64-unknown-linux-gnu.zip" - YT_DLP_ASSET="yt-dlp_linux_aarch64" - ;; - *) - DENO_ASSET="deno-x86_64-unknown-linux-gnu.zip" - YT_DLP_ASSET="yt-dlp_linux" - ;; -esac fetch_and_deploy_gh_release "deno" "denoland/deno" "prebuild" "latest" "/usr/local/bin" "$DENO_ASSET" fetch_and_deploy_gh_release "yt-dlp" "yt-dlp/yt-dlp" "singlefile" "latest" "/usr/local/bin" "$YT_DLP_ASSET" @@ -67,7 +59,7 @@ fetch_and_deploy_gh_release "pinchflat" "kieraneglin/pinchflat" "tarball" "lates msg_info "Configuring Pinchflat" CONFIG_PATH="/opt/pinchflat/config" -DOWNLOADS_PATH="${DOWNLOADS_PATH:-/opt/pinchflat/downloads}" +DOWNLOADS_PATH="/opt/pinchflat/downloads" mkdir -p \ /etc/elixir_tzdata_data \ @@ -114,6 +106,7 @@ cp -r _build/prod/rel/pinchflat /opt/pinchflat/app msg_ok "Built Pinchflat" msg_info "Creating Service" + cat </etc/systemd/system/pinchflat.service [Unit] Description=Pinchflat @@ -133,20 +126,10 @@ RestartSec=5 [Install] WantedBy=multi-user.target EOF + systemctl enable -q --now pinchflat msg_ok "Created Service" -cat </opt/pinchflat/README -Pinchflat is installed as a systemd service. - -Web UI: http://:8945 -Config path: ${CONFIG_PATH} -Downloads path: ${DOWNLOADS_PATH} - -If an external downloads path was selected, mount it inside the LXC at the same path. -If the path did not exist during installation, it was created locally and can later be replaced by the mount. -EOF - motd_ssh customize cleanup_lxc diff --git a/json/pinchflat.json b/json/pinchflat.json index 04339fd7..5fd58605 100644 --- a/json/pinchflat.json +++ b/json/pinchflat.json @@ -11,7 +11,7 @@ "interface_port": 8945, "documentation": "https://github.com/kieraneglin/pinchflat/wiki", "website": "https://github.com/kieraneglin/pinchflat", - "logo": "https://raw.githubusercontent.com/kieraneglin/pinchflat/master/priv/static/images/originals/logo-white-wordmark-with-background.png", + "logo": "https://raw.githubusercontent.com/kieraneglin/pinchflat/67d8bd5598f4461c5435bcc66fc8d02b00c607cb/priv/static/images/icon-2024-03-20.png", "description": "Pinchflat is a self-hosted YouTube media manager built with yt-dlp for automatically downloading and organizing content from channels and playlists.", "install_methods": [ { @@ -33,11 +33,11 @@ }, "notes": [ { - "text": "For large media libraries, use an external mount path such as `/mnt/pinchflat` for downloads.", - "type": "info" + "text": "For large media libraries, mount external storage at `/opt/pinchflat/downloads` before downloading media to avoid filling the LXC disk.", + "type": "warning" }, { - "text": "Pinchflat data is stored in `/opt/pinchflat/config`; downloaded media is stored in the selected downloads path.", + "text": "Pinchflat data is stored in `/opt/pinchflat/config`; downloaded media is stored in `/opt/pinchflat/downloads`.", "type": "info" } ] From c9b212169d45b1a702aec6a2d9921d4a64db2366 Mon Sep 17 00:00:00 2001 From: nnsense <2553412+nnsense@users.noreply.github.com> Date: Fri, 8 May 2026 14:13:25 +0000 Subject: [PATCH 09/19] Fix vars --- ct/pinchflat.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ct/pinchflat.sh b/ct/pinchflat.sh index 86ad2fa9..c2e6446c 100644 --- a/ct/pinchflat.sh +++ b/ct/pinchflat.sh @@ -12,7 +12,9 @@ var_ram="${var_ram:-2048}" var_disk="${var_disk:-8}" var_os="${var_os:-debian}" var_version="${var_version:-13}" -var_unprivileged="${var_unprivileged:-1}" +var_unprivileged="${var_unprivileged:0}" +var_nesting="${var_nesting:-0}" +var_gpu="${var_gpu:-1}" header_info "$APP" variables From 6e1f31f318c0912d2f270ca07d2c85b26c889498 Mon Sep 17 00:00:00 2001 From: nnsense <2553412+nnsense@users.noreply.github.com> Date: Fri, 8 May 2026 14:51:17 +0000 Subject: [PATCH 10/19] Fix logo and notes --- json/pinchflat.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/json/pinchflat.json b/json/pinchflat.json index 5fd58605..3e230063 100644 --- a/json/pinchflat.json +++ b/json/pinchflat.json @@ -11,7 +11,7 @@ "interface_port": 8945, "documentation": "https://github.com/kieraneglin/pinchflat/wiki", "website": "https://github.com/kieraneglin/pinchflat", - "logo": "https://raw.githubusercontent.com/kieraneglin/pinchflat/67d8bd5598f4461c5435bcc66fc8d02b00c607cb/priv/static/images/icon-2024-03-20.png", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/pinchflat.webp", "description": "Pinchflat is a self-hosted YouTube media manager built with yt-dlp for automatically downloading and organizing content from channels and playlists.", "install_methods": [ { @@ -37,7 +37,11 @@ "type": "warning" }, { - "text": "Pinchflat data is stored in `/opt/pinchflat/config`; downloaded media is stored in `/opt/pinchflat/downloads`.", + "text": "Pinchflat data is stored in `/opt/pinchflat/config`", + "type": "info" + }, + { + "text": "downloaded media is stored in `/opt/pinchflat/downloads`", "type": "info" } ] From 897d3e39c9f020821116d5a0cccea84884d2f23c Mon Sep 17 00:00:00 2001 From: nnsense <2553412+nnsense@users.noreply.github.com> Date: Fri, 8 May 2026 14:59:55 +0000 Subject: [PATCH 11/19] Removed unneeded vars --- install/pinchflat-install.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/install/pinchflat-install.sh b/install/pinchflat-install.sh index fb30981b..3aecb5c1 100644 --- a/install/pinchflat-install.sh +++ b/install/pinchflat-install.sh @@ -38,11 +38,9 @@ msg_ok "Installed Dependencies" NODE_VERSION="24" NODE_MODULE="yarn" setup_nodejs FFMPEG_TYPE="binary" setup_ffmpeg -DENO_ASSET="deno-x86_64-unknown-linux-gnu.zip" -YT_DLP_ASSET="yt-dlp_linux" -fetch_and_deploy_gh_release "deno" "denoland/deno" "prebuild" "latest" "/usr/local/bin" "$DENO_ASSET" -fetch_and_deploy_gh_release "yt-dlp" "yt-dlp/yt-dlp" "singlefile" "latest" "/usr/local/bin" "$YT_DLP_ASSET" +fetch_and_deploy_gh_release "deno" "denoland/deno" "prebuild" "latest" "/usr/local/bin" "deno-x86_64-unknown-linux-gnu.zip" +fetch_and_deploy_gh_release "yt-dlp" "yt-dlp/yt-dlp" "singlefile" "latest" "/usr/local/bin" "yt-dlp_linux" msg_info "Installing Apprise" export PIPX_HOME=/opt/pipx From a5507c8cade2ce362131cbea16affa4f112d9226 Mon Sep 17 00:00:00 2001 From: nnsense <2553412+nnsense@users.noreply.github.com> Date: Sun, 10 May 2026 02:29:37 +0200 Subject: [PATCH 12/19] Apply suggestion from @CrazyWolf13 Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --- install/pinchflat-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/pinchflat-install.sh b/install/pinchflat-install.sh index 3aecb5c1..962ee2fe 100644 --- a/install/pinchflat-install.sh +++ b/install/pinchflat-install.sh @@ -104,7 +104,6 @@ cp -r _build/prod/rel/pinchflat /opt/pinchflat/app msg_ok "Built Pinchflat" msg_info "Creating Service" - cat </etc/systemd/system/pinchflat.service [Unit] Description=Pinchflat From cd88dca5262e41a5493065f8ded083551500565c Mon Sep 17 00:00:00 2001 From: nnsense <2553412+nnsense@users.noreply.github.com> Date: Sun, 10 May 2026 15:38:34 +0200 Subject: [PATCH 13/19] Update ct/pinchflat.sh Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --- ct/pinchflat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/pinchflat.sh b/ct/pinchflat.sh index c2e6446c..f8940d3f 100644 --- a/ct/pinchflat.sh +++ b/ct/pinchflat.sh @@ -39,7 +39,7 @@ function update_script() { CLEAN_INSTALL=1 fetch_and_deploy_gh_release "pinchflat" "kieraneglin/pinchflat" "tarball" "latest" "/opt/pinchflat-src" msg_info "Building Pinchflat" - cd /opt/pinchflat-src || exit 1 + cd /opt/pinchflat-src export MIX_ENV=prod export ERL_FLAGS="+JPperf true" $STD mix deps.get --only prod From 4199ec7761eb97b90ea66d1c33ef03b237deebb3 Mon Sep 17 00:00:00 2001 From: nnsense <2553412+nnsense@users.noreply.github.com> Date: Sun, 10 May 2026 15:39:23 +0200 Subject: [PATCH 14/19] Update install/pinchflat-install.sh Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --- install/pinchflat-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/pinchflat-install.sh b/install/pinchflat-install.sh index 962ee2fe..ad40f9ae 100644 --- a/install/pinchflat-install.sh +++ b/install/pinchflat-install.sh @@ -38,7 +38,6 @@ msg_ok "Installed Dependencies" NODE_VERSION="24" NODE_MODULE="yarn" setup_nodejs FFMPEG_TYPE="binary" setup_ffmpeg - fetch_and_deploy_gh_release "deno" "denoland/deno" "prebuild" "latest" "/usr/local/bin" "deno-x86_64-unknown-linux-gnu.zip" fetch_and_deploy_gh_release "yt-dlp" "yt-dlp/yt-dlp" "singlefile" "latest" "/usr/local/bin" "yt-dlp_linux" From 5f97f0ad3fd5d7823dd93afcba30c632da1d0172 Mon Sep 17 00:00:00 2001 From: nnsense <2553412+nnsense@users.noreply.github.com> Date: Sun, 10 May 2026 15:41:40 +0200 Subject: [PATCH 15/19] Remove default nesting variable from pinchflat.sh --- ct/pinchflat.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ct/pinchflat.sh b/ct/pinchflat.sh index f8940d3f..98883b33 100644 --- a/ct/pinchflat.sh +++ b/ct/pinchflat.sh @@ -13,7 +13,6 @@ var_disk="${var_disk:-8}" var_os="${var_os:-debian}" var_version="${var_version:-13}" var_unprivileged="${var_unprivileged:0}" -var_nesting="${var_nesting:-0}" var_gpu="${var_gpu:-1}" header_info "$APP" From cd56a14e637e09e7fe60c4aee95571fa88a513fb Mon Sep 17 00:00:00 2001 From: nnsense <2553412+nnsense@users.noreply.github.com> Date: Sun, 10 May 2026 19:28:00 +0000 Subject: [PATCH 16/19] Added hwaccel, testing unprivileged --- ct/pinchflat.sh | 4 ++-- install/pinchflat-install.sh | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ct/pinchflat.sh b/ct/pinchflat.sh index 98883b33..7eb8dc95 100644 --- a/ct/pinchflat.sh +++ b/ct/pinchflat.sh @@ -12,8 +12,8 @@ var_ram="${var_ram:-2048}" var_disk="${var_disk:-8}" var_os="${var_os:-debian}" var_version="${var_version:-13}" -var_unprivileged="${var_unprivileged:0}" -var_gpu="${var_gpu:-1}" +var_unprivileged="${var_unprivileged:-1}" +var_gpu="${var_gpu:-yes}" header_info "$APP" variables diff --git a/install/pinchflat-install.sh b/install/pinchflat-install.sh index ad40f9ae..bfe7a36e 100644 --- a/install/pinchflat-install.sh +++ b/install/pinchflat-install.sh @@ -38,6 +38,7 @@ msg_ok "Installed Dependencies" NODE_VERSION="24" NODE_MODULE="yarn" setup_nodejs FFMPEG_TYPE="binary" setup_ffmpeg +setup_hwaccel fetch_and_deploy_gh_release "deno" "denoland/deno" "prebuild" "latest" "/usr/local/bin" "deno-x86_64-unknown-linux-gnu.zip" fetch_and_deploy_gh_release "yt-dlp" "yt-dlp/yt-dlp" "singlefile" "latest" "/usr/local/bin" "yt-dlp_linux" From 8c3e0fe75fca6a8a21d8f06fa3fc1d61c46acae0 Mon Sep 17 00:00:00 2001 From: nnsense <2553412+nnsense@users.noreply.github.com> Date: Thu, 14 May 2026 15:16:41 +0200 Subject: [PATCH 17/19] Update install/pinchflat-install.sh Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --- install/pinchflat-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/pinchflat-install.sh b/install/pinchflat-install.sh index bfe7a36e..b8dc85fc 100644 --- a/install/pinchflat-install.sh +++ b/install/pinchflat-install.sh @@ -58,7 +58,6 @@ fetch_and_deploy_gh_release "pinchflat" "kieraneglin/pinchflat" "tarball" "lates msg_info "Configuring Pinchflat" CONFIG_PATH="/opt/pinchflat/config" DOWNLOADS_PATH="/opt/pinchflat/downloads" - mkdir -p \ /etc/elixir_tzdata_data \ /etc/yt-dlp/plugins \ From 91c91f383d0e689b245f45716b5d49ed14b26351 Mon Sep 17 00:00:00 2001 From: nnsense <2553412+nnsense@users.noreply.github.com> Date: Thu, 14 May 2026 15:17:30 +0200 Subject: [PATCH 18/19] Update install/pinchflat-install.sh Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --- install/pinchflat-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/pinchflat-install.sh b/install/pinchflat-install.sh index b8dc85fc..162c08ef 100644 --- a/install/pinchflat-install.sh +++ b/install/pinchflat-install.sh @@ -122,7 +122,6 @@ RestartSec=5 [Install] WantedBy=multi-user.target EOF - systemctl enable -q --now pinchflat msg_ok "Created Service" From 99c2ec2acf5dc2f7cff3784f2e7c1fe901fde9bf Mon Sep 17 00:00:00 2001 From: nnsense <2553412+nnsense@users.noreply.github.com> Date: Thu, 14 May 2026 13:22:39 +0000 Subject: [PATCH 19/19] Cleanup --- install/pinchflat-install.sh | 5 ----- json/pinchflat.json | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/install/pinchflat-install.sh b/install/pinchflat-install.sh index 162c08ef..c8c5db1f 100644 --- a/install/pinchflat-install.sh +++ b/install/pinchflat-install.sh @@ -48,11 +48,6 @@ export PIPX_BIN_DIR=/usr/local/bin $STD pipx install apprise msg_ok "Installed Apprise" -msg_info "Setting Locale" -sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen -$STD locale-gen -msg_ok "Set Locale" - fetch_and_deploy_gh_release "pinchflat" "kieraneglin/pinchflat" "tarball" "latest" "/opt/pinchflat-src" msg_info "Configuring Pinchflat" diff --git a/json/pinchflat.json b/json/pinchflat.json index 3e230063..45d46ff4 100644 --- a/json/pinchflat.json +++ b/json/pinchflat.json @@ -33,7 +33,7 @@ }, "notes": [ { - "text": "For large media libraries, mount external storage at `/opt/pinchflat/downloads` before downloading media to avoid filling the LXC disk.", + "text": "For large media libraries, increase disk space or mount external storage at `/opt/pinchflat/downloads` before downloading media to avoid filling the LXC disk.", "type": "warning" }, {