Add to_json method to plex media item
@@ -97,6 +97,10 @@ def date_value(self, date):
def __repr__(self):
return "<%s:%s:%s>" % (self.provider, self.id, self.item)
+ def to_json(self):
+ return {
+ "collected_at": self.collected_at,
+ }
class PlexLibrarySection:
def __init__(self, section: LibrarySection):
