From 5efe2be7b2017da0b6cbf24d7567c3971700bd6f Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Fri, 8 Dec 2017 22:29:40 -0800 Subject: [PATCH] Fix app parameter in api --- plexpy/api2.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plexpy/api2.py b/plexpy/api2.py index 46490fd8..a16425d4 100644 --- a/plexpy/api2.py +++ b/plexpy/api2.py @@ -103,7 +103,9 @@ class API2: self._api_profileme = kwargs.pop('profileme', None) # Allow override for the api. self._api_out_type = kwargs.pop('out_type', 'json') - self._api_app = True if kwargs.pop('app') == 'true' else False + + if 'app' in kwargs and kwargs.pop('app') == 'true': + self._api_app = True if plexpy.CONFIG.API_ENABLED and not self._api_msg: if self._api_apikey == plexpy.CONFIG.API_KEY or (self._api_app and self._api_apikey == mobile_app.TEMP_DEVICE_TOKEN):