From 52fa0b6060effe0029acacc2ef1c14101add9c9b Mon Sep 17 00:00:00 2001 From: SBCrumb Date: Thu, 11 Sep 2025 09:59:15 -0400 Subject: [PATCH] Add missing get_episode_date method and bump version to v0.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🐛 Database Fix: • Add missing get_episode_date() method to NFOGuardDatabase • Fixes: 'NFOGuardDatabase' object has no attribute 'get_episode_date' 🔄 Version Update: • Bump VERSION from 0.2.22 to 0.6.0 • Major feature release with comprehensive TV enhancements ✅ Now Works: • Single season processing via /tv/scan-season • Single episode processing via /tv/scan-episode • Enhanced NFO generation with Sonarr API metadata • Database queries for existing episode dates --- VERSION | 2 +- core/database.py | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 109a20f..a918a2a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.22 +0.6.0 diff --git a/core/database.py b/core/database.py index 8b285af..bb90d36 100644 --- a/core/database.py +++ b/core/database.py @@ -141,6 +141,23 @@ class NFOGuardDatabase: for row in rows ] + def get_episode_date(self, imdb_id: str, season: int, episode: int) -> Optional[Dict[str, Any]]: + """Get episode date information for a specific episode""" + with self.get_connection() as conn: + row = conn.execute( + "SELECT aired, dateadded, source, has_video_file FROM episode_dates WHERE imdb_id = ? AND season = ? AND episode = ?", + (imdb_id, season, episode) + ).fetchone() + + if row: + return { + "aired": row[0], + "dateadded": row[1], + "source": row[2], + "has_video_file": bool(row[3]) + } + return None + def upsert_episode_date( self, imdb_id: str,