mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-10 22:24:12 +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):
|
def __eq__(self, other):
|
||||||
return other is not None and self.key == other.key
|
return other is not None and self.key == other.key
|
||||||
|
|
||||||
|
def __hash__(self):
|
||||||
|
return hash(repr(self))
|
||||||
|
|
||||||
def __getattribute__(self, attr):
|
def __getattribute__(self, attr):
|
||||||
# Dragons inside.. :-/
|
# Dragons inside.. :-/
|
||||||
value = utils.getattributeOrNone(PlexPartialObject, self, attr)
|
value = utils.getattributeOrNone(PlexPartialObject, self, attr)
|
||||||
|
|
Loading…
Reference in a new issue