Esempio n. 1
0
        /// <summary>
        /// When playback is based purely on files, this will take the files that were supplied to the PlayableItem,
        /// and create the actual paths that will be sent to the player
        /// </summary>
        internal override IEnumerable <string> GetPlayableFiles(IEnumerable <string> files)
        {
            foreach (string file in files)
            {
                MediaBrowser.Library.MediaType mediaType = MediaBrowser.Library.MediaTypeResolver.DetermineType(file);

                if (mediaType == Library.MediaType.BluRay)
                {
                    yield return(PlaybackControllerHelper.GetBluRayPath(file));
                }

                yield return(ShouldTranscode ? PlaybackControllerHelper.GetTranscodedPath(file) : file);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Takes a Media object and returns the list of files that will be sent to the player
        /// </summary>
        internal override IEnumerable <string> GetPlayableFiles(Media media)
        {
            IEnumerable <string> files = base.GetPlayableFiles(media);

            Video video = media as Video;

            if (video != null)
            {
                if (video.MediaType == Library.MediaType.BluRay)
                {
                    files = files.Select(i => PlaybackControllerHelper.GetBluRayPath(i));
                }
            }

            return(ShouldTranscode ? files.Select(f => PlaybackControllerHelper.GetTranscodedPath(f)) : files);
        }