Add setting for hiding broken torrents

This commit is contained in:
Ben Adrian Sarmiento
2024-07-06 23:56:12 +02:00
parent acd18aca9a
commit 1373bbb975
5 changed files with 20 additions and 5 deletions

View File

@@ -39,6 +39,7 @@ type ConfigInterface interface {
ShouldIgnoreRenames() bool
ShouldLogRequests() bool
ShouldServeFromRclone() bool
ShouldHideBrokenTorrents() bool
}
type ZurgConfig struct {
@@ -71,6 +72,7 @@ type ZurgConfig struct {
RetainRDTorrentName bool `yaml:"retain_rd_torrent_name" json:"retain_rd_torrent_name"`
RetriesUntilFailed int `yaml:"retries_until_failed" json:"retries_until_failed"`
ServeFromRclone bool `yaml:"serve_from_rclone" json:"serve_from_rclone"`
HideBrokenTorrents bool `yaml:"show_broken_torrents" json:"show_broken_torrents"`
Username string `yaml:"username" json:"username"`
}
@@ -232,3 +234,7 @@ func (z *ZurgConfig) ShouldLogRequests() bool {
func (z *ZurgConfig) GetDownloadTokens() []string {
return z.DownloadTokens
}
func (z *ZurgConfig) ShouldHideBrokenTorrents() bool {
return z.HideBrokenTorrents
}