Add missing get_episode_date method and bump version to v0.6.0
🐛 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
This commit is contained in:
@@ -141,6 +141,23 @@ class NFOGuardDatabase:
|
|||||||
for row in rows
|
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(
|
def upsert_episode_date(
|
||||||
self,
|
self,
|
||||||
imdb_id: str,
|
imdb_id: str,
|
||||||
|
|||||||
Reference in New Issue
Block a user