Skip to content

Commit

Permalink
fix: indexer seedcriteria fields not written
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuochi committed Jan 26, 2023
1 parent 8852e45 commit d74a6f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/provider/indexer_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,13 +422,13 @@ func (i *Indexer) writeFields(ctx context.Context, fields []*radarr.Field) {
continue
}

if slices.Contains(indexerIntFields, f.GetName()) {
if slices.Contains(indexerIntFields, f.GetName()) || f.GetName() == "seedCriteria.seedTime" || f.GetName() == "seedCriteria.seasonPackSeedTime" {
helpers.WriteIntField(f, i)

continue
}

if slices.Contains(indexerFloatFields, f.GetName()) {
if slices.Contains(indexerFloatFields, f.GetName()) || f.GetName() == "seedCriteria.seedRatio" {
helpers.WriteFloatField(f, i)

continue
Expand Down
2 changes: 2 additions & 0 deletions internal/provider/indexer_torrent_potato_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,7 @@ func testAccIndexerTorrentPotatoResourceConfig(name string, seeders int) string
user = "testUser"
passkey = "pass"
minimum_seeders = %d
seed_time = 10
seed_ratio = 0.5
}`, name, seeders)
}

0 comments on commit d74a6f0

Please sign in to comment.