Info about media not available for online items
MODIFY
plextraktsync/commands/inspect.py
plextraktsync/commands/inspect.py
@@ -41,7 +41,7 @@ def inspect_media(id):
if not pm.is_legacy_agent:
print(f"Media.Guids: {media.guids}")
- if media.type in ["episode", "movie"]:
+ if not pm.is_online and media.type in ["episode", "movie"]:
audio = pm.audio_streams[0]
print(f"Audio: '{audio.audioChannelLayout}', '{audio.displayTitle}'")

MODIFY
plextraktsync/plex/PlexLibraryItem.py
plextraktsync/plex/PlexLibraryItem.py
@@ -159,6 +159,8 @@ def audio_channels(self):
"""
Set to 1.0, 2.0, 2.1, 3.0, 3.1, 4.1, 5.1, 6.1, 7.1, 9.1, or 10.1
"""
+ if self.is_online:
+ return None
try:
media = self.item.media[0]
@@ -174,6 +176,9 @@ def audio_channels(self):
@property
def audio_codec(self):
+ if self.is_online:
+ return None
+
try:
media = self.item.media[0]
codec = media.audioCodec
@@ -188,6 +193,8 @@ def resolution(self):
"""
Set to uhd_4k, hd_1080p, hd_1080i, hd_720p, sd_480p, sd_480i, sd_576p, or sd_576i.
"""
+ if self.is_online:
+ return None
try:
stream = self.video_streams[0]
title = stream.displayTitle.split(" ")[0]
@@ -232,6 +239,9 @@ def hdr(self):
"""
Set to dolby_vision, hdr10, hdr10_plus, or hlg
"""
+ if self.is_online:
+ return None
+
try:
stream = self.video_streams[0]
colorTrc = stream.colorTrc
@@ -298,8 +308,7 @@ def __repr__(self):
return f"<{guid.provider}:{guid.id}:{plex}>"
def to_json(self):
- collected_at = None if not self.collected_at else timestamp(
- self.collected_at)
+ collected_at = None if not self.collected_at else timestamp(self.collected_at)
metadata = {
"collected_at": collected_at,
"media_type": "digital",

Info about media not available for online items