diff --git a/CHANGELOG.md b/CHANGELOG.md index a749bf1c..438c5d5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## v1.1.7 (2015-09-07) + +* Show tagline in info screens for movies. Thanks @JonnyWong. +* Add play/pause/buffer icon to activity pane. Thanks @JonnyWong. +* Add transcoder info in activity pane info. Thanks @JonnyWong. +* Show transcoder progress on activity progress bar. Thanks @JonnyWong. +* Fix bug where custom notification strings would be ignored if unicode characters were present. +* Fix text overflow issue on home stats cards. Thanks @JonnyWong. +* Fix regression with user friendly name change input in edit screen. Thanks @JonnyWong. + + ## v1.1.6 (2015-09-06) * Home stats cards are now expandable to show multiple items. Configurable in settings. Thanks @JonnyWong. diff --git a/data/interfaces/default/css/plexpy.css b/data/interfaces/default/css/plexpy.css index d8379a65..6ad3da79 100644 --- a/data/interfaces/default/css/plexpy.css +++ b/data/interfaces/default/css/plexpy.css @@ -683,6 +683,13 @@ a:hover .dashboard-activity-poster { -webkit-transition: all 0s; transition: all 0s; } +.dashboard-activity-progress .bufferbar { + padding-top: 6px; + background-color: #444; + position: absolute; + height: 6px; + overflow: hidden; +} .dashboard-activity-progress .bar { padding-top: 6px; background-color: #faa732; @@ -693,6 +700,9 @@ a:hover .dashboard-activity-poster { background-image: linear-gradient(to bottom, #fbb450, #f89406); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); + position: absolute; + height: 6px; + overflow: hidden; } .dashboard-activity-metadata-wrapper { position: relative; @@ -1541,6 +1551,7 @@ a .season-episodes-card-overlay:hover { -webkit-box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1); -moz-box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1); box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1); + white-space: nowrap; } .home-platforms-instance li { position: relative; @@ -1553,7 +1564,6 @@ a .season-episodes-card-overlay:hover { height: 120px; } .home-platforms-instance-name { - float: left; color: #fff; text-overflow: ellipsis; overflow: hidden; @@ -1565,53 +1575,20 @@ a .season-episodes-card-overlay:hover { padding: 0 0 0 20px; } .home-platforms-instance-name h4 { - margin: 10px 0 20px 0; -} -.home-platforms-instance-name h5 { - font-size: 14px; - line-height: 16px; - margin: 15px 0 2px 0; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} -.home-platforms-instance-name2 { - position: absolute; - top: 34px; - left: 215px; -} -.home-platforms-instance-name2 h5 { - font-size: 14px; - line-height: 16px; - margin: 15px 0 2px 0; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} -.home-platforms-instance-name2 h3 { - font-size: 30px; - font-weight: bold; - color: #F9AA03; - line-height: 22px; - position: relative; - top: 5px; - margin: 0 5px 0 0; - padding-top: 6px; - float: left; -} -.home-platforms-instance-name2 p { - color: #aaa; - font-size: 12px; - float: left; - position: relative; - top: 21px; - left: 0px; + margin: 10px 0 4px 0; } .home-platforms-instance-playcount { - float: left; + display: inline-block; position: relative; padding: 6px 0 0 20px; - width: 100%; +} +.home-platforms-instance-playcount h4 { + font-size: 14px; + line-height: 16px; + margin: 10px 0 10px 0; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .home-platforms-instance-playcount h3 { font-size: 30px; @@ -1638,6 +1615,14 @@ a .season-episodes-card-overlay:hover { padding: 6px 0 0 20px; width: 100%; } +.home-platforms-instance-last-user h4 { + font-size: 14px; + line-height: 16px; + margin: 10px 0 10px 0; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} .home-platforms-instance-last-user h5 { font-size: 12px; position: relative; @@ -2220,6 +2205,9 @@ a .home-platforms-instance-list-oval:hover, color: #fff; cursor: pointer; } +.edit-user-name > input[type='text'] { + margin: 0; +} .popover { z-index: 2; } diff --git a/data/interfaces/default/current_activity.html b/data/interfaces/default/current_activity.html index d166683d..da9a0c0d 100644 --- a/data/interfaces/default/current_activity.html +++ b/data/interfaces/default/current_activity.html @@ -34,6 +34,9 @@ title Returns the name of the episode, movie or music trac year Returns the year of the episode, movie, or clip. player Returns the name of the platform used to play the stream. platform Returns the type of platform used to play the stream. +throttled Returns true if the transcode session is throttled. +transcode_progress Returns the current transcode progress of the item. 0 to 100. +transcode_speed Returns the current transcode speed of the item. audio_decision Returns the audio transcode decision. Either 'transcode', 'copy' or 'direct play'. audio_codec Returns the name of the audio codec. audio_channels Returns the number of audio channels. @@ -68,7 +71,6 @@ DOCUMENTATION :: END % endif
- % if a['type'] == 'movie' and not a['indexes']:
% elif a['type'] == 'episode' and not a['indexes']: @@ -116,7 +118,12 @@ DOCUMENTATION :: END % if a['audio_decision'] == 'direct play': Stream  Direct Play % else: - Stream  Transcoding + Stream  Transcoding + (Speed: ${a['transcode_speed']}) + % if a['throttled'] == '1': + (Throttled) + % endif + % endif
% if a['audio_decision'] == 'direct play': @@ -130,7 +137,12 @@ DOCUMENTATION :: END % if a['video_decision'] == 'direct play': Stream  Direct Play % else: - Stream  Transcoding + Stream  Transcoding + (Speed: ${a['transcode_speed']}) + % if a['throttled'] == '1': + (Throttled) + % endif + % endif
% if a['video_decision'] == 'direct play': @@ -163,6 +175,7 @@ DOCUMENTATION :: END % endif
+
${a['transcode_progress']}%
${a['progress_percent']}%
@@ -171,6 +184,13 @@ DOCUMENTATION :: END
+ % if a['state'] == 'playing': +   + % elif a['state'] == 'paused': +   + % elif a['state'] == 'buffering': +   + % endif % if a['type'] == 'episode': ${a['grandparent_title']} - ${a['title']} % elif a['type'] == 'movie': diff --git a/data/interfaces/default/home_stats.html b/data/interfaces/default/home_stats.html index 175b3887..733bea85 100644 --- a/data/interfaces/default/home_stats.html +++ b/data/interfaces/default/home_stats.html @@ -73,13 +73,13 @@ DOCUMENTATION :: END

