mirror of
https://github.com/sphildreth/roadie
synced 2024-11-10 06:44:12 +00:00
Bug Squashing
This commit is contained in:
parent
3c86801745
commit
70b71df78e
4 changed files with 15 additions and 5 deletions
|
@ -71,6 +71,9 @@ namespace Roadie.Library.Identity
|
|||
[Column("removeTrackFromQueAfterPlayed")]
|
||||
public bool? RemoveTrackFromQueAfterPlayed { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// This is the last time a user access Roadie via an API (ie Subsonic or Plex or Apache)
|
||||
/// </summary>
|
||||
[Column("lastApiAccess")]
|
||||
public DateTime? LastApiAccess { get; set; }
|
||||
|
||||
|
|
|
@ -304,10 +304,18 @@ namespace Roadie.Api.Services
|
|||
var collections = this.DbContext.Collections.Where(x => x.IsLocked ?? false == false).ToArray();
|
||||
foreach(var collection in collections)
|
||||
{
|
||||
var result = await this.ScanCollection(user, collection.RoadieId, isReadOnly, doPurgeFirst);
|
||||
if(!result.IsSuccess)
|
||||
try
|
||||
{
|
||||
errors.AddRange(result.Errors);
|
||||
var result = await this.ScanCollection(user, collection.RoadieId, isReadOnly, doPurgeFirst);
|
||||
if (!result.IsSuccess)
|
||||
{
|
||||
errors.AddRange(result.Errors);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.Logger.LogError(ex);
|
||||
errors.Add(ex);
|
||||
}
|
||||
}
|
||||
sw.Stop();
|
||||
|
|
|
@ -80,7 +80,6 @@ namespace Roadie.Api.Controllers
|
|||
var user = await UserManager.FindByNameAsync(model.Username);
|
||||
var now = DateTime.UtcNow;
|
||||
user.LastLogin = now;
|
||||
user.LastApiAccess = now;
|
||||
user.LastUpdated = now;
|
||||
await UserManager.UpdateAsync(user);
|
||||
var t = await this.TokenService.GenerateToken(user, this.UserManager);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"Roadie.Api": {
|
||||
"commandName": "Project",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Production"
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"applicationUrl": "http://localhost:5123/"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue