mirror of
https://github.com/Felitendo/jellyfin-plugin-lyrics.git
synced 2026-11-01 17:23:25 +01:00
96 lines
4.5 KiB
HTML
96 lines
4.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en-US">
|
|
<head>
|
|
<title>Lyrics</title>
|
|
</head>
|
|
<body>
|
|
<div id="lyricsConfigurationPage" data-role="page" class="page type-interior pluginConfigurationPage">
|
|
<div data-role="content">
|
|
<div class="content-primary">
|
|
<form class="gotifyConfigurationForm">
|
|
<div class="verticalSection verticalSection-extrabottompadding">
|
|
<div class="sectionTitleContainer flex align-items-center">
|
|
<h2 class="sectionTitle">Lyrics Settings:</h2>
|
|
</div>
|
|
<label class="checkboxContainer">
|
|
<input is="emby-checkbox" type="checkbox" id="useStrictSearch" />
|
|
<span>Use strict search.</span>
|
|
</label>
|
|
<label class="checkboxContainer" id="excludeArtistNameLabel">
|
|
<input is="emby-checkbox" type="checkbox" id="excludeArtistName" />
|
|
<span>Exclude artist name from the search parameters.</span>
|
|
</label>
|
|
<label class="checkboxContainer" id="excludeAlbumNameLabel">
|
|
<input is="emby-checkbox" type="checkbox" id="excludeAlbumName" />
|
|
<span>Exclude album name from the search parameters.</span>
|
|
</label>
|
|
<br />
|
|
<div>
|
|
<button is="emby-button" type="submit" data-theme="b" class="raised button-submit block">
|
|
<span>Save</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
var LyricsPluginConfiguration = {
|
|
uniquePluginId: "f4a1b2c3-d4e5-6f7a-8b9c-0d1e2f3a4b5c",
|
|
|
|
loadConfiguration: function () {
|
|
Dashboard.showLoadingMsg();
|
|
|
|
ApiClient.getPluginConfiguration(LyricsPluginConfiguration.uniquePluginId).then(function (config) {
|
|
document.querySelector('#useStrictSearch').checked = config.UseStrictSearch;
|
|
|
|
if (config.UseStrictSearch) {
|
|
document.querySelector('#excludeArtistNameLabel').classList.add('hide');
|
|
document.querySelector('#excludeAlbumNameLabel').classList.add('hide');
|
|
}
|
|
|
|
document.querySelector('#excludeArtistName').checked = config.ExcludeArtistName;
|
|
document.querySelector('#excludeAlbumName').checked = config.ExcludeAlbumName;
|
|
Dashboard.hideLoadingMsg();
|
|
});
|
|
},
|
|
|
|
saveConfiguration: function () {
|
|
Dashboard.showLoadingMsg();
|
|
ApiClient.getPluginConfiguration(LyricsPluginConfiguration.uniquePluginId).then(function (config) {
|
|
|
|
config.UseStrictSearch = document.querySelector('#useStrictSearch').checked;
|
|
config.ExcludeArtistName = document.querySelector('#excludeArtistName').checked;
|
|
config.ExcludeAlbumName = document.querySelector('#excludeAlbumName').checked;
|
|
|
|
ApiClient.updatePluginConfiguration(LyricsPluginConfiguration.uniquePluginId, config).then(function (result) {
|
|
Dashboard.processPluginConfigurationUpdateResult(result);
|
|
});
|
|
});
|
|
},
|
|
};
|
|
|
|
document.getElementById('lyricsConfigurationPage').addEventListener('pageshow', function () {
|
|
LyricsPluginConfiguration.loadConfiguration();
|
|
});
|
|
|
|
document.getElementById('lyricsConfigurationPage').addEventListener('submit', function (e) {
|
|
e.preventDefault();
|
|
LyricsPluginConfiguration.saveConfiguration();
|
|
});
|
|
|
|
document.getElementById('useStrictSearch').addEventListener('change', function () {
|
|
|
|
if (document.getElementById('useStrictSearch').checked) {
|
|
document.getElementById('excludeArtistNameLabel').classList.add('hide');
|
|
document.getElementById('excludeAlbumNameLabel').classList.add('hide');
|
|
}
|
|
else {
|
|
document.getElementById('excludeArtistNameLabel').classList.remove('hide');
|
|
document.getElementById('excludeAlbumNameLabel').classList.remove('hide');
|
|
}
|
|
});
|
|
</script>
|
|
</div>
|
|
</body>
|
|
</html> |