pvr: add options and support for anime (#17)

* pvr: begin adding options

* pvr: add ability to configure add behaviour via config

* pvr: add skip_anime

* pvr: do not continue processing item if lookup failed or add to pvr failed
This commit is contained in:
l3uddz
2021-02-20 20:01:04 +00:00
committed by GitHub
parent 523e561666
commit a2848439b9
14 changed files with 283 additions and 30 deletions

39
util/slice_test.go Normal file
View File

@@ -0,0 +1,39 @@
package util
import "testing"
func TestStringSliceContains(t *testing.T) {
type args struct {
slice []string
val string
}
tests := []struct {
name string
args args
want bool
}{
{
name: "expect true",
args: args{
slice: []string{"tes", "Test"},
val: "test",
},
want: true,
},
{
name: "expect false",
args: args{
slice: []string{"tes", "Test"},
val: "testing",
},
want: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := StringSliceContains(tt.args.slice, tt.args.val); got != tt.want {
t.Errorf("StringSliceContains() = %v, want %v", got, tt.want)
}
})
}
}