mirror of https://github.com/lidarr/Lidarr
Search to add DB flow is error free but the artist doesn't add.
This commit is contained in:
parent
fa52eabb79
commit
f2a8336b31
|
@ -110,7 +110,6 @@ namespace NzbDrone.Api.Music
|
|||
ArtistSlug = model.ArtistSlug,
|
||||
|
||||
RootFolderPath = model.RootFolderPath,
|
||||
Certification = model.Certification,
|
||||
Genres = model.Genres,
|
||||
Tags = model.Tags,
|
||||
Added = model.Added,
|
||||
|
@ -164,7 +163,6 @@ namespace NzbDrone.Api.Music
|
|||
ArtistSlug = resource.ArtistSlug,
|
||||
|
||||
RootFolderPath = resource.RootFolderPath,
|
||||
Certification = resource.Certification,
|
||||
Genres = resource.Genres,
|
||||
Tags = resource.Tags,
|
||||
Added = resource.Added,
|
||||
|
|
|
@ -18,17 +18,22 @@ namespace NzbDrone.Core.Datastore.Migration
|
|||
.WithColumn("ArtistSlug").AsString().Unique()
|
||||
.WithColumn("CleanTitle").AsString() // Do we need this?
|
||||
.WithColumn("Monitored").AsBoolean()
|
||||
.WithColumn("AlbumFolder").AsBoolean()
|
||||
.WithColumn("ArtistFolder").AsBoolean()
|
||||
.WithColumn("LastInfoSync").AsDateTime().Nullable()
|
||||
.WithColumn("LastDiskSync").AsDateTime().Nullable()
|
||||
.WithColumn("Status").AsInt32()
|
||||
.WithColumn("Path").AsString()
|
||||
.WithColumn("Images").AsString()
|
||||
.WithColumn("QualityProfileId").AsInt32()
|
||||
.WithColumn("RootFolderPath").AsString()
|
||||
.WithColumn("Added").AsDateTime()
|
||||
.WithColumn("AddOptions").AsString()
|
||||
.WithColumn("AlbumFolder").AsInt32()
|
||||
.WithColumn("Genre").AsString()
|
||||
.WithColumn("ProfileId").AsInt32() // This is either ProfileId or Profile
|
||||
.WithColumn("Genres").AsString()
|
||||
.WithColumn("Albums").AsString()
|
||||
.WithColumn("Tags").AsString()
|
||||
.WithColumn("AddOptions").AsString()
|
||||
|
||||
;
|
||||
|
||||
Create.TableForModel("Albums")
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace NzbDrone.Core.Music
|
|||
}
|
||||
|
||||
newArtist.CleanTitle = newArtist.ArtistName.CleanSeriesTitle();
|
||||
newArtist.SortTitle = ArtistNameNormalizer.Normalize(newArtist.ArtistName, newArtist.ItunesId);
|
||||
//newArtist.SortTitle = ArtistNameNormalizer.Normalize(newArtist.ArtistName, newArtist.ItunesId); // There is no Sort Title
|
||||
newArtist.Added = DateTime.UtcNow;
|
||||
|
||||
var validationResult = _addArtistValidator.Validate(newArtist);
|
||||
|
|
|
@ -23,41 +23,42 @@ namespace NzbDrone.Core.Music
|
|||
}
|
||||
|
||||
public int ItunesId { get; set; }
|
||||
//public int TvRageId { get; set; }
|
||||
//public int TvMazeId { get; set; }
|
||||
//public string ImdbId { get; set; }
|
||||
public string ArtistName { get; set; }
|
||||
public string ArtistSlug { get; set; }
|
||||
public string CleanTitle { get; set; }
|
||||
public string SortTitle { get; set; }
|
||||
//public SeriesStatusType Status { get; set; }
|
||||
public string Overview { get; set; }
|
||||
public bool Monitored { get; set; }
|
||||
public bool AlbumFolder { get; set; }
|
||||
public bool ArtistFolder { get; set; }
|
||||
public DateTime? LastInfoSync { get; set; }
|
||||
//public int Runtime { get; set; }
|
||||
public DateTime? LastDiskSync { get; set; }
|
||||
|
||||
public int Status { get; set; } // TODO: Figure out what this is, do we need it?
|
||||
public string Path { get; set; }
|
||||
public List<MediaCover.MediaCover> Images { get; set; }
|
||||
public List<string> Genres { get; set; }
|
||||
public int QualityProfileId { get; set; }
|
||||
|
||||
public string RootFolderPath { get; set; }
|
||||
public DateTime Added { get; set; }
|
||||
public LazyLoaded<Profile> Profile { get; set; }
|
||||
public int ProfileId { get; set; }
|
||||
public List<Album> Albums { get; set; }
|
||||
public HashSet<int> Tags { get; set; }
|
||||
|
||||
public AddSeriesOptions AddOptions { get; set; }
|
||||
|
||||
//public string SortTitle { get; set; }
|
||||
//public SeriesStatusType Status { get; set; }
|
||||
//public int Runtime { get; set; }
|
||||
//public SeriesTypes SeriesType { get; set; }
|
||||
//public string Network { get; set; }
|
||||
//public bool UseSceneNumbering { get; set; }
|
||||
//public string TitleSlug { get; set; }
|
||||
public string Path { get; set; }
|
||||
//public int Year { get; set; }
|
||||
//public Ratings Ratings { get; set; }
|
||||
public List<string> Genres { get; set; }
|
||||
//public List<Actor> Actors { get; set; } // MOve to album?
|
||||
public string Certification { get; set; }
|
||||
public string RootFolderPath { get; set; }
|
||||
public DateTime Added { get; set; }
|
||||
public DateTime? FirstAired { get; set; }
|
||||
public LazyLoaded<Profile> Profile { get; set; }
|
||||
public int ProfileId { get; set; }
|
||||
|
||||
public List<Album> Albums { get; set; }
|
||||
public HashSet<int> Tags { get; set; }
|
||||
public bool ArtistFolder { get; set; }
|
||||
|
||||
public AddSeriesOptions AddOptions { get; set; } // TODO: Learn what this does
|
||||
//public string Certification { get; set; }
|
||||
//public DateTime? FirstAired { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
|
@ -66,6 +67,27 @@ namespace NzbDrone.Core.Music
|
|||
|
||||
public void ApplyChanges(Artist otherArtist)
|
||||
{
|
||||
|
||||
ItunesId = otherArtist.ItunesId;
|
||||
ArtistName = otherArtist.ArtistName;
|
||||
ArtistSlug = otherArtist.ArtistSlug;
|
||||
CleanTitle = otherArtist.CleanTitle;
|
||||
Monitored = otherArtist.Monitored;
|
||||
AlbumFolder = otherArtist.AlbumFolder;
|
||||
LastInfoSync = otherArtist.LastInfoSync;
|
||||
Images = otherArtist.Images;
|
||||
Path = otherArtist.Path;
|
||||
Genres = otherArtist.Genres;
|
||||
RootFolderPath = otherArtist.RootFolderPath;
|
||||
Added = otherArtist.Added;
|
||||
Profile = otherArtist.Profile;
|
||||
ProfileId = otherArtist.ProfileId;
|
||||
Albums = otherArtist.Albums;
|
||||
Tags = otherArtist.Tags;
|
||||
ArtistFolder = otherArtist.ArtistFolder;
|
||||
AddOptions = otherArtist.AddOptions;
|
||||
|
||||
|
||||
//TODO: Implement
|
||||
ItunesId = otherArtist.ItunesId;
|
||||
|
||||
|
@ -80,6 +102,7 @@ namespace NzbDrone.Core.Music
|
|||
RootFolderPath = otherArtist.RootFolderPath;
|
||||
Tags = otherArtist.Tags;
|
||||
AddOptions = otherArtist.AddOptions;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue