PlexApi: Allow MediaPart type to download arg
MODIFY
plextraktsync/plex/PlexApi.py
plextraktsync/plex/PlexApi.py
import plexapi
from plexapi.exceptions import BadRequest, NotFound, Unauthorized
-from plexapi.media import SubtitleStream
from plexapi.myplex import MyPlexAccount
from plexapi.playlist import Playlist
from plexapi.server import PlexServer, SystemAccount, SystemDevice
if TYPE_CHECKING:
from typing import Dict, List, Optional, Union
+ from plexapi.media import MediaPart, SubtitleStream
from plexapi.video import Movie, Show
from plextraktsync.plex.types import PlexMedia
@@ -93,7 +93,7 @@ def media_url(self, m: PlexLibraryItem, discover=False):
return f"{base_url}/details?key={key}"
- def download(self, m: Union[SubtitleStream], **kwargs):
+ def download(self, m: Union[SubtitleStream, MediaPart], **kwargs):
url = self.plex.url(m.key)
token = self.plex._token

PlexApi: Allow MediaPart type to download arg