using MangaReader.Core.HttpService; using MangaReader.Core.Metadata; namespace MangaReader.Core.Sources.MangaDex.Metadata; //public class MangaDexMetadataProvider(IHttpService httpService) : IMangaMetadataProvider, IMangaSourceComponent //{ // public string SourceId => "MangaDex"; // public async Task GetManga(string url) // { // Guid mangaGuid = GetSourceMangaGuid(url); // await GetSomething(mangaGuid); // throw new NotImplementedException(); // } // private static Guid GetSourceMangaGuid(string url) // { // string[] parts = url.Split('/'); // if (parts.Length < 5 || Guid.TryParse(parts[4], out Guid mangaGuid) == false) // { // throw new Exception("Unable to get guid from MangaDex url: " + url); // } // return mangaGuid; // } // private async Task GetSomething(Guid mangaGuid) // { // // https://api.mangadex.org/manga/ee96e2b7-9af2-4864-9656-649f4d3b6fec?includes[]=artist&includes[]=author&includes[]=cover_art // await httpService.GetStringAsync($"https://api.mangadex.org/manga/{mangaGuid}/feed?translatedLanguage[]=en&limit=96&includes[]=scanlation_group&includes[]=user&order[volume]=desc&order[chapter]=desc&offset=0&contentRating[]=safe&contentRating[]=suggestive&contentRating[]=erotica&contentRating[]=pornographic"); // } //}