mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-02-12 23:16:15 +08:00
fix(mediaserver): resolve media_statistic
This commit is contained in:
@@ -154,7 +154,7 @@ class JellyfinModule(_ModuleBase, _MediaServerBase[Jellyfin]):
|
||||
media_statistics = []
|
||||
for server in servers:
|
||||
media_statistic = server.get_medias_count()
|
||||
if not media_statistics:
|
||||
if not media_statistic:
|
||||
continue
|
||||
media_statistic.user_count = server.get_user_count()
|
||||
media_statistics.append(media_statistic)
|
||||
|
||||
@@ -144,8 +144,9 @@ class PlexModule(_ModuleBase, _MediaServerBase[Plex]):
|
||||
media_statistics = []
|
||||
for server in servers:
|
||||
media_statistic = server.get_medias_count()
|
||||
if not media_statistics:
|
||||
if not media_statistic:
|
||||
continue
|
||||
media_statistic.user_count = 1
|
||||
media_statistics.append(media_statistic)
|
||||
return media_statistics
|
||||
|
||||
|
||||
Reference in New Issue
Block a user