jellyfin-monitor: only trigger for video
This commit is contained in:
parent
0e90fff70d
commit
9d8b8ad33f
@ -54,7 +54,7 @@ class JellyfinQBittorrentMonitor:
|
||||
response.raise_for_status()
|
||||
sessions = response.json()
|
||||
|
||||
# Count active streaming sessions
|
||||
# Count active streaming sessions (video only)
|
||||
active_streams = []
|
||||
for session in sessions:
|
||||
if (
|
||||
@ -62,6 +62,9 @@ class JellyfinQBittorrentMonitor:
|
||||
and session.get("PlayState", {}).get("IsPaused", True) == False
|
||||
):
|
||||
item = session["NowPlayingItem"]
|
||||
# Only count video streams (Movies, Episodes, etc.)
|
||||
item_type = item.get("Type", "").lower()
|
||||
if item_type in ["movie", "episode", "video"]:
|
||||
user = session.get("UserName", "Unknown")
|
||||
active_streams.append(f"{user}: {item.get('Name', 'Unknown')}")
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user