mirror of
https://github.com/sphildreth/roadie
synced 2024-11-10 06:44:12 +00:00
Scan work
This commit is contained in:
parent
6253677d01
commit
6aad709e31
3 changed files with 9 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue