mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 03:26:07 +02:00
77 lines
3.8 KiB
HTML
77 lines
3.8 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>TMDb</title>
|
|
</head>
|
|
<body>
|
|
<div data-role="page" class="page type-interior pluginConfigurationPage configPage" data-require="emby-input,emby-button,emby-checkbox">
|
|
<div data-role="content">
|
|
<div class="content-primary">
|
|
<form class="configForm">
|
|
<label class="checkboxContainer">
|
|
<input is="emby-checkbox" type="checkbox" id="includeAdult" />
|
|
<span>Include adult content in search results.</span>
|
|
</label>
|
|
<label class="checkboxContainer">
|
|
<input is="emby-checkbox" type="checkbox" id="excludeTagsSeries" />
|
|
<span>Exclude tags/keywords from metadata fetched for series.</span>
|
|
</label>
|
|
<label class="checkboxContainer">
|
|
<input is="emby-checkbox" type="checkbox" id="excludeTagsMovies" />
|
|
<span>Exclude tags/keywords from metadata fetched for movies.</span>
|
|
</label>
|
|
<div class="inputContainer">
|
|
<input is="emby-input" type="number" id="maxCastMembers" pattern="[0-9]*" required min="0" max="1000" label="Max Cast Members" />
|
|
<div class="fieldDescription">The maximum number of cast members to fetch for an item.</div>
|
|
</div>
|
|
<br />
|
|
<div>
|
|
<button is="emby-button" type="submit" class="raised button-submit block"><span>Save</span></button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
var PluginConfig = {
|
|
pluginId: "b8715ed1-6c47-4528-9ad3-f72deb539cd4"
|
|
};
|
|
|
|
document.querySelector('.configPage')
|
|
.addEventListener('pageshow', function () {
|
|
Dashboard.showLoadingMsg();
|
|
ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
|
|
document.querySelector('#includeAdult').checked = config.IncludeAdult;
|
|
document.querySelector('#excludeTagsSeries').checked = config.ExcludeTagsSeries;
|
|
document.querySelector('#excludeTagsMovies').checked = config.ExcludeTagsMovies;
|
|
|
|
var maxCastMembers = document.querySelector('#maxCastMembers');
|
|
maxCastMembers.value = config.MaxCastMembers;
|
|
maxCastMembers.dispatchEvent(new Event('change', {
|
|
bubbles: true,
|
|
cancelable: false
|
|
}));
|
|
|
|
Dashboard.hideLoadingMsg();
|
|
});
|
|
});
|
|
|
|
|
|
document.querySelector('.configForm')
|
|
.addEventListener('submit', function (e) {
|
|
Dashboard.showLoadingMsg();
|
|
|
|
ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
|
|
config.IncludeAdult = document.querySelector('#includeAdult').checked;
|
|
config.ExcludeTagsSeries = document.querySelector('#excludeTagsSeries').checked;
|
|
config.ExcludeTagsMovies = document.querySelector('#excludeTagsMovies').checked;
|
|
config.MaxCastMembers = document.querySelector('#maxCastMembers').value;
|
|
ApiClient.updatePluginConfiguration(PluginConfig.pluginId, config).then(Dashboard.processPluginConfigurationUpdateResult);
|
|
});
|
|
|
|
e.preventDefault();
|
|
return false;
|
|
});
|
|
</script>
|
|
</div>
|
|
</body>
|
|
</html>
|