mirror of
https://github.com/C9Glax/tranga.git
synced 2025-04-14 04:13:18 +02:00
Provide Method to validate URL for GetMangaFromUrl
This commit is contained in:
parent
6909c367e5
commit
b24d2e12fc
@ -1,5 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.RegularExpressions;
|
||||
using API.MangaDownloadClients;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Newtonsoft.Json;
|
||||
@ -39,4 +40,6 @@ public abstract class MangaConnector(string name, string[] supportedLanguages, s
|
||||
}
|
||||
|
||||
internal abstract string[] GetChapterImageUrls(Chapter chapter);
|
||||
|
||||
protected bool ValidateUrl(string url) => BaseUris.Any(baseUri => Regex.IsMatch(url, "https?://" + baseUri + "/.*"));
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user