Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Album gain #10085

Merged
merged 6 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Emby.Server.Implementations/Dto/DtoService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -903,10 +903,11 @@ private void AttachBasicFields(BaseItemDto dto, BaseItem item, BaseItem owner, D
dto.IsPlaceHolder = supportsPlaceHolders.IsPlaceHolder;
}

dto.LUFS = item.LUFS;

// Add audio info
if (item is Audio audio)
{
dto.LUFS = audio.LUFS;
dto.Album = audio.Album;
if (audio.ExtraType.HasValue)
{
Expand Down
3 changes: 3 additions & 0 deletions MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ public async Task RefreshAllMetadata(MetadataRefreshOptions refreshOptions, IPro
progress.Report(percent * 95);
}

// get album LUFS
LUFS = items.OfType<Audio>().Max(item => item.LUFS);

var parentRefreshOptions = refreshOptions;
if (childUpdateType > ItemUpdateType.None)
{
Expand Down
Loading