diff --git a/ct/headers/tinymediamanager b/ct/headers/tinymediamanager new file mode 100644 index 0000000000..15e98caad6 --- /dev/null +++ b/ct/headers/tinymediamanager @@ -0,0 +1,6 @@ + __ _ __ ___ ___ __ ___ + / /_(_)___ __ __/ |/ /__ ____/ (_)___ _/ |/ /___ _____ ____ _____ ____ _____ + / __/ / __ \/ / / / /|_/ / _ \/ __ / / __ `/ /|_/ / __ `/ __ \/ __ `/ __ `/ _ \/ ___/ +/ /_/ / / / / /_/ / / / / __/ /_/ / / /_/ / / / / /_/ / / / / /_/ / /_/ / __/ / +\__/_/_/ /_/\__, /_/ /_/\___/\__,_/_/\__,_/_/ /_/\__,_/_/ /_/\__,_/\__, /\___/_/ + /____/ /____/ diff --git a/ct/tinymediamanager.sh b/ct/tinymediamanager.sh new file mode 100644 index 0000000000..482cc58a91 --- /dev/null +++ b/ct/tinymediamanager.sh @@ -0,0 +1,91 @@ +#!/usr/bin/env bash +_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main" +_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func" +source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func") +# Copyright (c) 2021-2026 community-scripts ORG +# Author: Borja Garduño (Borja-Garduno) +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://www.tinymediamanager.org/ + +APP="tinyMediaManager" +var_tags="${var_tags:-media;library}" +var_cpu="${var_cpu:-4}" +var_ram="${var_ram:-4096}" +var_disk="${var_disk:-12}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +#var_arm64="${var_arm64:-no}" # unset = ask the user; set yes/no only when verified +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -f /opt/tinymediamanager/tinyMediaManager ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + ASSET_PATH=$(curl -fsSL https://release.tinymediamanager.org/ | + grep -oE "v5/dist/tinyMediaManager-[0-9.]+-linux-$(arch_resolve)\\.tar\\.xz" | + head -1) + ASSET_URL="https://release.tinymediamanager.org/${ASSET_PATH}" + VERSION=$(basename "${ASSET_PATH}" | grep -oE '[0-9]+(\.[0-9]+)+') + CURRENT=$(cat ~/.tinymediamanager 2>/dev/null || true) + + if [[ "${CURRENT}" == "${VERSION}" ]]; then + msg_ok "tinyMediaManager is already up to date (${VERSION})" + exit + fi + + msg_info "Stopping tinyMediaManager" + systemctl stop tinymediamanager x11vnc novnc + msg_ok "Stopped tinyMediaManager" + + create_backup \ + /opt/tinymediamanager/data \ + /opt/tinymediamanager/backup \ + /opt/tinymediamanager/addons \ + /opt/tinymediamanager/launcher-extra.yml + + CLEAN_INSTALL=1 fetch_and_deploy_from_url "${ASSET_URL}" /opt/tinymediamanager + restore_backup + + rm -f /opt/tinymediamanager/.userdir + chmod +x /opt/tinymediamanager/tinyMediaManager + if [[ ! -f /opt/tinymediamanager/launcher-extra.yml ]]; then + cat </opt/tinymediamanager/launcher-extra.yml +javaHome: "" +jvmOpts: + - "-Xmx2048m" + - "-Dtmm.noupdate=true" + - "-Dtmm.legacy.filechooser=true" +env: + - "_JAVA_AWT_WM_NONREPARENTING=1" +EOF + fi + echo "${VERSION}" >~/.tinymediamanager + + msg_info "Starting tinyMediaManager" + systemctl start tinymediamanager + sleep 2 + systemctl start x11vnc novnc + msg_ok "Started tinyMediaManager" + msg_ok "Updated tinyMediaManager ${CURRENT:-unknown} -> ${VERSION}" + 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 "${GATEWAY}${BGN}http://${IP}:6080/vnc.html${CL}" diff --git a/install/tinymediamanager-install.sh b/install/tinymediamanager-install.sh new file mode 100644 index 0000000000..9a8d7e1a11 --- /dev/null +++ b/install/tinymediamanager-install.sh @@ -0,0 +1,163 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: Borja Garduño (Borja-Garduno) +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://www.tinymediamanager.org/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +ensure_dependencies \ + xvfb \ + x11vnc \ + novnc \ + websockify \ + openbox \ + x11-xserver-utils \ + x11-utils \ + libxrender1 \ + libxtst6 \ + libxi6 \ + libmediainfo0v5 \ + fonts-dejavu-core \ + xz-utils + +ASSET_PATH=$(curl -fsSL https://release.tinymediamanager.org/ | + grep -oE "v5/dist/tinyMediaManager-[0-9.]+-linux-$(arch_resolve)\\.tar\\.xz" | + head -1) +ASSET_URL="https://release.tinymediamanager.org/${ASSET_PATH}" +VERSION=$(basename "${ASSET_PATH}" | grep -oE '[0-9]+(\.[0-9]+)+') + +fetch_and_deploy_from_url "${ASSET_URL}" /opt/tinymediamanager +chmod +x /opt/tinymediamanager/tinyMediaManager +rm -f /opt/tinymediamanager/.userdir + +msg_info "Configuring tinyMediaManager" +cat </opt/tinymediamanager/launcher-extra.yml +javaHome: "" +jvmOpts: + - "-Xmx2048m" + - "-Dtmm.noupdate=true" + - "-Dtmm.legacy.filechooser=true" +env: + - "_JAVA_AWT_WM_NONREPARENTING=1" +EOF +echo "${VERSION}" >~/.tinymediamanager +mkdir -p /media/movies /media/tvshows +msg_ok "Configured tinyMediaManager" + +msg_info "Configuring Openbox" +mkdir -p /root/.config/openbox +cat <<'EOF' >/root/.config/openbox/rc.xml + + + + + true + + + +EOF +msg_ok "Configured Openbox" + +msg_info "Creating Services" +cat </etc/systemd/system/xvfb.service +[Unit] +Description=Virtual Framebuffer X Server +After=network.target + +[Service] +Type=simple +ExecStartPre=/bin/sh -c 'rm -f /tmp/.X1-lock' +ExecStart=/usr/bin/Xvfb :1 -screen 0 1920x1080x24 +ExecStartPost=/bin/sh -c 'sleep 1 && DISPLAY=:1 /usr/bin/xset s off && DISPLAY=:1 /usr/bin/xset s noblank && DISPLAY=:1 /usr/bin/xset -dpms' +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF + +cat </etc/systemd/system/openbox.service +[Unit] +Description=Openbox Window Manager +After=xvfb.service +Requires=xvfb.service + +[Service] +Type=simple +Environment=DISPLAY=:1 +ExecStart=/usr/bin/openbox +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF + +cat </etc/systemd/system/tinymediamanager.service +[Unit] +Description=tinyMediaManager +After=openbox.service +Requires=openbox.service + +[Service] +Type=simple +User=root +Environment=DISPLAY=:1 +WorkingDirectory=/opt/tinymediamanager +ExecStartPre=/bin/sleep 2 +ExecStart=/opt/tinymediamanager/tinyMediaManager +Restart=on-failure +RestartSec=10 + +[Install] +WantedBy=multi-user.target +EOF + +cat </etc/systemd/system/x11vnc.service +[Unit] +Description=x11vnc Server +After=tinymediamanager.service +Requires=xvfb.service + +[Service] +Type=simple +ExecStart=/usr/bin/x11vnc -display :1 -forever -shared -rfbport 5900 -nopw -noipv6 -xkb -noxdamage -nowf -nowcr -wait 50 -defer 50 +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF + +cat </etc/systemd/system/novnc.service +[Unit] +Description=noVNC WebSocket Proxy +After=x11vnc.service +Requires=x11vnc.service + +[Service] +Type=simple +ExecStart=/usr/bin/websockify --web=/usr/share/novnc 6080 localhost:5900 +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF + +for svc in xvfb openbox tinymediamanager x11vnc novnc; do + systemctl enable -q --now "$svc" +done +msg_ok "Created Services" + +motd_ssh +customize +cleanup_lxc diff --git a/json/tinymediamanager.json b/json/tinymediamanager.json new file mode 100644 index 0000000000..e46c5e612b --- /dev/null +++ b/json/tinymediamanager.json @@ -0,0 +1,47 @@ +{ + "name": "tinyMediaManager", + "slug": "tinymediamanager", + "categories": [13], + "date_created": "2026-09-20", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 6080, + "documentation": "https://www.tinymediamanager.org/docs/", + "website": "https://www.tinymediamanager.org/", + "repository": "https://gitlab.com/tinyMediaManager/tinyMediaManager", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/tinymediamanager.webp", + "description": "tinyMediaManager is a media library manager for organizing and scraping metadata, artwork, and NFO files for movies and TV shows, ready for Kodi, Plex, Jellyfin and Emby. Browser access is the desktop UI via noVNC.", + "install_methods": [ + { + "type": "default", + "script": "ct/tinymediamanager.sh", + "config_path": "/opt/tinymediamanager/data", + "resources": { + "cpu": 4, + "ram": 4096, + "hdd": 12, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Access is via VNC on http://:6080/vnc.html or on port 5900 with a VNC client.", + "type": "info" + }, + { + "text": "Empty /media/movies and /media/tvshows folders are created as optional bind-mount targets (e.g. pct set -mp0 /path/on/host,mp=/media/movies). On unprivileged LXCs, match host ownership to the container UID mapping.", + "type": "info" + }, + { + "text": "Portable layout: settings/library live under /opt/tinymediamanager (data/, backup/, …). Updates use create_backup/restore_backup around a clean deploy. Java heap defaults to -Xmx2048m in launcher-extra.yml (raise it there for very large libraries). Built-in auto-update is disabled; use the helper script.", + "type": "info" + } + ] +}