コード例 #1
0
        public void TestImdbSearch()
        {
            var downloader = new SratimDownloader();
            var query      = new ImdbSearchQuery("0372784")
            {
                LanguageCodes = new[] { "heb" }
            };
            var results = downloader.SearchSubtitles(query);

            // make sure there are resuts
            Assert.IsNotNull(results);
            Assert.IsTrue(results.Count > 0);

            // check first result
            var subtitleFiles = downloader.SaveSubtitle(results[10]);

            Assert.AreNotEqual(null, subtitleFiles);
            Assert.AreNotEqual(0, subtitleFiles.Count);
        }
コード例 #2
0
        public void TestExactMovieSearch2()
        {
            var downloader = new SratimDownloader();
            var query      = new SearchQuery("intouchables")
            {
                Year = 2012, LanguageCodes = new[] { "heb" }
            };
            var results = downloader.SearchSubtitles(query);

            // make sure there are resuts
            Assert.IsNotNull(results);
            Assert.IsTrue(results.Count > 0);

            // check first result
            var subtitleFiles = downloader.SaveSubtitle(results[3]);

            Assert.AreNotEqual(null, subtitleFiles);
            Assert.AreNotEqual(0, subtitleFiles.Count);
        }