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,