diff --git a/plexpy/__init__.py b/plexpy/__init__.py index ca59d672..20d2e015 100644 --- a/plexpy/__init__.py +++ b/plexpy/__init__.py @@ -2156,10 +2156,7 @@ def dbcheck(): def upgrade(): - if CONFIG.UPDATE_NOTIFIERS_DB: - notifiers.upgrade_config_to_db() - if CONFIG.UPDATE_LIBRARIES_DB_NOTIFY: - libraries.update_libraries_db_notify() + return def shutdown(restart=False, update=False, checkout=False, reset=False): diff --git a/plexpy/config.py b/plexpy/config.py index a685338b..8427c986 100644 --- a/plexpy/config.py +++ b/plexpy/config.py @@ -41,15 +41,12 @@ def bool_int(value): value = 0 return int(bool(value)) + FILENAME = "config.ini" _CONFIG_DEFINITIONS = { 'ALLOW_GUEST_ACCESS': (int, 'General', 0), 'DATE_FORMAT': (str, 'General', 'YYYY-MM-DD'), - 'GROUPING_GLOBAL_HISTORY': (int, 'PlexWatch', 0), - 'GROUPING_USER_HISTORY': (int, 'PlexWatch', 0), - 'GROUPING_CHARTS': (int, 'PlexWatch', 0), - 'PLEXWATCH_DATABASE': (str, 'PlexWatch', ''), 'PMS_IDENTIFIER': (str, 'PMS', ''), 'PMS_IP': (str, 'PMS', '127.0.0.1'), 'PMS_IS_CLOUD': (int, 'PMS', 0), @@ -79,39 +76,6 @@ _CONFIG_DEFINITIONS = { 'API_ENABLED': (int, 'General', 1), 'API_KEY': (str, 'General', ''), 'API_SQL': (int, 'General', 0), - 'BOXCAR_ENABLED': (int, 'Boxcar', 0), - 'BOXCAR_TOKEN': (str, 'Boxcar', ''), - 'BOXCAR_SOUND': (str, 'Boxcar', ''), - 'BOXCAR_ON_PLAY': (int, 'Boxcar', 0), - 'BOXCAR_ON_STOP': (int, 'Boxcar', 0), - 'BOXCAR_ON_PAUSE': (int, 'Boxcar', 0), - 'BOXCAR_ON_RESUME': (int, 'Boxcar', 0), - 'BOXCAR_ON_BUFFER': (int, 'Boxcar', 0), - 'BOXCAR_ON_WATCHED': (int, 'Boxcar', 0), - 'BOXCAR_ON_CREATED': (int, 'Boxcar', 0), - 'BOXCAR_ON_EXTDOWN': (int, 'Boxcar', 0), - 'BOXCAR_ON_INTDOWN': (int, 'Boxcar', 0), - 'BOXCAR_ON_EXTUP': (int, 'Boxcar', 0), - 'BOXCAR_ON_INTUP': (int, 'Boxcar', 0), - 'BOXCAR_ON_PMSUPDATE': (int, 'Boxcar', 0), - 'BOXCAR_ON_CONCURRENT': (int, 'Boxcar', 0), - 'BOXCAR_ON_NEWDEVICE': (int, 'Boxcar', 0), - 'BROWSER_ENABLED': (int, 'Browser', 0), - 'BROWSER_AUTO_HIDE_DELAY': (int, 'Browser', 5), - 'BROWSER_ON_PLAY': (int, 'Browser', 0), - 'BROWSER_ON_STOP': (int, 'Browser', 0), - 'BROWSER_ON_PAUSE': (int, 'Browser', 0), - 'BROWSER_ON_RESUME': (int, 'Browser', 0), - 'BROWSER_ON_BUFFER': (int, 'Browser', 0), - 'BROWSER_ON_WATCHED': (int, 'Browser', 0), - 'BROWSER_ON_CREATED': (int, 'Browser', 0), - 'BROWSER_ON_EXTDOWN': (int, 'Browser', 0), - 'BROWSER_ON_INTDOWN': (int, 'Browser', 0), - 'BROWSER_ON_EXTUP': (int, 'Browser', 0), - 'BROWSER_ON_INTUP': (int, 'Browser', 0), - 'BROWSER_ON_PMSUPDATE': (int, 'Browser', 0), - 'BROWSER_ON_CONCURRENT': (int, 'Browser', 0), - 'BROWSER_ON_NEWDEVICE': (int, 'Browser', 0), 'BUFFER_THRESHOLD': (int, 'Monitoring', 10), 'BUFFER_WAIT': (int, 'Monitoring', 900), 'BACKUP_DAYS': (int, 'General', 3), @@ -129,56 +93,7 @@ _CONFIG_DEFINITIONS = { 'CLOUDINARY_API_SECRET': (str, 'Cloudinary', ''), 'CONFIG_VERSION': (int, 'Advanced', 0), 'DO_NOT_OVERRIDE_GIT_BRANCH': (int, 'General', 0), - 'EMAIL_ENABLED': (int, 'Email', 0), - 'EMAIL_FROM_NAME': (str, 'Email', 'Tautulli'), - 'EMAIL_FROM': (str, 'Email', ''), - 'EMAIL_TO': (str, 'Email', ''), - 'EMAIL_CC': (str, 'Email', ''), - 'EMAIL_BCC': (str, 'Email', ''), - 'EMAIL_SMTP_SERVER': (str, 'Email', ''), - 'EMAIL_SMTP_USER': (str, 'Email', ''), - 'EMAIL_SMTP_PASSWORD': (str, 'Email', ''), - 'EMAIL_SMTP_PORT': (int, 'Email', 25), - 'EMAIL_TLS': (int, 'Email', 0), - 'EMAIL_HTML_SUPPORT': (int, 'Email', 1), - 'EMAIL_ON_PLAY': (int, 'Email', 0), - 'EMAIL_ON_STOP': (int, 'Email', 0), - 'EMAIL_ON_PAUSE': (int, 'Email', 0), - 'EMAIL_ON_RESUME': (int, 'Email', 0), - 'EMAIL_ON_BUFFER': (int, 'Email', 0), - 'EMAIL_ON_WATCHED': (int, 'Email', 0), - 'EMAIL_ON_CREATED': (int, 'Email', 0), - 'EMAIL_ON_EXTDOWN': (int, 'Email', 0), - 'EMAIL_ON_INTDOWN': (int, 'Email', 0), - 'EMAIL_ON_EXTUP': (int, 'Email', 0), - 'EMAIL_ON_INTUP': (int, 'Email', 0), - 'EMAIL_ON_PMSUPDATE': (int, 'Email', 0), - 'EMAIL_ON_CONCURRENT': (int, 'Email', 0), - 'EMAIL_ON_NEWDEVICE': (int, 'Email', 0), 'ENABLE_HTTPS': (int, 'General', 0), - 'FACEBOOK_ENABLED': (int, 'Facebook', 0), - 'FACEBOOK_REDIRECT_URI': (str, 'Facebook', ''), - 'FACEBOOK_APP_ID': (str, 'Facebook', ''), - 'FACEBOOK_APP_SECRET': (str, 'Facebook', ''), - 'FACEBOOK_TOKEN': (str, 'Facebook', ''), - 'FACEBOOK_GROUP': (str, 'Facebook', ''), - 'FACEBOOK_INCL_PMSLINK': (int, 'Facebook', 0), - 'FACEBOOK_INCL_POSTER': (int, 'Facebook', 0), - 'FACEBOOK_INCL_SUBJECT': (int, 'Facebook', 1), - 'FACEBOOK_ON_PLAY': (int, 'Facebook', 0), - 'FACEBOOK_ON_STOP': (int, 'Facebook', 0), - 'FACEBOOK_ON_PAUSE': (int, 'Facebook', 0), - 'FACEBOOK_ON_RESUME': (int, 'Facebook', 0), - 'FACEBOOK_ON_BUFFER': (int, 'Facebook', 0), - 'FACEBOOK_ON_WATCHED': (int, 'Facebook', 0), - 'FACEBOOK_ON_CREATED': (int, 'Facebook', 0), - 'FACEBOOK_ON_EXTDOWN': (int, 'Facebook', 0), - 'FACEBOOK_ON_INTDOWN': (int, 'Facebook', 0), - 'FACEBOOK_ON_EXTUP': (int, 'Facebook', 0), - 'FACEBOOK_ON_INTUP': (int, 'Facebook', 0), - 'FACEBOOK_ON_PMSUPDATE': (int, 'Facebook', 0), - 'FACEBOOK_ON_CONCURRENT': (int, 'Facebook', 0), - 'FACEBOOK_ON_NEWDEVICE': (int, 'Facebook', 0), 'FIRST_RUN_COMPLETE': (int, 'General', 0), 'FREEZE_DB': (int, 'General', 0), 'GET_FILE_SIZES': (int, 'General', 0), @@ -190,23 +105,6 @@ _CONFIG_DEFINITIONS = { 'GIT_USER': (str, 'General', 'Tautulli'), 'GIT_REPO': (str, 'General', 'Tautulli'), 'GROUP_HISTORY_TABLES': (int, 'General', 1), - 'GROWL_ENABLED': (int, 'Growl', 0), - 'GROWL_HOST': (str, 'Growl', ''), - 'GROWL_PASSWORD': (str, 'Growl', ''), - 'GROWL_ON_PLAY': (int, 'Growl', 0), - 'GROWL_ON_STOP': (int, 'Growl', 0), - 'GROWL_ON_PAUSE': (int, 'Growl', 0), - 'GROWL_ON_RESUME': (int, 'Growl', 0), - 'GROWL_ON_BUFFER': (int, 'Growl', 0), - 'GROWL_ON_WATCHED': (int, 'Growl', 0), - 'GROWL_ON_CREATED': (int, 'Growl', 0), - 'GROWL_ON_EXTDOWN': (int, 'Growl', 0), - 'GROWL_ON_INTDOWN': (int, 'Growl', 0), - 'GROWL_ON_EXTUP': (int, 'Growl', 0), - 'GROWL_ON_INTUP': (int, 'Growl', 0), - 'GROWL_ON_PMSUPDATE': (int, 'Growl', 0), - 'GROWL_ON_CONCURRENT': (int, 'Growl', 0), - 'GROWL_ON_NEWDEVICE': (int, 'Growl', 0), 'HISTORY_TABLE_ACTIVITY': (int, 'General', 1), 'HOME_SECTIONS': (list, 'General', ['current_activity','watch_stats','library_stats','recently_added']), 'HOME_LIBRARY_CARDS': (list, 'General', ['first_run']), @@ -231,65 +129,8 @@ _CONFIG_DEFINITIONS = { 'HTTP_USERNAME': (str, 'General', ''), 'HTTP_PLEX_ADMIN': (int, 'General', 0), 'HTTP_BASE_URL': (str, 'General', ''), - 'HIPCHAT_URL': (str, 'Hipchat', ''), - 'HIPCHAT_COLOR': (str, 'Hipchat', ''), - 'HIPCHAT_INCL_SUBJECT': (int, 'Hipchat', 1), - 'HIPCHAT_INCL_PMSLINK': (int, 'Hipchat', 0), - 'HIPCHAT_INCL_POSTER': (int, 'Hipchat', 0), - 'HIPCHAT_EMOTICON': (str, 'Hipchat', ''), - 'HIPCHAT_ENABLED': (int, 'Hipchat', 0), - 'HIPCHAT_ON_PLAY': (int, 'Hipchat', 0), - 'HIPCHAT_ON_STOP': (int, 'Hipchat', 0), - 'HIPCHAT_ON_PAUSE': (int, 'Hipchat', 0), - 'HIPCHAT_ON_RESUME': (int, 'Hipchat', 0), - 'HIPCHAT_ON_BUFFER': (int, 'Hipchat', 0), - 'HIPCHAT_ON_WATCHED': (int, 'Hipchat', 0), - 'HIPCHAT_ON_CREATED': (int, 'Hipchat', 0), - 'HIPCHAT_ON_EXTDOWN': (int, 'Hipchat', 0), - 'HIPCHAT_ON_INTDOWN': (int, 'Hipchat', 0), - 'HIPCHAT_ON_EXTUP': (int, 'Hipchat', 0), - 'HIPCHAT_ON_INTUP': (int, 'Hipchat', 0), - 'HIPCHAT_ON_PMSUPDATE': (int, 'Hipchat', 0), - 'HIPCHAT_ON_CONCURRENT': (int, 'Hipchat', 0), - 'HIPCHAT_ON_NEWDEVICE': (int, 'Hipchat', 0), 'INTERFACE': (str, 'General', 'default'), - 'IP_LOGGING_ENABLE': (int, 'General', 0), - 'IFTTT_KEY': (str, 'IFTTT', ''), - 'IFTTT_EVENT': (str, 'IFTTT', 'tautulli'), - 'IFTTT_ENABLED': (int, 'IFTTT', 0), - 'IFTTT_ON_PLAY': (int, 'IFTTT', 0), - 'IFTTT_ON_STOP': (int, 'IFTTT', 0), - 'IFTTT_ON_PAUSE': (int, 'IFTTT', 0), - 'IFTTT_ON_RESUME': (int, 'IFTTT', 0), - 'IFTTT_ON_BUFFER': (int, 'IFTTT', 0), - 'IFTTT_ON_WATCHED': (int, 'IFTTT', 0), - 'IFTTT_ON_CREATED': (int, 'IFTTT', 0), - 'IFTTT_ON_EXTDOWN': (int, 'IFTTT', 0), - 'IFTTT_ON_INTDOWN': (int, 'IFTTT', 0), - 'IFTTT_ON_EXTUP': (int, 'IFTTT', 0), - 'IFTTT_ON_INTUP': (int, 'IFTTT', 0), - 'IFTTT_ON_PMSUPDATE': (int, 'IFTTT', 0), - 'IFTTT_ON_CONCURRENT': (int, 'IFTTT', 0), - 'IFTTT_ON_NEWDEVICE': (int, 'IFTTT', 0), 'IMGUR_CLIENT_ID': (str, 'Monitoring', ''), - 'JOIN_APIKEY': (str, 'Join', ''), - 'JOIN_DEVICEID': (str, 'Join', ''), - 'JOIN_ENABLED': (int, 'Join', 0), - 'JOIN_INCL_SUBJECT': (int, 'Join', 1), - 'JOIN_ON_PLAY': (int, 'Join', 0), - 'JOIN_ON_STOP': (int, 'Join', 0), - 'JOIN_ON_PAUSE': (int, 'Join', 0), - 'JOIN_ON_RESUME': (int, 'Join', 0), - 'JOIN_ON_BUFFER': (int, 'Join', 0), - 'JOIN_ON_WATCHED': (int, 'Join', 0), - 'JOIN_ON_CREATED': (int, 'Join', 0), - 'JOIN_ON_EXTDOWN': (int, 'Join', 0), - 'JOIN_ON_INTDOWN': (int, 'Join', 0), - 'JOIN_ON_EXTUP': (int, 'Join', 0), - 'JOIN_ON_INTUP': (int, 'Join', 0), - 'JOIN_ON_PMSUPDATE': (int, 'Join', 0), - 'JOIN_ON_CONCURRENT': (int, 'Join', 0), - 'JOIN_ON_NEWDEVICE': (int, 'Join', 0), 'JOURNAL_MODE': (str, 'Advanced', 'WAL'), 'LAUNCH_BROWSER': (int, 'General', 1), 'LAUNCH_STARTUP': (int, 'General', 1), @@ -297,17 +138,7 @@ _CONFIG_DEFINITIONS = { 'LOG_DIR': (str, 'General', ''), 'LOGGING_IGNORE_INTERVAL': (int, 'Monitoring', 120), 'METADATA_CACHE_SECONDS': (int, 'Advanced', 1800), - 'MOVIE_LOGGING_ENABLE': (int, 'Monitoring', 1), - 'MOVIE_NOTIFY_ENABLE': (int, 'Monitoring', 0), - 'MOVIE_NOTIFY_ON_START': (int, 'Monitoring', 1), - 'MOVIE_NOTIFY_ON_STOP': (int, 'Monitoring', 0), - 'MOVIE_NOTIFY_ON_PAUSE': (int, 'Monitoring', 0), 'MOVIE_WATCHED_PERCENT': (int, 'Monitoring', 85), - 'MUSIC_LOGGING_ENABLE': (int, 'Monitoring', 1), - 'MUSIC_NOTIFY_ENABLE': (int, 'Monitoring', 0), - 'MUSIC_NOTIFY_ON_START': (int, 'Monitoring', 1), - 'MUSIC_NOTIFY_ON_STOP': (int, 'Monitoring', 0), - 'MUSIC_NOTIFY_ON_PAUSE': (int, 'Monitoring', 0), 'MUSIC_WATCHED_PERCENT': (int, 'Monitoring', 85), 'MUSICBRAINZ_LOOKUP': (int, 'General', 0), 'MONITOR_PMS_UPDATES': (int, 'Monitoring', 0), @@ -322,23 +153,6 @@ _CONFIG_DEFINITIONS = { 'NEWSLETTER_DIR': (str, 'Newsletter', ''), 'NEWSLETTER_SELF_HOSTED': (int, 'Newsletter', 0), 'NEWSLETTER_STATIC_URL': (int, 'Newsletter', 0), - 'NMA_APIKEY': (str, 'NMA', ''), - 'NMA_ENABLED': (int, 'NMA', 0), - 'NMA_PRIORITY': (int, 'NMA', 0), - 'NMA_ON_PLAY': (int, 'NMA', 0), - 'NMA_ON_STOP': (int, 'NMA', 0), - 'NMA_ON_PAUSE': (int, 'NMA', 0), - 'NMA_ON_RESUME': (int, 'NMA', 0), - 'NMA_ON_BUFFER': (int, 'NMA', 0), - 'NMA_ON_WATCHED': (int, 'NMA', 0), - 'NMA_ON_CREATED': (int, 'NMA', 0), - 'NMA_ON_EXTDOWN': (int, 'NMA', 0), - 'NMA_ON_INTDOWN': (int, 'NMA', 0), - 'NMA_ON_EXTUP': (int, 'NMA', 0), - 'NMA_ON_INTUP': (int, 'NMA', 0), - 'NMA_ON_PMSUPDATE': (int, 'NMA', 0), - 'NMA_ON_CONCURRENT': (int, 'NMA', 0), - 'NMA_ON_NEWDEVICE': (int, 'NMA', 0), 'NOTIFICATION_THREADS': (int, 'Advanced', 2), 'NOTIFY_CONSECUTIVE': (int, 'Monitoring', 1), 'NOTIFY_CONTINUED_SESSION_THRESHOLD': (int, 'Monitoring', 15), @@ -353,143 +167,7 @@ _CONFIG_DEFINITIONS = { 'NOTIFY_CONCURRENT_BY_IP': (int, 'Monitoring', 0), 'NOTIFY_CONCURRENT_THRESHOLD': (int, 'Monitoring', 2), 'NOTIFY_WATCHED_PERCENT': (int, 'Monitoring', 85), - 'NOTIFY_ON_START_SUBJECT_TEXT': (str, 'Monitoring', 'Tautulli ({server_name})'), - 'NOTIFY_ON_START_BODY_TEXT': (str, 'Monitoring', '{user} ({player}) started playing {title}.'), - 'NOTIFY_ON_STOP_SUBJECT_TEXT': (str, 'Monitoring', 'Tautulli ({server_name})'), - 'NOTIFY_ON_STOP_BODY_TEXT': (str, 'Monitoring', '{user} ({player}) has stopped {title}.'), - 'NOTIFY_ON_PAUSE_SUBJECT_TEXT': (str, 'Monitoring', 'Tautulli ({server_name})'), - 'NOTIFY_ON_PAUSE_BODY_TEXT': (str, 'Monitoring', '{user} ({player}) has paused {title}.'), - 'NOTIFY_ON_RESUME_SUBJECT_TEXT': (str, 'Monitoring', 'Tautulli ({server_name})'), - 'NOTIFY_ON_RESUME_BODY_TEXT': (str, 'Monitoring', '{user} ({player}) has resumed {title}.'), - 'NOTIFY_ON_BUFFER_SUBJECT_TEXT': (str, 'Monitoring', 'Tautulli ({server_name})'), - 'NOTIFY_ON_BUFFER_BODY_TEXT': (str, 'Monitoring', '{user} ({player}) is buffering {title}.'), - 'NOTIFY_ON_WATCHED_SUBJECT_TEXT': (str, 'Monitoring', 'Tautulli ({server_name})'), - 'NOTIFY_ON_WATCHED_BODY_TEXT': (str, 'Monitoring', '{user} ({player}) has watched {title}.'), - 'NOTIFY_ON_CREATED_SUBJECT_TEXT': (str, 'Monitoring', 'Tautulli ({server_name})'), - 'NOTIFY_ON_CREATED_BODY_TEXT': (str, 'Monitoring', '{title} was recently added to Plex.'), - 'NOTIFY_ON_EXTDOWN_SUBJECT_TEXT': (str, 'Monitoring', 'Tautulli ({server_name})'), - 'NOTIFY_ON_EXTDOWN_BODY_TEXT': (str, 'Monitoring', 'The Plex Media Server remote access is down.'), - 'NOTIFY_ON_INTDOWN_SUBJECT_TEXT': (str, 'Monitoring', 'Tautulli ({server_name})'), - 'NOTIFY_ON_INTDOWN_BODY_TEXT': (str, 'Monitoring', 'The Plex Media Server is down.'), - 'NOTIFY_ON_EXTUP_SUBJECT_TEXT': (str, 'Monitoring', 'Tautulli ({server_name})'), - 'NOTIFY_ON_EXTUP_BODY_TEXT': (str, 'Monitoring', 'The Plex Media Server remote access is back up.'), - 'NOTIFY_ON_INTUP_SUBJECT_TEXT': (str, 'Monitoring', 'Tautulli ({server_name})'), - 'NOTIFY_ON_INTUP_BODY_TEXT': (str, 'Monitoring', 'The Plex Media Server is back up.'), - 'NOTIFY_ON_PMSUPDATE_SUBJECT_TEXT': (str, 'Monitoring', 'Tautulli ({server_name})'), - 'NOTIFY_ON_PMSUPDATE_BODY_TEXT': (str, 'Monitoring', 'An update is available for the Plex Media Server (version {update_version}).'), - 'NOTIFY_ON_CONCURRENT_SUBJECT_TEXT': (str, 'Monitoring', 'Tautulli ({server_name})'), - 'NOTIFY_ON_CONCURRENT_BODY_TEXT': (str, 'Monitoring', '{user} has {user_streams} concurrent streams.'), - 'NOTIFY_ON_NEWDEVICE_SUBJECT_TEXT': (str, 'Monitoring', 'Tautulli ({server_name})'), - 'NOTIFY_ON_NEWDEVICE_BODY_TEXT': (str, 'Monitoring', '{user} is streaming from a new device: {player}.'), - 'NOTIFY_SCRIPTS_ARGS_TEXT': (str, 'Monitoring', ''), - 'OSX_NOTIFY_APP': (str, 'OSX_Notify', '/Applications/Tautulli'), - 'OSX_NOTIFY_ENABLED': (int, 'OSX_Notify', 0), - 'OSX_NOTIFY_ON_PLAY': (int, 'OSX_Notify', 0), - 'OSX_NOTIFY_ON_STOP': (int, 'OSX_Notify', 0), - 'OSX_NOTIFY_ON_PAUSE': (int, 'OSX_Notify', 0), - 'OSX_NOTIFY_ON_RESUME': (int, 'OSX_Notify', 0), - 'OSX_NOTIFY_ON_BUFFER': (int, 'OSX_Notify', 0), - 'OSX_NOTIFY_ON_WATCHED': (int, 'OSX_Notify', 0), - 'OSX_NOTIFY_ON_CREATED': (int, 'OSX_Notify', 0), - 'OSX_NOTIFY_ON_EXTDOWN': (int, 'OSX_Notify', 0), - 'OSX_NOTIFY_ON_INTDOWN': (int, 'OSX_Notify', 0), - 'OSX_NOTIFY_ON_EXTUP': (int, 'OSX_Notify', 0), - 'OSX_NOTIFY_ON_INTUP': (int, 'OSX_Notify', 0), - 'OSX_NOTIFY_ON_PMSUPDATE': (int, 'OSX_Notify', 0), - 'OSX_NOTIFY_ON_CONCURRENT': (int, 'OSX_Notify', 0), - 'OSX_NOTIFY_ON_NEWDEVICE': (int, 'OSX_Notify', 0), - 'PLEX_CLIENT_HOST': (str, 'Plex', ''), - 'PLEX_ENABLED': (int, 'Plex', 0), - 'PLEX_PASSWORD': (str, 'Plex', ''), - 'PLEX_USERNAME': (str, 'Plex', ''), - 'PLEX_ON_PLAY': (int, 'Plex', 0), - 'PLEX_ON_STOP': (int, 'Plex', 0), - 'PLEX_ON_PAUSE': (int, 'Plex', 0), - 'PLEX_ON_RESUME': (int, 'Plex', 0), - 'PLEX_ON_BUFFER': (int, 'Plex', 0), - 'PLEX_ON_WATCHED': (int, 'Plex', 0), - 'PLEX_ON_CREATED': (int, 'Plex', 0), - 'PLEX_ON_EXTDOWN': (int, 'Plex', 0), - 'PLEX_ON_INTDOWN': (int, 'Plex', 0), - 'PLEX_ON_EXTUP': (int, 'Plex', 0), - 'PLEX_ON_INTUP': (int, 'Plex', 0), - 'PLEX_ON_PMSUPDATE': (int, 'Plex', 0), - 'PLEX_ON_CONCURRENT': (int, 'Plex', 0), - 'PLEX_ON_NEWDEVICE': (int, 'Plex', 0), 'PLEXPY_AUTO_UPDATE': (int, 'General', 0), - 'PROWL_ENABLED': (int, 'Prowl', 0), - 'PROWL_KEYS': (str, 'Prowl', ''), - 'PROWL_PRIORITY': (int, 'Prowl', 0), - 'PROWL_ON_PLAY': (int, 'Prowl', 0), - 'PROWL_ON_STOP': (int, 'Prowl', 0), - 'PROWL_ON_PAUSE': (int, 'Prowl', 0), - 'PROWL_ON_RESUME': (int, 'Prowl', 0), - 'PROWL_ON_BUFFER': (int, 'Prowl', 0), - 'PROWL_ON_WATCHED': (int, 'Prowl', 0), - 'PROWL_ON_CREATED': (int, 'Prowl', 0), - 'PROWL_ON_EXTDOWN': (int, 'Prowl', 0), - 'PROWL_ON_INTDOWN': (int, 'Prowl', 0), - 'PROWL_ON_EXTUP': (int, 'Prowl', 0), - 'PROWL_ON_INTUP': (int, 'Prowl', 0), - 'PROWL_ON_PMSUPDATE': (int, 'Prowl', 0), - 'PROWL_ON_CONCURRENT': (int, 'Prowl', 0), - 'PROWL_ON_NEWDEVICE': (int, 'Prowl', 0), - 'PUSHALOT_APIKEY': (str, 'Pushalot', ''), - 'PUSHALOT_ENABLED': (int, 'Pushalot', 0), - 'PUSHALOT_ON_PLAY': (int, 'Pushalot', 0), - 'PUSHALOT_ON_STOP': (int, 'Pushalot', 0), - 'PUSHALOT_ON_PAUSE': (int, 'Pushalot', 0), - 'PUSHALOT_ON_RESUME': (int, 'Pushalot', 0), - 'PUSHALOT_ON_BUFFER': (int, 'Pushalot', 0), - 'PUSHALOT_ON_WATCHED': (int, 'Pushalot', 0), - 'PUSHALOT_ON_CREATED': (int, 'Pushalot', 0), - 'PUSHALOT_ON_EXTDOWN': (int, 'Pushalot', 0), - 'PUSHALOT_ON_INTDOWN': (int, 'Pushalot', 0), - 'PUSHALOT_ON_EXTUP': (int, 'Pushalot', 0), - 'PUSHALOT_ON_INTUP': (int, 'Pushalot', 0), - 'PUSHALOT_ON_PMSUPDATE': (int, 'Pushalot', 0), - 'PUSHALOT_ON_CONCURRENT': (int, 'Pushalot', 0), - 'PUSHALOT_ON_NEWDEVICE': (int, 'Pushalot', 0), - 'PUSHBULLET_APIKEY': (str, 'PushBullet', ''), - 'PUSHBULLET_DEVICEID': (str, 'PushBullet', ''), - 'PUSHBULLET_CHANNEL_TAG': (str, 'PushBullet', ''), - 'PUSHBULLET_ENABLED': (int, 'PushBullet', 0), - 'PUSHBULLET_ON_PLAY': (int, 'PushBullet', 0), - 'PUSHBULLET_ON_STOP': (int, 'PushBullet', 0), - 'PUSHBULLET_ON_PAUSE': (int, 'PushBullet', 0), - 'PUSHBULLET_ON_RESUME': (int, 'PushBullet', 0), - 'PUSHBULLET_ON_BUFFER': (int, 'PushBullet', 0), - 'PUSHBULLET_ON_WATCHED': (int, 'PushBullet', 0), - 'PUSHBULLET_ON_CREATED': (int, 'PushBullet', 0), - 'PUSHBULLET_ON_EXTDOWN': (int, 'PushBullet', 0), - 'PUSHBULLET_ON_INTDOWN': (int, 'PushBullet', 0), - 'PUSHBULLET_ON_EXTUP': (int, 'PushBullet', 0), - 'PUSHBULLET_ON_INTUP': (int, 'PushBullet', 0), - 'PUSHBULLET_ON_PMSUPDATE': (int, 'PushBullet', 0), - 'PUSHBULLET_ON_CONCURRENT': (int, 'PushBullet', 0), - 'PUSHBULLET_ON_NEWDEVICE': (int, 'PushBullet', 0), - 'PUSHOVER_APITOKEN': (str, 'Pushover', ''), - 'PUSHOVER_ENABLED': (int, 'Pushover', 0), - 'PUSHOVER_HTML_SUPPORT': (int, 'Pushover', 1), - 'PUSHOVER_INCL_PMSLINK': (int, 'Pushover', 0), - 'PUSHOVER_INCL_URL': (int, 'Pushover', 1), - 'PUSHOVER_KEYS': (str, 'Pushover', ''), - 'PUSHOVER_PRIORITY': (int, 'Pushover', 0), - 'PUSHOVER_SOUND': (str, 'Pushover', ''), - 'PUSHOVER_ON_PLAY': (int, 'Pushover', 0), - 'PUSHOVER_ON_STOP': (int, 'Pushover', 0), - 'PUSHOVER_ON_PAUSE': (int, 'Pushover', 0), - 'PUSHOVER_ON_RESUME': (int, 'Pushover', 0), - 'PUSHOVER_ON_BUFFER': (int, 'Pushover', 0), - 'PUSHOVER_ON_WATCHED': (int, 'Pushover', 0), - 'PUSHOVER_ON_CREATED': (int, 'Pushover', 0), - 'PUSHOVER_ON_EXTDOWN': (int, 'Pushover', 0), - 'PUSHOVER_ON_INTDOWN': (int, 'Pushover', 0), - 'PUSHOVER_ON_EXTUP': (int, 'Pushover', 0), - 'PUSHOVER_ON_INTUP': (int, 'Pushover', 0), - 'PUSHOVER_ON_PMSUPDATE': (int, 'Pushover', 0), - 'PUSHOVER_ON_CONCURRENT': (int, 'Pushover', 0), - 'PUSHOVER_ON_NEWDEVICE': (int, 'Pushover', 0), 'REFRESH_LIBRARIES_INTERVAL': (int, 'Monitoring', 12), 'REFRESH_LIBRARIES_ON_STARTUP': (int, 'Monitoring', 1), 'REFRESH_USERS_INTERVAL': (int, 'Monitoring', 12), @@ -498,117 +176,15 @@ _CONFIG_DEFINITIONS = { 'REMOTE_ACCESS_PING_THRESHOLD': (int, 'Advanced', 3), 'SESSION_DB_WRITE_ATTEMPTS': (int, 'Advanced', 5), 'SHOW_ADVANCED_SETTINGS': (int, 'General', 0), - 'SLACK_ENABLED': (int, 'Slack', 0), - 'SLACK_HOOK': (str, 'Slack', ''), - 'SLACK_CHANNEL': (str, 'Slack', ''), - 'SLACK_ICON_EMOJI': (str, 'Slack', ''), - 'SLACK_INCL_PMSLINK': (int, 'Slack', 0), - 'SLACK_INCL_POSTER': (int, 'Slack', 0), - 'SLACK_INCL_SUBJECT': (int, 'Slack', 1), - 'SLACK_USERNAME': (str, 'Slack', ''), - 'SLACK_ON_PLAY': (int, 'Slack', 0), - 'SLACK_ON_STOP': (int, 'Slack', 0), - 'SLACK_ON_PAUSE': (int, 'Slack', 0), - 'SLACK_ON_RESUME': (int, 'Slack', 0), - 'SLACK_ON_BUFFER': (int, 'Slack', 0), - 'SLACK_ON_WATCHED': (int, 'Slack', 0), - 'SLACK_ON_CREATED': (int, 'Slack', 0), - 'SLACK_ON_EXTDOWN': (int, 'Slack', 0), - 'SLACK_ON_INTDOWN': (int, 'Slack', 0), - 'SLACK_ON_EXTUP': (int, 'Slack', 0), - 'SLACK_ON_INTUP': (int, 'Slack', 0), - 'SLACK_ON_PMSUPDATE': (int, 'Slack', 0), - 'SLACK_ON_CONCURRENT': (int, 'Slack', 0), - 'SLACK_ON_NEWDEVICE': (int, 'Slack', 0), - 'SCRIPTS_ENABLED': (int, 'Scripts', 0), - 'SCRIPTS_FOLDER': (str, 'Scripts', ''), - 'SCRIPTS_TIMEOUT': (int, 'Scripts', 30), - 'SCRIPTS_ON_PLAY': (int, 'Scripts', 0), - 'SCRIPTS_ON_STOP': (int, 'Scripts', 0), - 'SCRIPTS_ON_PAUSE': (int, 'Scripts', 0), - 'SCRIPTS_ON_RESUME': (int, 'Scripts', 0), - 'SCRIPTS_ON_BUFFER': (int, 'Scripts', 0), - 'SCRIPTS_ON_WATCHED': (int, 'Scripts', 0), - 'SCRIPTS_ON_CREATED': (int, 'Scripts', 0), - 'SCRIPTS_ON_EXTDOWN': (int, 'Scripts', 0), - 'SCRIPTS_ON_EXTUP': (int, 'Scripts', 0), - 'SCRIPTS_ON_INTDOWN': (int, 'Scripts', 0), - 'SCRIPTS_ON_INTUP': (int, 'Scripts', 0), - 'SCRIPTS_ON_PMSUPDATE': (int, 'Scripts', 0), - 'SCRIPTS_ON_CONCURRENT': (int, 'Scripts', 0), - 'SCRIPTS_ON_NEWDEVICE': (int, 'Scripts', 0), - 'SCRIPTS_ON_PLAY_SCRIPT': (str, 'Scripts', ''), - 'SCRIPTS_ON_STOP_SCRIPT': (str, 'Scripts', ''), - 'SCRIPTS_ON_PAUSE_SCRIPT': (str, 'Scripts', ''), - 'SCRIPTS_ON_RESUME_SCRIPT': (str, 'Scripts', ''), - 'SCRIPTS_ON_BUFFER_SCRIPT': (str, 'Scripts', ''), - 'SCRIPTS_ON_WATCHED_SCRIPT': (str, 'Scripts', ''), - 'SCRIPTS_ON_CREATED_SCRIPT': (str, 'Scripts', ''), - 'SCRIPTS_ON_EXTDOWN_SCRIPT': (str, 'Scripts', ''), - 'SCRIPTS_ON_EXTUP_SCRIPT': (str, 'Scripts', ''), - 'SCRIPTS_ON_INTDOWN_SCRIPT': (str, 'Scripts', ''), - 'SCRIPTS_ON_INTUP_SCRIPT': (str, 'Scripts', ''), - 'SCRIPTS_ON_PMSUPDATE_SCRIPT': (str, 'Scripts', ''), - 'SCRIPTS_ON_CONCURRENT_SCRIPT': (str, 'Scripts', ''), - 'SCRIPTS_ON_NEWDEVICE_SCRIPT': (str, 'Scripts', ''), 'SYNCHRONOUS_MODE': (str, 'Advanced', 'NORMAL'), - 'TELEGRAM_BOT_TOKEN': (str, 'Telegram', ''), - 'TELEGRAM_ENABLED': (int, 'Telegram', 0), - 'TELEGRAM_CHAT_ID': (str, 'Telegram', ''), - 'TELEGRAM_DISABLE_WEB_PREVIEW': (int, 'Telegram', 0), - 'TELEGRAM_HTML_SUPPORT': (int, 'Telegram', 1), - 'TELEGRAM_INCL_POSTER': (int, 'Telegram', 0), - 'TELEGRAM_INCL_SUBJECT': (int, 'Telegram', 1), - 'TELEGRAM_ON_PLAY': (int, 'Telegram', 0), - 'TELEGRAM_ON_STOP': (int, 'Telegram', 0), - 'TELEGRAM_ON_PAUSE': (int, 'Telegram', 0), - 'TELEGRAM_ON_RESUME': (int, 'Telegram', 0), - 'TELEGRAM_ON_BUFFER': (int, 'Telegram', 0), - 'TELEGRAM_ON_WATCHED': (int, 'Telegram', 0), - 'TELEGRAM_ON_CREATED': (int, 'Telegram', 0), - 'TELEGRAM_ON_EXTDOWN': (int, 'Telegram', 0), - 'TELEGRAM_ON_INTDOWN': (int, 'Telegram', 0), - 'TELEGRAM_ON_EXTUP': (int, 'Telegram', 0), - 'TELEGRAM_ON_INTUP': (int, 'Telegram', 0), - 'TELEGRAM_ON_PMSUPDATE': (int, 'Telegram', 0), - 'TELEGRAM_ON_CONCURRENT': (int, 'Telegram', 0), - 'TELEGRAM_ON_NEWDEVICE': (int, 'Telegram', 0), 'THEMOVIEDB_APIKEY': (str, 'General', 'e9a6655bae34bf694a0f3e33338dc28e'), 'THEMOVIEDB_LOOKUP': (int, 'General', 0), 'TVMAZE_LOOKUP': (int, 'General', 0), - 'TV_LOGGING_ENABLE': (int, 'Monitoring', 1), - 'TV_NOTIFY_ENABLE': (int, 'Monitoring', 0), - 'TV_NOTIFY_ON_START': (int, 'Monitoring', 1), - 'TV_NOTIFY_ON_STOP': (int, 'Monitoring', 0), - 'TV_NOTIFY_ON_PAUSE': (int, 'Monitoring', 0), 'TV_WATCHED_PERCENT': (int, 'Monitoring', 85), - 'TWITTER_ENABLED': (int, 'Twitter', 0), - 'TWITTER_ACCESS_TOKEN': (str, 'Twitter', ''), - 'TWITTER_ACCESS_TOKEN_SECRET': (str, 'Twitter', ''), - 'TWITTER_CONSUMER_KEY': (str, 'Twitter', ''), - 'TWITTER_CONSUMER_SECRET': (str, 'Twitter', ''), - 'TWITTER_INCL_POSTER': (int, 'Twitter', 0), - 'TWITTER_INCL_SUBJECT': (int, 'Twitter', 1), - 'TWITTER_ON_PLAY': (int, 'Twitter', 0), - 'TWITTER_ON_STOP': (int, 'Twitter', 0), - 'TWITTER_ON_PAUSE': (int, 'Twitter', 0), - 'TWITTER_ON_RESUME': (int, 'Twitter', 0), - 'TWITTER_ON_BUFFER': (int, 'Twitter', 0), - 'TWITTER_ON_WATCHED': (int, 'Twitter', 0), - 'TWITTER_ON_CREATED': (int, 'Twitter', 0), - 'TWITTER_ON_EXTDOWN': (int, 'Twitter', 0), - 'TWITTER_ON_INTDOWN': (int, 'Twitter', 0), - 'TWITTER_ON_EXTUP': (int, 'Twitter', 0), - 'TWITTER_ON_INTUP': (int, 'Twitter', 0), - 'TWITTER_ON_PMSUPDATE': (int, 'Twitter', 0), - 'TWITTER_ON_CONCURRENT': (int, 'Twitter', 0), - 'TWITTER_ON_NEWDEVICE': (int, 'Twitter', 0), 'UPDATE_DB_INTERVAL': (int, 'General', 24), 'UPDATE_SECTION_IDS': (int, 'General', 1), 'UPDATE_SHOW_CHANGELOG': (int, 'General', 1), 'UPDATE_LABELS': (int, 'General', 1), - 'UPDATE_LIBRARIES_DB_NOTIFY': (int, 'General', 1), - 'UPDATE_NOTIFIERS_DB': (int, 'General', 1), 'VERBOSE_LOGS': (int, 'Advanced', 1), 'VERIFY_SSL_CERT': (bool_int, 'Advanced', 1), 'VIDEO_LOGGING_ENABLE': (int, 'Monitoring', 1), @@ -616,24 +192,6 @@ _CONFIG_DEFINITIONS = { 'WEBSOCKET_CONNECTION_ATTEMPTS': (int, 'Advanced', 5), 'WEBSOCKET_CONNECTION_TIMEOUT': (int, 'Advanced', 5), 'WEEK_START_MONDAY': (int, 'General', 0), - 'XBMC_ENABLED': (int, 'XBMC', 0), - 'XBMC_HOST': (str, 'XBMC', ''), - 'XBMC_PASSWORD': (str, 'XBMC', ''), - 'XBMC_USERNAME': (str, 'XBMC', ''), - 'XBMC_ON_PLAY': (int, 'XBMC', 0), - 'XBMC_ON_STOP': (int, 'XBMC', 0), - 'XBMC_ON_PAUSE': (int, 'XBMC', 0), - 'XBMC_ON_RESUME': (int, 'XBMC', 0), - 'XBMC_ON_BUFFER': (int, 'XBMC', 0), - 'XBMC_ON_WATCHED': (int, 'XBMC', 0), - 'XBMC_ON_CREATED': (int, 'XBMC', 0), - 'XBMC_ON_EXTDOWN': (int, 'XBMC', 0), - 'XBMC_ON_INTDOWN': (int, 'XBMC', 0), - 'XBMC_ON_EXTUP': (int, 'XBMC', 0), - 'XBMC_ON_INTUP': (int, 'XBMC', 0), - 'XBMC_ON_PMSUPDATE': (int, 'XBMC', 0), - 'XBMC_ON_CONCURRENT': (int, 'XBMC', 0), - 'XBMC_ON_NEWDEVICE': (int, 'XBMC', 0), 'JWT_SECRET': (str, 'Advanced', ''), 'JWT_UPDATE_SECRET': (bool_int, 'Advanced', 0), 'SYSTEM_ANALYTICS': (int, 'Advanced', 1), diff --git a/plexpy/libraries.py b/plexpy/libraries.py index 881ff2e3..8b4ed537 100644 --- a/plexpy/libraries.py +++ b/plexpy/libraries.py @@ -1151,39 +1151,3 @@ class Libraries(object): return 'Deleted duplicate libraries from the database.' except Exception as e: logger.warn("Tautulli Libraries :: Unable to delete duplicate libraries: %s." % e) - - -def update_libraries_db_notify(): - logger.info("Tautulli Libraries :: Upgrading library notification toggles...") - - # Set flag first in case something fails we don't want to keep re-adding the notifiers - plexpy.CONFIG.__setattr__('UPDATE_LIBRARIES_DB_NOTIFY', 0) - plexpy.CONFIG.write() - - libraries = Libraries() - sections = libraries.get_sections() - - for section in sections: - section_details = libraries.get_details(section['section_id']) - - if (section_details['do_notify'] == 1 and - (section_details['section_type'] == 'movie' and not plexpy.CONFIG.MOVIE_NOTIFY_ENABLE) or - (section_details['section_type'] == 'show' and not plexpy.CONFIG.TV_NOTIFY_ENABLE) or - (section_details['section_type'] == 'artist' and not plexpy.CONFIG.MUSIC_NOTIFY_ENABLE)): - do_notify = 0 - else: - do_notify = section_details['do_notify'] - - if (section_details['keep_history'] == 1 and - (section_details['section_type'] == 'movie' and not plexpy.CONFIG.MOVIE_LOGGING_ENABLE) or - (section_details['section_type'] == 'show' and not plexpy.CONFIG.TV_LOGGING_ENABLE) or - (section_details['section_type'] == 'artist' and not plexpy.CONFIG.MUSIC_LOGGING_ENABLE)): - keep_history = 0 - else: - keep_history = section_details['keep_history'] - - libraries.set_config(section_id=section_details['section_id'], - custom_thumb=section_details['library_thumb'], - do_notify=do_notify, - keep_history=keep_history, - do_notify_created=section_details['do_notify_created']) diff --git a/plexpy/notifiers.py b/plexpy/notifiers.py index 9a301af9..5635dbf5 100644 --- a/plexpy/notifiers.py +++ b/plexpy/notifiers.py @@ -3816,129 +3816,6 @@ class ZAPIER(Notifier): return config_option -def upgrade_config_to_db(): - logger.info("Tautulli Notifiers :: Upgrading to new notification system...") - - # Set flag first in case something fails we don't want to keep re-adding the notifiers - plexpy.CONFIG.__setattr__('UPDATE_NOTIFIERS_DB', 0) - plexpy.CONFIG.write() - - # Config section names from the {new: old} config - section_overrides = {'xbmc': 'XBMC', - 'nma': 'NMA', - 'pushbullet': 'PushBullet', - 'osx': 'OSX_Notify', - 'ifttt': 'IFTTT' - } - - # Config keys from the {new: old} config - config_key_overrides = {'plex': {'hosts': 'client_host'}, - 'facebook': {'access_token': 'token', - 'group_id': 'group', - 'incl_poster': 'incl_card'}, - 'join': {'api_key': 'apikey', - 'device_id': 'deviceid'}, - 'hipchat': {'hook': 'url', - 'incl_poster': 'incl_card'}, - 'nma': {'api_key': 'apikey'}, - 'osx': {'notify_app': 'app'}, - 'prowl': {'key': 'keys'}, - 'pushalot': {'api_key': 'apikey'}, - 'pushbullet': {'api_key': 'apikey', - 'device_id': 'deviceid'}, - 'pushover': {'api_token': 'apitoken', - 'key': 'keys'}, - 'scripts': {'script_folder': 'folder'}, - 'slack': {'incl_poster': 'incl_card'} - } - - # Get Monitoring config section - monitoring = plexpy.CONFIG._config['Monitoring'] - - # Get the new default notification subject and body text - defualt_subject_text = {a['name']: a['subject'] for a in available_notification_actions()} - defualt_body_text = {a['name']: a['body'] for a in available_notification_actions()} - - # Get the old notification subject and body text - notify_text = {} - for action in get_notify_actions(): - subject_key = 'notify_' + action + '_subject_text' - body_key = 'notify_' + action + '_body_text' - notify_text[action + '_subject'] = monitoring.get(subject_key, defualt_subject_text[action]) - notify_text[action + '_body'] = monitoring.get(body_key, defualt_body_text[action]) - - # Check through each notification agent - for agent in get_notify_agents(): - agent_id = AGENT_IDS[agent] - - # Get the old config section for the agent - agent_section = section_overrides.get(agent, agent.capitalize()) - agent_config = plexpy.CONFIG._config.get(agent_section) - agent_config_key = agent_section.lower() - - # Make sure there is an existing config section (to prevent adding v2 agents) - if not agent_config: - continue - - # Get all the actions for the agent - agent_actions = {} - for action in get_notify_actions(): - a_key = agent_config_key + '_' + action - agent_actions[action] = helpers.cast_to_int(agent_config.get(a_key, 0)) - - # Check if any of the actions were enabled - # If so, the agent will be added to the database - if any(agent_actions.values()): - # Get the new default config for the agent - notifier_default_config = get_agent_class(agent_id).config - - # Update the new config with the old config values - notifier_config = {} - for conf, val in notifier_default_config.items(): - c_key = agent_config_key + '_' + config_key_overrides.get(agent, {}).get(conf, conf) - notifier_config[agent + '_' + conf] = agent_config.get(c_key, val) - - # Special handling for scripts - one script with multiple actions - if agent == 'scripts': - # Get the old script arguments - script_args = monitoring.get('notify_scripts_args_text', '') - - # Get the old scripts for each action - action_scripts = {} - for action in get_notify_actions(): - s_key = agent + '_' + action + '_script' - action_scripts[action] = agent_config.get(s_key, '') - - # Reverse the dict to {script: [actions]} - script_actions = {} - for k, v in action_scripts.items(): - if v: script_actions.setdefault(v, set()).add(k) - - # Add a new script notifier for each script if the action was enabled - for script, actions in script_actions.items(): - if any(agent_actions[a] for a in actions): - temp_config = notifier_config - temp_config.update({a: 0 for a in agent_actions}) - temp_config.update({a + '_subject': '' for a in agent_actions}) - for a in actions: - if agent_actions[a]: - temp_config[a] = agent_actions[a] - temp_config[a + '_subject'] = script_args - temp_config[agent + '_script'] = script - - # Add a new notifier and update the config - notifier_id = add_notifier_config(agent_id=agent_id) - set_notifier_config(notifier_id=notifier_id, agent_id=agent_id, **temp_config) - - else: - notifier_config.update(agent_actions) - notifier_config.update(notify_text) - - # Add a new notifier and update the config - notifier_id = add_notifier_config(agent_id=agent_id) - set_notifier_config(notifier_id=notifier_id, agent_id=agent_id, **notifier_config) - - def check_browser_enabled(): global BROWSER_NOTIFIERS BROWSER_NOTIFIERS = {} diff --git a/plexpy/webserve.py b/plexpy/webserve.py index 5fc55787..35405a3a 100644 --- a/plexpy/webserve.py +++ b/plexpy/webserve.py @@ -2995,9 +2995,6 @@ class WebInterface(object): "time_format": plexpy.CONFIG.TIME_FORMAT, "week_start_monday": checked(plexpy.CONFIG.WEEK_START_MONDAY), "get_file_sizes": checked(plexpy.CONFIG.GET_FILE_SIZES), - "grouping_global_history": checked(plexpy.CONFIG.GROUPING_GLOBAL_HISTORY), - "grouping_user_history": checked(plexpy.CONFIG.GROUPING_USER_HISTORY), - "grouping_charts": checked(plexpy.CONFIG.GROUPING_CHARTS), "monitor_pms_updates": checked(plexpy.CONFIG.MONITOR_PMS_UPDATES), "refresh_libraries_interval": plexpy.CONFIG.REFRESH_LIBRARIES_INTERVAL, "refresh_libraries_on_startup": checked(plexpy.CONFIG.REFRESH_LIBRARIES_ON_STARTUP), @@ -3071,7 +3068,7 @@ class WebInterface(object): checked_configs = [ "launch_browser", "launch_startup", "enable_https", "https_create_cert", "api_enabled", "freeze_db", "check_github", - "grouping_global_history", "grouping_user_history", "grouping_charts", "group_history_tables", + "group_history_tables", "pms_url_manual", "week_start_monday", "refresh_libraries_on_startup", "refresh_users_on_startup", "notify_consecutive", "notify_recently_added_upgrade",