mirror of
https://github.com/SoPat712/allstarr.git
synced 2026-04-27 03:53:10 -04:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
39c8f16b59
|
@@ -153,6 +153,8 @@ This project brings together all the music streaming providers into one unified
|
|||||||
|
|
||||||
- [Finamp](https://github.com/jmshrv/finamp) (Android/iOS)
|
- [Finamp](https://github.com/jmshrv/finamp) (Android/iOS)
|
||||||
|
|
||||||
|
- [Finer Player](https://monk-studio.com/finer) (iOS/iPadOS/macOS/tvOS)
|
||||||
|
|
||||||
_Working on getting more currently_
|
_Working on getting more currently_
|
||||||
|
|
||||||
### Subsonic/Navidrome
|
### Subsonic/Navidrome
|
||||||
|
|||||||
@@ -9,5 +9,5 @@ public static class AppVersion
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Current application version.
|
/// Current application version.
|
||||||
/// </summary>
|
/// </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
|
// For library items, proxy transparently with full query string
|
||||||
_logger.LogDebug("Proxying library item request to Jellyfin: ParentId={ParentId}", parentId);
|
_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);
|
var (result, statusCode) = await _proxyService.GetJsonAsync(endpoint, null, Request.Headers);
|
||||||
|
|
||||||
return HandleProxyResponse(result, statusCode);
|
return HandleProxyResponse(result, statusCode);
|
||||||
|
|||||||
@@ -389,30 +389,6 @@ public class SpotifyTrackMatchingService : BackgroundService
|
|||||||
await MatchSinglePlaylistAsync(playlistName, CancellationToken.None);
|
await MatchSinglePlaylistAsync(playlistName, CancellationToken.None);
|
||||||
_lastRunTimes[playlistName] = DateTime.UtcNow;
|
_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)
|
private async Task RebuildAllPlaylistsAsync(CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user