Пример #1
0
        public static MediaItem GetMediaItem(this IMediaLibrary mediaLibrary, Guid mediaItemId, IEnumerable <Guid> necessaryMIATypes, IEnumerable <Guid> optionalMIATypes)
        {
            var items = mediaLibrary.LoadCustomPlaylist(new List <Guid>()
            {
                mediaItemId
            }, necessaryMIATypes, optionalMIATypes);

            return(items.Count > 0 ? items[0] : null);
        }