Commit Graph

357 Commits

Author SHA1 Message Date
sbcrumb ed03f23272 fix: Move NFOGuard comment to bottom with other fields
Local Docker Build (Dev) / build-dev (push) Successful in 24s
Moved the NFOGuard source comment from the top of the XML file to
just before our field additions at the bottom. This creates a clear
separation showing where NFOGuard's modifications begin.

Expected structure:
[existing rich metadata]
<!-- NFOGuard - Source: tmdb:digital -->
<uniqueid type="imdb" default="true">tt123</uniqueid>
<premiered>2024-08-20</premiered>
<dateadded>2024-08-20T00:00:00+00:00</dateadded>
<lockdata>true</lockdata>
2025-09-24 10:08:10 -04:00
sbcrumb fc3c190c1b fix: Ensure NFOGuard fields are appended at bottom of NFO files
Local Docker Build (Dev) / build-dev (push) Successful in 24s
Changed from ET.SubElement() to ET.Element() + explicit append() to
guarantee that NFOGuard-managed fields appear at the very bottom of
NFO files after all existing content.

This is critical because:
- Emby plugin specifically looks for dateadded field
- All NFOGuard fields should be grouped together at the bottom
- Preserves existing rich metadata while clearly marking our additions

Added debug logging for dateadded field to confirm it's being written.
2025-09-24 10:06:29 -04:00
sbcrumb 17914ff8f4 debug: Add NFO creation debugging for Inside Out 2 issue
Local Docker Build (Dev) / build-dev (push) Successful in 22s
Added debug logging to understand why rich existing NFO metadata
isn't being preserved when NFOGuard updates files.

This will show:
- Parameters passed to create_movie_nfo
- Whether existing premiered dates are being preserved
- Why NFOGuard fields aren't being added to the bottom

This should help diagnose why Inside Out 2 NFO isn't getting
NFOGuard's dateadded and lockdata fields appended.
2025-09-24 10:02:52 -04:00
sbcrumb bf7ee784a6 debug: Add logging to diagnose Flow movie processing issue
Local Docker Build (Dev) / build-dev (push) Successful in 23s
Added debug logs to understand why Flow (2019) isn't calling external APIs
while Ambush (2023) works correctly. This will show:

- should_query calculation and reasoning
- _decide_movie_dates entry point and logic path
- Whether existing database data is being used incorrectly

This should help identify why digital release date lookup works for some
movies but not others with identical database states.
2025-09-24 09:11:28 -04:00
sbcrumb e995c27655 fix: Query external APIs when database entry has no dateadded
Local Docker Build (Dev) / build-dev (push) Successful in 18s
The system was skipping external API calls when a database entry existed
but had no useful data (dateadded: None). This caused movies to get minimal
NFO files even when digital release dates were available.

Added condition to should_query logic: also query APIs when we have an
existing database entry but no dateadded value.

This fixes the Flow (2019) issue where it should fetch digital release
dates from TMDB/OMDB but was returning "no_valid_date_source" instead.
2025-09-24 08:49:46 -04:00
sbcrumb 03a71527b4 feat: Add version-gitea tags to main branch builds
Local Docker Build (Dev) / build-dev (push) Successful in 11s
Updated main workflow to create version-gitea tagged images
(e.g. 1.7.0-gitea) alongside the standard latest tag.

This provides clear identification that the image came from
the Gitea build system and includes the version number for
easy tracking.

Main branch images will now be available as:
- sbcrumb/nfoguard:latest (standard)
- sbcrumb/nfoguard:1.7.0-gitea (versioned Gitea build)
2025-09-24 08:39:49 -04:00
sbcrumb 99ffc08c9b feat: Add version-specific dev tags for easier identification
Local Docker Build (Dev) / build-dev (push) Successful in 24s
- Bump version to 1.7.0 for NFO release date fix
- Add version-dev-gitea tag format (e.g. 1.7.0-dev-gitea)
- Push version tag to Gitea registry alongside dev tag
- Update build output to show clear pull command

This makes it easy to identify which dev build you're running
and ensures you get the latest Gitea dev build with the NFO fixes.
2025-09-24 08:38:22 -04:00
sbcrumb 5e36796e7e fix: Update CI workflows to use correct repository paths
Local Docker Build (Dev) / build-dev (push) Successful in 18s
Updated both main and dev workflows to use sbcrumb/nfoguard instead of
jskala/NFOguard for repository cloning and Docker registry paths.

