Compare commits
No commits in common. "a20ee01cfa6c31f41511b0752a921f080636256c" and "fdea3659f1c9b3f63a93af8835a4573aea75002e" have entirely different histories.
a20ee01cfa
...
fdea3659f1
@ -2,10 +2,9 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<LangVersion>12</LangVersion>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
ARG DOTNET=8.0
|
ARG DOTNET=7.0
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/runtime:$DOTNET AS base
|
FROM mcr.microsoft.com/dotnet/runtime:$DOTNET AS base
|
||||||
WORKDIR /publish
|
WORKDIR /publish
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<LangVersion>12</LangVersion>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -8,7 +8,7 @@ namespace Tranga.MangaConnectors;
|
|||||||
public class Bato : MangaConnector
|
public class Bato : MangaConnector
|
||||||
{
|
{
|
||||||
|
|
||||||
public Bato(GlobalBase clone) : base(clone, "Bato", ["en"])
|
public Bato(GlobalBase clone) : base(clone, "Bato")
|
||||||
{
|
{
|
||||||
this.downloadClient = new HttpDownloadClient(clone);
|
this.downloadClient = new HttpDownloadClient(clone);
|
||||||
}
|
}
|
||||||
|
@ -14,12 +14,10 @@ namespace Tranga.MangaConnectors;
|
|||||||
public abstract class MangaConnector : GlobalBase
|
public abstract class MangaConnector : GlobalBase
|
||||||
{
|
{
|
||||||
internal DownloadClient downloadClient { get; init; } = null!;
|
internal DownloadClient downloadClient { get; init; } = null!;
|
||||||
protected string[] SupportedLanguages;
|
|
||||||
|
|
||||||
protected MangaConnector(GlobalBase clone, string name, string[] supportedLanguages) : base(clone)
|
protected MangaConnector(GlobalBase clone, string name) : base(clone)
|
||||||
{
|
{
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.SupportedLanguages = supportedLanguages;
|
|
||||||
Directory.CreateDirectory(TrangaSettings.coverImageCache);
|
Directory.CreateDirectory(TrangaSettings.coverImageCache);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,17 +7,14 @@ using JsonSerializer = System.Text.Json.JsonSerializer;
|
|||||||
namespace Tranga.MangaConnectors;
|
namespace Tranga.MangaConnectors;
|
||||||
public class MangaDex : MangaConnector
|
public class MangaDex : MangaConnector
|
||||||
{
|
{
|
||||||
//https://api.mangadex.org/docs/3-enumerations/#language-codes--localization
|
public MangaDex(GlobalBase clone) : base(clone, "MangaDex")
|
||||||
//https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes
|
|
||||||
//https://gist.github.com/Josantonius/b455e315bc7f790d14b136d61d9ae469
|
|
||||||
public MangaDex(GlobalBase clone) : base(clone, "MangaDex", ["en","pt","pt-br","it","de","ru","aa","ab","ae","af","ak","am","an","ar-ae","ar-bh","ar-dz","ar-eg","ar-iq","ar-jo","ar-kw","ar-lb","ar-ly","ar-ma","ar-om","ar-qa","ar-sa","ar-sy","ar-tn","ar-ye","ar","as","av","ay","az","ba","be","bg","bh","bi","bm","bn","bo","br","bs","ca","ce","ch","co","cr","cs","cu","cv","cy","da","de-at","de-ch","de-de","de-li","de-lu","div","dv","dz","ee","el","en-au","en-bz","en-ca","en-cb","en-gb","en-ie","en-jm","en-nz","en-ph","en-tt","en-us","en-za","en-zw","eo","es-ar","es-bo","es-cl","es-co","es-cr","es-do","es-ec","es-es","es-gt","es-hn","es-la","es-mx","es-ni","es-pa","es-pe","es-pr","es-py","es-sv","es-us","es-uy","es-ve","es","et","eu","fa","ff","fi","fj","fo","fr-be","fr-ca","fr-ch","fr-fr","fr-lu","fr-mc","fr","fy","ga","gd","gl","gn","gu","gv","ha","he","hi","ho","hr-ba","hr-hr","hr","ht","hu","hy","hz","ia","id","ie","ig","ii","ik","in","io","is","it-ch","it-it","iu","iw","ja","ja-ro","ji","jv","jw","ka","kg","ki","kj","kk","kl","km","kn","ko","ko-ro","kr","ks","ku","kv","kw","ky","kz","la","lb","lg","li","ln","lo","ls","lt","lu","lv","mg","mh","mi","mk","ml","mn","mo","mr","ms-bn","ms-my","ms","mt","my","na","nb","nd","ne","ng","nl-be","nl-nl","nl","nn","no","nr","ns","nv","ny","oc","oj","om","or","os","pa","pi","pl","ps","pt-pt","qu-bo","qu-ec","qu-pe","qu","rm","rn","ro","rw","sa","sb","sc","sd","se-fi","se-no","se-se","se","sg","sh","si","sk","sl","sm","sn","so","sq","sr-ba","sr-sp","sr","ss","st","su","sv-fi","sv-se","sv","sw","sx","syr","ta","te","tg","th","ti","tk","tl","tn","to","tr","ts","tt","tw","ty","ug","uk","ur","us","uz","ve","vi","vo","wa","wo","xh","yi","yo","za","zh-cn","zh-hk","zh-mo","zh-ro","zh-sg","zh-tw","zh","zu"])
|
|
||||||
{
|
{
|
||||||
this.downloadClient = new HttpDownloadClient(clone);
|
this.downloadClient = new HttpDownloadClient(clone);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Manga[] GetManga(string publicationTitle = "")
|
public override Manga[] GetManga(string publicationTitle = "")
|
||||||
{
|
{
|
||||||
Log($"Searching Publications. Term={publicationTitle}");
|
Log($"Searching Publications. Term=\"{publicationTitle}\"");
|
||||||
const int limit = 100; //How many values we want returned at once
|
const int limit = 100; //How many values we want returned at once
|
||||||
int offset = 0; //"Page"
|
int offset = 0; //"Page"
|
||||||
int total = int.MaxValue; //How many total results are there, is updated on first request
|
int total = int.MaxValue; //How many total results are there, is updated on first request
|
||||||
@ -57,7 +54,7 @@ public class MangaDex : MangaConnector
|
|||||||
if(MangaFromJsonObject(mangaNode.AsObject()) is { } manga)
|
if(MangaFromJsonObject(mangaNode.AsObject()) is { } manga)
|
||||||
retManga.Add(manga); //Add Publication (Manga) to result
|
retManga.Add(manga); //Add Publication (Manga) to result
|
||||||
}
|
}
|
||||||
Log($"Retrieved {retManga.Count} publications. Term={publicationTitle}");
|
Log($"Retrieved {retManga.Count} publications. Term=\"{publicationTitle}\"");
|
||||||
return retManga.ToArray();
|
return retManga.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ namespace Tranga.MangaConnectors;
|
|||||||
|
|
||||||
public class MangaHere : MangaConnector
|
public class MangaHere : MangaConnector
|
||||||
{
|
{
|
||||||
public MangaHere(GlobalBase clone) : base(clone, "MangaHere", ["en"])
|
public MangaHere(GlobalBase clone) : base(clone, "MangaHere")
|
||||||
{
|
{
|
||||||
this.downloadClient = new ChromiumDownloadClient(clone);
|
this.downloadClient = new ChromiumDownloadClient(clone);
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ namespace Tranga.MangaConnectors;
|
|||||||
|
|
||||||
public class MangaKatana : MangaConnector
|
public class MangaKatana : MangaConnector
|
||||||
{
|
{
|
||||||
public MangaKatana(GlobalBase clone) : base(clone, "MangaKatana", ["en"])
|
public MangaKatana(GlobalBase clone) : base(clone, "MangaKatana")
|
||||||
{
|
{
|
||||||
this.downloadClient = new HttpDownloadClient(clone);
|
this.downloadClient = new HttpDownloadClient(clone);
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ namespace Tranga.MangaConnectors;
|
|||||||
|
|
||||||
public class MangaLife : MangaConnector
|
public class MangaLife : MangaConnector
|
||||||
{
|
{
|
||||||
public MangaLife(GlobalBase clone) : base(clone, "Manga4Life", ["en"])
|
public MangaLife(GlobalBase clone) : base(clone, "Manga4Life")
|
||||||
{
|
{
|
||||||
this.downloadClient = new ChromiumDownloadClient(clone);
|
this.downloadClient = new ChromiumDownloadClient(clone);
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ namespace Tranga.MangaConnectors;
|
|||||||
|
|
||||||
public class Manganato : MangaConnector
|
public class Manganato : MangaConnector
|
||||||
{
|
{
|
||||||
public Manganato(GlobalBase clone) : base(clone, "Manganato", ["en"])
|
public Manganato(GlobalBase clone) : base(clone, "Manganato")
|
||||||
{
|
{
|
||||||
this.downloadClient = new HttpDownloadClient(clone);
|
this.downloadClient = new HttpDownloadClient(clone);
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ namespace Tranga.MangaConnectors;
|
|||||||
|
|
||||||
public class Mangasee : MangaConnector
|
public class Mangasee : MangaConnector
|
||||||
{
|
{
|
||||||
public Mangasee(GlobalBase clone) : base(clone, "Mangasee", ["en"])
|
public Mangasee(GlobalBase clone) : base(clone, "Mangasee")
|
||||||
{
|
{
|
||||||
this.downloadClient = new ChromiumDownloadClient(clone);
|
this.downloadClient = new ChromiumDownloadClient(clone);
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ namespace Tranga.MangaConnectors;
|
|||||||
|
|
||||||
public class Mangaworld: MangaConnector
|
public class Mangaworld: MangaConnector
|
||||||
{
|
{
|
||||||
public Mangaworld(GlobalBase clone) : base(clone, "Mangaworld", ["it"])
|
public Mangaworld(GlobalBase clone) : base(clone, "Mangaworld")
|
||||||
{
|
{
|
||||||
this.downloadClient = new HttpDownloadClient(clone);
|
this.downloadClient = new HttpDownloadClient(clone);
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ namespace Tranga.MangaConnectors;
|
|||||||
|
|
||||||
public class ManhuaPlus : MangaConnector
|
public class ManhuaPlus : MangaConnector
|
||||||
{
|
{
|
||||||
public ManhuaPlus(GlobalBase clone) : base(clone, "ManhuaPlus", ["en"])
|
public ManhuaPlus(GlobalBase clone) : base(clone, "ManhuaPlus")
|
||||||
{
|
{
|
||||||
this.downloadClient = new ChromiumDownloadClient(clone);
|
this.downloadClient = new ChromiumDownloadClient(clone);
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<LangVersion>12</LangVersion>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
Loading…
Reference in New Issue
Block a user