コード例 #1
0
        static void Main(string[] args)
        {
            new Plugin(null, null);

            var provider = new SubdivXProvider(new Logger(), new JsonSerializer(), new MediaLibrary());

            TestDownload(provider, new SubtitleSearchRequest()
            {
                SeriesName               = "Dexter: New Blood",
                ParentIndexNumber        = 1,
                IndexNumber              = 1,
                ContentType              = VideoContentType.Episode,
                TwoLetterISOLanguageName = "ES"
            });

            TestDownload(provider, new SubtitleSearchRequest()
            {
                SeriesName               = "The Batman",
                ParentIndexNumber        = 4,
                IndexNumber              = 6,
                ContentType              = VideoContentType.Episode,
                TwoLetterISOLanguageName = "ES"
            });

            TestDownload(provider, new SubtitleSearchRequest()
            {
                Name                     = "The Avengers",
                ProductionYear           = 2012,
                ContentType              = VideoContentType.Movie,
                TwoLetterISOLanguageName = "ES",
            });

            Console.WriteLine("Done");
        }
コード例 #2
0
        private static void TestDownload(SubdivXProvider provider, SubtitleSearchRequest request)
        {
            var subtitles = provider.Search(request, CancellationToken.None).GetAwaiter().GetResult();

            var item0 = (subtitles as List <MediaBrowser.Model.Providers.RemoteSubtitleInfo>)[0];

            var subtitle = provider.GetSubtitles(item0.Id, CancellationToken.None).GetAwaiter().GetResult();
        }