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

Merge pull request #5440 from jellyfin/lyric-library-management

Add lyric settings to music library management
This commit is contained in:
Joshua M. Boniface 2024-05-05 21:34:22 -04:00 committed by GitHub
commit 6987bbf71d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 23 additions and 0 deletions

View file

@ -432,6 +432,12 @@ export function setContentType(parent, contentType) {
parent.querySelector('.fldAllowEmbeddedSubtitlesContainer').classList.add('hide'); parent.querySelector('.fldAllowEmbeddedSubtitlesContainer').classList.add('hide');
} }
if (contentType === 'music') {
parent.querySelector('.lyricSettingsSection').classList.remove('hide');
} else {
parent.querySelector('.lyricSettingsSection').classList.add('hide');
}
parent.querySelector('.chkAutomaticallyAddToCollectionContainer').classList.toggle('hide', contentType !== 'movies' && contentType !== 'mixed'); parent.querySelector('.chkAutomaticallyAddToCollectionContainer').classList.toggle('hide', contentType !== 'movies' && contentType !== 'mixed');
return populateMetadataSettings(parent, contentType); return populateMetadataSettings(parent, contentType);
@ -536,6 +542,7 @@ export function getLibraryOptions(parent) {
SkipSubtitlesIfEmbeddedSubtitlesPresent: parent.querySelector('#chkSkipIfGraphicalSubsPresent').checked, SkipSubtitlesIfEmbeddedSubtitlesPresent: parent.querySelector('#chkSkipIfGraphicalSubsPresent').checked,
SkipSubtitlesIfAudioTrackMatches: parent.querySelector('#chkSkipIfAudioTrackPresent').checked, SkipSubtitlesIfAudioTrackMatches: parent.querySelector('#chkSkipIfAudioTrackPresent').checked,
SaveSubtitlesWithMedia: parent.querySelector('#chkSaveSubtitlesLocally').checked, SaveSubtitlesWithMedia: parent.querySelector('#chkSaveSubtitlesLocally').checked,
SaveLyricsWithMedia: parent.querySelector('#chkSaveLyricsLocally').checked,
RequirePerfectSubtitleMatch: parent.querySelector('#chkRequirePerfectMatch').checked, RequirePerfectSubtitleMatch: parent.querySelector('#chkRequirePerfectMatch').checked,
AutomaticallyAddToCollection: parent.querySelector('#chkAutomaticallyAddToCollection').checked, AutomaticallyAddToCollection: parent.querySelector('#chkAutomaticallyAddToCollection').checked,
MetadataSavers: Array.prototype.map.call(Array.prototype.filter.call(parent.querySelectorAll('.chkMetadataSaver'), elem => { MetadataSavers: Array.prototype.map.call(Array.prototype.filter.call(parent.querySelectorAll('.chkMetadataSaver'), elem => {
@ -596,6 +603,7 @@ export function setLibraryOptions(parent, options) {
parent.querySelector('#selectAllowEmbeddedSubtitles').value = options.AllowEmbeddedSubtitles; parent.querySelector('#selectAllowEmbeddedSubtitles').value = options.AllowEmbeddedSubtitles;
parent.querySelector('#chkSkipIfGraphicalSubsPresent').checked = options.SkipSubtitlesIfEmbeddedSubtitlesPresent; parent.querySelector('#chkSkipIfGraphicalSubsPresent').checked = options.SkipSubtitlesIfEmbeddedSubtitlesPresent;
parent.querySelector('#chkSaveSubtitlesLocally').checked = options.SaveSubtitlesWithMedia; parent.querySelector('#chkSaveSubtitlesLocally').checked = options.SaveSubtitlesWithMedia;
parent.querySelector('#chkSaveLyricsLocally').checked = options.SaveLyricsWithMedia;
parent.querySelector('#chkSkipIfAudioTrackPresent').checked = options.SkipSubtitlesIfAudioTrackMatches; parent.querySelector('#chkSkipIfAudioTrackPresent').checked = options.SkipSubtitlesIfAudioTrackMatches;
parent.querySelector('#chkRequirePerfectMatch').checked = options.RequirePerfectSubtitleMatch; parent.querySelector('#chkRequirePerfectMatch').checked = options.RequirePerfectSubtitleMatch;
parent.querySelector('#chkAutomaticallyAddToCollection').checked = options.AutomaticallyAddToCollection; parent.querySelector('#chkAutomaticallyAddToCollection').checked = options.AutomaticallyAddToCollection;

View file

@ -193,3 +193,15 @@
<div class="fieldDescription checkboxFieldDescription">${SaveSubtitlesIntoMediaFoldersHelp}</div> <div class="fieldDescription checkboxFieldDescription">${SaveSubtitlesIntoMediaFoldersHelp}</div>
</div> </div>
</div> </div>
<div class="lyricSettingsSection hide">
<h2>${Lyrics}</h2>
<div class="checkboxContainer checkboxContainer-withDescription advanced">
<label>
<input type="checkbox" is="emby-checkbox" id="chkSaveLyricsLocally" checked />
<span>${SaveLyricsIntoMediaFolders}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${SaveLyricsIntoMediaFoldersHelp}</div>
</div>
</div>

View file

@ -421,6 +421,7 @@
"HeaderLibrarySettings": "Library Settings", "HeaderLibrarySettings": "Library Settings",
"HeaderLiveTvTunerSetup": "Live TV Tuner Setup", "HeaderLiveTvTunerSetup": "Live TV Tuner Setup",
"HeaderLoginFailure": "Login Failure", "HeaderLoginFailure": "Login Failure",
"HeaderLyricDownloads": "Lyric Downloads",
"HeaderMedia": "Media", "HeaderMedia": "Media",
"HeaderMediaFolders": "Media Folders", "HeaderMediaFolders": "Media Folders",
"HeaderMetadataSettings": "Metadata Settings", "HeaderMetadataSettings": "Metadata Settings",
@ -1354,6 +1355,8 @@
"Saturday": "Saturday", "Saturday": "Saturday",
"Save": "Save", "Save": "Save",
"SaveChanges": "Save changes", "SaveChanges": "Save changes",
"SaveLyricsIntoMediaFolders": "Save lyrics into media folders",
"SaveLyricsIntoMediaFoldersHelp": "Storing lyrics next to audio files will allow them to be more easily managed.",
"SavePassword": "Save Password", "SavePassword": "Save Password",
"SaveRecordingNFO": "Save recording EPG metadata in NFO", "SaveRecordingNFO": "Save recording EPG metadata in NFO",
"SaveRecordingNFOHelp": "Save metadata from EPG listings provider along side media.", "SaveRecordingNFOHelp": "Save metadata from EPG listings provider along side media.",