diff --git a/API.md b/API.md index 9a62bc95..3e2465a8 100644 --- a/API.md +++ b/API.md @@ -543,6 +543,33 @@ Returns: ``` +### get_library +Get a library's details. + +``` +Required parameters: + section_id (str): The id of the Plex library section + +Optional parameters: + None + +Returns: + json: + {"child_count": null, + "count": 887, + "do_notify": 1, + "do_notify_created": 1, + "keep_history": 1, + "library_art": "/:/resources/movie-fanart.jpg", + "library_thumb": "/:/resources/movie.png", + "parent_count": null, + "section_id": 1, + "section_name": "Movies", + "section_type": "movie" + } +``` + + ### get_library_media_info Get the data on the PlexPy media info tables. @@ -619,6 +646,66 @@ Returns: ``` +### get_library_user_stats +Get a library's user statistics. + +``` +Required parameters: + section_id (str): The id of the Plex library section + +Optional parameters: + None + +Returns: + json: + [{"friendly_name": "Jon Snow", + "total_plays": 170, + "user_id": 133788, + "user_thumb": "https://plex.tv/users/k10w42309cynaopq/avatar" + }, + {"platform_type": "DanyKhaleesi69", + "total_plays": 42, + "user_id": 8008135, + "user_thumb": "https://plex.tv/users/568gwwoib5t98a3a/avatar" + }, + {...}, + {...} + ] +``` + + +### get_library_watch_time_stats +Get a library's watch time statistics. + +``` +Required parameters: + section_id (str): The id of the Plex library section + +Optional parameters: + None + +Returns: + json: + [{"query_days": 1, + "total_plays": 0, + "total_time": 0 + }, + {"query_days": 7, + "total_plays": 3, + "total_time": 15694 + }, + {"query_days": 30, + "total_plays": 35, + "total_time": 63054 + }, + {"query_days": 0, + "total_plays": 508, + "total_time": 1183080 + } + ] +``` + + ### get_logs Get the PlexPy logs. @@ -1311,6 +1398,35 @@ Returns: ``` +### get_user +Get a user's details. + +``` +Required parameters: + user_id (str): The id of the Plex user + +Optional parameters: + None + +Returns: + json: + {"allow_guest": 1, + "deleted_user": 0, + "do_notify": 1, + "email": "Jon.Snow.1337@CastleBlack.com", + "friendly_name": "Jon Snow", + "is_allow_sync": 1, + "is_home_user": 1, + "is_restricted": 0, + "keep_history": 1, + "shared_libraries": ["10", "1", "4", "5", "15", "20", "2"], + "user_id": 133788, + "user_thumb": "https://plex.tv/users/k10w42309cynaopq/avatar", + "username": "LordCommanderSnow" + } +``` + + ### get_user_ips Get the data on PlexPy users IP table. @@ -1415,6 +1531,66 @@ Returns: ``` +### get_user_player_stats +Get a user's player statistics. + +``` +Required parameters: + user_id (str): The id of the Plex user + +Optional parameters: + None + +Returns: + json: + [{"platform_type": "Chrome", + "player_name": "Plex Web (Chrome)", + "result_id": 1, + "total_plays": 170 + }, + {"platform_type": "Chromecast", + "player_name": "Chromecast", + "result_id": 2, + "total_plays": 42 + }, + {...}, + {...} + ] +``` + + +### get_user_watch_time_stats +Get a user's watch time statistics. + +``` +Required parameters: + user_id (str): The id of the Plex user + +Optional parameters: + None + +Returns: + json: + [{"query_days": 1, + "total_plays": 0, + "total_time": 0 + }, + {"query_days": 7, + "total_plays": 3, + "total_time": 15694 + }, + {"query_days": 30, + "total_plays": 35, + "total_time": 63054 + }, + {"query_days": 0, + "total_plays": 508, + "total_time": 1183080 + } + ] +``` + + ### get_users Get a list of all users that have access to your server. @@ -1520,6 +1696,24 @@ Send a notification using PlexPy. ``` Required parameters: agent_id(str): The id of the notification agent to use + 9 # Boxcar2 + 17 # Browser + 10 # Email + 16 # Facebook + 0 # Growl + 12 # IFTTT + 18 # Join + 4 # NotifyMyAndroid + 3 # Plex Home Theater + 1 # Prowl + 5 # Pushalot + 6 # Pushbullet + 7 # Pushover + 15 # Scripts + 14 # Slack + 13 # Telegram + 11 # Twitter + 2 # XBMC subject(str): The subject of the message body(str): The body of the message diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d7df366..6c2e51b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## v1.4.6 (2016-06-11) + +* New: Added User and Library statistics to the API. +* New: Ability to refresh individual poster images without clearing the entire cache. (Thanks @Hellowlol) +* New: Added {added_date}, {updated_date}, and {last_viewed_date} to metadata notification options. +* New: Log level filter for Plex logs. (Thanks @sanderploegsma) +* New: Log level filter for PlexPy logs. +* New: Button to download Plex logs directly from the web interface. +* New: Advanced setting in the config file to change the number of Plex log lines retrieved. +* Fix: FreeBSD and FreeNAS init scripts to reflect the path in the installation guide. (Thanks @nortron) +* Fix: Monitoring crashing when failed to retrieve current activity. + + ## v1.4.5 (2016-05-25) * Fix: PlexPy unable to start if failed to get shared libraries for a user. diff --git a/data/interfaces/default/css/plexpy.css b/data/interfaces/default/css/plexpy.css index ffc79a39..be3d66c9 100644 --- a/data/interfaces/default/css/plexpy.css +++ b/data/interfaces/default/css/plexpy.css @@ -1184,6 +1184,7 @@ a:hover .dashboard-recent-media-cover { margin: 0 40px 0 25px; height: 100px; overflow: visible; + position: relative; } .summary-poster-face { background-position: center; @@ -1922,6 +1923,7 @@ a .library-user-instance-box:hover { .home-platforms-instance-poster { margin-left: 0px; position: absolute; + overflow: hidden; } .home-platforms-instance-poster .home-platforms-poster-face { background-position: center; @@ -2079,6 +2081,7 @@ a .library-user-instance-box:hover { .home-platforms-instance-list-poster { position: absolute; left: 20px; + overflow: hidden; } .home-platforms-instance-list-poster .home-platforms-list-poster-face { background-position: center; @@ -2964,4 +2967,41 @@ a.no-highlight:hover { background-color: #555; border: 0px solid #444; border-radius: 3px; +} +.overlay-refresh-image { + opacity: 0; + color: #000; + font-size: 16px; + float: left; + position: absolute; + top: 0px; + right: 10px; + z-index: 1; + transition: all .1s cubic-bezier(.4,0,1,1); + -webkit-transition: all .1s cubic-bezier(.4,0,1,1); + -moz-transition: all .1s cubic-bezier(.4,0,1,1); + -o-transition: all .1s cubic-bezier(.4,0,1,1); + text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff; +} +.overlay-refresh-image.left { + left: 10px; +} +.overlay-refresh-image.info-art { + color: #999; + top: 15px; + right: 25px; + opacity: 1; + text-shadow: none; + cursor: pointer; +} +.overlay-refresh-image.info-art:hover { + color: #fff; + text-shadow: none; +} +a:hover .overlay-refresh-image { + opacity: .25; + top: 8px; +} +a:hover .overlay-refresh-image:hover { + opacity: .9; } \ No newline at end of file diff --git a/data/interfaces/default/current_activity.html b/data/interfaces/default/current_activity.html index 675904a5..8446d7c6 100644 --- a/data/interfaces/default/current_activity.html +++ b/data/interfaces/default/current_activity.html @@ -106,6 +106,7 @@ DOCUMENTATION :: END % else:
% endif +