diff --git a/plexapi/base.py b/plexapi/base.py index 24fc75be0..46a54581f 100644 --- a/plexapi/base.py +++ b/plexapi/base.py @@ -6,6 +6,7 @@ from plexapi.exceptions import BadRequest, NotFound, UnknownType, Unsupported from plexapi.utils import tag_helper +DONT_RELOAD_FOR_KEYS = ['key', 'session'] OPERATORS = { 'exact': lambda v, q: v == q, 'iexact': lambda v, q: v.lower() == q.lower(), @@ -278,7 +279,8 @@ def __getattribute__(self, attr): # Dragons inside.. :-/ value = super(PlexPartialObject, self).__getattribute__(attr) # Check a few cases where we dont want to reload - if attr == 'key' or attr.startswith('_'): return value + if attr in DONT_RELOAD_FOR_KEYS: return value + if attr.startswith('_'): return value if value not in (None, []): return value if self.isFullObject(): return value # Log the reload.