diff --git a/API.md b/API.md index c9aea64c..f7b70089 100644 --- a/API.md +++ b/API.md @@ -2682,7 +2682,10 @@ Optional parameters: onesignal_id (str): The OneSignal id for the mobile device Returns: - None + json: + {"pms_name": "Winterfell-Server", + "server_id": "ds48g4r354a8v9byrrtr697g3g79w" + } ``` diff --git a/plexpy/api2.py b/plexpy/api2.py index cf022c8c..73239b23 100644 --- a/plexpy/api2.py +++ b/plexpy/api2.py @@ -404,7 +404,10 @@ class API2(object): onesignal_id (str): The OneSignal id for the mobile device Returns: - None + json: + {"pms_name": "Winterfell-Server", + "server_id": "ds48g4r354a8v9byrrtr697g3g79w" + } ``` """ if not device_id: @@ -426,7 +429,16 @@ class API2(object): if result: self._api_msg = 'Device registration successful.' self._api_result_type = 'success' + mobile_app.set_temp_device_token(None) + + data = { + "pms_name": plexpy.CONFIG.PMS_NAME, + "server_id": plexpy.CONFIG.PMS_UUID + } + + return data + else: self._api_msg = 'Device registration failed: database error.' self._api_result_type = 'error'