This commit is contained in:
ponzischeme89
2026-08-16 12:13:51 +12:00
parent bd3732fba5
commit b9374baaf1
47 changed files with 2793 additions and 364 deletions
+17
View File
@@ -40,6 +40,23 @@ func (p Postgres) SaveMarker(ctx context.Context, marker Marker) error {
})
}
func (p Postgres) SaveScanAttempt(ctx context.Context, attempt ScanAttempt) error {
return p.Store.SaveCreditsScanAttempt(ctx, store.CreditsScanHistoryRow{
ItemID: attempt.ItemID, SeriesID: attempt.SeriesID,
Season: attempt.Season, Episode: attempt.Episode,
Reason: attempt.Reason, Priority: attempt.Priority, Outcome: attempt.Outcome,
MarkerMs: attempt.MarkerMs, Confidence: attempt.Confidence,
Method: attempt.Method, Frames: attempt.Frames, Error: attempt.Error,
StartedAt: attempt.StartedAt, FinishedAt: attempt.FinishedAt,
})
}
func (p Postgres) RecentScanTimes(
ctx context.Context, itemIDs []string, since time.Time,
) (map[string]time.Time, error) {
return p.Store.RecentCreditsScanTimes(ctx, itemIDs, since)
}
func (p Postgres) SeasonMarkers(
ctx context.Context, seriesID string, season, limit int,
) ([]Marker, error) {