Compare commits

...

5 Commits

Author SHA1 Message Date
Simon Diesenreiter
8a36606dee release: version 0.4.2 🚀
Some checks failed
CI / linter (9.0.X, ubuntu-latest) (push) Failing after 1m6s
CI / tests_linux (9.0.X, ubuntu-latest) (push) Has been skipped
Build Docker image / Create Release (push) Successful in 9s
Build Docker image / deploy (push) Successful in 1m17s
SonarQube Scan / SonarQube Trigger (push) Failing after 4m48s
2025-06-25 10:02:16 +02:00
Simon Diesenreiter
dfc02f6907 fix: broken build, refs NOISSUE 2025-06-25 10:02:09 +02:00
Simon Diesenreiter
887a8a7b6a release: version 0.4.1 🚀
Some checks failed
Build Docker image / Create Release (push) Successful in 20s
CI / linter (9.0.X, ubuntu-latest) (push) Successful in 1m14s
CI / tests_linux (9.0.X, ubuntu-latest) (push) Failing after 1m30s
SonarQube Scan / SonarQube Trigger (push) Failing after 5m8s
Build Docker image / deploy (push) Failing after 4m56s
2025-06-25 09:48:32 +02:00
Simon Diesenreiter
4b18003aa8 fix: fix formatting, refs NOISSUE 2025-06-25 09:48:27 +02:00
c0bee8fd3c fix: URL type, refs NOISSUE
Some checks failed
CI / linter (9.0.X, ubuntu-latest) (push) Failing after 1m20s
CI / tests_linux (9.0.X, ubuntu-latest) (push) Has been skipped
SonarQube Scan / SonarQube Trigger (push) Failing after 4m48s
2025-06-25 00:42:34 -07:00
12 changed files with 53 additions and 22 deletions

View File

@@ -5,6 +5,26 @@ Changelog
(unreleased)
------------
Fix
~~~
- Broken build, refs NOISSUE. [Simon Diesenreiter]
0.4.1 (2025-06-25)
------------------
Fix
~~~
- Fix formatting, refs NOISSUE. [Simon Diesenreiter]
- URL type, refs NOISSUE. [simon]
Other
~~~~~
0.4.0 (2025-06-04)
------------------
Fix
~~~
- Some cleanup and fixing runtime bugs, refs NOISSUE. [Simon
@@ -274,6 +294,10 @@ Other
0.1.9 (2025-04-15)
------------------
0.1.8 (2025-04-15)
------------------
Fix
~~~
- Additional debug outputs refs NOISSUE. [Simon Diesenreiter]

View File

@@ -3,10 +3,10 @@ using song_of_the_day;
public class LinkPreviewAttachment
{
public string Url { get; set; }
public string Title { get; set; }
public string Description { get; set; }
public string Base64Image { get; set; }
public required string Url { get; set; }
public required string Title { get; set; }
public required string Description { get; set; }
public required string Base64Image { get; set; }
}
public class SignalIntegration

View File

@@ -17,13 +17,14 @@ public class IndexModel : PageModel
[BindProperty]
public List<SongSuggestion> SongSuggestions { get; set; } = new List<SongSuggestion>();
public async Task OnGet()
public Task OnGet()
{
using var dci = DataContext.Instance;
this.SongSuggestions = dci.SongSuggestions.OrderByDescending(s => s.Date)
SongSuggestions = dci.SongSuggestions.OrderByDescending(s => s.Date)
.Take(50)
.Include(s => s.Song)
.Include(s => s.User)
.ToList();
return Task.CompletedTask;
}
}

View File

@@ -1,6 +1,6 @@
public class SongPartialModel
{
public Song InnerSong { get; set; }
public required Song InnerSong { get; set; }
public string? Artist => InnerSong.Artist;

View File

@@ -40,7 +40,7 @@ public class SongSubmissionModel : PageModel
public bool IsPageReadonly { get; set; } = false;
[BindProperty]
public SuggestionHelper SuggestionHelper { get; set; } = null;
public SuggestionHelper? SuggestionHelper { get; set; } = null;
[BindProperty]
public List<SongSuggestion> UserSongSubmissions { get; set; } = [];

View File

@@ -152,7 +152,7 @@ pickOfTheDayTimer.OnOccurence += async (s, ea) =>
await signalIntegration.SendMessageToGroupAsync($"Today's chosen person to share a song is: **{userName}**");
await signalIntegration.SendMessageToUserAsync($"Congratulations, you have been chosen to share a song today!", signalId);
await signalIntegration.SendMessageToUserAsync($"Today's (optional) suggestion helper to help you pick a song is:\n\n**{suggestion.Title}**\n\n*{suggestion.Description}*", signalId);
await signalIntegration.SendMessageToUserAsync($"Please navigate to https://sord.disi.dev/SongSubmission/{newSongSuggestion.Id} to submit your choice!", luckyUser.SignalMemberId);
await signalIntegration.SendMessageToUserAsync($"Please navigate to https://sotd.disi.dev/SongSubmission/{newSongSuggestion.Id} to submit your choice!", luckyUser.SignalMemberId);
}
await dci.DisposeAsync();
};

View File

@@ -1,6 +1,6 @@
public class Base64UrlImageBuilder
{
public string ContentType { set; get; }
public required string ContentType { set; get; }
public string Url
{
@@ -9,11 +9,17 @@ public class Base64UrlImageBuilder
var httpClient = new HttpClient();
var response = (httpClient.GetAsync(new Uri($"{value}"))).Result;
var bytes = (response.Content.ReadAsByteArrayAsync()).Result;
FileContents = Convert.ToBase64String(bytes);
_fileContents = Convert.ToBase64String(bytes);
}
}
private string FileContents { get; set; }
private string _fileContents = string.Empty;
public string FileContents {
get {
return _fileContents;
}
}
public override string ToString()
{

View File

@@ -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 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()

View File

@@ -1 +1 @@
0.4.0
0.4.2