Don't use finally block for tag fallback
Signed-off-by: gnattu <gnattuoc@me.com>
This commit is contained in:
parent
475fa36ea3
commit
97d7151289
|
@ -191,8 +191,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
||||||
{
|
{
|
||||||
_logger.LogWarning(e, "TagLib-Sharp does not support this audio");
|
_logger.LogWarning(e, "TagLib-Sharp does not support this audio");
|
||||||
}
|
}
|
||||||
finally
|
|
||||||
{
|
|
||||||
tags ??= new TagLib.Id3v2.Tag();
|
tags ??= new TagLib.Id3v2.Tag();
|
||||||
tags.AlbumArtists ??= mediaInfo.AlbumArtists;
|
tags.AlbumArtists ??= mediaInfo.AlbumArtists;
|
||||||
tags.Album ??= mediaInfo.Album;
|
tags.Album ??= mediaInfo.Album;
|
||||||
|
@ -202,7 +201,6 @@ namespace MediaBrowser.Providers.MediaInfo
|
||||||
tags.Genres ??= mediaInfo.Genres;
|
tags.Genres ??= mediaInfo.Genres;
|
||||||
tags.Track = tags.Track == 0U ? Convert.ToUInt32(mediaInfo.IndexNumber, CultureInfo.InvariantCulture) : tags.Track;
|
tags.Track = tags.Track == 0U ? Convert.ToUInt32(mediaInfo.IndexNumber, CultureInfo.InvariantCulture) : tags.Track;
|
||||||
tags.Disc = tags.Disc == 0U ? Convert.ToUInt32(mediaInfo.ParentIndexNumber, CultureInfo.InvariantCulture) : tags.Disc;
|
tags.Disc = tags.Disc == 0U ? Convert.ToUInt32(mediaInfo.ParentIndexNumber, CultureInfo.InvariantCulture) : tags.Disc;
|
||||||
}
|
|
||||||
|
|
||||||
if (audio.SupportsPeople && !audio.LockedFields.Contains(MetadataField.Cast))
|
if (audio.SupportsPeople && !audio.LockedFields.Contains(MetadataField.Cast))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user