2021-08-21 12:05:25 +00:00
|
|
|
<!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>
|
2021-11-04 22:58:32 +00:00
|
|
|
<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>
|
2021-08-21 12:05:25 +00:00
|
|
|
<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;
|
2021-11-02 14:11:01 +00:00
|
|
|
document.querySelector('#excludeTagsSeries').checked = config.ExcludeTagsSeries;
|
|
|
|
document.querySelector('#excludeTagsMovies').checked = config.ExcludeTagsMovies;
|
2021-08-21 12:05:25 +00:00
|
|
|
Dashboard.hideLoadingMsg();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2021-11-02 14:11:01 +00:00
|
|
|
|
2021-08-21 12:05:25 +00:00
|
|
|
document.querySelector('.configForm')
|
|
|
|
.addEventListener('submit', function (e) {
|
|
|
|
Dashboard.showLoadingMsg();
|
2021-11-02 14:11:01 +00:00
|
|
|
|
2021-08-21 12:05:25 +00:00
|
|
|
ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
|
|
|
|
config.IncludeAdult = document.querySelector('#includeAdult').checked;
|
2021-11-02 14:11:01 +00:00
|
|
|
config.ExcludeTagsSeries = document.querySelector('#excludeTagsSeries').checked;
|
|
|
|
config.ExcludeTagsMovies = document.querySelector('#excludeTagsMovies').checked;
|
2021-08-21 12:05:25 +00:00
|
|
|
ApiClient.updatePluginConfiguration(PluginConfig.pluginId, config).then(Dashboard.processPluginConfigurationUpdateResult);
|
|
|
|
});
|
2021-11-02 14:11:01 +00:00
|
|
|
|
2021-08-21 12:05:25 +00:00
|
|
|
e.preventDefault();
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|