mirror of https://github.com/jellyfin/jellyfin.git
Album gain (#10085)
* Add LUFSAlbum DTO * Get loudest track for smallest gain * Move gain search to musicalbum use baseitem LUFS for album * Use .Max for enumerable * Update DTO to be consistent with other DTOs * Remove albumlufs, Move dto for all types
This commit is contained in:
parent
da030ed589
commit
4c7fb8f452
|
@ -903,10 +903,11 @@ namespace Emby.Server.Implementations.Dto
|
||||||
dto.IsPlaceHolder = supportsPlaceHolders.IsPlaceHolder;
|
dto.IsPlaceHolder = supportsPlaceHolders.IsPlaceHolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dto.LUFS = item.LUFS;
|
||||||
|
|
||||||
// Add audio info
|
// Add audio info
|
||||||
if (item is Audio audio)
|
if (item is Audio audio)
|
||||||
{
|
{
|
||||||
dto.LUFS = audio.LUFS;
|
|
||||||
dto.Album = audio.Album;
|
dto.Album = audio.Album;
|
||||||
if (audio.ExtraType.HasValue)
|
if (audio.ExtraType.HasValue)
|
||||||
{
|
{
|
||||||
|
|
|
@ -183,6 +183,9 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||||
progress.Report(percent * 95);
|
progress.Report(percent * 95);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// get album LUFS
|
||||||
|
LUFS = items.OfType<Audio>().Max(item => item.LUFS);
|
||||||
|
|
||||||
var parentRefreshOptions = refreshOptions;
|
var parentRefreshOptions = refreshOptions;
|
||||||
if (childUpdateType > ItemUpdateType.None)
|
if (childUpdateType > ItemUpdateType.None)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue