fix: fix formatting, refs NOISSUE
This commit is contained in:
parent
c0bee8fd3c
commit
4b18003aa8
@ -3,10 +3,10 @@ using song_of_the_day;
|
|||||||
|
|
||||||
public class LinkPreviewAttachment
|
public class LinkPreviewAttachment
|
||||||
{
|
{
|
||||||
public string Url { get; set; }
|
public required string Url { get; set; }
|
||||||
public string Title { get; set; }
|
public required string Title { get; set; }
|
||||||
public string Description { get; set; }
|
public required string Description { get; set; }
|
||||||
public string Base64Image { get; set; }
|
public required string Base64Image { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SignalIntegration
|
public class SignalIntegration
|
||||||
|
@ -17,13 +17,14 @@ public class IndexModel : PageModel
|
|||||||
[BindProperty]
|
[BindProperty]
|
||||||
public List<SongSuggestion> SongSuggestions { get; set; } = new List<SongSuggestion>();
|
public List<SongSuggestion> SongSuggestions { get; set; } = new List<SongSuggestion>();
|
||||||
|
|
||||||
public async Task OnGet()
|
public Task OnGet()
|
||||||
{
|
{
|
||||||
using var dci = DataContext.Instance;
|
using var dci = DataContext.Instance;
|
||||||
this.SongSuggestions = dci.SongSuggestions.OrderByDescending(s => s.Date)
|
SongSuggestions = dci.SongSuggestions.OrderByDescending(s => s.Date)
|
||||||
.Take(50)
|
.Take(50)
|
||||||
.Include(s => s.Song)
|
.Include(s => s.Song)
|
||||||
.Include(s => s.User)
|
.Include(s => s.User)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
public class SongPartialModel
|
public class SongPartialModel
|
||||||
{
|
{
|
||||||
public Song InnerSong { get; set; }
|
public required Song InnerSong { get; set; }
|
||||||
|
|
||||||
public string? Artist => InnerSong.Artist;
|
public string? Artist => InnerSong.Artist;
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ public class SongSubmissionModel : PageModel
|
|||||||
public bool IsPageReadonly { get; set; } = false;
|
public bool IsPageReadonly { get; set; } = false;
|
||||||
|
|
||||||
[BindProperty]
|
[BindProperty]
|
||||||
public SuggestionHelper SuggestionHelper { get; set; } = null;
|
public SuggestionHelper? SuggestionHelper { get; set; } = null;
|
||||||
|
|
||||||
[BindProperty]
|
[BindProperty]
|
||||||
public List<SongSuggestion> UserSongSubmissions { get; set; } = [];
|
public List<SongSuggestion> UserSongSubmissions { get; set; } = [];
|
||||||
|
@ -24,7 +24,7 @@ public class UnclaimedPhoneNumbersModel : PageModel
|
|||||||
{
|
{
|
||||||
using (var dci = DataContext.Instance)
|
using (var dci = DataContext.Instance)
|
||||||
{
|
{
|
||||||
this.UnclaimedUsers = dci.Users == null ? new List<User>(): dci.Users.Where(u => string.IsNullOrEmpty(u.LdapUserName)).ToList();
|
this.UnclaimedUsers = dci.Users == null ? new List<User>() : dci.Users.Where(u => string.IsNullOrEmpty(u.LdapUserName)).ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
public class Base64UrlImageBuilder
|
public class Base64UrlImageBuilder
|
||||||
{
|
{
|
||||||
public string ContentType { set; get; }
|
public required string ContentType { set; get; }
|
||||||
|
|
||||||
public string Url
|
public string Url
|
||||||
{
|
{
|
||||||
@ -13,7 +13,7 @@ public class Base64UrlImageBuilder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private string FileContents { get; set; }
|
private required string FileContents { get; set; }
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@ public class SpotifyValidator : UriBasedSongValidatorBase
|
|||||||
public override string UriValidatorRegex => @"^(https?://)?open.spotify.com/track/([a-zA-Z0-9_-]{22})(\?si=[a-zA-Z0-9_-]+)?$";
|
public override string UriValidatorRegex => @"^(https?://)?open.spotify.com/track/([a-zA-Z0-9_-]{22})(\?si=[a-zA-Z0-9_-]+)?$";
|
||||||
|
|
||||||
public SpotifyValidator(ILogger _logger, SpotifyApiClient spotifyApiClient) : base(_logger, spotifyApiClient)
|
public SpotifyValidator(ILogger _logger, SpotifyApiClient spotifyApiClient) : base(_logger, spotifyApiClient)
|
||||||
{}
|
{ }
|
||||||
|
|
||||||
public override Task<bool> CanExtractSongMetadataAsync(Uri songUri)
|
public override Task<bool> CanExtractSongMetadataAsync(Uri songUri)
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,7 @@ public abstract class UriBasedSongValidatorBase : SongValidatorBase
|
|||||||
public abstract string UriValidatorRegex { get; }
|
public abstract string UriValidatorRegex { get; }
|
||||||
|
|
||||||
public UriBasedSongValidatorBase(ILogger logger, SpotifyApiClient spotifyApiClient) : base(logger, spotifyApiClient)
|
public UriBasedSongValidatorBase(ILogger logger, SpotifyApiClient spotifyApiClient) : base(logger, spotifyApiClient)
|
||||||
{}
|
{ }
|
||||||
|
|
||||||
public Match GetUriMatch(Uri songUri)
|
public Match GetUriMatch(Uri songUri)
|
||||||
{
|
{
|
||||||
|
@ -14,9 +14,9 @@ public class YoutubeValidator : UriBasedSongValidatorBase
|
|||||||
|
|
||||||
public override string UriValidatorRegex => @"^(https?://)?(www\.)?(youtube\.com/watch\?v=|youtu\.be/)([a-zA-Z0-9_-]{11})";
|
public override string UriValidatorRegex => @"^(https?://)?(www\.)?(youtube\.com/watch\?v=|youtu\.be/)([a-zA-Z0-9_-]{11})";
|
||||||
|
|
||||||
public override async Task<bool> CanExtractSongMetadataAsync(Uri songUri)
|
public override Task<bool> CanExtractSongMetadataAsync(Uri songUri)
|
||||||
{
|
{
|
||||||
return this.CanValidateUri(songUri);
|
return Task.FromResult(this.CanValidateUri(songUri));
|
||||||
}
|
}
|
||||||
|
|
||||||
public override SongProvider GetSongProvider()
|
public override SongProvider GetSongProvider()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user