public async Task TestLoadVideo() { var expected = new Video( id: "118abp00925", code: "ABP-925", title: "You Can Really F**k These Girls?! - The Legendary Pink Salon 13 - Get Your Fill Of A Tall Girl With Big T**s!", actresses: new[] { "Reina Kashima" }, genres: new[] { "Tall Girl", "Featured Actress", "Cosplay", "Creampie", "Sex Toys", "Hi-Def" }, studio: "Prestige", boxArt: "https://pics.r18.com/digital/video/118abp00925/118abp00925pl.jpg", cover: "https://pics.r18.com/digital/video/118abp00925/118abp00925ps.jpg", releaseDate: DateTime.Parse("2019-11-22") ); var result = await client.LoadVideo("118abp00925"); Assert.AreEqual(expected, result); }
public async Task TestLoadVideoNoActress() { var expected = new Video( id: "njvr00023", code: "NJVR-023", title: "[VR] The Horn Dogs Chose My Apartment To Be Their F**k Pad. My Friend Was A Nampa Artist And He Brought Over Tsubasa-chan For Some Lotion Lathered Slick And Slippery F*****g", actresses: Array.Empty <string>(), genres: new[] { "Beautiful Girl", "Big T**s", "Threesome / Foursome", "Lotion", "POV", "VR Exclusive" }, studio: "Nanpa JAPAN", boxArt: "https://pics.r18.com/digital/video/njvr00023/njvr00023pl.jpg", cover: "https://pics.r18.com/digital/video/njvr00023/njvr00023ps.jpg", releaseDate: DateTime.Parse("2019-07-26")); var result = await R18Client.LoadVideo("njvr00023").ConfigureAwait(false); Assert.AreEqual(expected, result); }
public async Task TestLoadVideo() { var expected = new Video( id: "ssni00643", code: "SSNI-643", title: "A Woman With Divine Titties Lala Anzai Her Adult Video Debut Miraculous Huge T**s A 7-Tit-Jamming Special", actresses: new[] { "Rara Anzai" }, genres: new[] { "Big T**s", "Big T**s Lover", "Featured Actress", "Titty F**k", "Debut", "Minimal Mosaic", "Hi-Def" }, studio: "S1 NO.1 STYLE", boxArt: "https://pics.r18.com/digital/video/ssni00643/ssni00643pl.jpg", cover: "https://pics.r18.com/digital/video/ssni00643/ssni00643ps.jpg", releaseDate: DateTime.Parse("2019-11-30 10:00:59")); var result = await R18Client.LoadVideo("ssni00643").ConfigureAwait(false); Assert.AreEqual(expected, result); }
/// <inheritdoc /> public async Task <MetadataResult <Movie> > GetMetadata(MovieInfo info, CancellationToken cancelToken) { var originalTitle = Utility.GetVideoOriginalTitle(info, this.libraryManager); info.Name = originalTitle; this.logger.LogInformation("[JellyfinJav] R18 - Scanning: " + originalTitle); Api.Video?video; if (info.ProviderIds.ContainsKey("R18")) { video = await R18Client.LoadVideo(info.ProviderIds["R18"]).ConfigureAwait(false); } else { var code = Utility.ExtractCodeFromFilename(originalTitle); if (code is null) { return(new MetadataResult <Movie>()); } video = await R18Client.SearchFirst(code).ConfigureAwait(false); } if (!video.HasValue) { return(new MetadataResult <Movie>()); } return(new MetadataResult <Movie> { Item = new Movie { OriginalTitle = info.Name, Name = Utility.CreateVideoDisplayName(video.Value), PremiereDate = video.Value.ReleaseDate, ProviderIds = new Dictionary <string, string> { { "R18", video.Value.Id } }, Studios = new[] { video.Value.Studio }, Genres = video.Value.Genres.ToArray(), }, People = CreateActressList(video.Value), HasMetadata = true, }); }
public async Task TestLoadVideoInvalid() { var result = await R18Client.LoadVideo("invalid").ConfigureAwait(false); Assert.AreEqual(null, result); }