diff options
| author | Jake Mannens <jake@asger.xyz> | 2026-06-05 00:27:20 +1000 |
|---|---|---|
| committer | Jake Mannens <jake@asger.xyz> | 2026-06-15 10:39:34 +1000 |
| commit | 900a52617efe69266d44f2bd02b22718501d753a (patch) | |
| tree | ae0e9540749996fd99874e755c9a6ffb1d22acd8 | |
| parent | fc95c7c72a46119908e7f42a13d96507d77626ea (diff) | |
Removed client-side services
| -rw-r--r-- | Services/SourceService.cs | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/Services/SourceService.cs b/Services/SourceService.cs deleted file mode 100644 index d145346..0000000 --- a/Services/SourceService.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Text.RegularExpressions; - -namespace HyperBooru.Services; - -public interface ISourceService { - public string? GetUrlFromFilename(string filename); -} - -public class SourceService : ISourceService { - private Regex PixivRegex = - new(@"^([0-9]+)_p[0-9]+(_master1200)?\.[^.]+$", RegexOptions.Compiled); - - public string? GetUrlFromFilename(string filename) { - var pixivMatch = PixivRegex.Match(filename); - if(pixivMatch.Success) - return $"https://pixiv.net/en/artworks/{pixivMatch.Groups[1].Value}"; - - return null; - } -} |
