mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-22 14:13:40 -07:00
date implementation missing components
This commit is contained in:
parent
9f87816bdb
commit
58f2e81a7b
6 changed files with 20 additions and 9 deletions
|
@ -853,10 +853,6 @@ function short_season(title) {
|
|||
return title
|
||||
}
|
||||
|
||||
function format_date_based_show(date) {
|
||||
return String(date).replaceAll('-', '\u00B7')
|
||||
}
|
||||
|
||||
function loadAllBlurHash() {
|
||||
$('[data-blurhash]').each(function() {
|
||||
const elem = $(this);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
var date_format = 'YYYY-MM-DD';
|
||||
var time_format = 'hh:mm a';
|
||||
var date_based_tv_show_format = 'YYYY\u00b7MM\u00b7DD';
|
||||
var history_to_delete = [];
|
||||
|
||||
$.ajax({
|
||||
|
@ -8,6 +9,7 @@ $.ajax({
|
|||
success: function(data) {
|
||||
date_format = data.date_format;
|
||||
time_format = data.time_format;
|
||||
date_based_tv_show_format = data.date_based_tv_show_format;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -179,7 +181,7 @@ history_table_options = {
|
|||
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="' + page('pms_image_proxy', rowData['thumb'], rowData['rating_key'], 300, 450, null, null, null, fallback) + '" data-height="120" data-width="80">' + cellData + parent_info + '</span>';
|
||||
$(td).html('<div class="history-title"><a href="' + page('info', rowData['rating_key'], rowData['guid'], history, rowData['live']) + '"><div style="float: left;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
||||
} else if (rowData['media_type'] === 'episode') {
|
||||
rowData['originally_available_at'] = format_date_based_show(rowData['originally_available_at']);
|
||||
rowData['originally_available_at'] = moment(rowData['originally_available_at']).format(date_based_tv_show_format);
|
||||
icon = (rowData['live']) ? 'fa-broadcast-tower' : 'fa-television';
|
||||
icon_title = (rowData['live']) ? 'Live TV' : 'Episode';
|
||||
if (!isNaN(parseInt(rowData['parent_media_index'])) && !isNaN(parseInt(rowData['media_index']))) { parent_info = ' (' + short_season(rowData['parent_title']) + ' · E' + rowData['media_index'] + ')'; }
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
var date_format = 'YYYY-MM-DD';
|
||||
var time_format = 'hh:mm a';
|
||||
var date_based_tv_show_format = 'YYYY\u00b7MM\u00b7DD';
|
||||
|
||||
$.ajax({
|
||||
url: 'get_date_formats',
|
||||
|
@ -7,6 +8,7 @@ $.ajax({
|
|||
success: function(data) {
|
||||
date_format = data.date_format;
|
||||
time_format = data.time_format;
|
||||
date_based_tv_show_format = data.date_based_tv_show_format;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -112,7 +114,7 @@ history_table_modal_options = {
|
|||
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="' + page('pms_image_proxy', rowData['thumb'], rowData['rating_key'], 300, 450, null, null, null, fallback) + '" data-height="120" data-width="80">' + cellData + parent_info + '</span>';
|
||||
$(td).html('<div class="history-title"><a href="' + page('info', rowData['rating_key'], rowData['guid'], true, rowData['live']) + '"><div style="float: left;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
||||
} else if (rowData['media_type'] === 'episode') {
|
||||
rowData['originally_available_at'] = format_date_based_show(rowData['originally_available_at']);
|
||||
rowData['originally_available_at'] = moment(rowData['originally_available_at']).format(date_based_tv_show_format);
|
||||
icon = (rowData['live']) ? 'fa-broadcast-tower' : 'fa-television';
|
||||
icon_title = (rowData['live']) ? 'Live TV' : 'Episode';
|
||||
if (!isNaN(parseInt(rowData['parent_media_index'])) && !isNaN(parseInt(rowData['media_index']))) { parent_info = ' (' + short_season(rowData['parent_title']) + ' · E' + rowData['media_index'] + ')'; }
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
var date_format = 'YYYY-MM-DD';
|
||||
var time_format = 'hh:mm a';
|
||||
var date_based_tv_show_format = 'YYYY\u00b7MM\u00b7DD';
|
||||
|
||||
$.ajax({
|
||||
url: 'get_date_formats',
|
||||
|
@ -7,6 +8,7 @@ $.ajax({
|
|||
success: function (data) {
|
||||
date_format = data.date_format;
|
||||
time_format = data.time_format;
|
||||
date_based_tv_show_format = data.date_based_tv_show_format;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -96,7 +98,8 @@ media_info_table_options = {
|
|||
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Episode"><i class="fa fa-television fa-fw"></i></span>';
|
||||
thumb_popover = (rowData['media_index']) ?
|
||||
'<span class="thumb-tooltip" data-toggle="popover" data-img="' + page('pms_image_proxy', rowData['thumb'], rowData['rating_key'], 500, 280, null, null, null, 'art') + '" data-height="80" data-width="140">E' + rowData['media_index'] + ' - ' + rowData['title'] + '</span>'
|
||||
: '<span class="thumb-tooltip" data-toggle="popover" data-img="' + page('pms_image_proxy', rowData['thumb'], rowData['rating_key'], 500, 280, null, null, null, 'art') + '" data-height="80" data-width="140">E' + format_date_based_show(rowData['originally_available_at']) + ' - ' + rowData['title'] + '</span>';
|
||||
: '<span class="thumb-tooltip" data-toggle="popover" data-img="' + page('pms_image_proxy', rowData['thumb'], rowData['rating_key'], 500, 280, null, null, null, 'art') + '" data-height="80" data-width="140">E' + moment(rowData['originally_available_at']).format(date_based_tv_show_format)
|
||||
+ ' - ' + rowData['title'] + '</span>';
|
||||
$(td).html('<div class="history-title"><a href="' + page('info', rowData['rating_key']) + '"><div style="float: left; padding-left: 30px;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
||||
} else if (rowData['media_type'] === 'artist') {
|
||||
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Artist"><i class="fa fa-music fa-fw"></i></span>';
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
var users_to_delete = [];
|
||||
var users_to_purge = [];
|
||||
var date_based_tv_show_format = 'YYYY\u00b7MM\u00b7DD';
|
||||
|
||||
$.ajax({
|
||||
url: 'get_date_formats',
|
||||
type: 'GET',
|
||||
success: function (data) {
|
||||
date_based_tv_show_format = data.date_based_tv_show_format;
|
||||
}
|
||||
});
|
||||
|
||||
function toggleEditNames() {
|
||||
if ($('.edit-control').hasClass('hidden')) {
|
||||
|
@ -211,7 +220,7 @@ users_list_table_options = {
|
|||
} else if (rowData['media_type'] === 'episode') {
|
||||
icon = (rowData['live']) ? 'fa-broadcast-tower' : 'fa-television';
|
||||
icon_title = (rowData['live']) ? 'Live TV' : 'Episode';
|
||||
rowData['originally_available_at'] = format_date_based_show(rowData['originally_available_at']);
|
||||
rowData['originally_available_at'] = moment(rowData['originally_available_at']).format(date_based_tv_show_format);
|
||||
if (!isNaN(parseInt(rowData['parent_media_index'])) && !isNaN(parseInt(rowData['media_index']))) { parent_info = ' (' + short_season(rowData['parent_title']) + ' · E' + rowData['media_index'] + ')'; }
|
||||
else if (isNaN(parseInt(rowData['media_index'])) && rowData['originally_available_at']) { parent_info = ' (' + rowData['originally_available_at'] + ')'; }
|
||||
else if (rowData['live'] && rowData['originally_available_at']) { parent_info = ' (' + rowData['originally_available_at'] + ')'; }
|
||||
|
|
|
@ -508,7 +508,6 @@ NOTIFICATION_PARAMETERS = [
|
|||
{'name': 'Season Number', 'type': 'int', 'value': 'season_num', 'description': 'The season number.', 'example': 'e.g. 1, or 1-3'},
|
||||
{'name': 'Season Number 00', 'type': 'int', 'value': 'season_num00', 'description': 'The two digit season number.', 'example': 'e.g. 01, or 01-03'},
|
||||
{'name': 'Episode Number', 'type': 'int', 'value': 'episode_num', 'description': 'The episode number.', 'example': 'e.g. 6, or 6-10'},
|
||||
{'name': 'Episode Number', 'type': 'str', 'value': 'episode_date', 'description': 'The episode number of date based tv shows (in date format).'},
|
||||
{'name': 'Episode Number 00', 'type': 'int', 'value': 'episode_num00', 'description': 'The two digit episode number.', 'example': 'e.g. 06, or 06-10'},
|
||||
{'name': 'Disc Number', 'type': 'int', 'value': 'disc_num', 'description': 'The disc number.', 'example': 'e.g. 2'},
|
||||
{'name': 'Disc Number 00', 'type': 'int', 'value': 'disc_num00', 'description': 'The two digit disc number.', 'example': 'e.g. 02'},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue