fixing past page, can't instantiate interface
This commit is contained in:
parent
0adc052dc6
commit
6fd7249c5e
@ -9,7 +9,7 @@ public interface INowPlayingHubClient
|
||||
public Task OnNewPlaying(CurrentlyPlayingDTO context);
|
||||
public Task OnNewAudioFeature(TrackAudioFeatures features);
|
||||
public Task OnNewPlayCount(PlayCount playCount);
|
||||
public Task OnNewCard(ICard card);
|
||||
public Task OnNewCard(Card card);
|
||||
}
|
||||
|
||||
public interface INowPlayingHub
|
||||
|
@ -5,7 +5,7 @@ namespace Selector.SignalR;
|
||||
public interface IPastHub
|
||||
{
|
||||
Task OnConnected();
|
||||
Task OnSubmitted(IPastParams param);
|
||||
Task OnSubmitted(PastParams param);
|
||||
}
|
||||
|
||||
public interface IPastHubClient
|
||||
|
@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using Selector.SignalR;
|
||||
|
||||
namespace Selector.Web.NowPlaying;
|
||||
namespace Selector.SignalR;
|
||||
|
||||
public class Card : ICard
|
||||
public class Card
|
||||
{
|
||||
public string Content { get; set; }
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
namespace Selector.SignalR;
|
||||
|
||||
public interface ICard
|
||||
{
|
||||
string Content { get; set; }
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
namespace Selector.SignalR;
|
||||
|
||||
public interface IPastParams
|
||||
{
|
||||
string Track { get; set; }
|
||||
string Album { get; set; }
|
||||
string Artist { get; set; }
|
||||
string From { get; set; }
|
||||
string To { get; set; }
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using Selector.SignalR;
|
||||
|
||||
namespace Selector.Web;
|
||||
namespace Selector.SignalR;
|
||||
|
||||
public class PastParams : IPastParams
|
||||
public class PastParams
|
||||
{
|
||||
public string Track { get; set; }
|
||||
public string Album { get; set; }
|
@ -10,7 +10,7 @@ public class NowHubCache
|
||||
private readonly ILogger<NowHubCache> logger;
|
||||
|
||||
public TrackAudioFeatures LastFeature { get; private set; }
|
||||
public List<ICard> LastCards { get; private set; } = new();
|
||||
public List<Card> LastCards { get; private set; } = new();
|
||||
private readonly object updateLock = new();
|
||||
|
||||
private readonly object bindingLock = new();
|
||||
|
@ -32,7 +32,7 @@ public class NowHubClient: BaseSignalRClient, INowPlayingHub, IDisposable
|
||||
NewPlayCountCallbacks.Add(hubConnection.On(nameof(OnNewPlayCount), action));
|
||||
}
|
||||
|
||||
public void OnNewCard(Action<ICard> action)
|
||||
public void OnNewCard(Action<Card> action)
|
||||
{
|
||||
NewCardCallbacks.Add(hubConnection.On(nameof(OnNewCard), action));
|
||||
}
|
||||
@ -52,7 +52,7 @@ public class NowHubClient: BaseSignalRClient, INowPlayingHub, IDisposable
|
||||
NewPlayCountCallbacks.Add(hubConnection.On(nameof(OnNewPlayCount), action));
|
||||
}
|
||||
|
||||
public void OnNewCard(Func<ICard, Task> action)
|
||||
public void OnNewCard(Func<Card, Task> action)
|
||||
{
|
||||
NewCardCallbacks.Add(hubConnection.On(nameof(OnNewCard), action));
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ public class PastHubClient: BaseSignalRClient, IPastHub, IDisposable
|
||||
return hubConnection.InvokeAsync(nameof(OnConnected));
|
||||
}
|
||||
|
||||
public Task OnSubmitted(IPastParams param)
|
||||
public Task OnSubmitted(PastParams param)
|
||||
{
|
||||
return hubConnection.InvokeAsync(nameof(OnSubmitted), param);
|
||||
}
|
||||
|
@ -12,7 +12,6 @@ using Selector.Cache;
|
||||
using Selector.Model;
|
||||
using Selector.Model.Extensions;
|
||||
using Selector.SignalR;
|
||||
using Selector.Web.NowPlaying;
|
||||
using SpotifyAPI.Web;
|
||||
using StackExchange.Redis;
|
||||
|
||||
|
@ -57,7 +57,7 @@ namespace Selector.Web.Hubs
|
||||
" (Expanded Edition)",
|
||||
};
|
||||
|
||||
public async Task OnSubmitted(IPastParams param)
|
||||
public async Task OnSubmitted(PastParams param)
|
||||
{
|
||||
param.Track = string.IsNullOrWhiteSpace(param.Track) ? null : param.Track;
|
||||
param.Album = string.IsNullOrWhiteSpace(param.Album) ? null : param.Album;
|
||||
|
@ -41,13 +41,11 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="wwwroot\" />
|
||||
<Folder Include="NowPlaying\" />
|
||||
<Folder Include="Past\" />
|
||||
<Folder Include="Auth\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="NowPlaying\" />
|
||||
<None Remove="Past\" />
|
||||
<None Remove="Microsoft.AspNetCore.Authentication.JwtBearer" />
|
||||
<None Remove="Auth\" />
|
||||
|
Loading…
Reference in New Issue
Block a user