Add media.parts property
from plexapi import X_PLEX_CONTAINER_SIZE
from plexapi.exceptions import BadRequest, NotFound, Unauthorized
from plexapi.library import LibrarySection, MovieSection, ShowSection
-from plexapi.media import VideoStream, AudioStream
+from plexapi.media import VideoStream, AudioStream, MediaPart
from plexapi.server import PlexServer, SystemAccount, SystemDevice
from plexapi.video import Episode, Movie, Show
from trakt.utils import timestamp
@@ -184,6 +184,11 @@ def seen_date(self):
def collected_at(self):
return self.date_value(self.item.addedAt)
+ @property
+ def parts(self) -> List[MediaPart]:
+ for media in self.item.media:
+ yield from media.parts
+
@flatten
def streams(self, cls):
for media in self.item.media:
