You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
781 B
29 lines
781 B
7 years ago
|
using NzbDrone.Core.MediaFiles.MediaInfo;
|
||
|
using Lidarr.Http.REST;
|
||
|
|
||
7 years ago
|
namespace Lidarr.Api.V1.TrackFiles
|
||
7 years ago
|
{
|
||
|
public class MediaInfoResource : RestResource
|
||
|
{
|
||
|
public decimal AudioChannels { get; set; }
|
||
|
public string AudioCodec { get; set; }
|
||
|
}
|
||
|
|
||
|
public static class MediaInfoResourceMapper
|
||
|
{
|
||
|
public static MediaInfoResource ToResource(this MediaInfoModel model, string sceneName)
|
||
|
{
|
||
|
if (model == null)
|
||
|
{
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
return new MediaInfoResource
|
||
|
{
|
||
|
AudioChannels = MediaInfoFormatter.FormatAudioChannels(model),
|
||
|
AudioCodec = MediaInfoFormatter.FormatAudioCodec(model)
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
}
|