mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Change Pushy to OneSignal for push notifications
This commit is contained in:
parent
c405f04e9c
commit
42a895b095
3 changed files with 39 additions and 28 deletions
|
@ -341,13 +341,13 @@ class API2:
|
|||
|
||||
return data
|
||||
|
||||
def register_device(self, device_name='', device_token='', **kwargs):
|
||||
def register_device(self, device_name='', device_id='', **kwargs):
|
||||
""" Registers the PlexPy Android App for notifications.
|
||||
|
||||
```
|
||||
Required parameters:
|
||||
device_token (str): The device token of the PlexPy Android App
|
||||
device_name (str): The device name of the PlexPy Android App
|
||||
device_id (str): The OneSignal device id of the PlexPy Android App
|
||||
|
||||
Optional parameters:
|
||||
None
|
||||
|
@ -361,14 +361,14 @@ class API2:
|
|||
self._api_result_type = 'error'
|
||||
return
|
||||
|
||||
elif not device_token:
|
||||
elif not device_id:
|
||||
self._api_msg = 'Device registartion failed: no device token provided.'
|
||||
self._api_result_type = 'error'
|
||||
return
|
||||
|
||||
db = database.MonitorDatabase()
|
||||
|
||||
keys = {'device_token': device_token}
|
||||
keys = {'device_id': device_id}
|
||||
values = {'device_name': device_name}
|
||||
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue