Skip to content

Commit

Permalink
Fix #244: return early if no series are returned
Browse files Browse the repository at this point in the history
Signed-off-by: Russell Troxel <[email protected]>
  • Loading branch information
rtrox committed Mar 5, 2024
1 parent 63ea3fa commit b51f214
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/arr/collector/bazarr.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand Down

2 comments on commit b51f214

@onedr0p
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rtrox was this meant to be opened as a PR?

@rtrox
Copy link
Collaborator Author

@rtrox rtrox commented on b51f214 Apr 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, it was initially. I ultimately abandoned this, as it broke the tests, and I don't have a bazarr instance to easily collect test fixtures from. I'll probably come back to this once I set up bazarr unless someone else gets to it sooner.

Please sign in to comment.