mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-30 11:48:26 -07:00
Support for Artist Disambiguation and Type
This commit is contained in:
parent
6e4638f7b1
commit
ed3b47d76a
19 changed files with 95 additions and 92 deletions
|
@ -14,65 +14,11 @@ namespace Lidarr.Api.V3.Artist
|
|||
//Todo: Is there an easy way to keep IgnoreArticlesWhenSorting in sync between, Series, History, Missing?
|
||||
//Todo: We should get the entire Profile instead of ID and Name separately
|
||||
|
||||
////View Only
|
||||
//public string Title { get; set; }
|
||||
////public List<AlternateTitleResource> AlternateTitles { get; set; }
|
||||
//public string SortTitle { get; set; }
|
||||
|
||||
//public int SeasonCount
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// if (Seasons == null) return 0;
|
||||
|
||||
// return Seasons.Where(s => s.SeasonNumber > 0).Count();
|
||||
// }
|
||||
//}
|
||||
|
||||
//public int? TotalEpisodeCount { get; set; }
|
||||
//public int? EpisodeCount { get; set; }
|
||||
//public int? EpisodeFileCount { get; set; }
|
||||
//public long? SizeOnDisk { get; set; }
|
||||
|
||||
//// V3: replace with Ended
|
||||
|
||||
public ArtistStatusType Status { get; set; }
|
||||
|
||||
public bool Ended => Status == ArtistStatusType.Ended;
|
||||
|
||||
//public string ProfileName { get; set; }
|
||||
//public string Overview { get; set; }
|
||||
//public DateTime? NextAiring { get; set; }
|
||||
//public DateTime? PreviousAiring { get; set; }
|
||||
//public string Network { get; set; }
|
||||
//public string AirTime { get; set; }
|
||||
//public List<MediaCover> Images { get; set; }
|
||||
|
||||
//public string RemotePoster { get; set; }
|
||||
//public int Year { get; set; }
|
||||
|
||||
////View & Edit
|
||||
//public string Path { get; set; }
|
||||
//public int QualityProfileId { get; set; }
|
||||
//public int LanguageProfileId { get; set; }
|
||||
|
||||
////Editing Only
|
||||
//public bool SeasonFolder { get; set; }
|
||||
//public bool Monitored { get; set; }
|
||||
|
||||
//public DateTime? FirstAired { get; set; }
|
||||
public DateTime? LastInfoSync { get; set; }
|
||||
////public SeriesTypes SeriesType { get; set; }
|
||||
//public string CleanTitle { get; set; }
|
||||
//public string ImdbId { get; set; }
|
||||
//public string TitleSlug { get; set; }
|
||||
//public string RootFolderPath { get; set; }
|
||||
//public string Certification { get; set; }
|
||||
//public List<string> Genres { get; set; }
|
||||
//public HashSet<int> Tags { get; set; }
|
||||
//public DateTime Added { get; set; }
|
||||
//public AddSeriesOptions AddOptions { get; set; }
|
||||
//public Ratings Ratings { get; set; }
|
||||
|
||||
public string ArtistName { get; set; }
|
||||
public string ForeignArtistId { get; set; }
|
||||
|
@ -81,6 +27,8 @@ namespace Lidarr.Api.V3.Artist
|
|||
public int DiscogsId { get; set; }
|
||||
public string AllMusicId { get; set; }
|
||||
public string Overview { get; set; }
|
||||
public string ArtistType { get; set; }
|
||||
public string Disambiguation { get; set; }
|
||||
public List<Links> Links { get; set; }
|
||||
|
||||
public int? AlbumCount { get; set; }
|
||||
|
@ -136,10 +84,9 @@ namespace Lidarr.Api.V3.Artist
|
|||
|
||||
Status = model.Status,
|
||||
Overview = model.Overview,
|
||||
//NextAiring
|
||||
//PreviousAiring
|
||||
//Network = model.Network,
|
||||
//AirTime = model.AirTime,
|
||||
ArtistType = model.ArtistType,
|
||||
Disambiguation = model.Disambiguation,
|
||||
|
||||
Images = model.Images,
|
||||
|
||||
Albums = model.Albums.ToResource(),
|
||||
|
|
21
src/NzbDrone.Core/Datastore/Migration/119_artist_type.cs
Normal file
21
src/NzbDrone.Core/Datastore/Migration/119_artist_type.cs
Normal file
|
@ -0,0 +1,21 @@
|
|||
using FluentMigrator;
|
||||
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace NzbDrone.Core.Datastore.Migration
|
||||
{
|
||||
[Migration(119)]
|
||||
public class artist_type : NzbDroneMigrationBase
|
||||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
Alter.Table("Artists")
|
||||
.AddColumn("ArtistType").AsString().Nullable()
|
||||
.AddColumn("Disambiguation").AsString().Nullable();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -14,6 +14,8 @@ namespace NzbDrone.Core.MetadataSource.SkyHook.Resource
|
|||
public List<string> Genres { get; set; }
|
||||
public string AristUrl { get; set; }
|
||||
public string Overview { get; set; }
|
||||
public string Type { get; set; }
|
||||
public string Disambiguation { get; set; }
|
||||
public string Id { get; set; }
|
||||
public List<ImageResource> Images { get; set; }
|
||||
public List<LinkResource> Links { get; set; }
|
||||
|
|
|
@ -176,7 +176,9 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
|||
artist.Overview = resource.Overview;
|
||||
artist.NameSlug = Parser.Parser.CleanArtistTitle(artist.Name);
|
||||
artist.CleanName = Parser.Parser.CleanArtistTitle(artist.Name);
|
||||
artist.SortName = SeriesTitleNormalizer.Normalize(artist.Name, 0);
|
||||
artist.SortName = Parser.Parser.NormalizeTitle(artist.Name);
|
||||
artist.Disambiguation = resource.Disambiguation;
|
||||
artist.ArtistType = resource.Type;
|
||||
artist.Images = resource.Images.Select(MapImage).ToList();
|
||||
artist.Status = MapArtistStatus(resource.Status);
|
||||
artist.Ratings = MapRatings(resource.Rating);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
|
|
@ -34,6 +34,8 @@ namespace NzbDrone.Core.Music
|
|||
public string CleanName { get; set; }
|
||||
public string SortName { get; set; }
|
||||
public string Overview { get; set; }
|
||||
public string Disambiguation { get; set; }
|
||||
public string ArtistType { get; set; }
|
||||
public bool Monitored { get; set; }
|
||||
public bool AlbumFolder { get; set; }
|
||||
public DateTime? LastInfoSync { get; set; }
|
||||
|
|
|
@ -80,6 +80,8 @@ namespace NzbDrone.Core.Music
|
|||
artist.Images = artistInfo.Images;
|
||||
artist.Genres = artistInfo.Genres;
|
||||
artist.Links = artistInfo.Links;
|
||||
artist.Disambiguation = artistInfo.Disambiguation;
|
||||
artist.ArtistType = artistInfo.ArtistType;
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -293,6 +293,7 @@
|
|||
</Compile>
|
||||
<Compile Include="Datastore\Migration\105_rename_torrent_downloadstation.cs" />
|
||||
<Compile Include="Datastore\Migration\111_create_language_profiles.cs" />
|
||||
<Compile Include="Datastore\Migration\119_artist_type.cs" />
|
||||
<Compile Include="Datastore\Migration\118_history_trackid.cs" />
|
||||
<Compile Include="Datastore\Migration\117_artist_links.cs" />
|
||||
<Compile Include="Datastore\Migration\116_change_drone_factory_variable_name.cs" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue