From c98c8c8836dc85f7bd6da645089c9e296bdcac30 Mon Sep 17 00:00:00 2001 From: zhu0823 Date: Tue, 16 Apr 2024 17:42:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20plex=E5=AA=92=E4=BD=93=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E7=BB=9F=E8=AE=A1=E8=BF=87=E6=BB=A4=E9=BB=91=E5=90=8D?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/modules/plex/plex.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/modules/plex/plex.py b/app/modules/plex/plex.py index 34aacec2..73ce7a37 100644 --- a/app/modules/plex/plex.py +++ b/app/modules/plex/plex.py @@ -142,7 +142,11 @@ class Plex: return schemas.Statistic() sections = self._plex.library.sections() MovieCount = SeriesCount = EpisodeCount = 0 + # 媒体库白名单 + allow_library = [lib.id for lib in self.get_librarys()] for sec in sections: + if str(sec.key) not in allow_library: + continue if sec.type == "movie": MovieCount += sec.totalSize if sec.type == "show": @@ -610,7 +614,7 @@ class Plex: """ if not self._plex: return [] - # 过滤黑名单 + # 媒体库白名单 allow_library = ",".join([lib.id for lib in self.get_librarys()]) query = {'contentDirectoryID': allow_library} path = '/hubs/continueWatching/items' + utils.joinArgs(query)