Compare commits

..

1 Commits

4 changed files with 9 additions and 26 deletions
+2
View File
@@ -153,6 +153,8 @@ This project brings together all the music streaming providers into one unified
- [Finamp](https://github.com/jmshrv/finamp) (Android/iOS)
- [Finer Player](https://monk-studio.com/finer) (iOS/iPadOS/macOS/tvOS)
_Working on getting more currently_
### Subsonic/Navidrome
+1 -1
View File
@@ -9,5 +9,5 @@ public static class AppVersion
/// <summary>
/// Current application version.
/// </summary>
public const string Version = "1.1.1";
public const string Version = "1.1.3";
}
@@ -513,7 +513,12 @@ public partial class JellyfinController
// For library items, proxy transparently with full query string
_logger.LogDebug("Proxying library item request to Jellyfin: ParentId={ParentId}", parentId);
var endpoint = $"Users/{Request.RouteValues["userId"]}/Items{Request.QueryString}";
// Build endpoint - handle both /Items and /Users/{userId}/Items routes
var userIdFromRoute = Request.RouteValues["userId"]?.ToString();
var endpoint = string.IsNullOrEmpty(userIdFromRoute)
? $"Items{Request.QueryString}"
: $"Users/{userIdFromRoute}/Items{Request.QueryString}";
var (result, statusCode) = await _proxyService.GetJsonAsync(endpoint, null, Request.Headers);
return HandleProxyResponse(result, statusCode);
@@ -389,30 +389,6 @@ public class SpotifyTrackMatchingService : BackgroundService
await MatchSinglePlaylistAsync(playlistName, CancellationToken.None);
_lastRunTimes[playlistName] = DateTime.UtcNow;
}
/// <summary>
/// Public method to trigger matching for a specific playlist (called from controller).
/// This bypasses cron schedules and runs immediately.
/// </summary>
public async Task TriggerMatchingForPlaylistAsync(string playlistName)
{
_logger.LogInformation("Manual track matching triggered for playlist: {Playlist} (bypassing cron schedule)", playlistName);
// Check cooldown to prevent abuse
if (_lastRunTimes.TryGetValue(playlistName, out var lastRun))
{
var timeSinceLastRun = DateTime.UtcNow - lastRun;
if (timeSinceLastRun < _minimumRunInterval)
{
_logger.LogWarning("Skipping manual refresh for {Playlist} - last run was {Seconds}s ago (cooldown: {Cooldown}s)",
playlistName, (int)timeSinceLastRun.TotalSeconds, (int)_minimumRunInterval.TotalSeconds);
throw new InvalidOperationException($"Please wait {(int)(_minimumRunInterval - timeSinceLastRun).TotalSeconds} more seconds before refreshing again");
}
}
await MatchSinglePlaylistAsync(playlistName, CancellationToken.None);
_lastRunTimes[playlistName] = DateTime.UtcNow;
}
private async Task RebuildAllPlaylistsAsync(CancellationToken cancellationToken)
{