mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-11 15:56:37 +08:00
support multiple roots per library
This commit is contained in:
@@ -73,3 +73,14 @@ func (o *OrganizerService) keepSeedingEnabled(ctx context.Context) bool {
|
||||
}
|
||||
return v == "true" || v == "1" || v == "on"
|
||||
}
|
||||
|
||||
func (o *OrganizerService) autoAddLibraryEnabled(ctx context.Context) bool {
|
||||
if o == nil || o.repo == nil || o.repo.Setting == nil {
|
||||
return true
|
||||
}
|
||||
v, err := o.repo.Setting.Get(ctx, "organize.auto_add_library")
|
||||
if err != nil || strings.TrimSpace(v) == "" {
|
||||
return true
|
||||
}
|
||||
return parseBoolSetting(v, true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user