This fixes the build failures where workflows were trying to clone from
the old repository location that no longer exists.

Changes:
- Updated git clone URLs in both ci.yml and ci-dev.yml
- Fixed Docker registry paths for image tagging and pushing
- Updated cache image manifest checking paths
2025-09-24 08:34:23 -04:00
sbcrumb c983e93a76 fix: Use release dates as dateadded fallback when import dates unavailable
Local Docker Build (Dev) / build-dev (push) Failing after 0s
When Radarr can't provide import/download dates, the system now properly
uses digital release dates, theatrical dates, or air dates as the dateadded
value for both NFO files and database storage.

This fixes the issue where movies would get minimal NFO content with
"no_valid_date_source" when valid release dates were available but not
being saved to the database for future use.

Key changes:
- Use release date as dateadded when import date is None but release date exists
- Ensure all found dates are saved to database for future manual scans
- Maintain proper source tracking for debugging
- Fix NFO files getting minimal content when valid dates exist
2025-09-24 08:31:12 -04:00
sbcrumb d854233470 docs: Document successful GitHub synchronization resolution
- Record repository sync status and resolution steps
- Explain GitHub force-push timestamp behavior
- Document current synchronized state between Gitea and GitHub
- Clarify expected 1-commit differential due to private file exclusion
2025-09-23 17:54:52 -04:00
sbcrumb 8329098590 docs: Update SUMMARY.md with enhanced workflow and privacy protection details
Local Docker Build (Main) / build (push) Successful in 14s
Local Docker Build (Main) / deploy (push) Successful in 0s
Local Docker Build (Dev) / build-dev (push) Successful in 18s
- Document emergency privacy breach resolution
- Add professional Git workflow documentation
- Detail protection features and command safeguards
- Include code examples of privacy protection measures
2025-09-23 17:50:20 -04:00
sbcrumb a99fb3e9c9 enhance: Add intelligent workflow guidance and error handling
- Command suggestions for typos and alternatives
- Workflow state analysis with next steps
- Enhanced error messages with examples
- Progress indicators throughout workflow
- Automated guidance for feature development
2025-09-23 17:40:07 -04:00
sbcrumb d85d9bf63a update: template
Local Docker Build (Main) / build (push) Successful in 23s
Local Docker Build (Main) / deploy (push) Successful in 1s
2025-09-23 17:24:57 -04:00
sbcrumb 4ba9611b70 Merge pull request 'Update README.md' (#1) from dev into main
Local Docker Build (Main) / build (push) Successful in 29s
Local Docker Build (Dev) / build-dev (push) Successful in 19s
Local Docker Build (Main) / deploy (push) Successful in 0s
Reviewed-on: #1
2025-09-23 17:21:42 -04:00
sbcrumb e90dcb2f6b Update README.md
Local Docker Build (Dev) / build-dev (push) Successful in 33s
Local Docker Build (Main) / build (pull_request) Successful in 23s
Local Docker Build (Main) / deploy (pull_request) Has been skipped
2025-09-23 17:20:40 -04:00
sbcrumb 053a29ba8f fix: Update workflow configuration for current deployment setup
Local Docker Build (Main) / build (push) Successful in 24s
Local Docker Build (Main) / deploy (push) Successful in 0s
Local Docker Build (Dev) / build-dev (push) Successful in 28s
- Align repository references with current infrastructure
- Update Docker registry namespace consistency
- Ensure proper CI/CD pipeline functionality
2025-09-23 16:27:31 -04:00
sbcrumb 7ad0dd8ca2 feat: NFOGuard v1.7.2 - Complete media management system
Local Docker Build (Dev) / build-dev (push) Failing after 0s
Local Docker Build (Main) / build (push) Failing after 0s
Local Docker Build (Main) / deploy (push) Has been skipped
Initial clean repository with full NFOGuard codebase:
- Docker-based media file processing
- Webhook integration for Radarr/Sonarr
- NFO file management and organization
- Emby/Jellyfin plugin integration
- TMDB API integration for metadata
- Smart episode and movie renaming
- Comprehensive dual-repository development workflow

Author: SBCrumb
2025-09-23 16:12:58 -04:00
jskala 3a31ba8866 Merge pull request 'plugin-update' (#21) from plugin-update into dev
Reviewed-on: jskala/NFOguard#21
2025-09-23 12:17:55 -04:00
sbcrumb 814156035e update: Version bump for emby-plugin 2025-09-23 12:17:55 -04:00
sbcrumb c24625274e docs: Add critical .local directory security reminder
- Emphasize .local/ must NEVER be committed to GitHub
- Document security breach procedures if .local/ exposed publicly
- Reinforce that .local/ contains sensitive development information
- Add warning about privacy violations and Claude attribution details
2025-09-23 12:17:55 -04:00
sbcrumb c2dc0b2beb fix: Clean up commit template
- Remove co-authorship lines from template
- Keep template clean for releases
2025-09-22 14:26:49 -04:00
sbcrumb 3e017a3d17 Merge branch 'main' into dev 2025-09-22 14:23:10 -04:00
sbcrumb 91e749ccdc restore: Add .local development documentation back to Gitea
- Restore .local/ directory with all development documentation
- Files include SUMMARY.md, commit.md, workflow.md, and setup templates
- These files stay local and in Gitea only (excluded from GitHub)
2025-09-22 14:20:22 -04:00
sbcrumb 4d1dc3b06f fix: Configure .local/ directory as Gitea-only (not GitHub)
- Add .local/ to .gitignore to exclude from GitHub releases
- .local/ contains private development documentation and notes
- Files remain available locally and in Gitea for development reference
2025-09-22 13:59:14 -04:00
sbcrumb 41ece0af86 Establish shared history with GitHub main 2025-09-22 12:35:59 -04:00
sbcrumb 1848ed61bf Merge branch 'dev' 2025-09-22 12:24:04 -04:00
sbcrumb c04fe8d083 debug optional 2025-09-22 12:18:40 -04:00
sbcrumb 3e5c80279f fix: nfo logic long vs shortname 2025-09-22 11:02:12 -04:00
sbcrumb de3896b8c3 fix: add debug for .nfo ussues 2025-09-22 10:54:22 -04:00
jskala b1484641d9 fix: update tv .nfo handling
updated TV .nfo handling
2025-09-22 10:52:20 -04:00
sbcrumb 07b3110c72 fix branch issue in workflow 2025-09-22 10:35:05 -04:00
sbcrumb 96de17e0c5 update docker for force build 2025-09-22 10:31:26 -04:00
sbcrumb 7de99ef945 trying to add gitea 2025-09-22 10:12:07 -04:00
sbcrumb 95273be0b0 update flow 2025-09-22 10:07:39 -04:00
sbcrumb a74feeb67e udpates to flow and nfo manager for TV 2025-09-22 10:03:59 -04:00
sbcrumb e7749620f6 better docker handling for shutdown 2025-09-22 09:30:50 -04:00
sbcrumb f563c67405 update sonarr .nfo flow 2025-09-22 09:25:03 -04:00
sbcrumb 93cee77ce0 stop main flow when dev runs 2025-09-22 09:13:08 -04:00
sbcrumb 927d7cdeff another workflow upate local 2025-09-22 09:04:01 -04:00
sbcrumb a4b1042b65 update local workflow 2025-09-22 09:01:21 -04:00
sbcrumb 09b28abcdc make local dir for ignores in local docs 2025-09-22 08:36:46 -04:00
sbcrumb fa3f41e6fd update Dev 2025-09-21 09:32:27 -04:00
sbcrumb b881c7944c initial updates to mirror github files 2025-09-21 09:30:12 -04:00
sbcrumb c6d5d2e6dc updates 2025-09-21 09:28:06 -04:00
sbcrumb 22483717c4 initial update 2025-09-21 09:25:36 -04:00
sbcrumb 49d63a9136 Bump version from 1.6.7 to 1.6.8
MAJOR IMPROVEMENTS:
  • Enhanced movie detection for directories without IMDb IDs in folder names
  • Fixed NFO processing to execute before date validation (preserves existing metadata)
  • Added smart episode NFO migration to standardized S##E## format
  • Resolved database save issues with proper upsert operations for dateadded values
  • Implemented comprehensive IMDb ID detection from filenames and NFO content

  TECHNICAL CHANGES:
  • nfoguard.py:1008-1025 - Fixed early exit logic to process NFOs regardless of date availability
  • core/nfo_manager.py - Added find_existing_episode_nfo() and enhanced episode processing
  • core/database.py - Fixed upsert operations to properly save dateadded values
  • Enhanced find_movie_imdb_id() to detect IMDb IDs from multiple sources

  CORE FIXES:
  • Movie NFO processing now happens before date validation checks
  • Episode NFOs with long names automatically migrated to S##E## format
  • Database operations properly handle both new entries and updates
  • Movies without IMDb in directory names now detected via filenames/NFO content
  • All existing metadata preserved during NFO standardization

  RESULTS:
   Existing movie.nfo files receive full NFOGuard processing
   Episode NFOs standardized to proper S##E## naming convention
   Database persistence works correctly for all date scenarios
   Enhanced movie detection covers edge cases
   Maintained backward compatibility with existing configurations
2025-09-21 08:53:58 -04:00
sbcrumb fcc21d8eb7 fix: NFO processing overhaul - comprehensive metadata management
Commit Message:
  fix: NFO processing overhaul - comprehensive metadata management

  MAJOR IMPROVEMENTS:
  • Enhanced movie detection for directories without IMDb IDs in folder names
  • Fixed NFO processing to execute before date validation (preserves existing metadata)
  • Added smart episode NFO migration to standardized S##E## format
  • Resolved database save issues with proper upsert operations for dateadded values
  • Implemented comprehensive IMDb ID detection from filenames and NFO content

  TECHNICAL CHANGES:
  • nfoguard.py:1008-1025 - Fixed early exit logic to process NFOs regardless of date availability
  • core/nfo_manager.py - Added find_existing_episode_nfo() and enhanced episode processing
  • core/database.py - Fixed upsert operations to properly save dateadded values
  • Enhanced find_movie_imdb_id() to detect IMDb IDs from multiple sources

  CORE FIXES:
  • Movie NFO processing now happens before date validation checks
  • Episode NFOs with long names automatically migrated to S##E## format
  • Database operations properly handle both new entries and updates
  • Movies without IMDb in directory names now detected via filenames/NFO content
  • All existing metadata preserved during NFO standardization

  RESULTS:
   Existing movie.nfo files receive full NFOGuard processing
   Episode NFOs standardized to proper S##E## naming convention
   Database persistence works correctly for all date scenarios
   Enhanced movie detection covers edge cases
   Maintained backward compatibility with existing configurations
2025-09-21 08:52:41 -04:00
sbcrumb cd22cd3340 feat: enhance NFO processing and movie detection
* fix: NFO processing overhaul - looking GOOD!

  Listen up, buddy! Your boy Cat just made this NFO processing
  smoother than my pompadour on a good hair day!

  WHAT'S THE DEAL?
  • Movie NFOs were getting DISSED when dates went missing
  • Episode NFOs with long names were cluttering up the joint
  • Nobody wants a messy media library - that's just WRONG!

  WHAT I FIXED (because I'm THAT good):
  • Movies: NFO processing now happens FIRST, baby! No more
    skipping when dates are wonky - we standardize EVERYTHING!
  • TV Shows: Long episode NFO names? GONE! We migrate that
    metadata to proper S##E## format and trash the old junk
  • Dates get moved to the bottom where they belong (it's all
    about the STYLE!)
  • NFOGuard signatures added to everything (gotta sign your work!)

  FILES TOUCHED:
  • nfoguard.py:1008-1025 - Fixed that early exit nonsense
  • core/nfo_manager.py - Added find_existing_episode_nfo() function
  • core/nfo_manager.py - Enhanced create_episode_nfo() with migration

  RESULTS:
   Existing movie.nfo files get the full treatment
   Long episode NFO names become sleek S##E## format
   All metadata preserved (we're not ANIMALS!)
   Dates organized properly at the bottom
   NFOGuard branding on everything

  This code is now looking SO good, it should be in GQ!
  What's not to like about perfection?

* testing: Testing database date adds for old files

* database debuging

* fixing database calls as well as ID for imdb

* fix: dirs with no imdb in title

movies with no imdb getting skipped

* update: fix core parsing
2025-09-20 20:24:02 -04:00
sbcrumb d5937b13be Docker compose update (#10)
* chore: update docker compose example

update/correct missing emby bind point for .dll
2025-09-19 16:40:23 -04:00
sbcrumb 3abef7057c Delete docker-compose.example
remove old docker-compose example
2025-09-19 16:28:52 -04:00