Add audio_streams property to plex media
MODIFY
plextraktsync/plex_api.py
plextraktsync/plex_api.py
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
+from plexapi.media import VideoStream, AudioStream
from plexapi.server import PlexServer, SystemAccount, SystemDevice
from plexapi.video import Episode, Movie, Show
from trakt.utils import timestamp
@@ -192,6 +192,10 @@ def streams(self, cls):
if isinstance(stream, cls):
yield stream
+ @property
+ def audio_streams(self):
+ return self.streams(AudioStream)
+
@property
def video_streams(self):
return self.streams(VideoStream)

Add audio_streams property to plex media