Skip to content

Commit

Permalink
Merge pull request #2118 from glensc/dl-check-error
Browse files Browse the repository at this point in the history
Fix: Catch missing subtitle files on download
  • Loading branch information
glensc authored Dec 26, 2024
2 parents 1f11c87 + 1b9cbd3 commit c0b477e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions plextraktsync/commands/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
from pathlib import Path, PureWindowsPath
from typing import TYPE_CHECKING

from plextraktsync.factory import factory
from plexapi.exceptions import NotFound

from plextraktsync.factory import factory, logger
from plextraktsync.util.expand_id import expand_plexid

if TYPE_CHECKING:
Expand Down Expand Up @@ -48,10 +50,14 @@ def download_subtitles(plex: PlexApi, pm: PlexLibraryItem, savepath: Path):
continue

if not sub.key:
print(f" ERROR: Subtitle {index}: has no key: Not downloadable")
logger.error(f"Subtitle {index}: has no key: Not downloadable")
continue

plex.download(sub, savepath=savepath, filename=filename, showstatus=True)
try:
plex.download(sub, savepath=savepath, filename=filename, showstatus=True)
except NotFound:
logger.error(f"Subtitle {index}: File doesn't exist: Not downloadable")
continue
print(f"Downloaded: {filename}")


Expand Down

1 comment on commit c0b477e

@alzee28
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry for the completely noobish question but how do i update Plextraktsnyc if i use this Windows install option? Is it just a case of deleting my previous install and using this latest version and going through the setup again? Thanks in advance for any help.

Please sign in to comment.