From 147a4dc60281af30f1a4ac5ca5c39b3d8b77e2aa Mon Sep 17 00:00:00 2001 From: vicpa Date: Sun, 21 Feb 2016 11:42:56 -0500 Subject: [PATCH] music lyricist, writer --- .../Probing/ProbeResultNormalizer.cs | 20 +++++++++++++++++++ MediaBrowser.Model/Entities/PersonType.cs | 4 ++++ 2 files changed, 24 insertions(+) diff --git a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs index ec51bc967..07f1d4578 100644 --- a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs +++ b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs @@ -496,6 +496,26 @@ namespace MediaBrowser.MediaEncoding.Probing } } + var lyricist = FFProbeHelpers.GetDictionaryValue(tags, "lyricist"); + + if (!string.IsNullOrWhiteSpace(lyricist)) + { + foreach (var person in Split(lyricist, false)) + { + audio.People.Add(new BaseItemPerson { Name = person, Type = PersonType.Lyricist }); + } + } + // Check for writer some music is tagged that way as alternative to composer/lyricist + var writer = FFProbeHelpers.GetDictionaryValue(tags, "writer"); + + if (!string.IsNullOrWhiteSpace(writer)) + { + foreach (var person in Split(writer, false)) + { + audio.People.Add(new BaseItemPerson { Name = person, Type = PersonType.Writer }); + } + } + audio.Album = FFProbeHelpers.GetDictionaryValue(tags, "album"); var artists = FFProbeHelpers.GetDictionaryValue(tags, "artists"); diff --git a/MediaBrowser.Model/Entities/PersonType.cs b/MediaBrowser.Model/Entities/PersonType.cs index bdf846095..bc274972d 100644 --- a/MediaBrowser.Model/Entities/PersonType.cs +++ b/MediaBrowser.Model/Entities/PersonType.cs @@ -34,5 +34,9 @@ namespace MediaBrowser.Model.Entities /// The conductor /// public const string Conductor = "Conductor"; + /// + /// The lyricist + /// + public const string Lyricist = "Lyricist"; } }