public override void ResolveEntity(IMediaLocation location, out BaseItemFactory factory, out IEnumerable <InitializationParameter> setup) { factory = null; setup = null; if (!location.IsHidden()) { bool isFolder = !Path.HasExtension(location.Path); bool containsIfo = false; bool isDvd = isFolder ? IsDvd(location, out containsIfo) : false; bool isIso = isFolder ? false : Helper.IsIso(location.Path); bool isBD = isFolder ? Helper.IsBluRayFolder(location.Path, null) : false; bool isVideo = !(location is IFolderMediaLocation) && (isIso || isBD || Helper.IsVideo(location.Path) || location.IsVob()); if ((isDvd || isBD || isVideo) && TVUtils.IsEpisode(location.Path)) { if (isBD) { setup = new List <InitializationParameter>() { new MediaTypeInitializationParameter() { MediaType = MediaType.BluRay } }; } else if (containsIfo || isIso) { MediaType mt = isIso ? MediaType.ISO : MediaType.DVD; setup = new List <InitializationParameter>() { new MediaTypeInitializationParameter() { MediaType = mt } }; } else if (isVideo) { MediaType mt = location.GetVideoMediaType(); setup = new List <InitializationParameter>() { new MediaTypeInitializationParameter() { MediaType = mt } }; } factory = BaseItemFactory <Episode> .Instance; } } }
public override void ResolveEntity(IMediaLocation location, out BaseItemFactory factory, out IEnumerable <InitializationParameter> setup) { factory = null; setup = null; bool isMovie = false; MediaType mediaType = MediaType.Unknown; List <IMediaLocation> volumes = null; if (location.IsHidden()) { return; } var folder = location as IFolderMediaLocation; if (folder != null && !folder.ContainsChild(FolderResolver.IGNORE_FOLDER) && folder.Name.ToUpper() != TrailersPath) { DetectFolderWhichIsMovie(folder, out isMovie, out mediaType, out volumes); } else { if (location.IsIso()) { isMovie = true; mediaType = MediaType.ISO; } else { isMovie = location.IsVideo(); if (isMovie) { mediaType = location.GetVideoMediaType(); } } } if (isMovie) { factory = BaseItemFactory <Movie> .Instance; setup = new List <InitializationParameter>() { new MediaTypeInitializationParameter() { MediaType = mediaType } }; if (volumes != null && volumes.Count > 0) { (setup as List <InitializationParameter>).Add(new MovieVolumeInitializationParameter() { Volumes = volumes }); } } }
public override void ResolveEntity(IMediaLocation location, out BaseItemFactory factory, out IEnumerable<InitializationParameter> setup) { factory = null; setup = null; if (!location.IsHidden() && location.IsVodcast()) { factory = BaseItemFactory<VodCast>.Instance; } }
public override void ResolveEntity(IMediaLocation location, out BaseItemFactory factory, out IEnumerable <InitializationParameter> setup) { factory = null; setup = null; if (!location.IsHidden() && location.IsVodcast()) { factory = BaseItemFactory <VodCast> .Instance; } }
public override void ResolveEntity(IMediaLocation location, out BaseItemFactory factory, out IEnumerable<InitializationParameter> setup) { factory = null; setup = null; if (location is IFolderMediaLocation && !location.IsHidden() && TVUtils.IsSeasonFolder(location.Path)) { factory = BaseItemFactory<Season>.Instance; } }
public override void ResolveEntity(IMediaLocation location, out BaseItemFactory factory, out IEnumerable <InitializationParameter> setup) { factory = null; setup = null; if (location is IFolderMediaLocation && !location.IsHidden() && TVUtils.IsSeasonFolder(location.Path)) { factory = BaseItemFactory <Season> .Instance; } }
public override void ResolveEntity(IMediaLocation location, out BaseItemFactory factory, out IEnumerable<InitializationParameter> setup) { factory = null; setup = null; if (!location.IsHidden()) { bool isFolder = !Path.HasExtension(location.Path); bool containsIfo = false; bool isDvd = isFolder ? IsDvd(location, out containsIfo) : false; bool isIso = isFolder ? false : Helper.IsIso(location.Path); bool isBD = isFolder ? Helper.IsBluRayFolder(location.Path, null) : false; bool isVideo = !(location is IFolderMediaLocation) && (isIso || isBD || Helper.IsVideo(location.Path) || location.IsVob()); if ( (isDvd || isBD || isVideo ) && TVUtils.IsEpisode(location.Path)) { if (isBD) { setup = new List<InitializationParameter>() { new MediaTypeInitializationParameter() {MediaType = MediaType.BluRay} }; } else if (containsIfo || isIso) { MediaType mt = isIso ? MediaType.ISO : MediaType.DVD; setup = new List<InitializationParameter>() { new MediaTypeInitializationParameter() {MediaType = mt} }; } else if (isVideo) { MediaType mt = location.GetVideoMediaType(); setup = new List<InitializationParameter>() { new MediaTypeInitializationParameter() {MediaType = mt} }; } factory = BaseItemFactory<Episode>.Instance; } } }
public override void ResolveEntity(IMediaLocation location, out BaseItemFactory factory, out IEnumerable<InitializationParameter> setup) { factory = null; setup = null; bool isMovie = false; MediaType mediaType = MediaType.Unknown; List<IMediaLocation> volumes = null; if (location.IsHidden()) return; var folder = location as IFolderMediaLocation; if (folder != null && !folder.ContainsChild(FolderResolver.IGNORE_FOLDER) && folder.Name.ToUpper() != TrailersPath) { DetectFolderWhichIsMovie(folder, out isMovie, out mediaType, out volumes); } else { if (location.IsIso()) { isMovie = true; mediaType = MediaType.ISO; } else { isMovie = location.IsVideo(); if (isMovie) mediaType = location.GetVideoMediaType(); } } if (isMovie) { factory = BaseItemFactory<Movie>.Instance; setup = new List<InitializationParameter>() { new MediaTypeInitializationParameter() {MediaType = mediaType} }; if (volumes != null && volumes.Count > 0) { (setup as List<InitializationParameter>).Add(new MovieVolumeInitializationParameter() { Volumes = volumes }); } } }