From 88f116f1cb7616719f9a0d02e867969f56753220 Mon Sep 17 00:00:00 2001 From: arnaucube Date: Sun, 8 Feb 2026 18:08:54 +0100 Subject: [PATCH] add parse-blueray sh script, and backup server-dockers config --- bin/parse-blueray | 49 +++++++++++++++++++ server-dockers/backup-configs.sh | 4 +- .../configurations/homepage/services.yaml | 8 +-- server-dockers/docker-compose.yml | 22 ++++----- 4 files changed, 65 insertions(+), 18 deletions(-) create mode 100755 bin/parse-blueray diff --git a/bin/parse-blueray b/bin/parse-blueray new file mode 100755 index 0000000..693f3ce --- /dev/null +++ b/bin/parse-blueray @@ -0,0 +1,49 @@ +#!/usr/bin/env bash + +# NOTE: needs mkvtoolnix installed, ie. `apt install mkvtoolnix`. + +set -e + +OUT="$PWD" +echo "processing current directory: $OUT" + +for dir in */ ; do + [ -d "$dir" ] || continue + echo "processing $dir" + + cd "$dir" + + # prefer .rar if present + rarfile=$(ls *.rar 2>/dev/null | head -n1) + if [ -z "$rarfile" ]; then + rarfile=$(ls *.r00 2>/dev/null | head -n1) + fi + + if [ -z "$rarfile" ]; then + echo " no .rar/.r00 in $dir, skipping" + cd .. + continue + fi + + unrar x -o+ "$rarfile" . || { echo " extraction failed in $dir"; cd ..; continue; } + + # find first video file + video=$(find . -maxdepth 1 -type f \ + \( -iname '*.mkv' -o -iname '*.mp4' -o -iname '*.avi' -o -iname '*.m2ts' \) \ + ! -iname '*sample*' | head -n1) + + if [ -z "$video" ]; then + echo " no video found after extraction in $dir" + cd .. + continue + fi + + base=$(basename "$dir" /) + out="$OUT/${base}.mkv" + + echo " muxing '$video' -> '$out'" + mkvmerge -o "$out" "$video" + + cd .. +done + diff --git a/server-dockers/backup-configs.sh b/server-dockers/backup-configs.sh index 9ae2dbd..cc815ef 100755 --- a/server-dockers/backup-configs.sh +++ b/server-dockers/backup-configs.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash SERVER=$1 -PASSW=$2 +PASSW=$2 # the password that appears at the configs to be replaced by $NEW_PASSW NEW_PASSW="YOURPASSWORDHERE" if [ "$#" -ne 2 ]; then @@ -9,7 +9,7 @@ if [ "$#" -ne 2 ]; then exit 1 fi -rsync -avz --progress --exclude={'*.log','emby','jellyfin','qbittorrent','slskd','wallabag','prowlarr','sonarr','radarr','bazarr'} $SERVER:~/server-dockers/docker-compose.yml $SERVER:/mnt/usb/configurations ./ +rsync -avz --progress --exclude={'*.log','emby','jellyfin','qbittorrent','slskd','wallabag','prowlarr','sonarr','radarr','bazarr','qui'} $SERVER:~/server-dockers/docker-compose.yml $SERVER:/mnt/usb/configurations ./ # replace PASSW by NEW_PASSW (also in subdirs) find . -type f -exec \ diff --git a/server-dockers/configurations/homepage/services.yaml b/server-dockers/configurations/homepage/services.yaml index 715d176..f7b367a 100644 --- a/server-dockers/configurations/homepage/services.yaml +++ b/server-dockers/configurations/homepage/services.yaml @@ -8,10 +8,6 @@ icon: jellyfin.png href: http://192.168.1.155:8096 description: Jellyfin Media Server - - Emby: - icon: emby.png - href: http://192.168.1.155:8097 - description: Emby Media Server - Descarregues a ma: - qBittorrent: icon: qbittorrent.png @@ -23,6 +19,10 @@ username: admin password: YOURPASSWORDHERE enableLeechProgress: true # optional, defaults to false + - qui: + icon: qui.png + href: http://192.168.1.155:8105 + description: interface for qbittorrent - slskd: icon: slskd.png href: http://192.168.1.155:8099 diff --git a/server-dockers/docker-compose.yml b/server-dockers/docker-compose.yml index 23ae012..cf4d7b3 100644 --- a/server-dockers/docker-compose.yml +++ b/server-dockers/docker-compose.yml @@ -26,7 +26,6 @@ # # Port of each service: # - jellyfin: 8096 -# - emby: 8097 # - wallabag: 8098 # - slskd: 8099 # - metube: 8100 @@ -34,6 +33,7 @@ # - prowlarr: 8102 # - bazarr: 8103 # - radarr: 8104 +# - qui: 8105 # - qbittorrent: 8080 # - homepage: 8000 # - grafana: 3000 @@ -49,16 +49,6 @@ services: - /mnt/usb:/media restart: unless-stopped - emby: - image: emby/embyserver # in rpi: emby/embyserver_arm64v8 - container_name: emby - ports: - - "8097:8096" - volumes: - - /mnt/usb/configurations/emby:/config - - /mnt/usb:/media - restart: unless-stopped - wallabag: image: wallabag/wallabag container_name: wallabag @@ -166,6 +156,15 @@ services: - WEBUI_PORT=8080 restart: unless-stopped + qui: + image: ghcr.io/autobrr/qui:latest + container_name: qui + restart: unless-stopped + ports: + - "8105:7476" + volumes: + - ./qui:/config + homepage: image: ghcr.io/gethomepage/homepage:latest container_name: homepage @@ -222,7 +221,6 @@ services: # which has support for 'add-ons'. # More info: https://www.home-assistant.io/installation/#about-installation-types - networks: monitoring: driver: bridge