mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-24 06:55:26 -07:00
Clean up code
This commit is contained in:
parent
fc43f4773a
commit
7cbc1993b2
2 changed files with 27 additions and 31 deletions
|
@ -307,6 +307,13 @@ DOCUMENTATION :: END
|
||||||
% endif
|
% endif
|
||||||
% endif
|
% endif
|
||||||
<div class='col-md-12'>
|
<div class='col-md-12'>
|
||||||
|
% if data['type'] == 'library' and config['update_library_ids'] == 1:
|
||||||
|
<div id="update_library_ids_mssage" style="text-align: center; margin-top: 20px;">
|
||||||
|
<i class="fa fa-refresh fa-spin"></i> Updating library ids in the database. This could take a few minutes depending on the size of your database.
|
||||||
|
<br />
|
||||||
|
The history table will refresh automatically when the update is complete. Please wait...
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
<div class='table-card-header'>
|
<div class='table-card-header'>
|
||||||
<div class="header-bar">
|
<div class="header-bar">
|
||||||
<span>Watch History for <strong>${data['title']}</strong></span>
|
<span>Watch History for <strong>${data['title']}</strong></span>
|
||||||
|
@ -409,21 +416,15 @@ DOCUMENTATION :: END
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="summary-content-title-wrapper">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<h4 style="text-align: center; margin-bottom: 20px;">
|
|
||||||
Error retrieving item metadata. This media item is not available in the Plex Media Server library.
|
|
||||||
</h4>
|
|
||||||
% if query:
|
|
||||||
<h4 style="text-align: center; margin-bottom: 20px;">
|
|
||||||
If the item has been moved, please select the correct match below to update the PlexPy database.
|
|
||||||
</h4>
|
|
||||||
% endif
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="summary-content-wrapper">
|
<div class="summary-content-wrapper">
|
||||||
<div class='col-md-12'>
|
<div class='col-md-12'>
|
||||||
|
<div style="text-align: center; margin-top: 20px;">
|
||||||
|
<i class="fa fa-exclamation-triangle"></i> Error retrieving item metadata. This media item is not available in the Plex Media Server library.
|
||||||
|
</div>
|
||||||
% if query:
|
% if query:
|
||||||
|
<div style="text-align: center; margin-top: 20px;">
|
||||||
|
If the item has been moved, please select the correct match below to update the PlexPy database.
|
||||||
|
</div>
|
||||||
<div class='table-card-header'>
|
<div class='table-card-header'>
|
||||||
<div class="header-bar">
|
<div class="header-bar">
|
||||||
<span>Search Results for <strong>${query['query_string']}</strong></span>
|
<span>Search Results for <strong>${query['query_string']}</strong></span>
|
||||||
|
@ -502,24 +503,19 @@ DOCUMENTATION :: END
|
||||||
'library_id': "${data['library_id']}" };
|
'library_id': "${data['library_id']}" };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ("${config['update_library_ids']}" == "1") {
|
}
|
||||||
$('#history_table').before('<div id="update_mssage" style="text-align: center"> \
|
if ("${config['update_library_ids']}" == "1") {
|
||||||
<i class="fa fa-refresh fa-spin"></i> Updating library ids in the database. This could take a few minutes depending on the size of your database. \
|
$.ajax({
|
||||||
<br /> \
|
url: 'update_library_ids',
|
||||||
The history table will refresh automatically when complete. Please wait... \
|
type: 'post',
|
||||||
</div>')
|
cache: false,
|
||||||
$.ajax({
|
async: true,
|
||||||
url: 'update_library_ids',
|
data: { },
|
||||||
type: 'post',
|
complete: function (xhr, status) {
|
||||||
cache: false,
|
$('#update_library_ids_mssage').remove();
|
||||||
async: true,
|
history_table.draw();
|
||||||
data: { },
|
}
|
||||||
complete: function (xhr, status) {
|
});
|
||||||
$('#update_mssage').remove();
|
|
||||||
history_table.draw();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
% elif data['type'] == 'show' or data['type'] == 'artist':
|
% elif data['type'] == 'show' or data['type'] == 'artist':
|
||||||
|
|
|
@ -1481,9 +1481,9 @@ class WebInterface(object):
|
||||||
result = data_factory.update_library_ids()
|
result = data_factory.update_library_ids()
|
||||||
|
|
||||||
if result:
|
if result:
|
||||||
|
logger.debug(u"Updated all library_id's in database.")
|
||||||
plexpy.CONFIG.UPDATE_LIBRARY_IDS = 0
|
plexpy.CONFIG.UPDATE_LIBRARY_IDS = 0
|
||||||
plexpy.CONFIG.write()
|
plexpy.CONFIG.write()
|
||||||
logger.debug(u"Updated all library_id's in database.")
|
|
||||||
return "Library ids updated."
|
return "Library ids updated."
|
||||||
else:
|
else:
|
||||||
logger.debug(u"Unable to update library_id's in database.")
|
logger.debug(u"Unable to update library_id's in database.")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue