Polishing and Bugfixes (#613)

* Added a new field to Library for showing Last Scan time for a library.

Manage library page now shows last scan for each library. Tweaked the websocket code to make scan progress a bit more reliable.

* Updated docnet to provide ARM support from our recent PR. Pi users can now have a version for PDF support out of the box.

* Parser is now culture invariant to hopefully fix an issue on Italian systems not detecting . correctly

* Added the ability for the collection detail page to update when a new series is added.

* Fixed an issue where multiple chapters stacked in a volume and reading in incognito, wouldn't sort the chapters and would open the wrong one.

* Code smell
This commit is contained in:
Joseph Milazzo 2021-10-01 08:13:55 -07:00 committed by GitHub
parent 1ff1be2eb9
commit ce2f4b6a9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 1267 additions and 160 deletions

View file

@ -59,7 +59,7 @@ namespace API.SignalR
};
}
public static SignalRMessage ScanLibraryProgressEvent(int libraryId, int progress, string seriesName)
public static SignalRMessage ScanLibraryProgressEvent(int libraryId, float progress, string seriesName)
{
return new SignalRMessage()
{
@ -97,5 +97,17 @@ namespace API.SignalR
};
}
public static SignalRMessage SeriesAddedToCollection(int tagId, int seriesId)
{
return new SignalRMessage
{
Name = SignalREvents.UpdateVersion,
Body = new
{
TagId = tagId,
SeriesId = seriesId
}
};
}
}
}

View file

@ -1,41 +0,0 @@
using System;
using System.Threading.Tasks;
using API.Extensions;
using API.SignalR.Presence;
using Microsoft.AspNetCore.SignalR;
namespace API.SignalR
{
/// <summary>
/// Keeps track of who is logged into the app
/// </summary>
public class PresenceHub : Hub
{
private readonly IPresenceTracker _tracker;
public PresenceHub(IPresenceTracker tracker)
{
_tracker = tracker;
}
public override async Task OnConnectedAsync()
{
await _tracker.UserConnected(Context.User.GetUsername(), Context.ConnectionId);
var currentUsers = await PresenceTracker.GetOnlineUsers();
await Clients.All.SendAsync("GetOnlineUsers", currentUsers);
}
public override async Task OnDisconnectedAsync(Exception exception)
{
await _tracker.UserDisconnected(Context.User.GetUsername(), Context.ConnectionId);
var currentUsers = await PresenceTracker.GetOnlineUsers();
await Clients.All.SendAsync("GetOnlineUsers", currentUsers);
await base.OnDisconnectedAsync(exception);
}
}
}

View file

@ -10,5 +10,6 @@
public const string SeriesRemoved = "SeriesRemoved";
public const string ScanLibraryProgress = "ScanLibraryProgress";
public const string OnlineUsers = "OnlineUsers";
public const string SeriesAddedToCollection = "SeriesAddedToCollection";
}
}