From bfabbe3cdbe2c284c9f8baab49cc8c3e39e7cf7b Mon Sep 17 00:00:00 2001
From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
Date: Mon, 4 May 2020 13:03:49 -0700
Subject: [PATCH 1/7] Fix library stuck as inactive in the database
---
plexpy/libraries.py | 1 +
plexpy/users.py | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/plexpy/libraries.py b/plexpy/libraries.py
index 83b9bab2..2f2a7d02 100644
--- a/plexpy/libraries.py
+++ b/plexpy/libraries.py
@@ -61,6 +61,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/users.py b/plexpy/users.py
index 0c4df0f6..ab590ca9 100644
--- a/plexpy/users.py
+++ b/plexpy/users.py
@@ -60,7 +60,7 @@ def refresh_users():
else:
item['custom_avatar_url'] = item['thumb']
- monitor_db.upsert('users', item, keys_dict)
+ monitor_db.upsert('users', keys_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)
From 9d2be4b939031a45576505b5bc034285682ccb54 Mon Sep 17 00:00:00 2001
From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
Date: Mon, 4 May 2020 14:29:46 -0700
Subject: [PATCH 2/7] Fix typo
---
plexpy/users.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plexpy/users.py b/plexpy/users.py
index ab590ca9..e954bd29 100644
--- a/plexpy/users.py
+++ b/plexpy/users.py
@@ -60,7 +60,7 @@ def refresh_users():
else:
item['custom_avatar_url'] = item['thumb']
- monitor_db.upsert('users', keys_dict=keys_dict, value_dict=item)
+ 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)
From d4b46a5721215772ddd8d9bc4c6c7523f0f5075d Mon Sep 17 00:00:00 2001
From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
Date: Thu, 7 May 2020 12:25:23 -0700
Subject: [PATCH 3/7] Get stream user by user_id instead of username
---
plexpy/pmsconnect.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/plexpy/pmsconnect.py b/plexpy/pmsconnect.py
index 1fde9995..85bbf440 100644
--- a/plexpy/pmsconnect.py
+++ b/plexpy/pmsconnect.py
@@ -1568,7 +1568,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]
From 6ef9d187bac9ab9f7f48d983c9ad6ddd47c20bfc Mon Sep 17 00:00:00 2001
From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
Date: Sat, 9 May 2020 15:16:07 -0700
Subject: [PATCH 4/7] Fix remote access check rescheduled when settings are
saved
---
plexpy/webserve.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plexpy/webserve.py b/plexpy/webserve.py
index 3c8b71ed..8f44718a 100644
--- a/plexpy/webserve.py
+++ b/plexpy/webserve.py
@@ -3024,7 +3024,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
From 71551d3f6d84342d51572d2ec552054f26541201 Mon Sep 17 00:00:00 2001
From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
Date: Sat, 9 May 2020 17:25:46 -0700
Subject: [PATCH 5/7] Show "None" for source subtitle if user selected
subtitle
---
.../interfaces/default/current_activity_instance.html | 11 +++++++----
data/interfaces/default/index.html | 9 +++++----
plexpy/pmsconnect.py | 6 ++++--
3 files changed, 16 insertions(+), 10 deletions(-)
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/pmsconnect.py b/plexpy/pmsconnect.py
index 85bbf440..6845ed72 100644
--- a/plexpy/pmsconnect.py
+++ b/plexpy/pmsconnect.py
@@ -1805,7 +1805,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
@@ -1816,7 +1817,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
From dcad3017d3efcb62f08bfffb4fb2c3763fc096f2 Mon Sep 17 00:00:00 2001
From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
Date: Sat, 16 May 2020 16:11:25 -0700
Subject: [PATCH 6/7] Fix get_history returning incorrect title (Fixes
Tautulli/Tautulli-Issues#244)
---
plexpy/datafactory.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plexpy/datafactory.py b/plexpy/datafactory.py
index 0bc364fe..b09423ea 100644
--- a/plexpy/datafactory.py
+++ b/plexpy/datafactory.py
@@ -248,7 +248,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'],
From 7f178e091349a1399395c1ac3227d6f0fa801efc Mon Sep 17 00:00:00 2001
From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
Date: Sat, 16 May 2020 16:13:03 -0700
Subject: [PATCH 7/7] v2.2.4
---
CHANGELOG.md | 13 +++++++++++++
plexpy/version.py | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)
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/plexpy/version.py b/plexpy/version.py
index 29b1a341..65c5d1fb 100644
--- a/plexpy/version.py
+++ b/plexpy/version.py
@@ -1,2 +1,2 @@
PLEXPY_BRANCH = "master"
-PLEXPY_RELEASE_VERSION = "v2.2.3"
+PLEXPY_RELEASE_VERSION = "v2.2.4"