diff --git a/CHANGELOG.md b/CHANGELOG.md index e2321b1d..42704913 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## v2.2.4 (2020-05-16) + +* Monitoring: + * Fix: Show "None" as the subtitle source on the activity card for user selected subtitles. +* UI: + * Fix: Deleted libraries were showing up on the homepage library cards. + * Fix: Libraries could get stuck as inactive in the database in some instances. +* API: + * Fix: Incorrect title was being returned for the get_history API command. +* Other: + * Fix: Plex remote access check was not being rescheduled after changing the settings. + + ## v2.2.3 (2020-05-01) * Notifications: diff --git a/data/interfaces/default/current_activity_instance.html b/data/interfaces/default/current_activity_instance.html index 45ee7703..9dddde5e 100644 --- a/data/interfaces/default/current_activity_instance.html +++ b/data/interfaces/default/current_activity_instance.html @@ -276,14 +276,17 @@ DOCUMENTATION :: END
Subtitle
% if data['subtitles'] == 1: + <% + subtitle_codec = 'None' if data['stream_subtitle_codec'] and data['stream_subtitle_transient'] else data['subtitle_codec'].upper() + %> % if data['stream_subtitle_decision'] == 'transcode': - Transcode (${data['subtitle_codec'].upper()} ${data['stream_subtitle_codec'].upper()}) + Transcode (${subtitle_codec} ${data['stream_subtitle_codec'].upper()}) % elif data['stream_subtitle_decision'] == 'copy': - Direct Stream (${data['subtitle_codec'].upper()}) + Direct Stream (${subtitle_codec}) % elif data['stream_subtitle_decision'] == 'burn': - Burn (${data['subtitle_codec'].upper()}) + Burn (${subtitle_codec}) % else: - Direct Play (${data['subtitle_codec'].upper() if data['synced_version'] else data['stream_subtitle_codec'].upper()}) + Direct Play (${subtitle_codec if data['synced_version'] else data['stream_subtitle_codec'].upper()}) % endif % else: None diff --git a/data/interfaces/default/index.html b/data/interfaces/default/index.html index 948c117f..85d60a2f 100644 --- a/data/interfaces/default/index.html +++ b/data/interfaces/default/index.html @@ -493,14 +493,15 @@ var subtitle_decision = 'None'; if (['movie', 'episode', 'clip'].indexOf(s.media_type) > -1 && s.subtitles === 1) { + var subtitle_codec = (s.stream_subtitle_codec && s.stream_subtitle_transient) ? 'None' : s.subtitle_codec.toUpperCase(); if (s.stream_subtitle_decision === 'transcode') { - subtitle_decision = 'Transcode (' + s.subtitle_codec.toUpperCase() + ' ' + s.stream_subtitle_codec.toUpperCase() + ')'; + subtitle_decision = 'Transcode (' + subtitle_codec + ' ' + s.stream_subtitle_codec.toUpperCase() + ')'; } else if (s.stream_subtitle_decision === 'copy') { - subtitle_decision = 'Direct Stream (' + s.subtitle_codec.toUpperCase() + ')'; + subtitle_decision = 'Direct Stream (' + subtitle_codec + ')'; } else if (s.stream_subtitle_decision === 'burn') { - subtitle_decision = 'Burn (' + s.subtitle_codec.toUpperCase() + ')'; + subtitle_decision = 'Burn (' + subtitle_codec + ')'; } else { - subtitle_decision = 'Direct Play (' + ((s.synced_version === '1') ? s.subtitle_codec.toUpperCase() : s.stream_subtitle_codec.toUpperCase()) + ')'; + subtitle_decision = 'Direct Play (' + ((s.synced_version === '1') ? subtitle_codec : s.stream_subtitle_codec.toUpperCase()) + ')'; } } $('#subtitle_decision-' + key).html(subtitle_decision); diff --git a/plexpy/datafactory.py b/plexpy/datafactory.py index 699af9e3..939ffc72 100644 --- a/plexpy/datafactory.py +++ b/plexpy/datafactory.py @@ -265,7 +265,7 @@ class DataFactory(object): 'parent_rating_key': item['parent_rating_key'], 'grandparent_rating_key': item['grandparent_rating_key'], 'full_title': item['full_title'], - 'title': item['parent_title'], + 'title': item['title'], 'parent_title': item['parent_title'], 'grandparent_title': item['grandparent_title'], 'original_title': item['original_title'], diff --git a/plexpy/libraries.py b/plexpy/libraries.py index 4a828239..0abf5491 100644 --- a/plexpy/libraries.py +++ b/plexpy/libraries.py @@ -78,6 +78,7 @@ def refresh_libraries(): 'count': section['count'], 'parent_count': section.get('parent_count', None), 'child_count': section.get('child_count', None), + 'is_active': section['is_active'] } result = monitor_db.upsert('library_sections', key_dict=section_keys, value_dict=section_values) diff --git a/plexpy/pmsconnect.py b/plexpy/pmsconnect.py index 7fd8b506..2b2f679b 100644 --- a/plexpy/pmsconnect.py +++ b/plexpy/pmsconnect.py @@ -1585,7 +1585,11 @@ class PmsConnect(object): # Get the user details user_info = session.getElementsByTagName('User')[0] - user_details = users.Users().get_details(user=helpers.get_xml_attr(user_info, 'title')) + user_id = helpers.get_xml_attr(user_info, 'id') + if user_id == '1': # Admin user + user_details = users.Users().get_details(user=helpers.get_xml_attr(user_info, 'title')) + else: + user_details = users.Users().get_details(user_id=user_id) # Get the player details player_info = session.getElementsByTagName('Player')[0] @@ -1818,7 +1822,8 @@ class PmsConnect(object): 'stream_subtitle_location': helpers.get_xml_attr(subtitle_stream_info, 'location'), 'stream_subtitle_language': helpers.get_xml_attr(subtitle_stream_info, 'language'), 'stream_subtitle_language_code': helpers.get_xml_attr(subtitle_stream_info, 'languageCode'), - 'stream_subtitle_decision': helpers.get_xml_attr(subtitle_stream_info, 'decision') + 'stream_subtitle_decision': helpers.get_xml_attr(subtitle_stream_info, 'decision'), + 'stream_subtitle_transient': int(helpers.get_xml_attr(subtitle_stream_info, 'transient') == '1') } else: subtitle_selected = None @@ -1829,7 +1834,8 @@ class PmsConnect(object): 'stream_subtitle_location': '', 'stream_subtitle_language': '', 'stream_subtitle_language_code': '', - 'stream_subtitle_decision': '' + 'stream_subtitle_decision': '', + 'stream_subtitle_transient': 0 } # Get the bif thumbnail diff --git a/plexpy/users.py b/plexpy/users.py index 7af42c94..cb6e8921 100644 --- a/plexpy/users.py +++ b/plexpy/users.py @@ -77,7 +77,7 @@ def refresh_users(): else: item['custom_avatar_url'] = item['thumb'] - monitor_db.upsert('users', item, keys_dict) + monitor_db.upsert('users', key_dict=keys_dict, value_dict=item) query = 'UPDATE users SET is_active = 0 WHERE user_id NOT IN ({})'.format(', '.join(['?'] * len(user_ids))) monitor_db.action(query=query, args=user_ids) diff --git a/plexpy/version.py b/plexpy/version.py index 3376b683..ced70a9c 100644 --- a/plexpy/version.py +++ b/plexpy/version.py @@ -18,4 +18,4 @@ from __future__ import unicode_literals PLEXPY_BRANCH = "python3" -PLEXPY_RELEASE_VERSION = "v2.2.3" +PLEXPY_RELEASE_VERSION = "v2.2.4" \ No newline at end of file diff --git a/plexpy/webserve.py b/plexpy/webserve.py index 778fa242..4de3a273 100644 --- a/plexpy/webserve.py +++ b/plexpy/webserve.py @@ -3127,7 +3127,7 @@ class WebInterface(object): kwargs.get('pms_update_check_interval') != str(plexpy.CONFIG.PMS_UPDATE_CHECK_INTERVAL) or \ kwargs.get('monitor_pms_updates') != plexpy.CONFIG.MONITOR_PMS_UPDATES or \ kwargs.get('monitor_remote_access') != plexpy.CONFIG.MONITOR_REMOTE_ACCESS or \ - kwargs.get('remote_access_ping_interval') != plexpy.CONFIG.REMOTE_ACCESS_PING_INTERVAL or \ + kwargs.get('remote_access_ping_interval') != str(plexpy.CONFIG.REMOTE_ACCESS_PING_INTERVAL) or \ kwargs.get('pms_url_manual') != plexpy.CONFIG.PMS_URL_MANUAL: reschedule = True