Fix typo in air date parsing.

This commit is contained in:
SergeantPanda 2025-08-07 19:41:10 -05:00
parent 8d37c678d3
commit 3741d28565
2 changed files with 3 additions and 3 deletions

View file

@ -357,9 +357,9 @@ class SeriesViewSet(viewsets.ReadOnlyModelViewSet):
if not episodes_fetched or not detailed_fetched or force_refresh:
force_refresh = True
logger.debug(f"Series {series.id} needs detailed/episode refresh, forcing refresh")
elif last_refreshed and (now - last_refreshed) > timedelta(hours=refresh_interval_hours):
elif last_refreshed is None or (now - last_refreshed) > timedelta(hours=refresh_interval_hours):
force_refresh = True
logger.debug(f"Series {series.id} refresh interval exceeded, forcing refresh")
logger.debug(f"Series {series.id} refresh interval exceeded or never refreshed, forcing refresh")
if force_refresh:
logger.debug(f"Refreshing series {series.id} data from provider")

View file

@ -668,7 +668,7 @@ def cleanup_orphaned_vod_content():
def extract_date_from_data(data):
"""Extract date from various data sources with fallback options"""
try:
for date_field in ['air_date', 'releaseDate', 'release_date']:
for date_field in ['air_date', 'releasedate', 'release_date']:
date_value = data.get(date_field)
if date_value and isinstance(date_value, str) and date_value.strip():
parsed = parse_date(date_value)