1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

added toggles for metadata settings

This commit is contained in:
Luke Pulverenti 2014-02-10 23:55:01 -05:00
parent 33c7077414
commit c35957bf15
4 changed files with 107 additions and 26 deletions

View file

@ -35,9 +35,17 @@
Save
</button>
</div>
<div style="display: inline-block; vertical-align: bottom;">
<div style="vertical-align: bottom; display: inline-block;">
<div class="fldRefresh" style="display: none;">
<button id="btnRefresh" type="button" data-icon="refresh" data-mini="true" data-inline="true">Refresh Metadata</button>
<button id="btnRefresh" type="button" data-icon="refresh" data-mini="true" data-inline="true">Refresh</button>
</div>
</div>
<div style="display: inline-block; vertical-align: top;">
<div class="fldRefresh" style="display: none;">
<select data-mini="true" data-inline="true" id="selectRefreshMode">
<option value="all">Refresh All Data</option>
<option value="missing">Add Missing Data Only</option>
</select>
</div>
</div>
<div style="vertical-align: bottom; display: inline-block;">

View file

@ -26,17 +26,16 @@
</div>
<br />
<br />
<div class="tabContent">
<form class="metadataImagesConfigurationForm" style="margin-top: .5em;">
<div class="tabContent">
<form class="metadataImagesConfigurationForm" style="margin-top:10px;max-width:700px;">
<div class="metadataReaders" style="margin-bottom: 3em;">
<div class="metadataReaders" style="margin-bottom: 2em;width:85%;">
</div>
<div class="metadataFetchers" style="margin-bottom: 3em;">
<div class="metadataFetchers" style="margin-bottom: 2em;">
</div>
<div class="metadataSavers" style="margin-bottom: 3em;">
<div class="metadataSavers" style="margin-bottom: 2em;width:85%;">
</div>
<div class="imageFetchers" style="margin-bottom: 3em;">
<div class="imageFetchers" style="margin-bottom: 2em;">
</div>
<div data-role="collapsible">

View file

@ -1534,7 +1534,7 @@
var refreshPromise;
var force = true;
var force = $('#selectRefreshMode', page).val()=='all';
if (currentItem.Type == "MusicArtist") {
refreshPromise = ApiClient.refreshArtist(currentItem.Name, force);

View file

@ -162,20 +162,45 @@
return;
}
html += '<fieldset data-role="controlgroup">';
html += '<legend>Image Fetchers:</legend>';
var i, length, plugin, id;
for (var i = 0, length = plugins.length; i < length; i++) {
html += '<div class="ui-controlgroup-label" style="margin-bottom:0;padding-left:2px;">Image Fetchers:</div>';
var plugin = plugins[i];
html += '<div style="display:inline-block;width: 85%;vertical-align:top;">';
html += '<div data-role="controlgroup">';
var id = 'chkImageFetcher' + i;
for (i = 0, length = plugins.length; i < length; i++) {
html += '<input class="chkImageFetcher" type="checkbox" name="' + id + '" id="' + id + '" data-mini="true" data-pluginname="' + plugin.Name + '">';
plugin = plugins[i];
id = 'chkImageFetcher' + i;
var isChecked = config.DisabledImageFetchers.indexOf(plugin.Name) == -1 ? ' checked="checked"' : '';
html += '<input class="chkImageFetcher" type="checkbox" name="' + id + '" id="' + id + '" data-pluginname="' + plugin.Name + '" data-mini="true"' + isChecked + '>';
html += '<label for="' + id + '">' + plugin.Name + '</label>';
}
html += '</fieldset>';
html += '</div>';
html += '</div>';
if (plugins.length > 1) {
html += '<div style="display:inline-block;vertical-align:top;margin-left:5px;">';
for (i = 0, length = plugins.length; i < length; i++) {
plugin = plugins[i];
if (i == 0) {
html += '<button type="button" data-icon="arrow-d" data-mini="true" data-iconpos="notext" style="margin-top:6px;margin-bottom:6px;">Down</button>';
} else {
html += '<button type="button" data-icon="arrow-u" data-mini="true" data-iconpos="notext" style="margin-top:6px;margin-bottom:6px;">Up</button>';
}
}
}
html += '</div>';
html += '<div class="fieldDescription" style="width:85%;">Enable and rank your preferred image fetchers in order of priority.</div>';
$('.imageFetchers', page).html(html).show().trigger('create');
}
@ -227,20 +252,45 @@
return;
}
html += '<fieldset data-role="controlgroup">';
html += '<legend>Metadata Fetchers:</legend>';
var i, length, plugin, id;
for (var i = 0, length = plugins.length; i < length; i++) {
html += '<div class="ui-controlgroup-label" style="margin-bottom:0;padding-left:2px;">Metadata Fetchers:</div>';
var plugin = plugins[i];
html += '<div style="display:inline-block;width: 85%;vertical-align:top;">';
html += '<div data-role="controlgroup">';
var id = 'chkMetadataFetcher' + i;
for (i = 0, length = plugins.length; i < length; i++) {
html += '<input type="checkbox" name="' + id + '" id="' + id + '" data-mini="true">';
plugin = plugins[i];
id = 'chkMetadataFetcher' + i;
var isChecked = config.DisabledMetadataFetchers.indexOf(plugin.Name) == -1 ? ' checked="checked"' : '';
html += '<input class="chkMetadataFetcher" type="checkbox" name="' + id + '" id="' + id + '" data-pluginname="' + plugin.Name + '" data-mini="true"' + isChecked + '>';
html += '<label for="' + id + '">' + plugin.Name + '</label>';
}
html += '</fieldset>';
html += '</div>';
html += '</div>';
if (plugins.length > 1) {
html += '<div style="display:inline-block;vertical-align:top;margin-left:5px;">';
for (i = 0, length = plugins.length; i < length; i++) {
plugin = plugins[i];
if (i == 0) {
html += '<button type="button" data-icon="arrow-d" data-mini="true" data-iconpos="notext" style="margin-top:6px;margin-bottom:6px;">Down</button>';
} else {
html += '<button type="button" data-icon="arrow-u" data-mini="true" data-iconpos="notext" style="margin-top:6px;margin-bottom:6px;">Up</button>';
}
}
}
html += '</div>';
html += '<div class="fieldDescription" style="width:85%;">Enable and rank your preferred metadata fetchers in order of priority. Lower priority fetchers will only be used to fill in missing information.</div>';
$('.metadataFetchers', page).html(html).show().trigger('create');
}
@ -253,7 +303,7 @@
var html = '';
if (!plugins.length) {
if (plugins.length < 2) {
$('.metadataReaders', page).html(html).hide().trigger('create');
return;
}
@ -373,7 +423,31 @@
});
config.LocalMetadataReaders = $('.localReaderOption', form).get().map(function (c) {
config.LocalMetadataReaderOrder = $('.localReaderOption', form).get().map(function (c) {
return c.getAttribute('data-pluginname');
});
config.DisabledMetadataFetchers = $('.chkMetadataFetcher:not(:checked)', form).get().map(function (c) {
return c.getAttribute('data-pluginname');
});
config.MetadataFetcherOrder = $('.chkMetadataFetcher', form).get().map(function (c) {
return c.getAttribute('data-pluginname');
});
config.DisabledImageFetchers = $('.chkImageFetcher:not(:checked)', form).get().map(function (c) {
return c.getAttribute('data-pluginname');
});
config.ImageFetcherOrder = $('.chkImageFetcher', form).get().map(function (c) {
return c.getAttribute('data-pluginname');