mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-13 00:32:58 -07:00
121 lines
No EOL
5.7 KiB
HTML
121 lines
No EOL
5.7 KiB
HTML
<%doc>
|
|
USAGE DOCUMENTATION :: PLEASE LEAVE THIS AT THE TOP OF THIS FILE
|
|
|
|
For Mako templating syntax documentation please visit: http://docs.makotemplates.org/en/latest/
|
|
|
|
Filename: export_modal.html
|
|
Version: 0.1
|
|
Variable names: data [list]
|
|
|
|
data :: Usable parameters
|
|
|
|
== Global keys ==
|
|
|
|
DOCUMENTATION :: END
|
|
</%doc>
|
|
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
<h4 class="modal-title" id="info-modal-title">
|
|
${title}
|
|
</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<form method="post" class="form" id="export_metadata_form">
|
|
<input type="hidden" id="section_id" name="section_id" value="${section_id or ''}" />
|
|
<input type="hidden" id="rating_key" name="rating_key" value="${rating_key or ''}" />
|
|
<div class="form-group">
|
|
<label for="metadata_export_level_select">Metadata Export Level</label>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<select class="form-control" id="metadata_export_level_select" name="metadata_export_level_select">
|
|
<option value="1">Level 1 - Basic Metadata</option>
|
|
<option value="2">Level 2 - Extended Metadata</option>
|
|
<option value="3">Level 3 - Advanced Metadata</option>
|
|
<option value="9">Level 9 - All Metadata</option>
|
|
## <option value="-999">Custom</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<p class="help-block">Select the metadata export level.</p>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="media_info_export_level_select">Media Info Export Level</label>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<select class="form-control" id="media_info_export_level_select" name="media_info_export_level_select">
|
|
<option value="1">Level 1 - Basic Media Info</option>
|
|
<option value="2">Level 2 - Extended Media Info</option>
|
|
<option value="3">Level 3 - Advanced Media Info</option>
|
|
<option value="9">Level 9 - All Media Info</option>
|
|
## <option value="-999">Custom</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<p class="help-block">Select the media info export level.</p>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="file_format_select">File Format</label>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<select class="form-control" id="file_format_select" name="file_format_select">
|
|
<option value="csv">CSV</option>
|
|
<option value="json">JSON</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<p class="help-block">Select the export file format.</p>
|
|
</div>
|
|
<div class="checkbox">
|
|
<label>
|
|
<input type="checkbox" id="export_include_images" name="export_include_images" value="1"> Export artwork and posters
|
|
</label>
|
|
<p class="help-block">Enable to export artwork and poster image files. Warning: This will take a long time!</p>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<div>
|
|
<input type="button" class="btn btn-bright btn-ok" data-dismiss="modal" id="export_metadata" value="Export">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$("#export_metadata").click(function() {
|
|
var section_id = $('#section_id').val();
|
|
var rating_key = $('#rating_key').val();
|
|
var metadata_export_level = $('#metadata_export_level_select option:selected').val();
|
|
var media_info_export_level = $('#media_info_export_level_select option:selected').val();
|
|
var file_format = $('#file_format_select option:selected').val();
|
|
var include_images = $("#export_include_images").is(':checked') ? 1 : 0;
|
|
|
|
$.ajax({
|
|
url: 'export_metadata',
|
|
data: {
|
|
section_id: section_id,
|
|
rating_key: rating_key,
|
|
metadata_level: metadata_export_level,
|
|
media_info_level: media_info_export_level,
|
|
file_format: file_format,
|
|
include_images: include_images
|
|
},
|
|
async: true,
|
|
success: function (data) {
|
|
if (data.result === 'success') {
|
|
var msg = '';
|
|
if (typeof export_table !== 'undefined') {
|
|
redrawExportTable();
|
|
} else {
|
|
msg = '<br>View the export from the <a href="library?section_id=' + section_id +'#tab_tabs-export">library page</a>.'
|
|
}
|
|
showMsg('<i class="fa fa-check"></i> ' + data.message + msg, false, true, 5000);
|
|
} else {
|
|
showMsg('<i class="fa fa-exclamation-circle"></i> ' + data.message, false, true, 5000, true);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
</script> |