def _notify_pht(message, title='Medusa', host=None, username=None, password=None, force=False): # pylint: disable=too-many-arguments """Internal wrapper for the notify_snatch and notify_download functions Args: message: Message body of the notice to send title: Title of the notice to send host: Plex Home Theater(s) host:port username: Plex username password: Plex password force: Used for the Test method to override config safety checks Returns: Returns a list results in the format of host:ip:result The result will either be 'OK' or False, this is used to be parsed by the calling function. """ from medusa.notifiers import kodi_notifier # suppress notifications if the notifier is disabled but the notify options are checked if not app.USE_PLEX_CLIENT and not force: return False host = host or app.PLEX_CLIENT_HOST username = username or app.PLEX_CLIENT_USERNAME password = password or app.PLEX_CLIENT_PASSWORD return kodi_notifier._notify_kodi(message, title=title, host=host, username=username, password=password, force=force, dest_app='PLEX') # pylint: disable=protected-access
def _notify_pht(title, message, host=None, username=None, password=None, force=False): # pylint: disable=too-many-arguments """Internal wrapper for the notify_snatch and notify_download functions Args: message: Message body of the notice to send title: Title of the notice to send host: Plex Home Theater(s) host:port username: Plex username password: Plex password force: Used for the Test method to override config safety checks Returns: Returns a list results in the format of host:ip:result The result will either be 'OK' or False, this is used to be parsed by the calling function. """ from medusa.notifiers import kodi_notifier # suppress notifications if the notifier is disabled but the notify options are checked if not app.USE_PLEX_CLIENT and not force: return False host = host or app.PLEX_CLIENT_HOST username = username or app.PLEX_CLIENT_USERNAME password = password or app.PLEX_CLIENT_PASSWORD return kodi_notifier._notify_kodi(message, title=title, host=host, username=username, password=password, force=force, dest_app='PLEX') # pylint: disable=protected-access