Skip to content

Commit ef0556f

Browse files
committed
Add __hash__ so we can use sets to remove dupes etc.
1 parent a39326f commit ef0556f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

plexapi/base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,9 @@ class PlexPartialObject(PlexObject):
269269
def __eq__(self, other):
270270
return other is not None and self.key == other.key
271271

272+
def __hash__(self):
273+
return hash(repr(self))
274+
272275
def __getattribute__(self, attr):
273276
# Dragons inside.. :-/
274277
value = utils.getattributeOrNone(PlexPartialObject, self, attr)

0 commit comments

Comments
 (0)