Most Watched TV

-
+
+ -
+ % if top_stat['stat_type'] == 'total_plays':

${top_stat['rows'][0]['total_plays']}

plays

@@ -153,13 +153,13 @@ DOCUMENTATION :: END

Most Popular TV

-
+
+ -
+

${top_stat['rows'][0]['users_watched']}

users

@@ -225,13 +225,13 @@ DOCUMENTATION :: END

Most Watched Movie

-
+
+ -
+ % if top_stat['stat_type'] == 'total_plays':

${top_stat['rows'][0]['total_plays']}

plays

@@ -305,13 +305,13 @@ DOCUMENTATION :: END

Most Popular Movie

-
+
+ -
+

${top_stat['rows'][0]['users_watched']}

users

@@ -377,17 +377,17 @@ DOCUMENTATION :: END

Most Active User

-
- % if top_stat['rows'][0]['user_id']: - - % else: - - % endif - ${top_stat['rows'][0]['friendly_name']} - -
+

+ % if top_stat['rows'][0]['user_id']: + + % else: + + % endif + ${top_stat['rows'][0]['friendly_name']} + +

% if top_stat['stat_type'] == 'total_plays':

${top_stat['rows'][0]['total_plays']}

plays

@@ -473,9 +473,9 @@ DOCUMENTATION :: END

Most Active Platform

-
${top_stat['rows'][0]['platform_type']}
+

${top_stat['rows'][0]['platform_type']}

% if top_stat['stat_type'] == 'total_plays':

