Fix detection issues
This commit is contained in:
@@ -30,6 +30,7 @@ type ConfigInterface interface {
|
||||
ShouldDeleteRarFiles() bool
|
||||
GetDownloadsEveryMins() int
|
||||
GetPlayableExtensions() []string
|
||||
GetTorrentsCount() int
|
||||
}
|
||||
|
||||
type ZurgConfig struct {
|
||||
@@ -60,6 +61,7 @@ type ZurgConfig struct {
|
||||
RetriesUntilFailed int `yaml:"retries_until_failed" json:"retries_until_failed"`
|
||||
ServeFromRclone bool `yaml:"serve_from_rclone" json:"serve_from_rclone"`
|
||||
Username string `yaml:"username" json:"username"`
|
||||
TorrentsCount int `yaml:"get_torrents_count" json:"get_torrents_count"`
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) GetConfig() ZurgConfig {
|
||||
@@ -201,3 +203,10 @@ func (z *ZurgConfig) GetPlayableExtensions() []string {
|
||||
}
|
||||
return z.PlayableExtensions
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) GetTorrentsCount() int {
|
||||
if z.TorrentsCount == 0 {
|
||||
return 100
|
||||
}
|
||||
return z.TorrentsCount
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user