mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-12 05:42:59 +00:00
more of the day debug logging and fix datetime duplicate in NCAA FB
This commit is contained in:
@@ -267,7 +267,6 @@ class BaseNCAAFBManager: # Renamed class
|
|||||||
# CRITICAL FIX: Also fetch current week using date-based approach (like odds manager)
|
# CRITICAL FIX: Also fetch current week using date-based approach (like odds manager)
|
||||||
# This ensures we get games that might be missed by week-based API
|
# This ensures we get games that might be missed by week-based API
|
||||||
try:
|
try:
|
||||||
from datetime import datetime, timedelta
|
|
||||||
now = datetime.now(pytz.utc)
|
now = datetime.now(pytz.utc)
|
||||||
# Fetch games from yesterday to next 7 days (same as odds manager)
|
# Fetch games from yesterday to next 7 days (same as odds manager)
|
||||||
for days_offset in range(-1, 8): # Yesterday through next 7 days
|
for days_offset in range(-1, 8): # Yesterday through next 7 days
|
||||||
|
|||||||
@@ -190,17 +190,23 @@ class OfTheDayManager:
|
|||||||
os.path.join(script_dir, '..', 'of_the_day', data_file),
|
os.path.join(script_dir, '..', 'of_the_day', data_file),
|
||||||
os.path.join('of_the_day', data_file)
|
os.path.join('of_the_day', data_file)
|
||||||
])
|
])
|
||||||
|
|
||||||
# Remove duplicates while preserving order
|
# Debug: Show all paths before deduplication
|
||||||
seen = set()
|
logger.debug(f"All possible paths before deduplication: {possible_paths}")
|
||||||
unique_paths = []
|
|
||||||
for path in possible_paths:
|
# Remove duplicates while preserving order
|
||||||
abs_path = os.path.abspath(path)
|
seen = set()
|
||||||
if abs_path not in seen:
|
unique_paths = []
|
||||||
seen.add(abs_path)
|
for path in possible_paths:
|
||||||
unique_paths.append(abs_path)
|
abs_path = os.path.abspath(path)
|
||||||
|
if abs_path not in seen:
|
||||||
|
seen.add(abs_path)
|
||||||
|
unique_paths.append(abs_path)
|
||||||
possible_paths = unique_paths
|
possible_paths = unique_paths
|
||||||
|
|
||||||
|
# Debug: Show paths after deduplication
|
||||||
|
logger.debug(f"Unique paths after deduplication: {possible_paths}")
|
||||||
|
|
||||||
file_path = None
|
file_path = None
|
||||||
for potential_path in possible_paths:
|
for potential_path in possible_paths:
|
||||||
abs_path = os.path.abspath(potential_path)
|
abs_path = os.path.abspath(potential_path)
|
||||||
|
|||||||
Reference in New Issue
Block a user