Initial commit: qBittorrent & SMB AI Video Performer Sorter with in-browser streaming preview, Intellisense & SQLite persistence

This commit is contained in:
david
2026-08-16 19:00:16 -04:00
commit 6aadc53335
5 changed files with 4838 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
# Exit immediately if a command exits with a non-zero status
set -e
SHARE="//truenas.local/isolation"
MOUNT_POINT="/mnt/isolation"
USERNAME="home"
PASSWORD="kifer"
# Ensure cifs-utils is installed (required for mounting SMB shares)
if ! dpkg -s cifs-utils >/dev/null 2>&1; then
echo "Installing required package 'cifs-utils'..."
sudo apt-get update && sudo apt-get install -y cifs-utils
fi
# Create target mount directory if it doesn't exist
if [ ! -d "$MOUNT_POINT" ]; then
echo "Creating mount directory $MOUNT_POINT..."
sudo mkdir -p "$MOUNT_POINT"
fi
# Check if already mounted
if mountpoint -q "$MOUNT_POINT"; then
echo "Directory is already mounted. Unmounting first..."
sudo umount "$MOUNT_POINT"
fi
echo "Mounting $SHARE to $MOUNT_POINT..."
# Mount temporarily. Using uid/gid configuration allows your local user to read/write to the share.
# We fetch the current user's UID and GID dynamically.
CURRENT_UID=$(id -u)
CURRENT_GID=$(id -g)
sudo mount -t cifs "$SHARE" "$MOUNT_POINT" \
-o username="$USERNAME",password="$PASSWORD",uid="$CURRENT_UID",gid="$CURRENT_GID",iocharset=utf8
echo "Successfully mounted $SHARE to $MOUNT_POINT."
echo "Note: This mount is temporary and will automatically unmount upon reboot."