diff options
| author | Jake Mannens <jake@asger.xyz> | 2026-06-05 00:27:20 +1000 |
|---|---|---|
| committer | Jake Mannens <jake@asger.xyz> | 2026-06-11 01:16:00 +1000 |
| commit | c1335c865e3dd1d993e26df03fa79c353954ca75 (patch) | |
| tree | b6c6f3c91c8786eba616c73ed75e75f8a6cf0de3 /Services/SourceService.cs | |
| parent | f78be44d0cd8f73510335bd543207d414b003d37 (diff) | |
Removed client-side services
Diffstat (limited to 'Services/SourceService.cs')
| -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; - } -} |
