def _send_growl(self, options, message=None): # send notification notice = gntp.GNTPNotice() #Required notice.add_header('Application-Name', options['app']) notice.add_header('Notification-Name', options['name']) notice.add_header('Notification-Title', options['title']) if options['password']: notice.set_password(options['password']) # optional if options['sticky']: notice.add_header('Notification-Sticky', options['sticky']) if options['priority']: notice.add_header('Notification-Priority', options['priority']) if options['icon']: notice.add_header('Notification-Icon', 'http://www.sickbeard.com/notify.png') if message: notice.add_header('Notification-Text', message) response = self._send(options['host'], options['port'], notice.encode(), options['debug']) if isinstance(response, gntp.GNTPOK): return True return False
def _send_growl(self, options, message=None): #Send Notification notice = gntp.GNTPNotice() #Required notice.add_header('Application-Name', options['app']) notice.add_header('Notification-Name', options['name']) notice.add_header('Notification-Title', options['title']) if options['password']: notice.set_password(options['password']) #Optional if options['sticky']: notice.add_header('Notification-Sticky', options['sticky']) if options['priority']: notice.add_header('Notification-Priority', options['priority']) if options['icon']: notice.add_header( 'Notification-Icon', 'https://github.com/midgetspy/Sick-Beard/raw/master/data/images/sickbeard_touch_icon.png' ) if message: notice.add_header('Notification-Text', message) response = self._send(options['host'], options['port'], notice.encode(), options['debug']) if isinstance(response, gntp.GNTPOK): return True return False
def _send_growl(self, options, message=None): #Send Notification notice = gntp.GNTPNotice() #Required notice.add_header('Application-Name', options['app']) notice.add_header('Notification-Name', options['name']) notice.add_header('Notification-Title', options['title']) if options['password']: notice.set_password(options['password']) #Optional if options['sticky']: notice.add_header('Notification-Sticky', options['sticky']) if options['priority']: notice.add_header('Notification-Priority', options['priority']) if options['icon']: notice.add_header( 'Notification-Icon', 'https://raw.githubusercontent.com/gborri/Sick-Beard/ThePirateBay/gui/slick/images/sickbeard.png' ) if message: notice.add_header('Notification-Text', message) response = self._send(options['host'], options['port'], notice.encode(), options['debug']) if isinstance(response, gntp.GNTPOK): return True return False
def _send_growl(self, options, message=None): #Send Notification notice = gntp.GNTPNotice() #Required notice.add_header('Application-Name', options['app']) notice.add_header('Notification-Name', options['name']) notice.add_header('Notification-Title', options['title']) if options['password']: notice.set_password(options['password']) #Optional if options['sticky']: notice.add_header('Notification-Sticky', options['sticky']) if options['priority']: notice.add_header('Notification-Priority', options['priority']) if options['icon']: notice.add_header('Notification-Icon', 'https://raw.github.com/SiCKRAGETV/SickRage/master/gui/slick/images/sickrage-shark-mascot.png') if message: notice.add_header('Notification-Text', message) response = self._send(options['host'], options['port'], notice.encode(), options['debug']) if isinstance(response, gntp.GNTPOK): return True return False
def _create_notice(self, message): notice = gntp.GNTPNotice() notice.add_header('Application-Name', self.application) notice.add_header('Notification-Name', self.title) notice.add_header('Notification-Title', self.application_title) notice.add_header('Notification-Text', message) if autosubliminal.GROWLPASS: notice.set_password(autosubliminal.GROWLPASS) return notice
def _send_growl(self, options, message=None): #Send Registration register = gntp.GNTPRegister() register.add_header('Application-Name', options['app']) register.add_notification(options['name'], True) if options['password']: register.set_password(options['password']) self._send(options['host'], options['port'], register.encode(), options['debug']) #Send Notification notice = gntp.GNTPNotice() #Required notice.add_header('Application-Name', options['app']) notice.add_header('Notification-Name', options['name']) notice.add_header('Notification-Title', options['title']) if options['password']: notice.set_password(options['password']) #Optional # determined by config option GROWL_STICKY if options['sticky']: notice.add_header('Notification-Sticky', options['sticky']) if options['priority']: notice.add_header('Notification-Priority', options['priority']) if options['icon']: notice.add_header('Notification-Icon', options['icon']) if message: notice.add_header('Notification-Text', message) response = self._send(options['host'], options['port'], notice.encode(), options['debug']) if isinstance(response, gntp.GNTPOK): return True return False