Merge pull request #158 from db-2001/cuttingedge
Reimplement Fix for Mangasee
This commit is contained in:
commit
051eb4a417
@ -19,7 +19,7 @@ public readonly struct Chapter : IComparable
|
|||||||
public string fileName { get; }
|
public string fileName { get; }
|
||||||
|
|
||||||
private static readonly Regex LegalCharacters = new (@"([A-z]*[0-9]* *\.*-*,*\]*\[*'*\'*\)*\(*~*!*)*");
|
private static readonly Regex LegalCharacters = new (@"([A-z]*[0-9]* *\.*-*,*\]*\[*'*\'*\)*\(*~*!*)*");
|
||||||
private static readonly Regex IllegalStrings = new(@"Vol(ume)?.?", RegexOptions.IgnoreCase);
|
private static readonly Regex IllegalStrings = new(@"(Vol(ume)?|Ch(apter)?)\.?", RegexOptions.IgnoreCase);
|
||||||
private static readonly Regex Digits = new(@"[0-9\.]*");
|
private static readonly Regex Digits = new(@"[0-9\.]*");
|
||||||
public Chapter(Manga parentManga, string? name, string? volumeNumber, string chapterNumber, string url)
|
public Chapter(Manga parentManga, string? name, string? volumeNumber, string chapterNumber, string url)
|
||||||
{
|
{
|
||||||
|
@ -241,6 +241,15 @@ public abstract class MangaConnector : GlobalBase
|
|||||||
|
|
||||||
int chapter = 0;
|
int chapter = 0;
|
||||||
//Download all Images to temporary Folder
|
//Download all Images to temporary Folder
|
||||||
|
if (imageUrls.Length == 0)
|
||||||
|
{
|
||||||
|
Log("No images found");
|
||||||
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||||
|
File.SetUnixFileMode(saveArchiveFilePath, UserRead | UserWrite | UserExecute | GroupRead | GroupWrite | GroupExecute);
|
||||||
|
Directory.Delete(tempFolder, true);
|
||||||
|
progressToken?.Complete();
|
||||||
|
return HttpStatusCode.NoContent;
|
||||||
|
}
|
||||||
foreach (string imageUrl in imageUrls)
|
foreach (string imageUrl in imageUrls)
|
||||||
{
|
{
|
||||||
string extension = imageUrl.Split('.')[^1].Split('?')[0];
|
string extension = imageUrl.Split('.')[^1].Split('?')[0];
|
||||||
|
@ -199,8 +199,8 @@ public class Mangasee : MangaConnector
|
|||||||
string? volumeNumber = m.Groups[2].Success ? m.Groups[2].Value : "1";
|
string? volumeNumber = m.Groups[2].Success ? m.Groups[2].Value : "1";
|
||||||
string chapterNumber = m.Groups[1].Value;
|
string chapterNumber = m.Groups[1].Value;
|
||||||
|
|
||||||
url = string.Concat(Regex.Match(url, @"(.*)-page-[0-9]+(\.html)").Groups.Values.Select(v => v.Value));
|
string chapterUrl = Regex.Replace(url, @"-page-[0-9]+(\.html)", ".html");
|
||||||
chapters.Add(new Chapter(manga, "", volumeNumber, chapterNumber, url));
|
chapters.Add(new Chapter(manga, "", volumeNumber, chapterNumber, chapterUrl));
|
||||||
}
|
}
|
||||||
|
|
||||||
//Return Chapters ordered by Chapter-Number
|
//Return Chapters ordered by Chapter-Number
|
||||||
|
Loading…
Reference in New Issue
Block a user