embed images
This commit is contained in:
@@ -48,6 +48,17 @@ class CacheManager:
|
||||
cache_path = self.output_dir / f"{self.video_name}.json"
|
||||
if cache_path.exists():
|
||||
logger.info(f"✓ Found cached Whisper transcript: {cache_path.name}")
|
||||
|
||||
# Debug: Show cached transcript info
|
||||
try:
|
||||
import json
|
||||
with open(cache_path, 'r', encoding='utf-8') as f:
|
||||
data = json.load(f)
|
||||
if 'segments' in data:
|
||||
logger.debug(f"Cached transcript has {len(data['segments'])} segments")
|
||||
except Exception as e:
|
||||
logger.debug(f"Could not parse cached whisper for debug: {e}")
|
||||
|
||||
return cache_path
|
||||
|
||||
return None
|
||||
@@ -68,6 +79,7 @@ class CacheManager:
|
||||
return None
|
||||
|
||||
logger.info(f"✓ Found {len(existing_frames)} cached frames in {self.frames_dir.name}/")
|
||||
logger.debug(f"Frame filenames: {[f.name for f in sorted(existing_frames)[:3]]}...")
|
||||
|
||||
# Build frames_info from existing files
|
||||
frames_info = []
|
||||
@@ -102,6 +114,11 @@ class CacheManager:
|
||||
with open(cache_path, 'r', encoding='utf-8') as f:
|
||||
results = json.load(f)
|
||||
logger.info(f"✓ Loaded {len(results)} analyzed frames from cache")
|
||||
|
||||
# Debug: Show first cached result
|
||||
if results:
|
||||
logger.debug(f"First cached result: timestamp={results[0].get('timestamp')}, text_length={len(results[0].get('text', ''))}")
|
||||
|
||||
return results
|
||||
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user