mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 13:10:13 -07:00
Search to add DB flow is error free but the artist doesn't add.
This commit is contained in:
parent
fa52eabb79
commit
f2a8336b31
4 changed files with 54 additions and 28 deletions
|
@ -110,7 +110,6 @@ namespace NzbDrone.Api.Music
|
||||||
ArtistSlug = model.ArtistSlug,
|
ArtistSlug = model.ArtistSlug,
|
||||||
|
|
||||||
RootFolderPath = model.RootFolderPath,
|
RootFolderPath = model.RootFolderPath,
|
||||||
Certification = model.Certification,
|
|
||||||
Genres = model.Genres,
|
Genres = model.Genres,
|
||||||
Tags = model.Tags,
|
Tags = model.Tags,
|
||||||
Added = model.Added,
|
Added = model.Added,
|
||||||
|
@ -164,7 +163,6 @@ namespace NzbDrone.Api.Music
|
||||||
ArtistSlug = resource.ArtistSlug,
|
ArtistSlug = resource.ArtistSlug,
|
||||||
|
|
||||||
RootFolderPath = resource.RootFolderPath,
|
RootFolderPath = resource.RootFolderPath,
|
||||||
Certification = resource.Certification,
|
|
||||||
Genres = resource.Genres,
|
Genres = resource.Genres,
|
||||||
Tags = resource.Tags,
|
Tags = resource.Tags,
|
||||||
Added = resource.Added,
|
Added = resource.Added,
|
||||||
|
|
|
@ -18,17 +18,22 @@ namespace NzbDrone.Core.Datastore.Migration
|
||||||
.WithColumn("ArtistSlug").AsString().Unique()
|
.WithColumn("ArtistSlug").AsString().Unique()
|
||||||
.WithColumn("CleanTitle").AsString() // Do we need this?
|
.WithColumn("CleanTitle").AsString() // Do we need this?
|
||||||
.WithColumn("Monitored").AsBoolean()
|
.WithColumn("Monitored").AsBoolean()
|
||||||
|
.WithColumn("AlbumFolder").AsBoolean()
|
||||||
|
.WithColumn("ArtistFolder").AsBoolean()
|
||||||
.WithColumn("LastInfoSync").AsDateTime().Nullable()
|
.WithColumn("LastInfoSync").AsDateTime().Nullable()
|
||||||
.WithColumn("LastDiskSync").AsDateTime().Nullable()
|
.WithColumn("LastDiskSync").AsDateTime().Nullable()
|
||||||
.WithColumn("Status").AsInt32()
|
.WithColumn("Status").AsInt32()
|
||||||
.WithColumn("Path").AsString()
|
.WithColumn("Path").AsString()
|
||||||
.WithColumn("Images").AsString()
|
.WithColumn("Images").AsString()
|
||||||
.WithColumn("QualityProfileId").AsInt32()
|
.WithColumn("QualityProfileId").AsInt32()
|
||||||
|
.WithColumn("RootFolderPath").AsString()
|
||||||
.WithColumn("Added").AsDateTime()
|
.WithColumn("Added").AsDateTime()
|
||||||
.WithColumn("AddOptions").AsString()
|
.WithColumn("ProfileId").AsInt32() // This is either ProfileId or Profile
|
||||||
.WithColumn("AlbumFolder").AsInt32()
|
.WithColumn("Genres").AsString()
|
||||||
.WithColumn("Genre").AsString()
|
|
||||||
.WithColumn("Albums").AsString()
|
.WithColumn("Albums").AsString()
|
||||||
|
.WithColumn("Tags").AsString()
|
||||||
|
.WithColumn("AddOptions").AsString()
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
Create.TableForModel("Albums")
|
Create.TableForModel("Albums")
|
||||||
|
|
|
@ -53,7 +53,7 @@ namespace NzbDrone.Core.Music
|
||||||
}
|
}
|
||||||
|
|
||||||
newArtist.CleanTitle = newArtist.ArtistName.CleanSeriesTitle();
|
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;
|
newArtist.Added = DateTime.UtcNow;
|
||||||
|
|
||||||
var validationResult = _addArtistValidator.Validate(newArtist);
|
var validationResult = _addArtistValidator.Validate(newArtist);
|
||||||
|
|
|
@ -23,41 +23,42 @@ namespace NzbDrone.Core.Music
|
||||||
}
|
}
|
||||||
|
|
||||||
public int ItunesId { get; set; }
|
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 ArtistName { get; set; }
|
||||||
public string ArtistSlug { get; set; }
|
public string ArtistSlug { get; set; }
|
||||||
public string CleanTitle { 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 Monitored { get; set; }
|
||||||
public bool AlbumFolder { get; set; }
|
public bool AlbumFolder { get; set; }
|
||||||
|
public bool ArtistFolder { get; set; }
|
||||||
public DateTime? LastInfoSync { 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<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 SeriesTypes SeriesType { get; set; }
|
||||||
//public string Network { get; set; }
|
//public string Network { get; set; }
|
||||||
//public bool UseSceneNumbering { get; set; }
|
//public bool UseSceneNumbering { get; set; }
|
||||||
//public string TitleSlug { get; set; }
|
//public string TitleSlug { get; set; }
|
||||||
public string Path { get; set; }
|
|
||||||
//public int Year { get; set; }
|
//public int Year { get; set; }
|
||||||
//public Ratings Ratings { get; set; }
|
//public Ratings Ratings { get; set; }
|
||||||
public List<string> Genres { get; set; }
|
|
||||||
//public List<Actor> Actors { get; set; } // MOve to album?
|
//public List<Actor> Actors { get; set; } // MOve to album?
|
||||||
public string Certification { get; set; }
|
//public string Certification { get; set; }
|
||||||
public string RootFolderPath { get; set; }
|
//public DateTime? FirstAired { 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 override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
|
@ -66,8 +67,29 @@ namespace NzbDrone.Core.Music
|
||||||
|
|
||||||
public void ApplyChanges(Artist otherArtist)
|
public void ApplyChanges(Artist otherArtist)
|
||||||
{
|
{
|
||||||
//TODO: Implement
|
|
||||||
ItunesId = otherArtist.ItunesId;
|
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;
|
||||||
|
|
||||||
Albums = otherArtist.Albums;
|
Albums = otherArtist.Albums;
|
||||||
Path = otherArtist.Path;
|
Path = otherArtist.Path;
|
||||||
|
@ -80,6 +102,7 @@ namespace NzbDrone.Core.Music
|
||||||
RootFolderPath = otherArtist.RootFolderPath;
|
RootFolderPath = otherArtist.RootFolderPath;
|
||||||
Tags = otherArtist.Tags;
|
Tags = otherArtist.Tags;
|
||||||
AddOptions = otherArtist.AddOptions;
|
AddOptions = otherArtist.AddOptions;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue