Exemplo n.º 1
0
        /// <summary>
        /// Checks if a subtitle already exists for the given video
        /// </summary>
        /// <returns></returns>
        private bool DoesSubtitleExist()
        {
            var localSubtitleFinderFactory = new LocalSubtitleFinderFactory(Plugin.PluginOptions.Instance.ExtendedLogging);
            var localSubtitleFinder        = localSubtitleFinderFactory.CreateLocalSubtitleFinderByVideo(CurrentVideo, Logger.LoggerInstance);

            return(localSubtitleFinder.DoesSubtitleExist());
        }
    public static void DoesSubTitleExist(Item item)
    {
        var video = item.BaseItem as Video;
        if (video == null) return;

        var localSubtitleFinderFactory = new LocalSubtitleFinderFactory(Plugin.PluginOptions.Instance.ExtendedLogging);

        var finder = localSubtitleFinderFactory.CreateLocalSubtitleFinderByVideo(video, Logger.LoggerInstance);

        var subtitleExist = finder.DoesSubtitleExist();
        if (subtitleExist)
        {
            HandleSubtitleAvailable(video);
            return;
        }

        HandleNoSubtitle(video);
    }
        /// <summary>
        /// Checks if a subtitle already exists for the given video
        /// </summary>
        /// <returns></returns>
        private bool DoesSubtitleExist()
        {
            var localSubtitleFinderFactory = new LocalSubtitleFinderFactory(Plugin.PluginOptions.Instance.ExtendedLogging);
            var localSubtitleFinder = localSubtitleFinderFactory.CreateLocalSubtitleFinderByVideo(CurrentVideo, Logger.LoggerInstance);

            return localSubtitleFinder.DoesSubtitleExist();
        }