${top_stat['rows'][0]['total_plays']}

plays

@@ -535,13 +535,13 @@ DOCUMENTATION :: END + % if data['type'] == 'movie' and data['tagline']: +
+

${data['tagline']}

+
+ % endif

${data['summary']}

diff --git a/data/interfaces/default/library_stats.html b/data/interfaces/default/library_stats.html index 66b774d9..34ef2a91 100644 --- a/data/interfaces/default/library_stats.html +++ b/data/interfaces/default/library_stats.html @@ -38,21 +38,21 @@ DOCUMENTATION :: END

${library['rows']['title']}

-
${library['rows']['count_type']}
+
${library['rows']['count_type']}

${library['rows']['count']}

items

% if library['type'] == 'show': -
+
${library['rows']['episode_count_type']}

${library['rows']['episode_count']}

items

% endif % if library['type'] == 'artist': -
+
${library['rows']['album_count_type']}

${library['rows']['album_count']}

items

diff --git a/data/interfaces/default/settings.html b/data/interfaces/default/settings.html index 797097a2..a498399d 100644 --- a/data/interfaces/default/settings.html +++ b/data/interfaces/default/settings.html @@ -321,7 +321,7 @@ available_notification_agents = notifiers.available_notification_agents()

If you have media indexing enabled on your server, use these on the activity pane.

