mirror of
https://github.com/C9Glax/tranga.git
synced 2025-07-03 09:24:16 +02:00
Compare commits
6 Commits
adbbe3f6cc
...
v1.2
Author | SHA1 | Date | |
---|---|---|---|
1cd819b21d | |||
27afedc1b4 | |||
fac0a3f7eb | |||
03ca480fe8 | |||
c2915468a5 | |||
8805c53cb8 |
@ -54,6 +54,7 @@
|
|||||||
Tranga can download Chapters and Metadata from Scanlation sites such as
|
Tranga can download Chapters and Metadata from Scanlation sites such as
|
||||||
|
|
||||||
- [MangaDex.org](https://mangadex.org/)
|
- [MangaDex.org](https://mangadex.org/)
|
||||||
|
- [Manganato.com](https://manganato.com/)
|
||||||
|
|
||||||
and automatically start updates in [Komga](https://komga.org/) to import them.
|
and automatically start updates in [Komga](https://komga.org/) to import them.
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ public class Manganato : Connector
|
|||||||
Dictionary<string, string>? links = null;
|
Dictionary<string, string>? links = null;
|
||||||
HashSet<string> tags = new();
|
HashSet<string> tags = new();
|
||||||
string? author = null, originalLanguage = null;
|
string? author = null, originalLanguage = null;
|
||||||
int? year = null;
|
int? year = DateTime.Now.Year;
|
||||||
|
|
||||||
HtmlNode infoNode = document.DocumentNode.Descendants("div").First(d => d.HasClass("story-info-right"));
|
HtmlNode infoNode = document.DocumentNode.Descendants("div").First(d => d.HasClass("story-info-right"));
|
||||||
|
|
||||||
@ -114,8 +114,13 @@ public class Manganato : Connector
|
|||||||
|
|
||||||
string description = document.DocumentNode.Descendants("div").First(d => d.HasClass("panel-story-info-description"))
|
string description = document.DocumentNode.Descendants("div").First(d => d.HasClass("panel-story-info-description"))
|
||||||
.InnerText.Replace("Description :", "");
|
.InnerText.Replace("Description :", "");
|
||||||
|
while (description.StartsWith('\n'))
|
||||||
|
description = description.Substring(1);
|
||||||
|
|
||||||
|
string yearString = document.DocumentNode.Descendants("li").Last(li => li.HasClass("a-h")).Descendants("span")
|
||||||
|
.First(s => s.HasClass("chapter-time")).InnerText;
|
||||||
|
year = Convert.ToInt32(yearString.Split(',')[^1]) + 2000;
|
||||||
|
|
||||||
return new Publication(sortName, author, description, altTitles, tags.ToArray(), posterUrl, coverFileNameInCache, links,
|
return new Publication(sortName, author, description, altTitles, tags.ToArray(), posterUrl, coverFileNameInCache, links,
|
||||||
year, originalLanguage, status, publicationId);
|
year, originalLanguage, status, publicationId);
|
||||||
}
|
}
|
||||||
@ -123,7 +128,7 @@ public class Manganato : Connector
|
|||||||
public override Chapter[] GetChapters(Publication publication, string language = "")
|
public override Chapter[] GetChapters(Publication publication, string language = "")
|
||||||
{
|
{
|
||||||
logger?.WriteLine(this.GetType().ToString(), $"Getting Chapters for {publication.sortName} {publication.internalId} (language={language})");
|
logger?.WriteLine(this.GetType().ToString(), $"Getting Chapters for {publication.sortName} {publication.internalId} (language={language})");
|
||||||
string requestUrl = $"https://manganato.com/{publication.publicationId}";
|
string requestUrl = $"https://chapmanganato.com/{publication.publicationId}";
|
||||||
DownloadClient.RequestResult requestResult =
|
DownloadClient.RequestResult requestResult =
|
||||||
downloadClient.MakeRequest(requestUrl, (byte)1);
|
downloadClient.MakeRequest(requestUrl, (byte)1);
|
||||||
if (requestResult.statusCode != HttpStatusCode.OK)
|
if (requestResult.statusCode != HttpStatusCode.OK)
|
||||||
|
@ -95,9 +95,9 @@ public readonly struct Publication
|
|||||||
{
|
{
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.year = year;
|
this.year = year;
|
||||||
if(status == "ongoing" || status == "hiatus")
|
if(status.ToLower() == "ongoing" || status.ToLower() == "hiatus")
|
||||||
this.status = "Continuing";
|
this.status = "Continuing";
|
||||||
else if (status == "completed" || status == "cancelled")
|
else if (status.ToLower() == "completed" || status.ToLower() == "cancelled")
|
||||||
this.status = "Ended";
|
this.status = "Ended";
|
||||||
else
|
else
|
||||||
this.status = status;
|
this.status = status;
|
||||||
|
@ -17,4 +17,5 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 9555:80
|
- 9555:80
|
||||||
depends_on:
|
depends_on:
|
||||||
- tranga-api
|
- tranga-api
|
||||||
|
restart: unless-stopped
|
Reference in New Issue
Block a user