mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Add user selection to history page
* Clean up buttons
This commit is contained in:
parent
c8b13ff5e1
commit
4d057a1c5e
12 changed files with 172 additions and 107 deletions
|
@ -287,7 +287,6 @@ fieldset[disabled] .btn-bright.active {
|
|||
background-color: #3B3B3B;
|
||||
border-color: transparent;
|
||||
float: right;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.btn-danger.btn-edit:hover {
|
||||
color: #fff;
|
||||
|
@ -304,11 +303,17 @@ fieldset[disabled] .btn-bright.active {
|
|||
background-color: #ac2925;
|
||||
border-color: #761c19;
|
||||
}
|
||||
.btn-group select {
|
||||
margin-top: 0;
|
||||
}
|
||||
#user-selection label {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.alert-edit {
|
||||
display: none;
|
||||
float: right;
|
||||
float: left;
|
||||
margin-bottom: 0;
|
||||
margin-right: 5px;
|
||||
/*margin-right: 5px;*/
|
||||
padding: 6px 15px;
|
||||
}
|
||||
.modal-header {
|
||||
|
@ -2231,11 +2236,11 @@ a .home-platforms-instance-list-oval:hover,
|
|||
.colvis-button-bar,
|
||||
.refresh-users-button,
|
||||
.refresh-libraries-button {
|
||||
float: right;
|
||||
/*float: right;*/
|
||||
}
|
||||
.refresh-users-button,
|
||||
.refresh-libraries-button {
|
||||
margin-right: 5px;
|
||||
/*margin-right: 5px;*/
|
||||
}
|
||||
.nav-settings,
|
||||
.nav-settings ul {
|
||||
|
|
|
@ -7,20 +7,45 @@
|
|||
</%def>
|
||||
|
||||
<%def name="body()">
|
||||
|
||||
<div class='container-fluid'>
|
||||
<div class='table-card-header'>
|
||||
<div class="header-bar">
|
||||
<span><i class="fa fa-history"></i> History</span>
|
||||
</div>
|
||||
<div class="button-bar">
|
||||
<div class="colvis-button-bar hidden-xs"></div>
|
||||
% if _session['user_group'] == 'admin':
|
||||
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="row-edit-mode">
|
||||
<i class="fa fa-trash-o"></i> Delete mode
|
||||
</button>
|
||||
<div class="alert alert-danger alert-edit" role="alert" id="row-edit-mode-alert"><i class="fa fa-exclamation-triangle"></i> Select rows to delete. Data is deleted upon exiting delete mode.</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="row-edit-mode">
|
||||
<i class="fa fa-trash-o"></i> Delete mode
|
||||
</button> 
|
||||
</div>
|
||||
% endif
|
||||
% if _session['user_group'] == 'admin':
|
||||
<div class="btn-group" id="user-selection">
|
||||
<label>
|
||||
<select name="history-user" id="history-user" class="btn" style="color: inherit;">
|
||||
<option value="">All Users</option>
|
||||
<option disabled>────────────</option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
% endif
|
||||
<div class="btn-group" data-toggle="buttons" id="media_type-selection">
|
||||
<label class="btn btn-dark active">
|
||||
<input type="radio" name="media_type-filter" id="history-all" value="" autocomplete="off"> All
|
||||
</label>
|
||||
<label class="btn btn-dark">
|
||||
<input type="radio" name="media_type-filter" id="history-movies" value="movie" autocomplete="off"> Movies
|
||||
</label>
|
||||
<label class="btn btn-dark">
|
||||
<input type="radio" name="media_type-filter" id="history-tv_shows" value="episode" autocomplete="off"> TV Shows
|
||||
</label>
|
||||
<label class="btn btn-dark">
|
||||
<input type="radio" name="media_type-filter" id="history-music" value="track" autocomplete="off"> Music
|
||||
</label>
|
||||
</div>
|
||||
<div class="btn-group colvis-button-bar hidden-xs"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='table-card-back'>
|
||||
|
@ -79,7 +104,25 @@
|
|||
<script src="${http_root}js/tables/history_table.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
function loadHistoryTable(media_type) {
|
||||
// Load user ids and names (for the selector)
|
||||
$.ajax({
|
||||
url: 'get_user_names',
|
||||
type: 'get',
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
var select = $('#history-user');
|
||||
data.sort(function (a, b) {
|
||||
return a.friendly_name.localeCompare(b.friendly_name);
|
||||
});
|
||||
data.forEach(function (item) {
|
||||
select.append('<option value="' + item.user_id + '">' +
|
||||
item.friendly_name + '</option>');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function loadHistoryTable(media_type, selected_user_id) {
|
||||
console.log(selected_user_id)
|
||||
history_table_options.ajax = {
|
||||
url: 'get_history',
|
||||
type: 'post',
|
||||
|
@ -87,7 +130,7 @@
|
|||
return {
|
||||
json_data: JSON.stringify(d),
|
||||
media_type: media_type,
|
||||
user_id: "${_session['user_id']}" == "None" ? null : "${_session['user_id']}"
|
||||
user_id: selected_user_id
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -97,21 +140,6 @@
|
|||
|
||||
clearSearchButton('history_table', history_table);
|
||||
|
||||
$('#history_table_filter').prepend('<div class="btn-group" data-toggle="buttons" id="media_type-selection" style="padding-right: 15px;"> \
|
||||
<label class="btn btn-dark active"> \
|
||||
<input type="radio" name="media_type-filter" id="history-all" value="all" autocomplete="off"> All \
|
||||
</label> \
|
||||
<label class="btn btn-dark"> \
|
||||
<input type="radio" name="media_type-filter" id="history-movies" value="movie" autocomplete="off"> Movies \
|
||||
</label> \
|
||||
<label class="btn btn-dark"> \
|
||||
<input type="radio" name="media_type-filter" id="history-tv_shows" value="episode" autocomplete="off"> TV Shows \
|
||||
</label> \
|
||||
<label class="btn btn-dark"> \
|
||||
<input type="radio" name="media_type-filter" id="history-music" value="track" autocomplete="off"> Music \
|
||||
</label> \
|
||||
</div>');
|
||||
|
||||
$('#media_type-selection').on('change', function () {
|
||||
$('#media_type-selection > label').removeClass('active');
|
||||
selected_filter = $('input[name=media_type-filter]:checked', '#media_type-selection');
|
||||
|
@ -119,10 +147,17 @@
|
|||
media_type = $(selected_filter).val();
|
||||
history_table.draw();
|
||||
});
|
||||
|
||||
$('#history-user').on('change', function () {
|
||||
selected_user_id = $(this).val() || null;
|
||||
console.log(selected_user_id)
|
||||
history_table.draw();
|
||||
});
|
||||
}
|
||||
|
||||
var media_type = 'all';
|
||||
loadHistoryTable(media_type);
|
||||
var media_type = null;
|
||||
var selected_user_id = "${_session['user_id']}" == "None" ? null : "${_session['user_id']}"
|
||||
loadHistoryTable(media_type, selected_user_id);
|
||||
|
||||
$('#row-edit-mode').on('click', function() {
|
||||
$('#row-edit-mode-alert').fadeIn(200);
|
||||
|
|
|
@ -340,29 +340,35 @@ DOCUMENTATION :: END
|
|||
<span>Watch History for <strong>${data['title']}</strong></span>
|
||||
</div>
|
||||
<div class="button-bar">
|
||||
<div class="colvis-button-bar hidden-xs"></div>
|
||||
% if _session['user_group'] == 'admin':
|
||||
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="row-edit-mode">
|
||||
<i class="fa fa-trash-o"></i> Delete mode
|
||||
</button>
|
||||
<div class="alert alert-danger alert-edit" role="alert" id="row-edit-mode-alert"><i class="fa fa-exclamation-triangle"></i> Select rows to delete. Data is deleted upon exiting delete mode.</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="row-edit-mode">
|
||||
<i class="fa fa-trash-o"></i> Delete mode
|
||||
</button>
|
||||
</div>
|
||||
% if source == 'history':
|
||||
<a href="update_metadata?rating_key=${data['rating_key']}&update=True" class="btn btn-danger btn-edit" id="fix-metadata">
|
||||
<i class="fa fa-wrench"></i> Fix Metadata
|
||||
</a>
|
||||
<div class="btn-group">
|
||||
<a href="update_metadata?rating_key=${data['rating_key']}&update=True" class="btn btn-danger btn-edit" id="fix-metadata">
|
||||
<i class="fa fa-wrench"></i> Fix Metadata
|
||||
</a>
|
||||
</div>
|
||||
% endif
|
||||
% if data.get('poster_url'):
|
||||
% if data['media_type'] == 'artist' or data['media_type'] == 'album' or data['media_type'] == 'track':
|
||||
<span class="imgur-poster-tooltip" data-toggle="popover" data-img="${data['poster_url']}" data-height="80" data-width="80" style="display: inline-flex;">
|
||||
% else:
|
||||
<span class="imgur-poster-tooltip" data-toggle="popover" data-img="${data['poster_url']}" data-height="120" data-width="80" style="display: inline-flex;">
|
||||
<div class="btn-group">
|
||||
% if data['media_type'] == 'artist' or data['media_type'] == 'album' or data['media_type'] == 'track':
|
||||
<span class="imgur-poster-tooltip" data-toggle="popover" data-img="${data['poster_url']}" data-height="80" data-width="80" style="display: inline-flex;">
|
||||
% else:
|
||||
<span class="imgur-poster-tooltip" data-toggle="popover" data-img="${data['poster_url']}" data-height="120" data-width="80" style="display: inline-flex;">
|
||||
% endif
|
||||
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="delete-imgur-poster">
|
||||
<i class="fa fa-picture-o"></i> Reset Imgur Poster
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
% endif
|
||||
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="delete-imgur-poster">
|
||||
<i class="fa fa-picture-o"></i> Reset Imgur Poster
|
||||
</button>
|
||||
</span>
|
||||
% endif
|
||||
<div class="alert alert-danger alert-edit" role="alert" id="row-edit-mode-alert"><i class="fa fa-exclamation-triangle"></i> Select rows to delete. Data is deleted upon exiting delete mode.</div>
|
||||
% endif
|
||||
<div class="btn-group colvis-button-bar hidden-xs"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-card-back">
|
||||
|
|
|
@ -24,18 +24,24 @@
|
|||
<span><i class="fa fa-book"></i> All Libraries</span>
|
||||
</div>
|
||||
<div class="button-bar">
|
||||
<div class="colvis-button-bar hidden-xs"></div>
|
||||
<div class="alert alert-danger alert-edit" role="alert" id="row-edit-mode-alert"><i class="fa fa-exclamation-triangle"></i> Select libraries to delete/purge. Data is deleted/purged upon exiting edit mode.</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="row-edit-mode">
|
||||
<i class="fa fa-pencil"></i> Edit mode
|
||||
</button> 
|
||||
</div>
|
||||
% if _session['user_group'] == 'admin':
|
||||
% if config['update_section_ids'] == -1:
|
||||
<button class="btn btn-dark refresh-libraries-button" id="refresh-libraries-list" disabled><i class="fa fa-refresh"></i> Refresh libraries</button>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-dark refresh-libraries-button" id="refresh-libraries-list" disabled><i class="fa fa-refresh"></i> Refresh libraries</button>
|
||||
</div>
|
||||
% else:
|
||||
<button class="btn btn-dark refresh-libraries-button" id="refresh-libraries-list"><i class="fa fa-refresh"></i> Refresh libraries</button>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-dark refresh-libraries-button" id="refresh-libraries-list"><i class="fa fa-refresh"></i> Refresh libraries</button>
|
||||
</div>
|
||||
% endif
|
||||
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="row-edit-mode">
|
||||
<i class="fa fa-pencil"></i> Edit mode
|
||||
</button> 
|
||||
<div class="alert alert-danger alert-edit" role="alert" id="row-edit-mode-alert"><i class="fa fa-exclamation-triangle"></i> Select libraries to delete/purge. Data is deleted/purged upon exiting edit mode.</div>
|
||||
% endif
|
||||
<div class="btn-group colvis-button-bar hidden-xs"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='table-card-back'>
|
||||
|
|
|
@ -180,13 +180,15 @@ DOCUMENTATION :: END
|
|||
</span>
|
||||
</div>
|
||||
<div class="button-bar">
|
||||
<div class="colvis-button-bar hidden-xs" id="button-bar-history"></div>
|
||||
% if _session['user_group'] == 'admin':
|
||||
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="row-edit-mode">
|
||||
<i class="fa fa-trash-o"></i> Delete mode
|
||||
</button>
|
||||
<div class="alert alert-danger alert-edit" role="alert" id="row-edit-mode-alert"><i class="fa fa-exclamation-triangle"></i> Select rows to delete. Data is deleted upon exiting delete mode.</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="row-edit-mode">
|
||||
<i class="fa fa-trash-o"></i> Delete mode
|
||||
</button>
|
||||
</div>
|
||||
% endif
|
||||
<div class="btn-group colvis-button-bar hidden-xs" id="button-bar-history"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-card-back">
|
||||
|
@ -237,17 +239,19 @@ DOCUMENTATION :: END
|
|||
</div>
|
||||
<div class="button-bar">
|
||||
% if _session['user_group'] == 'admin':
|
||||
% if config['get_file_sizes'] and data['section_id'] in config['get_file_sizes_hold']['section_ids']:
|
||||
<button class="btn btn-dark refresh-media-info-table-button" id="refresh-media-info-table" style="margin-right: 5px;" disabled>
|
||||
<i class="fa fa-refresh"></i> Refresh media info
|
||||
</button>
|
||||
% else:
|
||||
<button class="btn btn-dark refresh-media-info-table-button" id="refresh-media-info-table" style="margin-right: 5px;">
|
||||
<i class="fa fa-refresh"></i> Refresh media info
|
||||
</button>
|
||||
<div class="btn-group">
|
||||
% if config['get_file_sizes'] and data['section_id'] in config['get_file_sizes_hold']['section_ids']:
|
||||
<button class="btn btn-dark refresh-media-info-table-button" id="refresh-media-info-table" disabled>
|
||||
<i class="fa fa-refresh"></i> Refresh media info
|
||||
</button>
|
||||
% else:
|
||||
<button class="btn btn-dark refresh-media-info-table-button" id="refresh-media-info-table">
|
||||
<i class="fa fa-refresh"></i> Refresh media info
|
||||
</button>
|
||||
% endif
|
||||
</div>
|
||||
% endif
|
||||
% endif
|
||||
<div class="colvis-button-bar hidden-xs" id="button-bar-media-info"></div>
|
||||
<div class="btn-group colvis-button-bar hidden-xs" id="button-bar-media-info"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-card-back">
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
<div class="header-bar">
|
||||
<span><i class="fa fa-cloud-download"></i> Synced Items</span>
|
||||
</div>
|
||||
<div class="colvis-button-bar hidden-phone">
|
||||
<div class="button-bar">
|
||||
<div class="btn-group colvis-button-bar hidden-xs"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='table-card-back'>
|
||||
|
|
|
@ -180,13 +180,29 @@ from plexpy import helpers
|
|||
</span>
|
||||
</div>
|
||||
<div class="button-bar">
|
||||
<div class="colvis-button-bar hidden-xs" id="button-bar-history"></div>
|
||||
% if _session['user_group'] == 'admin':
|
||||
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="row-edit-mode">
|
||||
<i class="fa fa-trash-o"></i> Delete mode
|
||||
</button>
|
||||
<div class="alert alert-danger alert-edit" role="alert" id="row-edit-mode-alert"><i class="fa fa-exclamation-triangle"></i> Select rows to delete. Data is deleted upon exiting delete mode.</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="row-edit-mode">
|
||||
<i class="fa fa-trash-o"></i> Delete mode
|
||||
</button>
|
||||
</div>
|
||||
% endif
|
||||
<div class="btn-group" data-toggle="buttons" id="media_type-selection">
|
||||
<label class="btn btn-dark active">
|
||||
<input type="radio" name="media_type-filter" id="history-all" value="" autocomplete="off"> All
|
||||
</label>
|
||||
<label class="btn btn-dark">
|
||||
<input type="radio" name="media_type-filter" id="history-movies" value="movie" autocomplete="off"> Movies
|
||||
</label>
|
||||
<label class="btn btn-dark">
|
||||
<input type="radio" name="media_type-filter" id="history-tv_shows" value="episode" autocomplete="off"> TV Shows
|
||||
</label>
|
||||
<label class="btn btn-dark">
|
||||
<input type="radio" name="media_type-filter" id="history-music" value="track" autocomplete="off"> Music
|
||||
</label>
|
||||
</div>
|
||||
<div class="btn-group colvis-button-bar hidden-xs" id="button-bar-history"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-card-back">
|
||||
|
@ -226,7 +242,8 @@ from plexpy import helpers
|
|||
</strong>
|
||||
</span>
|
||||
</div>
|
||||
<div class="colvis-button-bar hidden-xs" id="button-bar-sync">
|
||||
<div class="button-bar">
|
||||
<div class="btn-group colvis-button-bar hidden-xs" id="button-bar-sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-card-back">
|
||||
|
@ -368,21 +385,6 @@ from plexpy import helpers
|
|||
|
||||
clearSearchButton('history_table-UID-${data["user_id"]}', history_table);
|
||||
|
||||
$('#history_table_filter').prepend('<div class="btn-group" data-toggle="buttons" id="media_type-selection" style="padding-right: 15px;"> \
|
||||
<label class="btn btn-dark active"> \
|
||||
<input type="radio" name="media_type-filter" id="history-all" value="all" autocomplete="off"> All \
|
||||
</label> \
|
||||
<label class="btn btn-dark"> \
|
||||
<input type="radio" name="media_type-filter" id="history-movies" value="movie" autocomplete="off"> Movies \
|
||||
</label> \
|
||||
<label class="btn btn-dark"> \
|
||||
<input type="radio" name="media_type-filter" id="history-tv_shows" value="episode" autocomplete="off"> TV Shows \
|
||||
</label> \
|
||||
<label class="btn btn-dark"> \
|
||||
<input type="radio" name="media_type-filter" id="history-music" value="track" autocomplete="off"> Music \
|
||||
</label> \
|
||||
</div>');
|
||||
|
||||
$('#media_type-selection').on('change', function () {
|
||||
$('#media_type-selection > label').removeClass('active');
|
||||
selected_filter = $('input[name=media_type-filter]:checked', '#media_type-selection');
|
||||
|
@ -393,7 +395,7 @@ from plexpy import helpers
|
|||
}
|
||||
|
||||
$( "#history-tab-btn" ).one( "click", function() {
|
||||
var media_type = 'all';
|
||||
var media_type = null;
|
||||
loadHistoryTable(media_type);
|
||||
});
|
||||
|
||||
|
|
|
@ -13,14 +13,18 @@
|
|||
<span><i class="fa fa-group"></i> All Users</span>
|
||||
</div>
|
||||
<div class="button-bar">
|
||||
<div class="colvis-button-bar hidden-xs"></div>
|
||||
% if _session['user_group'] == 'admin':
|
||||
<button class="btn btn-dark refresh-users-button" id="refresh-users-list"><i class="fa fa-refresh"></i> Refresh users</button>
|
||||
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="row-edit-mode">
|
||||
<i class="fa fa-pencil"></i> Edit mode
|
||||
</button> 
|
||||
<div class="alert alert-danger alert-edit" role="alert" id="row-edit-mode-alert"><i class="fa fa-exclamation-triangle"></i> Select users to delete/purge. Data is deleted/purged upon exiting edit mode.</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="row-edit-mode">
|
||||
<i class="fa fa-pencil"></i> Edit mode
|
||||
</button> 
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-dark refresh-users-button" id="refresh-users-list"><i class="fa fa-refresh"></i> Refresh users</button>
|
||||
</div>
|
||||
% endif
|
||||
<div class="btn-group colvis-button-bar hidden-xs"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='table-card-back'>
|
||||
|
|
|
@ -959,20 +959,20 @@ class PmsConnect(object):
|
|||
if a.getElementsByTagName('Track'):
|
||||
session_data = a.getElementsByTagName('Track')
|
||||
session_type = 'track'
|
||||
for session in session_data:
|
||||
session_output = self.get_session_each(session_type, session)
|
||||
for session_ in session_data:
|
||||
session_output = self.get_session_each(session_type, session_)
|
||||
session_list.append(session_output)
|
||||
if a.getElementsByTagName('Video'):
|
||||
session_data = a.getElementsByTagName('Video')
|
||||
session_type = 'video'
|
||||
for session in session_data:
|
||||
session_output = self.get_session_each(session_type, session)
|
||||
for session_ in session_data:
|
||||
session_output = self.get_session_each(session_type, session_)
|
||||
session_list.append(session_output)
|
||||
if a.getElementsByTagName('Photo'):
|
||||
session_data = a.getElementsByTagName('Photo')
|
||||
session_type = 'photo'
|
||||
for session in session_data:
|
||||
session_output = self.get_session_each(session_type, session)
|
||||
for session_ in session_data:
|
||||
session_output = self.get_session_each(session_type, session_)
|
||||
session_list.append(session_output)
|
||||
|
||||
output = {'stream_count': helpers.get_xml_attr(xml_head[0], 'size'),
|
||||
|
|
|
@ -142,9 +142,11 @@ def friendly_name_to_username(list_of_dicts):
|
|||
Reverts the friendly name back to the username of the current logged in session
|
||||
"""
|
||||
session_user = get_session_user()
|
||||
|
||||
for d in list_of_dicts:
|
||||
if 'friendly_name' in d and d['friendly_name'] != session_user:
|
||||
d['friendly_name'] = session_user
|
||||
session_user_id = get_session_user_id()
|
||||
|
||||
if session_user_id:
|
||||
for d in list_of_dicts:
|
||||
if 'friendly_name' in d and d['friendly_name'] != session_user:
|
||||
d['friendly_name'] = session_user
|
||||
|
||||
return list_of_dicts
|
|
@ -367,7 +367,7 @@ class Users(object):
|
|||
user_details = {}
|
||||
if result:
|
||||
for item in result:
|
||||
if session.get_session_user():
|
||||
if session.get_session_user_id():
|
||||
friendly_name = session.get_session_user()
|
||||
elif item['friendly_name']:
|
||||
friendly_name = item['friendly_name']
|
||||
|
|
|
@ -861,8 +861,8 @@ class WebInterface(object):
|
|||
custom_where.append(['session_history_metadata.section_id', section_id])
|
||||
if 'media_type' in kwargs:
|
||||
media_type = kwargs.get('media_type', "")
|
||||
if media_type != 'all':
|
||||
custom_where.append(['session_history.media_type', media_type])
|
||||
if media_type:
|
||||
custom_where.append(['session_history.media_type', media_type])
|
||||
if 'transcode_decision' in kwargs:
|
||||
transcode_decision = kwargs.get('transcode_decision', "")
|
||||
if transcode_decision:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue