Add button to fix metadata on info pages

This commit is contained in:
Jonathan Wong 2015-10-18 13:02:16 -07:00
parent 2243cd1de9
commit 1bcb34d7eb

View file

@ -514,11 +514,11 @@ DOCUMENTATION :: END
<script>
function get_history() {
history_table_options.ajax = {
"url": "get_history",
url: 'get_history',
type: 'post',
data: function ( d ) {
return { 'json_data': JSON.stringify( d ),
'media_type': '${data['media_type']}' };
'media_type': "${data['media_type']}" };
}
}
}
@ -527,11 +527,11 @@ DOCUMENTATION :: END
<script>
function get_history() {
history_table_options.ajax = {
"url": "get_history",
url: 'get_history',
type: 'post',
data: function ( d ) {
return { 'json_data': JSON.stringify( d ),
'grandparent_rating_key': ${data['rating_key']} };
'grandparent_rating_key': "${data['rating_key']}" };
}
}
}
@ -540,11 +540,11 @@ DOCUMENTATION :: END
<script>
function get_history() {
history_table_options.ajax = {
"url": "get_history",
url: 'get_history',
type: 'post',
data: function ( d ) {
return { 'json_data': JSON.stringify( d ),
'parent_rating_key': ${data['rating_key']} };
'parent_rating_key': "${data['rating_key']}" };
}
}
}
@ -553,11 +553,11 @@ DOCUMENTATION :: END
<script>
function get_history() {
history_table_options.ajax = {
"url": "get_history",
url: 'get_history',
type: 'post',
data: function ( d ) {
return { 'json_data': JSON.stringify( d ),
'rating_key': ${data['rating_key']} };
'rating_key': "${data['rating_key']}" };
}
}
}
@ -614,7 +614,7 @@ DOCUMENTATION :: END
<script>
$.ajax({
url: 'get_item_children',
type: "GET",
type: 'GET',
async: true,
data: { rating_key : ${data['rating_key']} },
complete: function(xhr, status) {
@ -622,6 +622,13 @@ DOCUMENTATION :: END
});
</script>
% endif
% if data['type'] != 'library':
<script>
$('#row-edit-mode').after('<a href="info?item_id=${data['rating_key']}" class="btn btn-danger btn-edit" id="fix-metadata" \
data-toggle="tooltip" data-placement="left" title="Fix metadata if the item was moved in Plex"><i class="fa fa-wrench"></i> Fix Metadata</a>');
$('#fix-metadata').tooltip();
</script>
% endif
% if data['type'] != 'library' and data['rating']:
<script>
// Convert rating to 5 star rating type
@ -638,7 +645,7 @@ DOCUMENTATION :: END
<script>
$.ajax({
url: 'get_search_results_children',
type: "GET",
type: 'GET',
async: true,
data: {'query': "${query['query_string']}",
'media_type': "${query['media_type']}",