mirror of
https://github.com/sphildreth/roadie
synced 2024-11-10 06:44:12 +00:00
Setting status on list results. Removed unused cssClass attribute.
This commit is contained in:
parent
add88bed32
commit
e0c2de4480
4 changed files with 8 additions and 7 deletions
|
@ -11,8 +11,6 @@ namespace Roadie.Library.Models
|
|||
{
|
||||
public DateTime? CreatedDate { get; set; }
|
||||
|
||||
public string CssClass { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// This is the "id" of the record in the database and is only used during composition, not stored in cache and not
|
||||
/// returned in results.
|
||||
|
|
|
@ -168,6 +168,7 @@ namespace Roadie.Library.Models
|
|||
ReleaseDate = release.ReleaseDate,
|
||||
PlayedCount = track.PlayedCount,
|
||||
Rating = track.Rating,
|
||||
Status = track.Status,
|
||||
Title = track.Title,
|
||||
TrackPlayUrl = trackPlayUrl,
|
||||
Thumbnail = trackThumbnail
|
||||
|
|
|
@ -672,7 +672,6 @@ namespace Roadie.Api.Services
|
|||
Text = par.Release
|
||||
},
|
||||
Status = Statuses.Missing,
|
||||
CssClass = "missing",
|
||||
ArtistThumbnail = new Image($"{HttpContext.ImageBaseUrl}/unknown.jpg"),
|
||||
Thumbnail = new Image($"{HttpContext.ImageBaseUrl}/unknown.jpg"),
|
||||
ListNumber = par.Position
|
||||
|
@ -1175,7 +1174,7 @@ namespace Roadie.Api.Services
|
|||
join rm in DbContext.ReleaseMedias on t.ReleaseMediaId equals rm.Id
|
||||
where rm.ReleaseId == release.Id
|
||||
select t).FirstOrDefault();
|
||||
if(firstTrack?.FilePath != null)
|
||||
if (firstTrack?.FilePath != null)
|
||||
{
|
||||
var trackPath = Path.GetDirectoryName(firstTrack.PathToTrack(Configuration));
|
||||
if (Directory.Exists(trackPath) && !releasePath.Equals(trackPath))
|
||||
|
@ -1214,6 +1213,7 @@ namespace Roadie.Api.Services
|
|||
Logger.LogWarning($"Unable To Find Release Folder [{releasePath}] For Release `{release}`");
|
||||
}
|
||||
}
|
||||
|
||||
#region Get Tracks for Release from DB and set as missing any not found in Folder
|
||||
|
||||
foreach (var releaseMedia in DbContext.ReleaseMedias.Where(x => x.ReleaseId == release.Id).ToArray())
|
||||
|
@ -1246,7 +1246,9 @@ namespace Roadie.Api.Services
|
|||
|
||||
#region Scan Folder and Add or Update Existing Tracks from Files
|
||||
|
||||
var existingReleaseMedia = DbContext.ReleaseMedias.Include(x => x.Tracks).Where(x => x.ReleaseId == release.Id).ToList();
|
||||
var existingReleaseMedia = DbContext.ReleaseMedias.Include(x => x.Tracks)
|
||||
.Where(x => x.ReleaseId == release.Id)
|
||||
.ToList();
|
||||
var foundInFolderTracks = new List<data.Track>();
|
||||
short totalNumberOfTracksFound = 0;
|
||||
// This is the number of tracks metadata says the release should have (releaseMediaNumber, TotalNumberOfTracks)
|
||||
|
@ -2007,7 +2009,7 @@ namespace Roadie.Api.Services
|
|||
Value = track.RoadieId.ToString()
|
||||
};
|
||||
t.MediaNumber = rm.MediaNumber;
|
||||
t.CssClass = string.IsNullOrEmpty(track.Hash) ? "Missing" : "Ok";
|
||||
t.Status = track.Status;
|
||||
t.TrackArtist = track.TrackArtist != null
|
||||
? ArtistList.FromDataArtist(track.TrackArtist,
|
||||
MakeArtistThumbnailImage(track.TrackArtist.RoadieId))
|
||||
|
|
|
@ -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