Handle PlexLibraryItem whose guid can't be resolved"
@@ -329,8 +329,11 @@ def date_value(self, date):
return date.astimezone(datetime.timezone.utc)
def __repr__(self):
+ try:
guid = self.guids[0]
- return "<%s:%s:%s>" % (guid.provider, guid.id, self.item)
+ return f"<{guid.provider}:{guid.id}:{self.item}>"
+ except IndexError:
+ return f"<{self.item}>"
def to_json(self):
