mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
feat(filters): validate existence of external exec cmd (#1501)
* feat(filters): check external cmd exists * fix: imports * Update internal/domain/filter.go --------- Co-authored-by: s0up4200 <soup@r4tio.dev>
This commit is contained in:
parent
b44d55ea55
commit
da53230077
3 changed files with 84 additions and 8 deletions
|
@ -6,3 +6,14 @@ func String(str string) string {
|
|||
str = strings.TrimSpace(str)
|
||||
return str
|
||||
}
|
||||
|
||||
func FilterString(str string) string {
|
||||
str = strings.TrimSpace(str)
|
||||
str = strings.Trim(str, ",")
|
||||
|
||||
// replace newline with comma
|
||||
str = strings.ReplaceAll(str, "\n", ",")
|
||||
str = strings.ReplaceAll(str, ",,", ",")
|
||||
|
||||
return str
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue