Bug Squashing

This commit is contained in:
Steven Hildreth 2019-01-27 17:34:33 -06:00
parent 3c86801745
commit 70b71df78e
4 changed files with 15 additions and 5 deletions

View file

@ -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; }

View file

@ -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();

View file

@ -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);

View file

@ -3,7 +3,7 @@
"Roadie.Api": {
"commandName": "Project",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Production"
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:5123/"
}