This commit is contained in:
@@ -111,8 +111,14 @@ class DatabasePopulator:
|
||||
# Check if movie already exists in database
|
||||
existing = self.db.get_movie_dates(imdb_id)
|
||||
if existing and existing.get('dateadded'):
|
||||
# Already in database - skip silently (not an error)
|
||||
_log("DEBUG", f"Movie {imdb_id} already in database, skipping")
|
||||
# Already in database - update file path and video status if needed
|
||||
existing_path = existing.get('path')
|
||||
if not existing_path or existing_path == 'unknown' or existing_path != path:
|
||||
_log("INFO", f"Movie {imdb_id} exists but updating file info: {path}")
|
||||
self.db.update_movie_file_info(imdb_id, path, has_video_file=True)
|
||||
stats['updated'] += 1
|
||||
else:
|
||||
_log("DEBUG", f"Movie {imdb_id} already in database with correct path, skipping")
|
||||
continue
|
||||
|
||||
# Get release date
|
||||
@@ -308,7 +314,13 @@ class DatabasePopulator:
|
||||
# Check if episode already exists
|
||||
existing = self.db.get_episode_date(imdb_id, season_num, episode_num)
|
||||
if existing and existing.get('dateadded'):
|
||||
# Already in database - skip silently (not an error)
|
||||
# Already in database - update file path and video status if needed
|
||||
existing_path = existing.get('path')
|
||||
episode_path = episode.get('path', 'unknown')
|
||||
if not existing_path or existing_path == 'unknown' or existing_path != episode_path:
|
||||
_log("INFO", f"Episode {imdb_id} S{season_num:02d}E{episode_num:02d} exists but updating file info: {episode_path}")
|
||||
self.db.update_episode_file_info(imdb_id, season_num, episode_num, episode_path, has_video_file=True)
|
||||
stats['updated'] += 1
|
||||
continue
|
||||
|
||||
# Only process episodes that have video files
|
||||
|
||||
Reference in New Issue
Block a user