Open hoffmann2002 opened 1 year ago
A possible patch can be the following:
From 42fbfbad008a332a437ac1d49391a8decb0e3f99 Mon Sep 17 00:00:00 2001
From: hoffmann2002
Date: Wed, 21 Dec 2022 17:56:50 +0100
Subject: [PATCH] libraries trailing slashes are irgnored
---
targets/plex/plex.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/targets/plex/plex.go b/targets/plex/plex.go
index ec526f9..0b0f525 100644
--- a/targets/plex/plex.go
+++ b/targets/plex/plex.go
@@ -110,7 +110,7 @@ func (t target) getScanLibrary(folder string) ([]library, error) {
libraries := make([]library, 0)
for _, l := range t.libraries {
- if strings.HasPrefix(folder, l.Path) {
+ if strings.HasPrefix(folder, strings.TrimSuffix(l.Path,"/")) {
libraries = append(libraries, l)
}
}
--
2.34.1
Hi,
if a plex target library is not organized in subdirectories and therefore using "Stand-Alone Movie Files"-Structure as described on plex.tv it will not be refreshed.
The changes will be detected, but the trigger will not find the corresponding library.