Compare commits
4 Commits
0.6.5
...
e0b0d6b98c
Author | SHA1 | Date | |
---|---|---|---|
e0b0d6b98c | |||
74a8c7dbe8 | |||
da2a32ecfc | |||
ef8c8fb867 |
23
HISTORY.md
23
HISTORY.md
@@ -5,10 +5,33 @@ Changelog
|
|||||||
(unreleased)
|
(unreleased)
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
Fix
|
||||||
|
~~~
|
||||||
|
- Attempted bugfix for crashing process on invalid spotify access token,
|
||||||
|
refs NOISSUE. [Simon Diesenreiter]
|
||||||
|
|
||||||
|
|
||||||
|
0.6.6 (2025-07-20)
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Fix
|
||||||
|
~~~
|
||||||
|
- Add additional logging, refs NOISSUE. [Simon Diesenreiter]
|
||||||
|
|
||||||
|
Other
|
||||||
|
~~~~~
|
||||||
|
|
||||||
|
|
||||||
|
0.6.5 (2025-07-20)
|
||||||
|
------------------
|
||||||
|
|
||||||
Fix
|
Fix
|
||||||
~~~
|
~~~
|
||||||
- Configurable Cron schedules, refs NOISSUE. [Simon Diesenreiter]
|
- Configurable Cron schedules, refs NOISSUE. [Simon Diesenreiter]
|
||||||
|
|
||||||
|
Other
|
||||||
|
~~~~~
|
||||||
|
|
||||||
|
|
||||||
0.6.4 (2025-07-20)
|
0.6.4 (2025-07-20)
|
||||||
------------------
|
------------------
|
||||||
|
@@ -86,18 +86,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");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
var foundPlaylist = dci.SmartPlaylistDefinitions?.Where(p => p.CreatedBy == user).ToList().Where(p => p.IsThisUsersLikedSongsPlaylist).SingleOrDefault();
|
var foundPlaylist = dci.SmartPlaylistDefinitions?.Where(p => p.CreatedBy == user).ToList().Where(p => p.IsThisUsersLikedSongsPlaylist).SingleOrDefault();
|
||||||
if (foundPlaylist == null)
|
if (foundPlaylist == null)
|
||||||
{
|
{
|
||||||
var title = $"{user.PreferredName}'s liked Songs";
|
logger.LogWarning($"Creating liked songs playlist for user {user.LdapUserName}");
|
||||||
|
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.";
|
var description = $"A collection of the songs liked by {user.PreferredName} on their 'Song of the day' server instance.";
|
||||||
// playlist does not exist yet, creating it
|
// playlist does not exist yet, creating it
|
||||||
var newPlaylist = await (await spotifyApiClient.WithUserAuthorizationAsync(user)).CreateSpotifyPlaylist(title, description, false, true, user);
|
var newPlaylist = await (await spotifyApiClient.WithUserAuthorizationAsync(user)).CreateSpotifyPlaylist(title, description, false, true, user);
|
||||||
await playlistSynchronizer.SynchronizePlaylistAsync(newPlaylist);
|
await playlistSynchronizer.SynchronizePlaylistAsync(newPlaylist);
|
||||||
needsSaving = true;
|
needsSaving = true;
|
||||||
}
|
}
|
||||||
|
logger.LogWarning($"Syncing playlists for user {user.LdapUserName}");
|
||||||
await playlistSynchronizer.SynchronizeUserPlaylistsAsync(user);
|
await playlistSynchronizer.SynchronizeUserPlaylistsAsync(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -252,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.");
|
||||||
@@ -259,7 +263,6 @@ if (!app.Environment.IsDevelopment())
|
|||||||
userIntroTimer.Start();
|
userIntroTimer.Start();
|
||||||
pickOfTheDayTimer.Start();
|
pickOfTheDayTimer.Start();
|
||||||
ldapAssociationTimer.Start();
|
ldapAssociationTimer.Start();
|
||||||
likePlaylistCheckTimer.Start();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -110,7 +110,7 @@ public class SpotifyApiClient
|
|||||||
|
|
||||||
public async Task<string> GetValidAuthorizationTokenAsync(User user)
|
public async Task<string> GetValidAuthorizationTokenAsync(User user)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(user.SpotifyAuthAccessToken))
|
if (string.IsNullOrEmpty(user.SpotifyAuthAccessToken) || string.IsNullOrEmpty(user.SpotifyAuthRefreshToken))
|
||||||
{
|
{
|
||||||
// user either never connected Spotify or we failed to refresh token - user needs to re-authenticate
|
// user either never connected Spotify or we failed to refresh token - user needs to re-authenticate
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
|
@@ -1 +1 @@
|
|||||||
0.6.5
|
0.6.7
|
||||||
|
Reference in New Issue
Block a user