diff --git a/frontend/src/AddArtist/AddNewArtist/AddNewArtistSearchResult.js b/frontend/src/AddArtist/AddNewArtist/AddNewArtistSearchResult.js index 9a63518f8..813bafa38 100644 --- a/frontend/src/AddArtist/AddNewArtist/AddNewArtistSearchResult.js +++ b/frontend/src/AddArtist/AddNewArtist/AddNewArtistSearchResult.js @@ -48,7 +48,8 @@ class AddNewArtistSearchResult extends Component { artistName, nameSlug, year, - network, + disambiguation, + artistType, status, overview, albumCount, @@ -59,10 +60,10 @@ class AddNewArtistSearchResult extends Component { } = this.props; const linkProps = isExistingArtist ? { to: `/artist/${nameSlug}` } : { onPress: this.onPress }; - let seasons = '1 Season'; + let albums = '1 Album'; if (albumCount > 1) { - seasons = `${albumCount} Seasons`; + albums = `${albumCount} Albums`; } return ( @@ -88,6 +89,11 @@ class AddNewArtistSearchResult extends Component { ({year}) } + { + !!disambiguation && + ({disambiguation}) + } + { isExistingArtist && { - !!network && + !!artistType && } { !!albumCount && } @@ -156,7 +162,8 @@ AddNewArtistSearchResult.propTypes = { artistName: PropTypes.string.isRequired, nameSlug: PropTypes.string.isRequired, year: PropTypes.number, - network: PropTypes.string, + disambiguation: PropTypes.string, + artistType: PropTypes.string, status: PropTypes.string.isRequired, overview: PropTypes.string, albumCount: PropTypes.number, diff --git a/frontend/src/AddArtist/ImportArtist/Import/SelectArtist/ImportArtistName.css b/frontend/src/AddArtist/ImportArtist/Import/SelectArtist/ImportArtistName.css index c70970dd0..263e91fda 100644 --- a/frontend/src/AddArtist/ImportArtist/Import/SelectArtist/ImportArtistName.css +++ b/frontend/src/AddArtist/ImportArtist/Import/SelectArtist/ImportArtistName.css @@ -7,7 +7,7 @@ margin-right: 5px; } -.overview { +.disambiguation { margin-right: 5px; color: $disabledColor; } diff --git a/frontend/src/AddArtist/ImportArtist/Import/SelectArtist/ImportArtistName.js b/frontend/src/AddArtist/ImportArtist/Import/SelectArtist/ImportArtistName.js index a88839bb6..25d4edd16 100644 --- a/frontend/src/AddArtist/ImportArtist/Import/SelectArtist/ImportArtistName.js +++ b/frontend/src/AddArtist/ImportArtist/Import/SelectArtist/ImportArtistName.js @@ -7,6 +7,7 @@ import styles from './ImportArtistName.css'; function ImportArtistName(props) { const { artistName, + disambiguation, // year, isExistingArtist } = props; @@ -16,6 +17,9 @@ function ImportArtistName(props) {
{artistName}
+
+ {disambiguation} +
{ isExistingArtist && @@ -31,6 +35,7 @@ function ImportArtistName(props) { ImportArtistName.propTypes = { artistName: PropTypes.string.isRequired, + disambiguation: PropTypes.string, // year: PropTypes.number.isRequired, isExistingArtist: PropTypes.bool.isRequired }; diff --git a/frontend/src/AddArtist/ImportArtist/Import/SelectArtist/ImportArtistSearchResult.js b/frontend/src/AddArtist/ImportArtist/Import/SelectArtist/ImportArtistSearchResult.js index d4d3bd104..aa489f0fb 100644 --- a/frontend/src/AddArtist/ImportArtist/Import/SelectArtist/ImportArtistSearchResult.js +++ b/frontend/src/AddArtist/ImportArtist/Import/SelectArtist/ImportArtistSearchResult.js @@ -19,7 +19,7 @@ class ImportArtistSearchResult extends Component { render() { const { artistName, - // overview, + disambiguation, // year, isExistingArtist } = this.props; @@ -31,7 +31,7 @@ class ImportArtistSearchResult extends Component { > @@ -43,7 +43,7 @@ class ImportArtistSearchResult extends Component { ImportArtistSearchResult.propTypes = { foreignArtistId: PropTypes.string.isRequired, artistName: PropTypes.string.isRequired, - // overview: PropTypes.string.isRequired, + disambiguation: PropTypes.string, // year: PropTypes.number.isRequired, isExistingArtist: PropTypes.bool.isRequired, onPress: PropTypes.func.isRequired diff --git a/frontend/src/AddArtist/ImportArtist/Import/SelectArtist/ImportArtistSelectArtist.js b/frontend/src/AddArtist/ImportArtist/Import/SelectArtist/ImportArtistSelectArtist.js index 7557ae0c5..f2f890cb4 100644 --- a/frontend/src/AddArtist/ImportArtist/Import/SelectArtist/ImportArtistSelectArtist.js +++ b/frontend/src/AddArtist/ImportArtist/Import/SelectArtist/ImportArtistSelectArtist.js @@ -158,7 +158,7 @@ class ImportArtistSelectArtist extends Component { isPopulated && selectedArtist && @@ -229,7 +229,7 @@ class ImportArtistSelectArtist extends Component { key={item.foreignArtistId} foreignArtistId={item.foreignArtistId} artistName={item.artistName} - // overview={item.overview} + disambiguation={item.disambiguation} // year={item.year} onPress={this.onArtistSelect} /> diff --git a/frontend/src/Artist/Index/Menus/ArtistIndexSortMenu.js b/frontend/src/Artist/Index/Menus/ArtistIndexSortMenu.js index d618b96ba..c4c70e0d2 100644 --- a/frontend/src/Artist/Index/Menus/ArtistIndexSortMenu.js +++ b/frontend/src/Artist/Index/Menus/ArtistIndexSortMenu.js @@ -24,6 +24,15 @@ function ArtistIndexSortMenu(props) { Name + + Type + + + {artistType} + + ); + } + if (name === 'qualityProfileId') { return ( - // - // - // ); - // } - if (name === 'actions') { return ( 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 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 Genres { get; set; } - //public HashSet 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 { 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(), diff --git a/src/NzbDrone.Core/Datastore/Migration/119_artist_type.cs b/src/NzbDrone.Core/Datastore/Migration/119_artist_type.cs new file mode 100644 index 000000000..4cef4cca3 --- /dev/null +++ b/src/NzbDrone.Core/Datastore/Migration/119_artist_type.cs @@ -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(); + } + + } +} diff --git a/src/NzbDrone.Core/MetadataSource/SkyHook/Resource/ArtistResource.cs b/src/NzbDrone.Core/MetadataSource/SkyHook/Resource/ArtistResource.cs index 2dc8f920d..85fc14ea8 100644 --- a/src/NzbDrone.Core/MetadataSource/SkyHook/Resource/ArtistResource.cs +++ b/src/NzbDrone.Core/MetadataSource/SkyHook/Resource/ArtistResource.cs @@ -14,6 +14,8 @@ namespace NzbDrone.Core.MetadataSource.SkyHook.Resource public List 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 Images { get; set; } public List Links { get; set; } diff --git a/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs b/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs index 8c3d770b7..a8642e486 100644 --- a/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs +++ b/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs @@ -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); diff --git a/src/NzbDrone.Core/Music/AddArtistService.cs b/src/NzbDrone.Core/Music/AddArtistService.cs index 1ed528c99..5cfbe6c68 100644 --- a/src/NzbDrone.Core/Music/AddArtistService.cs +++ b/src/NzbDrone.Core/Music/AddArtistService.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/src/NzbDrone.Core/Music/Artist.cs b/src/NzbDrone.Core/Music/Artist.cs index c9184e42a..be70ee211 100644 --- a/src/NzbDrone.Core/Music/Artist.cs +++ b/src/NzbDrone.Core/Music/Artist.cs @@ -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; } diff --git a/src/NzbDrone.Core/Music/RefreshArtistService.cs b/src/NzbDrone.Core/Music/RefreshArtistService.cs index 503c1fd06..65372b82d 100644 --- a/src/NzbDrone.Core/Music/RefreshArtistService.cs +++ b/src/NzbDrone.Core/Music/RefreshArtistService.cs @@ -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 { diff --git a/src/NzbDrone.Core/NzbDrone.Core.csproj b/src/NzbDrone.Core/NzbDrone.Core.csproj index d4d7e6b8a..dad07f20e 100644 --- a/src/NzbDrone.Core/NzbDrone.Core.csproj +++ b/src/NzbDrone.Core/NzbDrone.Core.csproj @@ -293,6 +293,7 @@ +