udpates to flow and nfo manager for TV

This commit is contained in:
2025-09-22 10:03:59 -04:00
parent e7749620f6
commit a74feeb67e
4 changed files with 18 additions and 1 deletions
+1
View File
@@ -96,6 +96,7 @@ jobs:
echo "Building DEV image with layer caching..." echo "Building DEV image with layer caching..."
docker build \ docker build \
$CACHE_ARGS \ $CACHE_ARGS \
--build-arg GIT_BRANCH=dev \
--tag nfoguard:dev \ --tag nfoguard:dev \
--tag nfoguard:dev-${{ github.sha }} \ --tag nfoguard:dev-${{ github.sha }} \
--tag "$CACHE_IMAGE" \ --tag "$CACHE_IMAGE" \
+1
View File
@@ -99,6 +99,7 @@ jobs:
echo "Building with layer caching..." echo "Building with layer caching..."
docker build \ docker build \
$CACHE_ARGS \ $CACHE_ARGS \
--build-arg GIT_BRANCH=main \
--tag nfoguard:latest \ --tag nfoguard:latest \
--tag nfoguard:${{ github.sha }} \ --tag nfoguard:${{ github.sha }} \
--tag "$CACHE_IMAGE" \ --tag "$CACHE_IMAGE" \
+9 -1
View File
@@ -1,9 +1,13 @@
FROM python:3.11-slim FROM python:3.11-slim
# Build argument for git branch
ARG GIT_BRANCH=main
# Set environment variables # Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \ ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \ PYTHONUNBUFFERED=1 \
PYTHONIOENCODING=utf-8 PYTHONIOENCODING=utf-8 \
GIT_BRANCH=${GIT_BRANCH}
# Install system dependencies including PostgreSQL client libraries # Install system dependencies including PostgreSQL client libraries
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
@@ -24,6 +28,10 @@ RUN pip install --no-cache-dir --upgrade pip && \
# Copy application code # Copy application code
COPY . . COPY . .
# Create git metadata for version detection based on build arg
RUN mkdir -p .git && \
echo "ref: refs/heads/${GIT_BRANCH}" > .git/HEAD
# Copy DLL to a dedicated directory and create entrypoint script # Copy DLL to a dedicated directory and create entrypoint script
RUN mkdir -p /app/emby-plugin && \ RUN mkdir -p /app/emby-plugin && \
cp /app/Emby-DLL/NFOGuard.Emby.Plugin.dll /app/emby-plugin/ && \ cp /app/Emby-DLL/NFOGuard.Emby.Plugin.dll /app/emby-plugin/ && \
+7
View File
@@ -466,6 +466,13 @@ class NFOManager:
# Important: DO NOT remove content fields like title, plot, runtime, premiered, etc. # Important: DO NOT remove content fields like title, plot, runtime, premiered, etc.
# These should be preserved from the long-named NFO files # These should be preserved from the long-named NFO files
# Debug: Show what fields are preserved after removing NFOGuard fields
preserved_fields = [elem.tag for elem in episode]
if preserved_fields:
print(f" 🔍 Content preserved after cleanup: {', '.join(preserved_fields)}")
else:
print(f" ⚠️ No content fields found after cleanup!")
except (ET.ParseError, ValueError) as e: except (ET.ParseError, ValueError) as e:
print(f"⚠️ Corrupted episode NFO detected: {nfo_path} - {str(e)[:100]}...") print(f"⚠️ Corrupted episode NFO detected: {nfo_path} - {str(e)[:100]}...")