Fix #244: return early if no series are returned

Signed-off-by: Russell Troxel <russell@troxel.io>
This commit is contained in:
Russell Troxel 2024-03-05 15:28:11 -08:00
parent 63ea3fa3bf
commit b51f214775
No known key found for this signature in database
GPG Key ID: 88CCFD83B5159BEF

View File

@ -410,6 +410,10 @@ func (collector *bazarrCollector) CollectEpisodeStats(ch chan<- prometheus.Metri
for _, s := range series.Data {
ids = append(ids, fmt.Sprintf("%d", s.Id))
}
if len(ids) < 1 {
return episodeStats
}
batches := createIDBatches(ids, collector.config.Bazarr.SeriesBatchSize)
eg := errgroup.Group{}