fixed live dectect in transcode manager

This commit is contained in:
2026-04-15 18:54:50 -04:00
parent 01bc4cbcc2
commit 950e32b6ac
+8 -3
View File
@@ -158,14 +158,19 @@ emby_api() {
} }
# Determine which storage location a session is using # Determine which storage location a session is using
# Checks filesystem for session folder in ramdisk or SSD transcode temp directories # Handles both short hex IDs (live TV) and long UUID format (standard transcodes)
get_session_location() { get_session_location() {
local session_id="$1" local session_id="$1"
local transcode_temp="transcoding-temp" local transcode_temp="transcoding-temp"
local short_id="${session_id:0:6}" # Emby uses short 6-char IDs for live TV sessions
if [[ -d "$RAMDISK_PATH/$transcode_temp/$session_id" ]]; then # Check ramdisk — exact match first, then short ID prefix match for live TV
if [[ -d "$RAMDISK_PATH/$transcode_temp/$session_id" ]] || \
ls -d "$RAMDISK_PATH/$transcode_temp/${short_id}"* 2>/dev/null | grep -q .; then
echo "ramdisk" echo "ramdisk"
elif [[ -d "$TRANSCODE_SSD/$transcode_temp/$session_id" ]]; then # Check SSD — same pattern
elif [[ -d "$TRANSCODE_SSD/$transcode_temp/$session_id" ]] || \
ls -d "$TRANSCODE_SSD/$transcode_temp/${short_id}"* 2>/dev/null | grep -q .; then
echo "ssd" echo "ssd"
else else
echo "unknown" echo "unknown"