fix: timezone not being respected in imports
Local Docker Build (Dev) / build-dev (push) Successful in 4s
Local Docker Build (Dev) / build-dev (push) Successful in 4s
This commit is contained in:
@@ -208,6 +208,14 @@ curl -X POST "http://localhost:8080/bulk/update"
|
||||
| `/api/v1/metrics/errors` | GET | Error metrics and recent failures |
|
||||
| `/api/v1/metrics/system` | GET | System resource metrics |
|
||||
|
||||
#### **Database Management**
|
||||
| Endpoint | Method | Purpose |
|
||||
|----------|--------|---------|
|
||||
| `/database/backfill/movie-release-dates` | POST | Backfill missing release dates for existing movies |
|
||||
| `/database/cleanup/orphaned-episodes` | POST | Delete episodes without video files |
|
||||
| `/database/cleanup/orphaned-movies` | POST | Delete movies without video files |
|
||||
| `/database/cleanup/orphaned-series` | POST | Delete TV series without directories |
|
||||
|
||||
#### **Configuration & Debugging**
|
||||
| Endpoint | Method | Purpose |
|
||||
|----------|--------|---------|
|
||||
|
||||
@@ -263,9 +263,11 @@ class TVSeriesProcessor:
|
||||
if episode_id:
|
||||
import_date = self.sonarr.get_episode_import_history(episode_id)
|
||||
if import_date:
|
||||
dateadded = convert_utc_to_local(import_date)
|
||||
# Sonarr import dates are already in local timezone despite 'Z' suffix
|
||||
# Remove 'Z' and use as-is to avoid double timezone conversion
|
||||
dateadded = import_date.replace('Z', '') if 'Z' in import_date else import_date
|
||||
source = "sonarr:history.import"
|
||||
_log("INFO", f"Found import date for S{season_num:02d}E{episode_num:02d}: {dateadded}")
|
||||
_log("INFO", f"Found import date for S{season_num:02d}E{episode_num:02d}: {dateadded} (no timezone conversion)")
|
||||
return aired, dateadded, source
|
||||
|
||||
# Fallback to airdate if no import history
|
||||
|
||||
Reference in New Issue
Block a user