Scan work

This commit is contained in:
Steven Hildreth 2018-12-14 22:25:00 -06:00
parent 6253677d01
commit 6aad709e31
3 changed files with 9 additions and 2 deletions

View file

@ -74,15 +74,16 @@ namespace Roadie.Library.Data
public string SpotifyId { get; set; }
[Column("releaseCount")]
public int? ReleaseCount { get; set; } // TODO update this on artist folder scan
public int? ReleaseCount { get; set; }
[Column("trackCount")]
public int? TrackCount { get; set; } // TODO update this on artist folder scane
public int? TrackCount { get; set; }
public Artist()
{
this.Releases = new HashSet<Release>();
this.Rating = 0;
this.Status = Statuses.Ok;
}
}

View file

@ -20,5 +20,10 @@ namespace Roadie.Library.Data
public int TimeSpanInSeconds { get; set; }
[NotMapped]
public new bool? IsLocked { get; set; }
public ScanHistory()
{
this.Status = Enums.Statuses.Complete;
}
}
}

View file

@ -1607,6 +1607,7 @@ namespace Roadie.Library.Factories
}
release.LibraryStatus = release.TrackCount > 0 && release.TrackCount == totalNumberOfTracksFound ? LibraryStatus.Complete : LibraryStatus.Incomplete;
release.LastUpdated = now;
release.Status = release.LibraryStatus == LibraryStatus.Complete ? Statuses.Complete : Statuses.Incomplete;
await this.DbContext.SaveChangesAsync();
this.CacheManager.ClearRegion(release.Artist.CacheRegion);