Skip to content

Commit

Permalink
Merge pull request #1871 from glensc/inspect-exists
Browse files Browse the repository at this point in the history
Print file exists info in inspect
  • Loading branch information
glensc authored Mar 17, 2024
2 parents 2ba1fb7 + 377c92e commit 7e10400
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plextraktsync/commands/inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def inspect_media(plex_id: PlexId):

print("Parts:")
for index, part in enumerate(pm.parts, start=1):
print(f" Part {index}: [link=file://{quote_plus(part.file)}]{escape(part.file)}[/link] {part.size} bytes")
print(f" Part {index} (exists: {part.exists}): [link=file://{quote_plus(part.file)}]{escape(part.file)}[/link] {part.size} bytes")

print("Markers:")
for marker in pm.markers:
Expand Down
6 changes: 4 additions & 2 deletions plextraktsync/plex/PlexLibraryItem.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,10 @@ def markers(self) -> list[Marker]:

@property
def parts(self) -> list[MediaPart]:
item = self.plex.fetch_item(self.item.ratingKey)
for media in item.item.media:
if self.item.isPartialObject():
self.item.reload()

for media in self.item.media:
yield from media.parts

@property
Expand Down

0 comments on commit 7e10400

Please sign in to comment.