diff --git a/MediaBrowser.Model/ApiClient/IApiClient.cs b/MediaBrowser.Model/ApiClient/IApiClient.cs
index b15d1c1d5f..b99773e4d5 100644
--- a/MediaBrowser.Model/ApiClient/IApiClient.cs
+++ b/MediaBrowser.Model/ApiClient/IApiClient.cs
@@ -240,6 +240,22 @@ namespace MediaBrowser.Model.ApiClient
/// userId
Task GetGenreAsync(string name, string userId);
+ ///
+ /// Gets the music genre async.
+ ///
+ /// The name.
+ /// The user id.
+ /// Task{BaseItemDto}.
+ Task GetMusicGenreAsync(string name, string userId);
+
+ ///
+ /// Gets the game genre async.
+ ///
+ /// The name.
+ /// The user id.
+ /// Task{BaseItemDto}.
+ Task GetGameGenreAsync(string name, string userId);
+
///
/// Gets the artist async.
///
diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs b/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs
index 209ae0e459..0ac0f0533b 100644
--- a/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs
+++ b/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs
@@ -1,6 +1,8 @@
using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Resolvers;
+using MediaBrowser.Model.Entities;
+using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@@ -12,6 +14,13 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Audio
///
public class MusicAlbumResolver : ItemResolver
{
+ private readonly ILibraryManager _libraryManager;
+
+ public MusicAlbumResolver(ILibraryManager libraryManager)
+ {
+ _libraryManager = libraryManager;
+ }
+
///
/// Gets the priority.
///
@@ -35,6 +44,15 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Audio
if (args.Parent.IsRoot) return null;
if (args.Parent is MusicAlbum) return null;
+ var collectionType = args.Parent == null ? null : _libraryManager.FindCollectionType(args.Parent);
+
+ // If there's a collection type and it's not music, it can't be a series
+ if (!string.IsNullOrEmpty(collectionType) &&
+ !string.Equals(collectionType, CollectionType.Music, StringComparison.OrdinalIgnoreCase))
+ {
+ return null;
+ }
+
return IsMusicAlbum(args) ? new MusicAlbum
{
DisplayMediaType = "Album"
diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs b/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs
index fa34a6a2e8..e2c71f613b 100644
--- a/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs
+++ b/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs
@@ -1,6 +1,8 @@
using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Resolvers;
+using MediaBrowser.Model.Entities;
+using System;
using System.IO;
using System.Linq;
@@ -11,6 +13,13 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Audio
///
public class MusicArtistResolver : ItemResolver
{
+ private readonly ILibraryManager _libraryManager;
+
+ public MusicArtistResolver(ILibraryManager libraryManager)
+ {
+ _libraryManager = libraryManager;
+ }
+
///
/// Gets the priority.
///
@@ -39,6 +48,15 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Audio
return null;
}
+ var collectionType = args.Parent == null ? null : _libraryManager.FindCollectionType(args.Parent);
+
+ // If there's a collection type and it's not music, it can't be a series
+ if (!string.IsNullOrEmpty(collectionType) &&
+ !string.Equals(collectionType, CollectionType.Music, StringComparison.OrdinalIgnoreCase))
+ {
+ return null;
+ }
+
// If we contain an album assume we are an artist folder
return args.FileSystemChildren.Where(i => (i.Attributes & FileAttributes.Directory) == FileAttributes.Directory).Any(i => MusicAlbumResolver.IsMusicAlbum(i.FullName)) ? new MusicArtist() : null;
}
diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs b/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs
index 10e73b288e..9c8f4dceb2 100644
--- a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs
+++ b/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs
@@ -13,6 +13,13 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV
///
public class SeriesResolver : FolderResolver
{
+ private readonly ILibraryManager _libraryManager;
+
+ public SeriesResolver(ILibraryManager libraryManager)
+ {
+ _libraryManager = libraryManager;
+ }
+
///
/// Gets the priority.
///
@@ -46,6 +53,15 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV
return null;
}
+ var collectionType = args.Parent == null ? null : _libraryManager.FindCollectionType(args.Parent);
+
+ // If there's a collection type and it's not tv, it can't be a series
+ if (!string.IsNullOrEmpty(collectionType) &&
+ !string.Equals(collectionType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase))
+ {
+ return null;
+ }
+
// It's a Series if any of the following conditions are met:
// series.xml exists
// [tvdbid= is present in the path