Compare commits

..

No commits in common. "main" and "0.6.7" have entirely different histories.
main ... 0.6.7

3 changed files with 14 additions and 38 deletions

View File

@ -5,33 +5,11 @@ Changelog
(unreleased) (unreleased)
------------ ------------
Fix
~~~
- Improved Spotify auth check flow, refs NOISSUE. [Simon Diesenreiter]
0.6.8 (2025-07-20)
------------------
Fix
~~~
- Improved Spotify auth check flow, refs NOISSUE. [Simon Diesenreiter]
Other
~~~~~
0.6.7 (2025-07-20)
------------------
Fix Fix
~~~ ~~~
- Attempted bugfix for crashing process on invalid spotify access token, - Attempted bugfix for crashing process on invalid spotify access token,
refs NOISSUE. [Simon Diesenreiter] refs NOISSUE. [Simon Diesenreiter]
Other
~~~~~
0.6.6 (2025-07-20) 0.6.6 (2025-07-20)
------------------ ------------------

View File

@ -87,23 +87,21 @@ likePlaylistCheckTimer.OnOccurence += async (s, ea) =>
if (!await spotifyApiClient.IsUserAuthenticatedAsync(user)) if (!await spotifyApiClient.IsUserAuthenticatedAsync(user))
{ {
logger.LogWarning($"User {user.LdapUserName} is not authorized with Spotify - skipping playlist sync"); logger.LogWarning($"User {user.LdapUserName} is not authorized with Spotify - skipping playlist sync");
continue;
} }
else var foundPlaylist = dci.SmartPlaylistDefinitions?.Where(p => p.CreatedBy == user).ToList().Where(p => p.IsThisUsersLikedSongsPlaylist).SingleOrDefault();
if (foundPlaylist == null)
{ {
var foundPlaylist = dci.SmartPlaylistDefinitions?.Where(p => p.CreatedBy == user).ToList().Where(p => p.IsThisUsersLikedSongsPlaylist).SingleOrDefault(); logger.LogWarning($"Creating liked songs playlist for user {user.LdapUserName}");
if (foundPlaylist == null) var title = $"{user.PreferredName}'s liked songs";
{ var description = $"A collection of the songs liked by {user.PreferredName} on their 'Song of the day' server instance.";
logger.LogWarning($"Creating liked songs playlist for user {user.LdapUserName}"); // playlist does not exist yet, creating it
var title = $"{user.PreferredName}'s liked songs"; var newPlaylist = await (await spotifyApiClient.WithUserAuthorizationAsync(user)).CreateSpotifyPlaylist(title, description, false, true, user);
var description = $"A collection of the songs liked by {user.PreferredName} on their 'Song of the day' server instance."; await playlistSynchronizer.SynchronizePlaylistAsync(newPlaylist);
// playlist does not exist yet, creating it needsSaving = true;
var newPlaylist = await (await spotifyApiClient.WithUserAuthorizationAsync(user)).CreateSpotifyPlaylist(title, description, false, true, user);
await playlistSynchronizer.SynchronizePlaylistAsync(newPlaylist);
needsSaving = true;
}
logger.LogWarning($"Syncing playlists for user {user.LdapUserName}");
await playlistSynchronizer.SynchronizeUserPlaylistsAsync(user);
} }
logger.LogWarning($"Syncing playlists for user {user.LdapUserName}");
await playlistSynchronizer.SynchronizeUserPlaylistsAsync(user);
} }
if (needsSaving) if (needsSaving)
@ -257,6 +255,7 @@ messageSyncTimer.OnOccurence += async (s, ea) =>
// only start interaction timers in production builds // only start interaction timers in production builds
// for local/development testing we want those disabled // for local/development testing we want those disabled
likePlaylistCheckTimer.Start();
if (!app.Environment.IsDevelopment()) if (!app.Environment.IsDevelopment())
{ {
logger.LogTrace("Starting timer for scheduled processes."); logger.LogTrace("Starting timer for scheduled processes.");
@ -264,7 +263,6 @@ if (!app.Environment.IsDevelopment())
userIntroTimer.Start(); userIntroTimer.Start();
pickOfTheDayTimer.Start(); pickOfTheDayTimer.Start();
ldapAssociationTimer.Start(); ldapAssociationTimer.Start();
likePlaylistCheckTimer.Start();
} }
else else
{ {

View File

@ -1 +1 @@
0.6.9 0.6.7