Compare commits

...

8 Commits

Author SHA1 Message Date
JonnyWong16
7f178e0913 v2.2.4 2020-05-16 16:13:03 -07:00
JonnyWong16
dcad3017d3 Fix get_history returning incorrect title (Fixes Tautulli/Tautulli-Issues#244) 2020-05-16 16:11:25 -07:00
JonnyWong16
71551d3f6d Show "None" for source subtitle if user selected subtitle 2020-05-09 17:25:46 -07:00
JonnyWong16
6ef9d187ba Fix remote access check rescheduled when settings are saved 2020-05-09 15:16:07 -07:00
JonnyWong16
d4b46a5721 Get stream user by user_id instead of username 2020-05-07 12:25:23 -07:00
JonnyWong16
9d2be4b939 Fix typo 2020-05-04 14:29:46 -07:00
JonnyWong16
bfabbe3cdb Fix library stuck as inactive in the database 2020-05-04 13:03:49 -07:00
JonnyWong16
5499e89058 Don't show deleted library on homepage cards 2020-05-02 12:36:04 -07:00
9 changed files with 40 additions and 16 deletions

View File

@@ -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:

View File

@@ -276,14 +276,17 @@ DOCUMENTATION :: END
<div class="sub-heading">Subtitle</div>
<div class="sub-value" id="subtitle_decision-${sk}">
% 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()} <i class="fa fa-long-arrow-right"></i> ${data['stream_subtitle_codec'].upper()})
Transcode (${subtitle_codec} <i class="fa fa-long-arrow-right"></i> ${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

View File

@@ -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() + ' <i class="fa fa-long-arrow-right"></i> ' + s.stream_subtitle_codec.toUpperCase() + ')';
subtitle_decision = 'Transcode (' + subtitle_codec + ' <i class="fa fa-long-arrow-right"></i> ' + 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);

View File

@@ -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'],
@@ -865,7 +865,7 @@ class DataFactory(object):
'custom_thumb_url AS custom_thumb, art AS library_art, custom_art_url AS custom_art, ' \
'count, parent_count, child_count ' \
'FROM library_sections ' \
'WHERE section_id IN (%s) ' \
'WHERE section_id IN (%s) AND deleted_section = 0 ' \
'ORDER BY section_type, count DESC, parent_count DESC, child_count DESC ' % ','.join(library_cards)
result = monitor_db.select(query)
except Exception as e:

View File

@@ -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)

View File

@@ -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]
@@ -1801,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
@@ -1812,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

View File

@@ -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', 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)

View File

@@ -1,2 +1,2 @@
PLEXPY_BRANCH = "master"
PLEXPY_RELEASE_VERSION = "v2.2.3"
PLEXPY_RELEASE_VERSION = "v2.2.4"

View File

@@ -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