diff --git a/data/interfaces/default/settings.html b/data/interfaces/default/settings.html index 01411d21..045f4957 100644 --- a/data/interfaces/default/settings.html +++ b/data/interfaces/default/settings.html @@ -416,15 +416,21 @@ available_notification_agents = sorted(notifiers.available_notification_agents()
-

Keep records of all video items played from your Plex Media Server.

+

Keep records of all movie items played from your Plex Media Server.

+
+
+ +

Keep records of all TV show items played from your Plex Media Server.

-

Keep records of all audio items played from your Plex Media Server. VERY experimental.

+

Keep records of all audio items played from your Plex Media Server.

diff --git a/data/interfaces/default/welcome.html b/data/interfaces/default/welcome.html index e4388b65..d5f132f6 100644 --- a/data/interfaces/default/welcome.html +++ b/data/interfaces/default/welcome.html @@ -105,8 +105,16 @@ from plexpy import common

Monitoring

- Log Movies and TV -

Keep records of all video items played from your Plex Media Server.

+ Log Movies +

Keep records of all movie items played.

+
+
+ Log TV Shows +

Keep records of all TV show items played.

+
+
+ Log Music +

Keep records of all audio items played.

@@ -118,12 +126,6 @@ from plexpy import common

The interval (in seconds) PlexPy will wait for a video item to be active before logging it. 0 to disable.

-

Notifications

diff --git a/plexpy/activity_processor.py b/plexpy/activity_processor.py index 2e582f5d..fda00ac1 100644 --- a/plexpy/activity_processor.py +++ b/plexpy/activity_processor.py @@ -110,8 +110,11 @@ class ActivityProcessor(object): else: stopped = int(time.time()) - if plexpy.CONFIG.VIDEO_LOGGING_ENABLE and str(session['rating_key']).isdigit() and \ - (session['media_type'] == 'movie' or session['media_type'] == 'episode'): + if plexpy.CONFIG.MOVIE_LOGGING_ENABLE and str(session['rating_key']).isdigit() and \ + session['media_type'] == 'movie': + logging_enabled = True + elif plexpy.CONFIG.TV_LOGGING_ENABLE and str(session['rating_key']).isdigit() and \ + session['media_type'] == 'episode': logging_enabled = True elif plexpy.CONFIG.MUSIC_LOGGING_ENABLE and str(session['rating_key']).isdigit() and \ session['media_type'] == 'track': diff --git a/plexpy/api.py b/plexpy/api.py index dc9d30ac..d2d0d432 100644 --- a/plexpy/api.py +++ b/plexpy/api.py @@ -410,7 +410,8 @@ class Api(object): "refresh_users_interval": plexpy.CONFIG.REFRESH_USERS_INTERVAL, "refresh_users_on_startup": bool(plexpy.CONFIG.REFRESH_USERS_ON_STARTUP), "ip_logging_enable": bool(plexpy.CONFIG.IP_LOGGING_ENABLE), - "video_logging_enable": bool(plexpy.CONFIG.VIDEO_LOGGING_ENABLE), + "movie_logging_enable": bool(plexpy.CONFIG.MOVIE_LOGGING_ENABLE), + "tv_logging_enable": bool(plexpy.CONFIG.TV_LOGGING_ENABLE), "music_logging_enable": bool(plexpy.CONFIG.MUSIC_LOGGING_ENABLE), "logging_ignore_interval": plexpy.CONFIG.LOGGING_IGNORE_INTERVAL, "pms_is_remote": bool(plexpy.CONFIG.PMS_IS_REMOTE), diff --git a/plexpy/config.py b/plexpy/config.py index c0f4b104..15ac6cbd 100644 --- a/plexpy/config.py +++ b/plexpy/config.py @@ -125,15 +125,16 @@ _CONFIG_DEFINITIONS = { 'LAUNCH_BROWSER': (int, 'General', 1), 'LOG_DIR': (str, 'General', ''), 'LOGGING_IGNORE_INTERVAL': (int, 'Monitoring', 120), + '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), + '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_LOGGING_ENABLE': (int, 'Monitoring', 0), 'MONITOR_REMOTE_ACCESS': (int, 'Monitoring', 0), 'MONITORING_INTERVAL': (int, 'Monitoring', 60), 'MONITORING_USE_WEBSOCKET': (int, 'Monitoring', 0), @@ -259,6 +260,7 @@ _CONFIG_DEFINITIONS = { 'TELEGRAM_ON_CREATED': (int, 'Telegram', 0), 'TELEGRAM_ON_EXTDOWN': (int, 'Telegram', 0), 'TELEGRAM_ON_INTDOWN': (int, 'Telegram', 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), @@ -278,7 +280,6 @@ _CONFIG_DEFINITIONS = { 'TWITTER_ON_INTDOWN': (int, 'Twitter', 0), 'UPDATE_DB_INTERVAL': (int, 'General', 24), 'VERIFY_SSL_CERT': (bool_int, 'Advanced', 1), - 'VIDEO_LOGGING_ENABLE': (int, 'Monitoring', 1), 'XBMC_ENABLED': (int, 'XBMC', 0), 'XBMC_HOST': (str, 'XBMC', ''), 'XBMC_PASSWORD': (str, 'XBMC', ''), diff --git a/plexpy/webserve.py b/plexpy/webserve.py index ba09435d..62b16cc5 100644 --- a/plexpy/webserve.py +++ b/plexpy/webserve.py @@ -93,10 +93,11 @@ class WebInterface(object): "movie_notify_enable": checked(plexpy.CONFIG.MOVIE_NOTIFY_ENABLE), "tv_notify_enable": checked(plexpy.CONFIG.TV_NOTIFY_ENABLE), "music_notify_enable": checked(plexpy.CONFIG.MUSIC_NOTIFY_ENABLE), - "tv_notify_on_start": checked(plexpy.CONFIG.TV_NOTIFY_ON_START), "movie_notify_on_start": checked(plexpy.CONFIG.MOVIE_NOTIFY_ON_START), + "tv_notify_on_start": checked(plexpy.CONFIG.TV_NOTIFY_ON_START), "music_notify_on_start": checked(plexpy.CONFIG.MUSIC_NOTIFY_ON_START), - "video_logging_enable": checked(plexpy.CONFIG.VIDEO_LOGGING_ENABLE), + "movie_logging_enable": checked(plexpy.CONFIG.MOVIE_LOGGING_ENABLE), + "tv_logging_enable": checked(plexpy.CONFIG.TV_LOGGING_ENABLE), "music_logging_enable": checked(plexpy.CONFIG.MUSIC_LOGGING_ENABLE), "logging_ignore_interval": plexpy.CONFIG.LOGGING_IGNORE_INTERVAL, "check_github": checked(plexpy.CONFIG.CHECK_GITHUB) @@ -441,7 +442,8 @@ class WebInterface(object): "refresh_users_interval": plexpy.CONFIG.REFRESH_USERS_INTERVAL, "refresh_users_on_startup": checked(plexpy.CONFIG.REFRESH_USERS_ON_STARTUP), "ip_logging_enable": checked(plexpy.CONFIG.IP_LOGGING_ENABLE), - "video_logging_enable": checked(plexpy.CONFIG.VIDEO_LOGGING_ENABLE), + "movie_logging_enable": checked(plexpy.CONFIG.MOVIE_LOGGING_ENABLE), + "tv_logging_enable": checked(plexpy.CONFIG.TV_LOGGING_ENABLE), "music_logging_enable": checked(plexpy.CONFIG.MUSIC_LOGGING_ENABLE), "logging_ignore_interval": plexpy.CONFIG.LOGGING_IGNORE_INTERVAL, "pms_is_remote": checked(plexpy.CONFIG.PMS_IS_REMOTE), @@ -490,8 +492,9 @@ class WebInterface(object): "tv_notify_on_start", "movie_notify_on_start", "music_notify_on_start", "tv_notify_on_stop", "movie_notify_on_stop", "music_notify_on_stop", "tv_notify_on_pause", "movie_notify_on_pause", "music_notify_on_pause", "refresh_users_on_startup", - "ip_logging_enable", "video_logging_enable", "music_logging_enable", "pms_is_remote", "home_stats_type", - "group_history_tables", "notify_consecutive", "notify_recently_added_grandparent", "monitor_remote_access" + "ip_logging_enable", "movie_logging_enable", "tv_logging_enable", "music_logging_enable", + "pms_is_remote", "home_stats_type", "group_history_tables", "notify_consecutive", + "notify_recently_added_grandparent", "monitor_remote_access" ] for checked_config in checked_configs: if checked_config not in kwargs: