diff options
| author | Pablu23 <pablu23@gmx.de> | 2024-06-11 15:50:39 +0200 |
|---|---|---|
| committer | Pablu23 <pablu23@gmx.de> | 2024-06-11 15:50:39 +0200 |
| commit | eece14aabbe4252274ec561c987a70225ad4f4f9 (patch) | |
| tree | 554c7032545c7d87847df345e884e776b58065d8 | |
| parent | a890c9141c98c9370d6de2c2d952d93b51dd7c8a (diff) | |
Able to disable black Filter, its not of much use at the moment anyways and causes Errors and tanks performance
| -rw-r--r-- | generator.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generator.go b/generator.go index a80a64b..15280a3 100644 --- a/generator.go +++ b/generator.go @@ -16,7 +16,7 @@ type TimeFilter struct { End float64 } -func GetThumbnail(path string, intervalSeconds int, maxThumbnails int) ([][]byte, error) { +func GetThumbnail(path string, intervalSeconds int, maxThumbnails int, enableFilter bool) ([][]byte, error) { filters, err := GetFilter(path) if err != nil { return nil, err @@ -50,7 +50,7 @@ func GetThumbnail(path string, intervalSeconds int, maxThumbnails int) ([][]byte } currFrame += int(fps) * intervalSeconds - if FrameLiesWithinFilter(time, filters) { + if enableFilter && FrameLiesWithinFilter(time, filters) { continue } |
