mirror of
https://github.com/pkkid/python-plexapi
synced 2024-09-20 22:01:57 +00:00
Add __hash__ so we can use sets to remove dupes etc.
This commit is contained in:
parent
a39326fab8
commit
ef0556f952
1 changed files with 3 additions and 0 deletions
|
@ -269,6 +269,9 @@ class PlexPartialObject(PlexObject):
|
|||
def __eq__(self, other):
|
||||
return other is not None and self.key == other.key
|
||||
|
||||
def __hash__(self):
|
||||
return hash(repr(self))
|
||||
|
||||
def __getattribute__(self, attr):
|
||||
# Dragons inside.. :-/
|
||||
value = utils.getattributeOrNone(PlexPartialObject, self, attr)
|
||||
|
|
Loading…
Reference in a new issue