diff --git a/data/interfaces/default/users.html b/data/interfaces/default/users.html index fe35f072..b493f997 100644 --- a/data/interfaces/default/users.html +++ b/data/interfaces/default/users.html @@ -16,7 +16,7 @@   - +
@@ -119,6 +119,13 @@ $(this).addClass('hidden'); $('#row-edit-mode-alert').fadeOut(200); }); + $('.edit-user-control > .edit-user-name').each(function () { + a = $(this).children('a'); + input = $(this).children('input'); + a.text(input.val()); + a.removeClass('hidden'); + input.addClass('hidden'); + }); } else { users_to_purge = []; @@ -126,6 +133,10 @@ $(this).find('button.btn-danger').toggleClass('btn-warning').toggleClass('btn-danger'); $(this).removeClass('hidden'); }); + $('.edit-user-control > .edit-user-name').each(function () { + $(this).children('a').addClass('hidden'); + $(this).children('input').removeClass('hidden'); + }); } }); }); diff --git a/plexpy/__init__.py b/plexpy/__init__.py index 44cd2b3c..ad02333c 100644 --- a/plexpy/__init__.py +++ b/plexpy/__init__.py @@ -1,4 +1,4 @@ -# This file is part of PlexPy. +# This file is part of PlexPy. # # PlexPy is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -377,7 +377,7 @@ def dbcheck(): 'title TEXT, parent_title TEXT, grandparent_title TEXT, full_title TEXT, media_index INTEGER, ' 'parent_media_index INTEGER, thumb TEXT, parent_thumb TEXT, grandparent_thumb TEXT, art TEXT, media_type TEXT, ' 'year INTEGER, originally_available_at TEXT, added_at INTEGER, updated_at INTEGER, last_viewed_at INTEGER, ' - 'content_rating TEXT, summary TEXT, rating TEXT, duration INTEGER DEFAULT 0, guid TEXT, ' + 'content_rating TEXT, summary TEXT, tagline TEXT, rating TEXT, duration INTEGER DEFAULT 0, guid TEXT, ' 'directors TEXT, writers TEXT, actors TEXT, genres TEXT, studio TEXT)' '' ) @@ -517,15 +517,24 @@ def dbcheck(): 'ALTER TABLE sessions ADD COLUMN transcode_height INTEGER' ) - # Upgrade sessions table from earlier versions + # Upgrade session_history_metadata table from earlier versions try: c_db.execute('SELECT full_title from session_history_metadata') except sqlite3.OperationalError: - logger.debug(u"Altering database. Updating database table sessions.") + logger.debug(u"Altering database. Updating database table session_history_metadata.") c_db.execute( 'ALTER TABLE session_history_metadata ADD COLUMN full_title TEXT' ) + # Upgrade session_history_metadata table from earlier versions + try: + c_db.execute('SELECT tagline from session_history_metadata') + except sqlite3.OperationalError: + logger.debug(u"Altering database. Updating database table session_history_metadata.") + c_db.execute( + 'ALTER TABLE session_history_metadata ADD COLUMN tagline TEXT' + ) + # notify_log table :: This is a table which logs notifications sent c_db.execute( 'CREATE TABLE IF NOT EXISTS notify_log (id INTEGER PRIMARY KEY AUTOINCREMENT, ' diff --git a/plexpy/datafactory.py b/plexpy/datafactory.py index fb587228..549612e4 100644 --- a/plexpy/datafactory.py +++ b/plexpy/datafactory.py @@ -578,8 +578,8 @@ class DataFactory(object): if row_id: query = 'SELECT rating_key, parent_rating_key, grandparent_rating_key, title, parent_title, grandparent_title, ' \ 'full_title, media_index, parent_media_index, thumb, parent_thumb, grandparent_thumb, art, media_type, ' \ - 'year, originally_available_at, added_at, updated_at, last_viewed_at, content_rating, summary, rating, ' \ - 'duration, guid, directors, writers, actors, genres, studio ' \ + 'year, originally_available_at, added_at, updated_at, last_viewed_at, content_rating, summary, tagline, ' \ + 'rating, duration, guid, directors, writers, actors, genres, studio ' \ 'FROM session_history_metadata ' \ 'WHERE id = ?' result = monitor_db.select(query=query, args=[row_id]) @@ -605,6 +605,7 @@ class DataFactory(object): 'title': item['title'], 'content_rating': item['content_rating'], 'summary': item['summary'], + 'tagline': item['tagline'], 'rating': item['rating'], 'duration': item['duration'], 'year': item['year'], diff --git a/plexpy/monitor.py b/plexpy/monitor.py index 74695bb8..c6d52936 100644 --- a/plexpy/monitor.py +++ b/plexpy/monitor.py @@ -1,4 +1,4 @@ -# This file is part of PlexPy. +# This file is part of PlexPy. # # PlexPy is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -343,17 +343,17 @@ class MonitorProcessing(object): 'grandparent_rating_key, title, parent_title, grandparent_title, full_title, media_index, ' \ 'parent_media_index, thumb, parent_thumb, grandparent_thumb, art, media_type, year, ' \ 'originally_available_at, added_at, updated_at, last_viewed_at, content_rating, summary, ' \ - 'rating, duration, guid, directors, writers, actors, genres, studio) VALUES ' \ + 'tagline, rating, duration, guid, directors, writers, actors, genres, studio) VALUES ' \ '(last_insert_rowid(), ' \ - '?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' + '?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' args = [session['rating_key'], session['parent_rating_key'], session['grandparent_rating_key'], session['title'], session['parent_title'], session['grandparent_title'], full_title, metadata['index'], metadata['parent_index'], metadata['thumb'], metadata['parent_thumb'], metadata['grandparent_thumb'], metadata['art'], session['media_type'], metadata['year'], metadata['originally_available_at'], metadata['added_at'], metadata['updated_at'], - metadata['last_viewed_at'], metadata['content_rating'], metadata['summary'], metadata['rating'], - metadata['duration'], metadata['guid'], directors, writers, actors, genres, metadata['studio']] + metadata['last_viewed_at'], metadata['content_rating'], metadata['summary'], metadata['tagline'], + metadata['rating'], metadata['duration'], metadata['guid'], directors, writers, actors, genres, metadata['studio']] # logger.debug(u"PlexPy Monitor :: Writing session_history_metadata transaction...") self.db.action(query=query, args=args) diff --git a/plexpy/notification_handler.py b/plexpy/notification_handler.py index 5330b7e5..1e751bac 100644 --- a/plexpy/notification_handler.py +++ b/plexpy/notification_handler.py @@ -349,14 +349,14 @@ def build_notify_text(session, state): if on_start_subject and on_start_body: try: - subject_text = on_start_subject.format(**available_params) + subject_text = unicode(on_start_subject).format(**available_params) except LookupError, e: logger.error(u"PlexPy Notifier :: Unable to parse field %s in notification subject. Using fallback." % e) except: logger.error(u"PlexPy Notifier :: Unable to parse custom notification subject. Using fallback.") try: - body_text = on_start_body.format(**available_params) + body_text = unicode(on_start_body).format(**available_params) except LookupError, e: logger.error(u"PlexPy Notifier :: Unable to parse field %s in notification body. Using fallback." % e) except: @@ -373,14 +373,14 @@ def build_notify_text(session, state): if on_stop_subject and on_stop_body: try: - subject_text = on_stop_subject.format(**available_params) + subject_text = unicode(on_stop_subject).format(**available_params) except LookupError, e: logger.error(u"PlexPy Notifier :: Unable to parse field %s in notification subject. Using fallback." % e) except: logger.error(u"PlexPy Notifier :: Unable to parse custom notification subject. Using fallback.") try: - body_text = on_stop_body.format(**available_params) + body_text = unicode(on_stop_body).format(**available_params) except LookupError, e: logger.error(u"PlexPy Notifier :: Unable to parse field %s in notification body. Using fallback." % e) except: @@ -397,14 +397,14 @@ def build_notify_text(session, state): if on_pause_subject and on_pause_body: try: - subject_text = on_pause_subject.format(**available_params) + subject_text = unicode(on_pause_subject).format(**available_params) except LookupError, e: logger.error(u"PlexPy Notifier :: Unable to parse field %s in notification subject. Using fallback." % e) except: logger.error(u"PlexPy Notifier :: Unable to parse custom notification subject. Using fallback.") try: - body_text = on_pause_body.format(**available_params) + body_text = unicode(on_pause_body).format(**available_params) except LookupError, e: logger.error(u"PlexPy Notifier :: Unable to parse field %s in notification body. Using fallback." % e) except: @@ -421,14 +421,14 @@ def build_notify_text(session, state): if on_resume_subject and on_resume_body: try: - subject_text = on_resume_subject.format(**available_params) + subject_text = unicode(on_resume_subject).format(**available_params) except LookupError, e: logger.error(u"PlexPy Notifier :: Unable to parse field %s in notification subject. Using fallback." % e) except: logger.error(u"PlexPy Notifier :: Unable to parse custom notification subject. Using fallback.") try: - body_text = on_resume_body.format(**available_params) + body_text = unicode(on_resume_body).format(**available_params) except LookupError, e: logger.error(u"PlexPy Notifier :: Unable to parse field %s in notification body. Using fallback." % e) except: @@ -445,14 +445,14 @@ def build_notify_text(session, state): if on_buffer_subject and on_buffer_body: try: - subject_text = on_buffer_subject.format(**available_params) + subject_text = unicode(on_buffer_subject).format(**available_params) except LookupError, e: logger.error(u"PlexPy Notifier :: Unable to parse field %s in notification subject. Using fallback." % e) except: logger.error(u"PlexPy Notifier :: Unable to parse custom notification subject. Using fallback.") try: - body_text = on_buffer_body.format(**available_params) + body_text = unicode(on_buffer_body).format(**available_params) except LookupError, e: logger.error(u"PlexPy Notifier :: Unable to parse field %s in notification body. Using fallback." % e) except: @@ -469,14 +469,14 @@ def build_notify_text(session, state): if on_watched_subject and on_watched_body: try: - subject_text = on_watched_subject.format(**available_params) + subject_text = unicode(on_watched_subject).format(**available_params) except LookupError, e: logger.error(u"PlexPy Notifier :: Unable to parse field %s in notification subject. Using fallback." % e) except: logger.error(u"PlexPy Notifier :: Unable to parse custom notification subject. Using fallback.") try: - body_text = on_watched_body.format(**available_params) + body_text = unicode(on_watched_body).format(**available_params) except LookupError, e: logger.error(u"PlexPy Notifier :: Unable to parse field %s in notification body. Using fallback." % e) except: diff --git a/plexpy/pmsconnect.py b/plexpy/pmsconnect.py index d25e783e..ab311a87 100644 --- a/plexpy/pmsconnect.py +++ b/plexpy/pmsconnect.py @@ -362,6 +362,7 @@ class PmsConnect(object): 'title': helpers.get_xml_attr(metadata_main, 'title'), 'content_rating': helpers.get_xml_attr(metadata_main, 'contentRating'), 'summary': helpers.get_xml_attr(metadata_main, 'summary'), + 'tagline': helpers.get_xml_attr(metadata_main, 'tagline'), 'rating': helpers.get_xml_attr(metadata_main, 'rating'), 'duration': helpers.get_xml_attr(metadata_main, 'duration'), 'year': helpers.get_xml_attr(metadata_main, 'year'), @@ -393,6 +394,7 @@ class PmsConnect(object): 'title': helpers.get_xml_attr(metadata_main, 'title'), 'content_rating': helpers.get_xml_attr(metadata_main, 'contentRating'), 'summary': helpers.get_xml_attr(metadata_main, 'summary'), + 'tagline': helpers.get_xml_attr(metadata_main, 'tagline'), 'rating': helpers.get_xml_attr(metadata_main, 'rating'), 'duration': helpers.get_xml_attr(metadata_main, 'duration'), 'year': helpers.get_xml_attr(metadata_main, 'year'), @@ -422,6 +424,7 @@ class PmsConnect(object): 'title': helpers.get_xml_attr(metadata_main, 'title'), 'content_rating': helpers.get_xml_attr(metadata_main, 'contentRating'), 'summary': helpers.get_xml_attr(metadata_main, 'summary'), + 'tagline': helpers.get_xml_attr(metadata_main, 'tagline'), 'rating': helpers.get_xml_attr(metadata_main, 'rating'), 'duration': helpers.get_xml_attr(metadata_main, 'duration'), 'year': helpers.get_xml_attr(metadata_main, 'year'), @@ -454,6 +457,7 @@ class PmsConnect(object): 'title': helpers.get_xml_attr(metadata_main, 'title'), 'content_rating': helpers.get_xml_attr(metadata_main, 'contentRating'), 'summary': show_details['metadata']['summary'], + 'tagline': helpers.get_xml_attr(metadata_main, 'tagline'), 'rating': helpers.get_xml_attr(metadata_main, 'rating'), 'duration': show_details['metadata']['duration'], 'year': helpers.get_xml_attr(metadata_main, 'year'), @@ -483,6 +487,7 @@ class PmsConnect(object): 'title': helpers.get_xml_attr(metadata_main, 'title'), 'content_rating': helpers.get_xml_attr(metadata_main, 'contentRating'), 'summary': helpers.get_xml_attr(metadata_main, 'summary'), + 'tagline': helpers.get_xml_attr(metadata_main, 'tagline'), 'rating': helpers.get_xml_attr(metadata_main, 'rating'), 'duration': helpers.get_xml_attr(metadata_main, 'duration'), 'year': helpers.get_xml_attr(metadata_main, 'year'), @@ -573,6 +578,9 @@ class PmsConnect(object): if session.getElementsByTagName('TranscodeSession'): transcode_session = session.getElementsByTagName('TranscodeSession')[0] + throttled = helpers.get_xml_attr(transcode_session, 'throttled') + transcode_progress = helpers.get_xml_attr(transcode_session, 'progress') + transcode_speed = helpers.get_xml_attr(transcode_session, 'speed') audio_decision = helpers.get_xml_attr(transcode_session, 'audioDecision') transcode_audio_channels = helpers.get_xml_attr(transcode_session, 'audioChannels') transcode_audio_codec = helpers.get_xml_attr(transcode_session, 'audioCodec') @@ -580,6 +588,9 @@ class PmsConnect(object): transcode_protocol = helpers.get_xml_attr(transcode_session, 'protocol') duration = helpers.get_xml_attr(transcode_session, 'duration') else: + throttled = '0' + transcode_progress = '0' + transcode_speed = '' transcode_audio_channels = '' transcode_audio_codec = '' transcode_container = '' @@ -615,6 +626,9 @@ class PmsConnect(object): 'rating_key': helpers.get_xml_attr(session, 'ratingKey'), 'parent_rating_key': helpers.get_xml_attr(session, 'parentRatingKey'), 'grandparent_rating_key': helpers.get_xml_attr(session, 'grandparentRatingKey'), + 'throttled': throttled, + 'transcode_progress': transcode_progress, + 'transcode_speed': str(round(helpers.cast_to_float(transcode_speed), 1)), 'audio_decision': audio_decision, 'audio_channels': audio_channels, 'audio_codec': audio_codec, @@ -659,6 +673,9 @@ class PmsConnect(object): if session.getElementsByTagName('TranscodeSession'): transcode_session = session.getElementsByTagName('TranscodeSession')[0] + throttled = helpers.get_xml_attr(transcode_session, 'throttled') + transcode_progress = helpers.get_xml_attr(transcode_session, 'progress') + transcode_speed = helpers.get_xml_attr(transcode_session, 'speed') audio_decision = helpers.get_xml_attr(transcode_session, 'audioDecision') transcode_audio_channels = helpers.get_xml_attr(transcode_session, 'audioChannels') transcode_audio_codec = helpers.get_xml_attr(transcode_session, 'audioCodec') @@ -669,6 +686,9 @@ class PmsConnect(object): transcode_container = helpers.get_xml_attr(transcode_session, 'container') transcode_protocol = helpers.get_xml_attr(transcode_session, 'protocol') else: + throttled = '0' + transcode_progress = '0' + transcode_speed = '' transcode_audio_channels = '' transcode_audio_codec = '' transcode_video_codec = '' @@ -726,6 +746,9 @@ class PmsConnect(object): 'rating_key': helpers.get_xml_attr(session, 'ratingKey'), 'parent_rating_key': helpers.get_xml_attr(session, 'parentRatingKey'), 'grandparent_rating_key': helpers.get_xml_attr(session, 'grandparentRatingKey'), + 'throttled': throttled, + 'transcode_progress': transcode_progress, + 'transcode_speed': str(round(helpers.cast_to_float(transcode_speed), 1)), 'audio_decision': audio_decision, 'audio_channels': audio_channels, 'audio_codec': audio_codec, @@ -779,6 +802,9 @@ class PmsConnect(object): 'rating_key': helpers.get_xml_attr(session, 'ratingKey'), 'parent_rating_key': helpers.get_xml_attr(session, 'parentRatingKey'), 'grandparent_rating_key': helpers.get_xml_attr(session, 'grandparentRatingKey'), + 'throttled': throttled, + 'transcode_progress': transcode_progress, + 'transcode_speed': str(round(helpers.cast_to_float(transcode_speed), 1)), 'audio_decision': audio_decision, 'audio_channels': audio_channels, 'audio_codec': audio_codec, @@ -832,6 +858,9 @@ class PmsConnect(object): 'rating_key': helpers.get_xml_attr(session, 'ratingKey'), 'parent_rating_key': helpers.get_xml_attr(session, 'parentRatingKey'), 'grandparent_rating_key': helpers.get_xml_attr(session, 'grandparentRatingKey'), + 'throttled': throttled, + 'transcode_progress': transcode_progress, + 'transcode_speed': str(round(helpers.cast_to_float(transcode_speed), 1)), 'audio_decision': audio_decision, 'audio_channels': audio_channels, 'audio_codec': audio_codec, diff --git a/plexpy/version.py b/plexpy/version.py index 9fbd0cc4..fccdc84b 100644 --- a/plexpy/version.py +++ b/plexpy/version.py @@ -1,2 +1,2 @@ PLEXPY_VERSION = "master" -PLEXPY_RELEASE_VERSION = "1.1.6" +PLEXPY_RELEASE_VERSION = "1.1.7"