1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Fixed: Kodi metadata AC3 audio codec

Closes #1344
This commit is contained in:
Mark McDowall 2016-07-02 00:22:58 -07:00
parent c8474701a0
commit c1f59a55c6

View File

@ -301,7 +301,7 @@ public override MetadataFileResult EpisodeMetadata(Series series, EpisodeFile ep
var audio = new XElement("audio");
audio.Add(new XElement("bitrate", episodeFile.MediaInfo.AudioBitrate));
audio.Add(new XElement("channels", episodeFile.MediaInfo.AudioChannels));
audio.Add(new XElement("codec", episodeFile.MediaInfo.AudioFormat));
audio.Add(new XElement("codec", GetAudioCodec(episodeFile.MediaInfo.AudioFormat)));
audio.Add(new XElement("language", episodeFile.MediaInfo.AudioLanguages));
streamDetails.Add(audio);
@ -416,5 +416,15 @@ private string GetEpisodeImageFilename(string episodeFilePath)
{
return Path.ChangeExtension(episodeFilePath, "").Trim('.') + "-thumb.jpg";
}
private string GetAudioCodec(string audioCodec)
{
if (audioCodec == "AC-3")
{
return "AC3";
}
return audioCodec;
}
}
}