Add download media to download command
MODIFY
plextraktsync/commands/download.py
plextraktsync/commands/download.py
from plextraktsync.plex.PlexLibraryItem import PlexLibraryItem
+def download_media(plex: PlexApi, pm: PlexLibraryItem):
+ print(f"Download media for {pm}:")
+ for index, part in enumerate(pm.parts, start=1):
+ print(f"Downloading part {index}: {part.file}")
+ plex.download(part, filename=part.file, showstatus=True)
+
+
def download_subtitles(plex: PlexApi, pm: PlexLibraryItem):
print(f"Subtitles for {pm}:")
for index, sub in enumerate(pm.subtitle_streams, start=1):
@@ -37,4 +44,8 @@ def download(input: List[str], only_subs: bool):
if not pm:
print(f"Not found: {id}. Skipping")
continue
+
+ if not only_subs:
+ download_media(plex, pm)
+
download_subtitles(plex, pm)

Add download media to download command