Remove support for games as a media type

This commit is contained in:
Claus Vium 2019-01-28 18:49:25 +01:00 committed by Bond-009
parent b5e8cce4cf
commit 8985fb8d58
102 changed files with 9 additions and 1705 deletions

View File

@ -454,7 +454,7 @@ namespace Emby.Dlna.ContentDirectory
User = user,
Recursive = true,
IsMissing = false,
ExcludeItemTypes = new[] { typeof(Game).Name, typeof(Book).Name },
ExcludeItemTypes = new[] { typeof(Book).Name },
IsFolder = isFolder,
MediaTypes = mediaTypes.ToArray(),
DtoOptions = GetDtoOptions()
@ -523,7 +523,7 @@ namespace Emby.Dlna.ContentDirectory
Limit = limit,
StartIndex = startIndex,
IsVirtualItem = false,
ExcludeItemTypes = new[] { typeof(Game).Name, typeof(Book).Name },
ExcludeItemTypes = new[] { typeof(Book).Name },
IsPlaceHolder = false,
DtoOptions = GetDtoOptions()
};

View File

@ -808,7 +808,7 @@ namespace Emby.Dlna.Didl
{
writer.WriteString(_profile.RequiresPlainFolders ? "object.container.storageFolder" : "object.container.genre.musicGenre");
}
else if (item is Genre || item is GameGenre)
else if (item is Genre)
{
writer.WriteString(_profile.RequiresPlainFolders ? "object.container.storageFolder" : "object.container.genre");
}

View File

@ -73,11 +73,6 @@ namespace Emby.Notifications
Type = NotificationType.AudioPlayback.ToString()
},
new NotificationTypeInfo
{
Type = NotificationType.GamePlayback.ToString()
},
new NotificationTypeInfo
{
Type = NotificationType.VideoPlayback.ToString()
@ -88,11 +83,6 @@ namespace Emby.Notifications
Type = NotificationType.AudioPlaybackStopped.ToString()
},
new NotificationTypeInfo
{
Type = NotificationType.GamePlaybackStopped.ToString()
},
new NotificationTypeInfo
{
Type = NotificationType.VideoPlaybackStopped.ToString()

View File

@ -207,10 +207,6 @@ namespace Emby.Server.Implementations.Activity
{
return NotificationType.AudioPlayback.ToString();
}
if (string.Equals(mediaType, MediaType.Game, StringComparison.OrdinalIgnoreCase))
{
return NotificationType.GamePlayback.ToString();
}
if (string.Equals(mediaType, MediaType.Video, StringComparison.OrdinalIgnoreCase))
{
return NotificationType.VideoPlayback.ToString();
@ -225,10 +221,6 @@ namespace Emby.Server.Implementations.Activity
{
return NotificationType.AudioPlaybackStopped.ToString();
}
if (string.Equals(mediaType, MediaType.Game, StringComparison.OrdinalIgnoreCase))
{
return NotificationType.GamePlaybackStopped.ToString();
}
if (string.Equals(mediaType, MediaType.Video, StringComparison.OrdinalIgnoreCase))
{
return NotificationType.VideoPlaybackStopped.ToString();

View File

@ -1671,7 +1671,6 @@ namespace Emby.Server.Implementations
var minRequiredVersions = new Dictionary<string, Version>(StringComparer.OrdinalIgnoreCase)
{
{ "GameBrowser.dll", new Version(3, 1) },
{ "moviethemesongs.dll", new Version(1, 6) },
{ "themesongs.dll", new Version(1, 2) }
};

View File

@ -1239,10 +1239,6 @@ namespace Emby.Server.Implementations.Data
{
return false;
}
else if (type == typeof(GameGenre))
{
return false;
}
else if (type == typeof(Genre))
{
return false;
@ -4789,10 +4785,6 @@ namespace Emby.Server.Implementations.Data
{
list.Add(typeof(MusicGenre).Name);
}
if (IsTypeInQuery(typeof(GameGenre).Name, query))
{
list.Add(typeof(GameGenre).Name);
}
if (IsTypeInQuery(typeof(MusicArtist).Name, query))
{
list.Add(typeof(MusicArtist).Name);
@ -4891,9 +4883,6 @@ namespace Emby.Server.Implementations.Data
typeof(Book),
typeof(CollectionFolder),
typeof(Folder),
typeof(Game),
typeof(GameGenre),
typeof(GameSystem),
typeof(Genre),
typeof(Person),
typeof(Photo),
@ -5251,11 +5240,6 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
return GetItemValues(query, new[] { 2 }, typeof(Genre).FullName);
}
public QueryResult<Tuple<BaseItem, ItemCounts>> GetGameGenres(InternalItemsQuery query)
{
return GetItemValues(query, new[] { 2 }, typeof(GameGenre).FullName);
}
public QueryResult<Tuple<BaseItem, ItemCounts>> GetMusicGenres(InternalItemsQuery query)
{
return GetItemValues(query, new[] { 2 }, typeof(MusicGenre).FullName);
@ -5276,14 +5260,9 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
return GetItemValueNames(new[] { 2 }, new List<string> { "Audio", "MusicVideo", "MusicAlbum", "MusicArtist" }, new List<string>());
}
public List<string> GetGameGenreNames()
{
return GetItemValueNames(new[] { 2 }, new List<string> { "Game" }, new List<string>());
}
public List<string> GetGenreNames()
{
return GetItemValueNames(new[] { 2 }, new List<string>(), new List<string> { "Audio", "MusicVideo", "MusicAlbum", "MusicArtist", "Game", "GameSystem" });
return GetItemValueNames(new[] { 2 }, new List<string>(), new List<string> { "Audio", "MusicVideo", "MusicAlbum", "MusicArtist" });
}
private List<string> GetItemValueNames(int[] itemValueTypes, List<string> withItemTypes, List<string> excludeItemTypes)
@ -5652,10 +5631,6 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
{
counts.SongCount = value;
}
else if (string.Equals(typeName, typeof(Game).FullName, StringComparison.OrdinalIgnoreCase))
{
counts.GameCount = value;
}
else if (string.Equals(typeName, typeof(Trailer).FullName, StringComparison.OrdinalIgnoreCase))
{
counts.TrailerCount = value;

View File

@ -374,10 +374,6 @@ namespace Emby.Server.Implementations.Dto
dto.MusicVideoCount = taggedItems.Count(i => i is MusicVideo);
dto.SongCount = taggedItems.Count(i => i is Audio);
}
else if (item is GameGenre)
{
dto.GameCount = taggedItems.Count(i => i is Game);
}
else
{
// This populates them all and covers Genre, Person, Studio, Year
@ -385,7 +381,6 @@ namespace Emby.Server.Implementations.Dto
dto.ArtistCount = taggedItems.Count(i => i is MusicArtist);
dto.AlbumCount = taggedItems.Count(i => i is MusicAlbum);
dto.EpisodeCount = taggedItems.Count(i => i is Episode);
dto.GameCount = taggedItems.Count(i => i is Game);
dto.MovieCount = taggedItems.Count(i => i is Movie);
dto.TrailerCount = taggedItems.Count(i => i is Trailer);
dto.MusicVideoCount = taggedItems.Count(i => i is MusicVideo);
@ -532,17 +527,6 @@ namespace Emby.Server.Implementations.Dto
dto.Album = item.Album;
}
private static void SetGameProperties(BaseItemDto dto, Game item)
{
dto.GameSystem = item.GameSystem;
dto.MultiPartGameFiles = item.MultiPartGameFiles;
}
private static void SetGameSystemProperties(BaseItemDto dto, GameSystem item)
{
dto.GameSystem = item.GameSystemName;
}
private string[] GetImageTags(BaseItem item, List<ItemImageInfo> images)
{
return images
@ -698,11 +682,6 @@ namespace Emby.Server.Implementations.Dto
return _libraryManager.GetMusicGenreId(name);
}
if (owner is Game || owner is GameSystem)
{
return _libraryManager.GetGameGenreId(name);
}
return _libraryManager.GetGenreId(name);
}
@ -1206,20 +1185,6 @@ namespace Emby.Server.Implementations.Dto
}
}
var game = item as Game;
if (game != null)
{
SetGameProperties(dto, game);
}
var gameSystem = item as GameSystem;
if (gameSystem != null)
{
SetGameSystemProperties(dto, gameSystem);
}
var musicVideo = item as MusicVideo;
if (musicVideo != null)
{

View File

@ -215,7 +215,7 @@ namespace Emby.Server.Implementations.Images
{
return CreateSquareCollage(item, itemsWithImages, outputPath);
}
if (item is Playlist || item is MusicGenre || item is Genre || item is GameGenre || item is PhotoAlbum)
if (item is Playlist || item is MusicGenre || item is Genre || item is PhotoAlbum)
{
return CreateSquareCollage(item, itemsWithImages, outputPath);
}

View File

@ -869,11 +869,6 @@ namespace Emby.Server.Implementations.Library
return GetItemByNameId<MusicGenre>(MusicGenre.GetPath, name);
}
public Guid GetGameGenreId(string name)
{
return GetItemByNameId<GameGenre>(GameGenre.GetPath, name);
}
/// <summary>
/// Gets a Genre
/// </summary>
@ -894,16 +889,6 @@ namespace Emby.Server.Implementations.Library
return CreateItemByName<MusicGenre>(MusicGenre.GetPath, name, new DtoOptions(true));
}
/// <summary>
/// Gets the game genre.
/// </summary>
/// <param name="name">The name.</param>
/// <returns>Task{GameGenre}.</returns>
public GameGenre GetGameGenre(string name)
{
return CreateItemByName<GameGenre>(GameGenre.GetPath, name, new DtoOptions(true));
}
/// <summary>
/// Gets a Year
/// </summary>
@ -1370,17 +1355,6 @@ namespace Emby.Server.Implementations.Library
return ItemRepository.GetGenres(query);
}
public QueryResult<Tuple<BaseItem, ItemCounts>> GetGameGenres(InternalItemsQuery query)
{
if (query.User != null)
{
AddUserToQuery(query, query.User);
}
SetTopParentOrAncestorIds(query);
return ItemRepository.GetGameGenres(query);
}
public QueryResult<Tuple<BaseItem, ItemCounts>> GetMusicGenres(InternalItemsQuery query)
{
if (query.User != null)

View File

@ -99,14 +99,12 @@ namespace Emby.Server.Implementations.Library
if (!query.IncludeMedia)
{
AddIfMissing(includeItemTypes, typeof(Genre).Name);
AddIfMissing(includeItemTypes, typeof(GameGenre).Name);
AddIfMissing(includeItemTypes, typeof(MusicGenre).Name);
}
}
else
{
AddIfMissing(excludeItemTypes, typeof(Genre).Name);
AddIfMissing(excludeItemTypes, typeof(GameGenre).Name);
AddIfMissing(excludeItemTypes, typeof(MusicGenre).Name);
}

View File

@ -308,9 +308,6 @@ namespace Emby.Server.Implementations.Library
mediaTypes.Add(MediaType.Book);
mediaTypes.Add(MediaType.Audio);
break;
case CollectionType.Games:
mediaTypes.Add(MediaType.Game);
break;
case CollectionType.Music:
mediaTypes.Add(MediaType.Audio);
break;
@ -336,7 +333,6 @@ namespace Emby.Server.Implementations.Library
typeof(Person).Name,
typeof(Studio).Name,
typeof(Year).Name,
typeof(GameGenre).Name,
typeof(MusicGenre).Name,
typeof(Genre).Name

View File

@ -1,45 +0,0 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Persistence;
using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.Library.Validators
{
/// <summary>
/// Class GameGenresPostScanTask
/// </summary>
public class GameGenresPostScanTask : ILibraryPostScanTask
{
/// <summary>
/// The _library manager
/// </summary>
private readonly ILibraryManager _libraryManager;
private readonly ILogger _logger;
private readonly IItemRepository _itemRepo;
/// <summary>
/// Initializes a new instance of the <see cref="GameGenresPostScanTask" /> class.
/// </summary>
/// <param name="libraryManager">The library manager.</param>
/// <param name="logger">The logger.</param>
public GameGenresPostScanTask(ILibraryManager libraryManager, ILogger logger, IItemRepository itemRepo)
{
_libraryManager = libraryManager;
_logger = logger;
_itemRepo = itemRepo;
}
/// <summary>
/// Runs the specified progress.
/// </summary>
/// <param name="progress">The progress.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
public Task Run(IProgress<double> progress, CancellationToken cancellationToken)
{
return new GameGenresValidator(_libraryManager, _logger, _itemRepo).Run(progress, cancellationToken);
}
}
}

View File

@ -1,72 +0,0 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Persistence;
using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.Library.Validators
{
class GameGenresValidator
{
/// <summary>
/// The _library manager
/// </summary>
private readonly ILibraryManager _libraryManager;
/// <summary>
/// The _logger
/// </summary>
private readonly ILogger _logger;
private readonly IItemRepository _itemRepo;
public GameGenresValidator(ILibraryManager libraryManager, ILogger logger, IItemRepository itemRepo)
{
_libraryManager = libraryManager;
_logger = logger;
_itemRepo = itemRepo;
}
/// <summary>
/// Runs the specified progress.
/// </summary>
/// <param name="progress">The progress.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
public async Task Run(IProgress<double> progress, CancellationToken cancellationToken)
{
var names = _itemRepo.GetGameGenreNames();
var numComplete = 0;
var count = names.Count;
foreach (var name in names)
{
try
{
var item = _libraryManager.GetGameGenre(name);
await item.RefreshMetadata(cancellationToken).ConfigureAwait(false);
}
catch (OperationCanceledException)
{
// Don't clutter the log
throw;
}
catch (Exception ex)
{
_logger.LogError(ex, "Error refreshing {GenreName}", name);
}
numComplete++;
double percent = numComplete;
percent /= count;
percent *= 100;
progress.Report(percent);
}
progress.Report(100);
}
}
}

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "عملية تسجيل الدخول فشلت من {0}",
"Favorites": "المفضلات",
"Folders": "المجلدات",
"Games": "الألعاب",
"Genres": "أنواع الأفلام",
"HeaderAlbumArtists": "فنانو الألبومات",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "بدأ تشغيل المقطع الصوتي",
"NotificationOptionAudioPlaybackStopped": "تم إيقاف تشغيل المقطع الصوتي",
"NotificationOptionCameraImageUploaded": "تم رقع صورة الكاميرا",
"NotificationOptionGamePlayback": "تم تشغيل اللعبة",
"NotificationOptionGamePlaybackStopped": "تم إيقاف تشغيل اللعبة",
"NotificationOptionInstallationFailed": "عملية التنصيب فشلت",
"NotificationOptionNewLibraryContent": "تم إضافة محتوى جديد",
"NotificationOptionPluginError": "فشل في الملحق",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Failed login attempt from {0}",
"Favorites": "Любими",
"Folders": "Папки",
"Games": "Игри",
"Genres": "Жанрове",
"HeaderAlbumArtists": "Изпълнители на албуми",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Възпроизвеждането на звук започна",
"NotificationOptionAudioPlaybackStopped": "Възпроизвеждането на звук е спряно",
"NotificationOptionCameraImageUploaded": "Изображението от фотоапарата е качено",
"NotificationOptionGamePlayback": "Възпроизвеждането на играта започна",
"NotificationOptionGamePlaybackStopped": "Възпроизвеждането на играта е спряна",
"NotificationOptionInstallationFailed": "Неуспешно инсталиране",
"NotificationOptionNewLibraryContent": "Добавено е ново съдържание",
"NotificationOptionPluginError": "Грешка в приставка",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Intent de connexió fallit des de {0}",
"Favorites": "Preferits",
"Folders": "Directoris",
"Games": "Jocs",
"Genres": "Gèneres",
"HeaderAlbumArtists": "Album Artists",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Audio playback started",
"NotificationOptionAudioPlaybackStopped": "Audio playback stopped",
"NotificationOptionCameraImageUploaded": "Camera image uploaded",
"NotificationOptionGamePlayback": "Game playback started",
"NotificationOptionGamePlaybackStopped": "Game playback stopped",
"NotificationOptionInstallationFailed": "Installation failure",
"NotificationOptionNewLibraryContent": "New content added",
"NotificationOptionPluginError": "Un component ha fallat",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Neúspěšný pokus o přihlášení z {0}",
"Favorites": "Oblíbené",
"Folders": "Složky",
"Games": "Hry",
"Genres": "Žánry",
"HeaderAlbumArtists": "Umělci alba",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Přehrávání audia zahájeno",
"NotificationOptionAudioPlaybackStopped": "Přehrávání audia ukončeno",
"NotificationOptionCameraImageUploaded": "Kamerový záznam nahrán",
"NotificationOptionGamePlayback": "Spuštění hry zahájeno",
"NotificationOptionGamePlaybackStopped": "Hra ukončena",
"NotificationOptionInstallationFailed": "Chyba instalace",
"NotificationOptionNewLibraryContent": "Přidán nový obsah",
"NotificationOptionPluginError": "Chyba zásuvného modulu",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Fejlet loginforsøg fra {0}",
"Favorites": "Favoritter",
"Folders": "Mapper",
"Games": "Spil",
"Genres": "Genre",
"HeaderAlbumArtists": "Albumkunstnere",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Audioafspilning påbegyndt",
"NotificationOptionAudioPlaybackStopped": "Audioafspilning stoppet",
"NotificationOptionCameraImageUploaded": "Kamerabillede uploadet",
"NotificationOptionGamePlayback": "Afspilning af Spil påbegyndt",
"NotificationOptionGamePlaybackStopped": "Afspilning af Spil stoppet",
"NotificationOptionInstallationFailed": "Installationsfejl",
"NotificationOptionNewLibraryContent": "Nyt indhold tilføjet",
"NotificationOptionPluginError": "Pluginfejl",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Fehlgeschlagener Anmeldeversuch von {0}",
"Favorites": "Favoriten",
"Folders": "Verzeichnisse",
"Games": "Spiele",
"Genres": "Genres",
"HeaderAlbumArtists": "Album-Künstler",
"HeaderCameraUploads": "Kamera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Audiowiedergabe gestartet",
"NotificationOptionAudioPlaybackStopped": "Audiowiedergabe gestoppt",
"NotificationOptionCameraImageUploaded": "Kamera Bild hochgeladen",
"NotificationOptionGamePlayback": "Spielwiedergabe gestartet",
"NotificationOptionGamePlaybackStopped": "Spielwiedergabe gestoppt",
"NotificationOptionInstallationFailed": "Installationsfehler",
"NotificationOptionNewLibraryContent": "Neuer Inhalt hinzugefügt",
"NotificationOptionPluginError": "Plugin Fehler",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Αποτυχημένη προσπάθεια σύνδεσης από {0}",
"Favorites": "Αγαπημένα",
"Folders": "Φάκελοι",
"Games": "Παιχνίδια",
"Genres": "Είδη",
"HeaderAlbumArtists": "Άλμπουμ Καλλιτεχνών",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Η αναπαραγωγή ήχου ξεκίνησε",
"NotificationOptionAudioPlaybackStopped": "Η αναπαραγωγή ήχου σταμάτησε",
"NotificationOptionCameraImageUploaded": "Camera image uploaded",
"NotificationOptionGamePlayback": "Η αναπαραγωγή του παιχνιδιού ξεκίνησε",
"NotificationOptionGamePlaybackStopped": "Η αναπαραγωγή του παιχνιδιού σταμάτησε",
"NotificationOptionInstallationFailed": "Αποτυχία εγκατάστασης",
"NotificationOptionNewLibraryContent": "Προστέθηκε νέο περιεχόμενο",
"NotificationOptionPluginError": "Αποτυχία του plugin",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Failed login attempt from {0}",
"Favorites": "Favourites",
"Folders": "Folders",
"Games": "Games",
"Genres": "Genres",
"HeaderAlbumArtists": "Album Artists",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Audio playback started",
"NotificationOptionAudioPlaybackStopped": "Audio playback stopped",
"NotificationOptionCameraImageUploaded": "Camera image uploaded",
"NotificationOptionGamePlayback": "Game playback started",
"NotificationOptionGamePlaybackStopped": "Game playback stopped",
"NotificationOptionInstallationFailed": "Installation failure",
"NotificationOptionNewLibraryContent": "New content added",
"NotificationOptionPluginError": "Plugin failure",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Failed login attempt from {0}",
"Favorites": "Favorites",
"Folders": "Folders",
"Games": "Games",
"Genres": "Genres",
"HeaderAlbumArtists": "Album Artists",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Audio playback started",
"NotificationOptionAudioPlaybackStopped": "Audio playback stopped",
"NotificationOptionCameraImageUploaded": "Camera image uploaded",
"NotificationOptionGamePlayback": "Game playback started",
"NotificationOptionGamePlaybackStopped": "Game playback stopped",
"NotificationOptionInstallationFailed": "Installation failure",
"NotificationOptionNewLibraryContent": "New content added",
"NotificationOptionPluginError": "Plugin failure",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Failed login attempt from {0}",
"Favorites": "Favorites",
"Folders": "Folders",
"Games": "Games",
"Genres": "Genres",
"HeaderAlbumArtists": "Album Artists",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Audio playback started",
"NotificationOptionAudioPlaybackStopped": "Audio playback stopped",
"NotificationOptionCameraImageUploaded": "Camera image uploaded",
"NotificationOptionGamePlayback": "Game playback started",
"NotificationOptionGamePlaybackStopped": "Game playback stopped",
"NotificationOptionInstallationFailed": "Installation failure",
"NotificationOptionNewLibraryContent": "New content added",
"NotificationOptionPluginError": "Plugin failure",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Intento fallido de inicio de sesión de {0}",
"Favorites": "Favoritos",
"Folders": "Carpetas",
"Games": "Juegos",
"Genres": "Géneros",
"HeaderAlbumArtists": "Artistas del Álbum",
"HeaderCameraUploads": "Subidos desde Camara",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Reproducción de audio iniciada",
"NotificationOptionAudioPlaybackStopped": "Reproducción de audio detenida",
"NotificationOptionCameraImageUploaded": "Imagen de la cámara subida",
"NotificationOptionGamePlayback": "Ejecución de juego iniciada",
"NotificationOptionGamePlaybackStopped": "Ejecución de juego detenida",
"NotificationOptionInstallationFailed": "Falla de instalación",
"NotificationOptionNewLibraryContent": "Nuevo contenido agregado",
"NotificationOptionPluginError": "Falla de complemento",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Error al intentar iniciar sesión a partir de {0}",
"Favorites": "Favoritos",
"Folders": "Carpetas",
"Games": "Juegos",
"Genres": "Géneros",
"HeaderAlbumArtists": "Artistas del Álbum",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Se inició la reproducción de audio",
"NotificationOptionAudioPlaybackStopped": "Se detuvo la reproducción de audio",
"NotificationOptionCameraImageUploaded": "Imagen de la cámara cargada",
"NotificationOptionGamePlayback": "Se inició la reproducción del juego",
"NotificationOptionGamePlaybackStopped": "Se detuvo la reproducción del juego",
"NotificationOptionInstallationFailed": "Error de instalación",
"NotificationOptionNewLibraryContent": "Nuevo contenido añadido",
"NotificationOptionPluginError": "Error en plugin",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "تلاش برای ورود از {0} ناموفق بود",
"Favorites": "مورد علاقه ها",
"Folders": "پوشه ها",
"Games": "بازی ها",
"Genres": "ژانرها",
"HeaderAlbumArtists": "هنرمندان آلبوم",
"HeaderCameraUploads": "آپلودهای دوربین",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "پخش صدا آغاز شد",
"NotificationOptionAudioPlaybackStopped": "پخش صدا متوقف شد",
"NotificationOptionCameraImageUploaded": "تصاویر دوربین آپلود شد",
"NotificationOptionGamePlayback": "پخش بازی آغاز شد",
"NotificationOptionGamePlaybackStopped": "پخش بازی متوقف شد",
"NotificationOptionInstallationFailed": "شکست نصب",
"NotificationOptionNewLibraryContent": "محتوای جدید افزوده شد",
"NotificationOptionPluginError": "خرابی افزونه",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Failed login attempt from {0}",
"Favorites": "Favorites",
"Folders": "Folders",
"Games": "Games",
"Genres": "Genres",
"HeaderAlbumArtists": "Album Artists",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Audio playback started",
"NotificationOptionAudioPlaybackStopped": "Audio playback stopped",
"NotificationOptionCameraImageUploaded": "Camera image uploaded",
"NotificationOptionGamePlayback": "Game playback started",
"NotificationOptionGamePlaybackStopped": "Game playback stopped",
"NotificationOptionInstallationFailed": "Installation failure",
"NotificationOptionNewLibraryContent": "New content added",
"NotificationOptionPluginError": "Plugin failure",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Échec d'une tentative de connexion de {0}",
"Favorites": "Favoris",
"Folders": "Dossiers",
"Games": "Jeux",
"Genres": "Genres",
"HeaderAlbumArtists": "Artistes de l'album",
"HeaderCameraUploads": "Photos transférées",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Lecture audio démarrée",
"NotificationOptionAudioPlaybackStopped": "Lecture audio arrêtée",
"NotificationOptionCameraImageUploaded": "L'image de l'appareil photo a été transférée",
"NotificationOptionGamePlayback": "Lecture de jeu démarrée",
"NotificationOptionGamePlaybackStopped": "Lecture de jeu arrêtée",
"NotificationOptionInstallationFailed": "Échec d'installation",
"NotificationOptionNewLibraryContent": "Nouveau contenu ajouté",
"NotificationOptionPluginError": "Erreur d'extension",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Failed login attempt from {0}",
"Favorites": "Favorites",
"Folders": "Folders",
"Games": "Spiel",
"Genres": "Genres",
"HeaderAlbumArtists": "Albuminterprete",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Audio playback started",
"NotificationOptionAudioPlaybackStopped": "Audio playback stopped",
"NotificationOptionCameraImageUploaded": "Camera image uploaded",
"NotificationOptionGamePlayback": "Game playback started",
"NotificationOptionGamePlaybackStopped": "Game playback stopped",
"NotificationOptionInstallationFailed": "Installation failure",
"NotificationOptionNewLibraryContent": "New content added",
"NotificationOptionPluginError": "Plugin failure",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Failed login attempt from {0}",
"Favorites": "Favorites",
"Folders": "Folders",
"Games": "משחקים",
"Genres": "ז'אנרים",
"HeaderAlbumArtists": "Album Artists",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Audio playback started",
"NotificationOptionAudioPlaybackStopped": "Audio playback stopped",
"NotificationOptionCameraImageUploaded": "Camera image uploaded",
"NotificationOptionGamePlayback": "Game playback started",
"NotificationOptionGamePlaybackStopped": "Game playback stopped",
"NotificationOptionInstallationFailed": "Installation failure",
"NotificationOptionNewLibraryContent": "New content added",
"NotificationOptionPluginError": "Plugin failure",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Neuspjeli pokušaj prijave za {0}",
"Favorites": "Omiljeni",
"Folders": "Mape",
"Games": "Igre",
"Genres": "Žanrovi",
"HeaderAlbumArtists": "Izvođači albuma",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Reprodukcija glazbe započeta",
"NotificationOptionAudioPlaybackStopped": "Reprodukcija audiozapisa je zaustavljena",
"NotificationOptionCameraImageUploaded": "Slike kamere preuzete",
"NotificationOptionGamePlayback": "Igrica pokrenuta",
"NotificationOptionGamePlaybackStopped": "Reprodukcija igre je zaustavljena",
"NotificationOptionInstallationFailed": "Instalacija nije izvršena",
"NotificationOptionNewLibraryContent": "Novi sadržaj je dodan",
"NotificationOptionPluginError": "Dodatak otkazao",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Failed login attempt from {0}",
"Favorites": "Kedvencek",
"Folders": "Könyvtárak",
"Games": "Játékok",
"Genres": "Műfajok",
"HeaderAlbumArtists": "Album Előadók",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Audió lejátszás elkezdve",
"NotificationOptionAudioPlaybackStopped": "Audió lejátszás befejezve",
"NotificationOptionCameraImageUploaded": "Kamera kép feltöltve",
"NotificationOptionGamePlayback": "Game playback started",
"NotificationOptionGamePlaybackStopped": "Game playback stopped",
"NotificationOptionInstallationFailed": "Telepítési hiba",
"NotificationOptionNewLibraryContent": "Új tartalom hozzáadva",
"NotificationOptionPluginError": "Bővítmény hiba",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Tentativo di accesso fallito da {0}",
"Favorites": "Preferiti",
"Folders": "Cartelle",
"Games": "Giochi",
"Genres": "Generi",
"HeaderAlbumArtists": "Artisti Album",
"HeaderCameraUploads": "Caricamenti Fotocamera",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "La riproduzione audio è iniziata",
"NotificationOptionAudioPlaybackStopped": "La riproduzione audio è stata interrotta",
"NotificationOptionCameraImageUploaded": "Immagine fotocamera caricata",
"NotificationOptionGamePlayback": "Il gioco è stato avviato",
"NotificationOptionGamePlaybackStopped": "Il gioco è stato fermato",
"NotificationOptionInstallationFailed": "Installazione fallita",
"NotificationOptionNewLibraryContent": "Nuovo contenuto aggiunto",
"NotificationOptionPluginError": "Errore del Plug-in",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "{0} тарапынан кіру әрекеті сәтсіз",
"Favorites": "Таңдаулылар",
"Folders": "Қалталар",
"Games": "Ойындар",
"Genres": "Жанрлар",
"HeaderAlbumArtists": "Альбом орындаушылары",
"HeaderCameraUploads": "Камерадан жүктелгендер",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Дыбыс ойнатуы басталды",
"NotificationOptionAudioPlaybackStopped": "Дыбыс ойнатуы тоқтатылды",
"NotificationOptionCameraImageUploaded": "Камерадан фотосурет кері қотарылған",
"NotificationOptionGamePlayback": "Ойын ойнатуы басталды",
"NotificationOptionGamePlaybackStopped": "Ойын ойнатуы тоқтатылды",
"NotificationOptionInstallationFailed": "Орнату сәтсіздігі",
"NotificationOptionNewLibraryContent": "Жаңа мазмұн үстелген",
"NotificationOptionPluginError": "Плагин сәтсіздігі",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Failed login attempt from {0}",
"Favorites": "Favorites",
"Folders": "Folders",
"Games": "Games",
"Genres": "Genres",
"HeaderAlbumArtists": "앨범 아티스트",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Audio playback started",
"NotificationOptionAudioPlaybackStopped": "Audio playback stopped",
"NotificationOptionCameraImageUploaded": "Camera image uploaded",
"NotificationOptionGamePlayback": "Game playback started",
"NotificationOptionGamePlaybackStopped": "Game playback stopped",
"NotificationOptionInstallationFailed": "Installation failure",
"NotificationOptionNewLibraryContent": "New content added",
"NotificationOptionPluginError": "Plugin failure",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Failed login attempt from {0}",
"Favorites": "Favorites",
"Folders": "Folders",
"Games": "Games",
"Genres": "Žanrai",
"HeaderAlbumArtists": "Album Artists",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Audio playback started",
"NotificationOptionAudioPlaybackStopped": "Audio playback stopped",
"NotificationOptionCameraImageUploaded": "Camera image uploaded",
"NotificationOptionGamePlayback": "Game playback started",
"NotificationOptionGamePlaybackStopped": "Game playback stopped",
"NotificationOptionInstallationFailed": "Installation failure",
"NotificationOptionNewLibraryContent": "New content added",
"NotificationOptionPluginError": "Plugin failure",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Failed login attempt from {0}",
"Favorites": "Favorites",
"Folders": "Folders",
"Games": "Games",
"Genres": "Genres",
"HeaderAlbumArtists": "Album Artists",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Audio playback started",
"NotificationOptionAudioPlaybackStopped": "Audio playback stopped",
"NotificationOptionCameraImageUploaded": "Camera image uploaded",
"NotificationOptionGamePlayback": "Game playback started",
"NotificationOptionGamePlaybackStopped": "Game playback stopped",
"NotificationOptionInstallationFailed": "Installation failure",
"NotificationOptionNewLibraryContent": "New content added",
"NotificationOptionPluginError": "Plugin failure",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Mislykket påloggingsforsøk fra {0}",
"Favorites": "Favoritter",
"Folders": "Mapper",
"Games": "Spill",
"Genres": "Sjanger",
"HeaderAlbumArtists": "Albumartist",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Lyd tilbakespilling startet",
"NotificationOptionAudioPlaybackStopped": "Lyd avspilling stoppet",
"NotificationOptionCameraImageUploaded": "Kamera bilde lastet opp",
"NotificationOptionGamePlayback": "Spill avspillingen startet",
"NotificationOptionGamePlaybackStopped": "Filmer",
"NotificationOptionInstallationFailed": "Installasjon feil",
"NotificationOptionNewLibraryContent": "Ny innhold er lagt til",
"NotificationOptionPluginError": "Plugin feil",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Mislukte aanmeld poging van {0}",
"Favorites": "Favorieten",
"Folders": "Mappen",
"Games": "Spellen",
"Genres": "Genres",
"HeaderAlbumArtists": "Album artiesten",
"HeaderCameraUploads": "Camera uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Geluid gestart",
"NotificationOptionAudioPlaybackStopped": "Geluid gestopt",
"NotificationOptionCameraImageUploaded": "Camera afbeelding geüpload",
"NotificationOptionGamePlayback": "Spel gestart",
"NotificationOptionGamePlaybackStopped": "Spel gestopt",
"NotificationOptionInstallationFailed": "Installatie mislukt",
"NotificationOptionNewLibraryContent": "Nieuwe content toegevoegd",
"NotificationOptionPluginError": "Plug-in fout",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Próba logowania przez {0} zakończona niepowodzeniem",
"Favorites": "Ulubione",
"Folders": "Foldery",
"Games": "Gry",
"Genres": "Gatunki",
"HeaderAlbumArtists": "Wykonawcy albumów",
"HeaderCameraUploads": "Przekazane obrazy",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Rozpoczęto odtwarzanie muzyki",
"NotificationOptionAudioPlaybackStopped": "Odtwarzane dźwięku zatrzymane",
"NotificationOptionCameraImageUploaded": "Przekazano obraz z urządzenia mobilnego",
"NotificationOptionGamePlayback": "Odtwarzanie gry rozpoczęte",
"NotificationOptionGamePlaybackStopped": "Odtwarzanie gry zatrzymane",
"NotificationOptionInstallationFailed": "Niepowodzenie instalacji",
"NotificationOptionNewLibraryContent": "Dodano nową zawartość",
"NotificationOptionPluginError": "Awaria wtyczki",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Falha na tentativa de login de {0}",
"Favorites": "Favoritos",
"Folders": "Pastas",
"Games": "Jogos",
"Genres": "Gêneros",
"HeaderAlbumArtists": "Artistas do Álbum",
"HeaderCameraUploads": "Uploads da Câmera",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Reprodução de áudio iniciada",
"NotificationOptionAudioPlaybackStopped": "Reprodução de áudio parada",
"NotificationOptionCameraImageUploaded": "Imagem de câmera enviada",
"NotificationOptionGamePlayback": "Reprodução de jogo iniciada",
"NotificationOptionGamePlaybackStopped": "Reprodução de jogo parada",
"NotificationOptionInstallationFailed": "Falha na instalação",
"NotificationOptionNewLibraryContent": "Novo conteúdo adicionado",
"NotificationOptionPluginError": "Falha de plugin",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Failed login attempt from {0}",
"Favorites": "Favorites",
"Folders": "Folders",
"Games": "Games",
"Genres": "Genres",
"HeaderAlbumArtists": "Album Artists",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Audio playback started",
"NotificationOptionAudioPlaybackStopped": "Audio playback stopped",
"NotificationOptionCameraImageUploaded": "Camera image uploaded",
"NotificationOptionGamePlayback": "Game playback started",
"NotificationOptionGamePlaybackStopped": "Game playback stopped",
"NotificationOptionInstallationFailed": "Installation failure",
"NotificationOptionNewLibraryContent": "New content added",
"NotificationOptionPluginError": "Plugin failure",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "{0} - попытка входа неудачна",
"Favorites": "Избранное",
"Folders": "Папки",
"Games": "Игры",
"Genres": "Жанры",
"HeaderAlbumArtists": "Исп-ли альбома",
"HeaderCameraUploads": "Камеры",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Воспр-ие аудио зап-но",
"NotificationOptionAudioPlaybackStopped": "Восп-ие аудио ост-но",
"NotificationOptionCameraImageUploaded": "Произведена выкладка отснятого с камеры",
"NotificationOptionGamePlayback": "Воспр-ие игры зап-но",
"NotificationOptionGamePlaybackStopped": "Восп-ие игры ост-но",
"NotificationOptionInstallationFailed": "Сбой установки",
"NotificationOptionNewLibraryContent": "Новое содержание добавлено",
"NotificationOptionPluginError": "Сбой плагина",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Neúspešný pokus o prihlásenie z {0}",
"Favorites": "Obľúbené",
"Folders": "Priečinky",
"Games": "Hry",
"Genres": "Žánre",
"HeaderAlbumArtists": "Album Artists",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Spustené prehrávanie audia",
"NotificationOptionAudioPlaybackStopped": "Zastavené prehrávanie audia",
"NotificationOptionCameraImageUploaded": "Nahraný obrázok z fotoaparátu",
"NotificationOptionGamePlayback": "Game playback started",
"NotificationOptionGamePlaybackStopped": "Hra ukončená",
"NotificationOptionInstallationFailed": "Chyba inštalácie",
"NotificationOptionNewLibraryContent": "Pridaný nový obsah",
"NotificationOptionPluginError": "Chyba rozšírenia",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Failed login attempt from {0}",
"Favorites": "Favorites",
"Folders": "Folders",
"Games": "Games",
"Genres": "Genres",
"HeaderAlbumArtists": "Album Artists",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Audio playback started",
"NotificationOptionAudioPlaybackStopped": "Audio playback stopped",
"NotificationOptionCameraImageUploaded": "Camera image uploaded",
"NotificationOptionGamePlayback": "Game playback started",
"NotificationOptionGamePlaybackStopped": "Game playback stopped",
"NotificationOptionInstallationFailed": "Installation failure",
"NotificationOptionNewLibraryContent": "New content added",
"NotificationOptionPluginError": "Plugin failure",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Misslyckat inloggningsförsök från {0}",
"Favorites": "Favoriter",
"Folders": "Mappar",
"Games": "Spel",
"Genres": "Genrer",
"HeaderAlbumArtists": "Albumartister",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Ljuduppspelning har påbörjats",
"NotificationOptionAudioPlaybackStopped": "Ljuduppspelning stoppad",
"NotificationOptionCameraImageUploaded": "Kamerabild har laddats upp",
"NotificationOptionGamePlayback": "Spel har startats",
"NotificationOptionGamePlaybackStopped": "Spel stoppat",
"NotificationOptionInstallationFailed": "Fel vid installation",
"NotificationOptionNewLibraryContent": "Nytt innehåll har lagts till",
"NotificationOptionPluginError": "Fel uppstod med tillägget",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Failed login attempt from {0}",
"Favorites": "Favorites",
"Folders": "Folders",
"Games": "Games",
"Genres": "Genres",
"HeaderAlbumArtists": "Album Artists",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Audio playback started",
"NotificationOptionAudioPlaybackStopped": "Audio playback stopped",
"NotificationOptionCameraImageUploaded": "Camera image uploaded",
"NotificationOptionGamePlayback": "Game playback started",
"NotificationOptionGamePlaybackStopped": "Game playback stopped",
"NotificationOptionInstallationFailed": "Installation failure",
"NotificationOptionNewLibraryContent": "New content added",
"NotificationOptionPluginError": "Plugin failure",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "来自 {0} 的失败登入",
"Favorites": "最爱",
"Folders": "文件夹",
"Games": "游戏",
"Genres": "风格",
"HeaderAlbumArtists": "专辑作家",
"HeaderCameraUploads": "相机上传",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "音频开始播放",
"NotificationOptionAudioPlaybackStopped": "音频播放已停止",
"NotificationOptionCameraImageUploaded": "相机图片已上传",
"NotificationOptionGamePlayback": "游戏开始",
"NotificationOptionGamePlaybackStopped": "游戏停止",
"NotificationOptionInstallationFailed": "安装失败",
"NotificationOptionNewLibraryContent": "已添加新内容",
"NotificationOptionPluginError": "插件失败",

View File

@ -14,7 +14,6 @@
"FailedLoginAttemptWithUserName": "Failed login attempt from {0}",
"Favorites": "Favorites",
"Folders": "Folders",
"Games": "Games",
"Genres": "Genres",
"HeaderAlbumArtists": "Album Artists",
"HeaderCameraUploads": "Camera Uploads",
@ -51,8 +50,6 @@
"NotificationOptionAudioPlayback": "Audio playback started",
"NotificationOptionAudioPlaybackStopped": "Audio playback stopped",
"NotificationOptionCameraImageUploaded": "Camera image uploaded",
"NotificationOptionGamePlayback": "Game playback started",
"NotificationOptionGamePlaybackStopped": "Game playback stopped",
"NotificationOptionInstallationFailed": "Installation failure",
"NotificationOptionNewLibraryContent": "New content added",
"NotificationOptionPluginError": "Plugin failure",

View File

@ -136,12 +136,6 @@ namespace Emby.Server.Implementations
return path;
}
/// <summary>
/// Gets the game genre path.
/// </summary>
/// <value>The game genre path.</value>
public string GameGenrePath => Path.Combine(InternalMetadataPath, "GameGenre");
private string _internalMetadataPath;
public string InternalMetadataPath
{

View File

@ -1,51 +0,0 @@
using System;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Sorting;
using MediaBrowser.Model.Querying;
namespace Emby.Server.Implementations.Sorting
{
public class GameSystemComparer : IBaseItemComparer
{
/// <summary>
/// Compares the specified x.
/// </summary>
/// <param name="x">The x.</param>
/// <param name="y">The y.</param>
/// <returns>System.Int32.</returns>
public int Compare(BaseItem x, BaseItem y)
{
return string.Compare(GetValue(x), GetValue(y), StringComparison.CurrentCultureIgnoreCase);
}
/// <summary>
/// Gets the value.
/// </summary>
/// <param name="x">The x.</param>
/// <returns>System.String.</returns>
private static string GetValue(BaseItem x)
{
var game = x as Game;
if (game != null)
{
return game.GameSystem;
}
var system = x as GameSystem;
if (system != null)
{
return system.GameSystemName;
}
return string.Empty;
}
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.GameSystem;
}
}

View File

@ -1,43 +0,0 @@
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Sorting;
using MediaBrowser.Model.Querying;
namespace Emby.Server.Implementations.Sorting
{
public class PlayersComparer : IBaseItemComparer
{
/// <summary>
/// Compares the specified x.
/// </summary>
/// <param name="x">The x.</param>
/// <param name="y">The y.</param>
/// <returns>System.Int32.</returns>
public int Compare(BaseItem x, BaseItem y)
{
return GetValue(x).CompareTo(GetValue(y));
}
/// <summary>
/// Gets the value.
/// </summary>
/// <param name="x">The x.</param>
/// <returns>System.String.</returns>
private static int GetValue(BaseItem x)
{
var game = x as Game;
if (game != null)
{
return game.PlayersSupported ?? 0;
}
return 0;
}
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.Players;
}
}

View File

@ -43,10 +43,6 @@ namespace Emby.Server.Implementations.UserViews
{
includeItemTypes = new string[] { "Book", "AudioBook" };
}
else if (string.Equals(viewType, CollectionType.Games))
{
includeItemTypes = new string[] { "Game" };
}
else if (string.Equals(viewType, CollectionType.BoxSets))
{
includeItemTypes = new string[] { "BoxSet" };

View File

@ -228,21 +228,6 @@ namespace MediaBrowser.Api
return libraryManager.GetMusicGenre(name);
}
protected GameGenre GetGameGenre(string name, ILibraryManager libraryManager, DtoOptions dtoOptions)
{
if (name.IndexOf(BaseItem.SlugChar) != -1)
{
var result = GetItemFromSlugName<GameGenre>(libraryManager, name, dtoOptions);
if (result != null)
{
return result;
}
}
return libraryManager.GetGameGenre(name);
}
protected Person GetPerson(string name, ILibraryManager libraryManager, DtoOptions dtoOptions)
{
if (name.IndexOf(BaseItem.SlugChar) != -1)
@ -349,10 +334,6 @@ namespace MediaBrowser.Api
{
item = GetMusicGenre(name, libraryManager, dtoOptions);
}
else if (type.IndexOf("GameGenre", StringComparison.OrdinalIgnoreCase) == 0)
{
item = GetGameGenre(name, libraryManager, dtoOptions);
}
else if (type.IndexOf("Studio", StringComparison.OrdinalIgnoreCase) == 0)
{
item = GetStudio(name, libraryManager, dtoOptions);

View File

@ -143,16 +143,6 @@ namespace MediaBrowser.Api
}).ToArray();
}
else if (string.Equals(request.IncludeItemTypes, "Game", StringComparison.OrdinalIgnoreCase) ||
string.Equals(request.IncludeItemTypes, "GameSystem", StringComparison.OrdinalIgnoreCase))
{
filters.Genres = _libraryManager.GetGameGenres(genreQuery).Items.Select(i => new NameGuidPair
{
Name = i.Item1.Name,
Id = i.Item1.Id
}).ToArray();
}
else
{
filters.Genres = _libraryManager.GetGenres(genreQuery).Items.Select(i => new NameGuidPair

View File

@ -1,140 +0,0 @@
using System;
using System.IO;
using System.Linq;
using MediaBrowser.Controller.Dto;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Net;
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Services;
namespace MediaBrowser.Api
{
/// <summary>
/// Class GetGameSystemSummaries
/// </summary>
[Route("/Games/SystemSummaries", "GET", Summary = "Finds games similar to a given game.")]
public class GetGameSystemSummaries : IReturn<GameSystemSummary[]>
{
/// <summary>
/// Gets or sets the user id.
/// </summary>
/// <value>The user id.</value>
[ApiMember(Name = "UserId", Description = "Optional. Filter by user id", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
public Guid UserId { get; set; }
}
/// <summary>
/// Class GamesService
/// </summary>
[Authenticated]
public class GamesService : BaseApiService
{
/// <summary>
/// The _user manager
/// </summary>
private readonly IUserManager _userManager;
/// <summary>
/// The _user data repository
/// </summary>
private readonly IUserDataManager _userDataRepository;
/// <summary>
/// The _library manager
/// </summary>
private readonly ILibraryManager _libraryManager;
/// <summary>
/// The _item repo
/// </summary>
private readonly IItemRepository _itemRepo;
/// <summary>
/// The _dto service
/// </summary>
private readonly IDtoService _dtoService;
private readonly IAuthorizationContext _authContext;
/// <summary>
/// Initializes a new instance of the <see cref="GamesService" /> class.
/// </summary>
/// <param name="userManager">The user manager.</param>
/// <param name="userDataRepository">The user data repository.</param>
/// <param name="libraryManager">The library manager.</param>
/// <param name="itemRepo">The item repo.</param>
/// <param name="dtoService">The dto service.</param>
public GamesService(IUserManager userManager, IUserDataManager userDataRepository, ILibraryManager libraryManager, IItemRepository itemRepo, IDtoService dtoService, IAuthorizationContext authContext)
{
_userManager = userManager;
_userDataRepository = userDataRepository;
_libraryManager = libraryManager;
_itemRepo = itemRepo;
_dtoService = dtoService;
_authContext = authContext;
}
/// <summary>
/// Gets the specified request.
/// </summary>
/// <param name="request">The request.</param>
/// <returns>System.Object.</returns>
public object Get(GetGameSystemSummaries request)
{
var user = request.UserId == null ? null : _userManager.GetUserById(request.UserId);
var query = new InternalItemsQuery(user)
{
IncludeItemTypes = new[] { typeof(GameSystem).Name },
DtoOptions = new DtoOptions(false)
{
EnableImages = false
}
};
var result = _libraryManager.GetItemList(query)
.Cast<GameSystem>()
.Select(i => GetSummary(i, user))
.ToArray();
return ToOptimizedResult(result);
}
/// <summary>
/// Gets the summary.
/// </summary>
/// <param name="system">The system.</param>
/// <param name="user">The user.</param>
/// <returns>GameSystemSummary.</returns>
private GameSystemSummary GetSummary(GameSystem system, User user)
{
var summary = new GameSystemSummary
{
Name = system.GameSystemName,
DisplayName = system.Name
};
var items = user == null ?
system.GetRecursiveChildren(i => i is Game) :
system.GetRecursiveChildren(user, new InternalItemsQuery(user)
{
IncludeItemTypes = new[] { typeof(Game).Name },
DtoOptions = new DtoOptions(false)
{
EnableImages = false
}
});
var games = items.Cast<Game>().ToArray();
summary.ClientInstalledGameCount = games.Count(i => i.IsPlaceHolder);
summary.GameCount = games.Length;
summary.GameFileExtensions = games.Where(i => !i.IsPlaceHolder).Select(i => Path.GetExtension(i.Path))
.Distinct(StringComparer.OrdinalIgnoreCase)
.ToArray();
return summary;
}
}
}

View File

@ -95,8 +95,6 @@ namespace MediaBrowser.Api.Images
[Route("/Artists/{Name}/Images/{Type}/{Index}", "GET")]
[Route("/Genres/{Name}/Images/{Type}", "GET")]
[Route("/Genres/{Name}/Images/{Type}/{Index}", "GET")]
[Route("/GameGenres/{Name}/Images/{Type}", "GET")]
[Route("/GameGenres/{Name}/Images/{Type}/{Index}", "GET")]
[Route("/MusicGenres/{Name}/Images/{Type}", "GET")]
[Route("/MusicGenres/{Name}/Images/{Type}/{Index}", "GET")]
[Route("/Persons/{Name}/Images/{Type}", "GET")]
@ -109,8 +107,6 @@ namespace MediaBrowser.Api.Images
[Route("/Artists/{Name}/Images/{Type}/{Index}", "HEAD")]
[Route("/Genres/{Name}/Images/{Type}", "HEAD")]
[Route("/Genres/{Name}/Images/{Type}/{Index}", "HEAD")]
[Route("/GameGenres/{Name}/Images/{Type}", "HEAD")]
[Route("/GameGenres/{Name}/Images/{Type}/{Index}", "HEAD")]
[Route("/MusicGenres/{Name}/Images/{Type}", "HEAD")]
[Route("/MusicGenres/{Name}/Images/{Type}/{Index}", "HEAD")]
[Route("/Persons/{Name}/Images/{Type}", "HEAD")]

View File

@ -57,12 +57,6 @@ namespace MediaBrowser.Api
{
}
[Route("/Items/RemoteSearch/Game", "POST")]
[Authenticated]
public class GetGameRemoteSearchResults : RemoteSearchQuery<GameInfo>, IReturn<List<RemoteSearchResult>>
{
}
[Route("/Items/RemoteSearch/BoxSet", "POST")]
[Authenticated]
public class GetBoxSetRemoteSearchResults : RemoteSearchQuery<BoxSetInfo>, IReturn<List<RemoteSearchResult>>
@ -173,13 +167,6 @@ namespace MediaBrowser.Api
return ToOptimizedResult(result);
}
public async Task<object> Post(GetGameRemoteSearchResults request)
{
var result = await _providerManager.GetRemoteSearchResults<Game, GameInfo>(request, CancellationToken.None).ConfigureAwait(false);
return ToOptimizedResult(result);
}
public async Task<object> Post(GetBoxSetRemoteSearchResults request)
{
var result = await _providerManager.GetRemoteSearchResults<BoxSet, BoxSetInfo>(request, CancellationToken.None).ConfigureAwait(false);

View File

@ -154,11 +154,6 @@ namespace MediaBrowser.Api
Name = "Books",
Value = "books"
});
list.Add(new NameValuePair
{
Name = "Games",
Value = "games"
});
}
list.Add(new NameValuePair

View File

@ -265,7 +265,6 @@ namespace MediaBrowser.Api.Library
public string Id { get; set; }
}
[Route("/Games/{Id}/Similar", "GET", Summary = "Finds games similar to a given game.")]
[Route("/Artists/{Id}/Similar", "GET", Summary = "Finds albums similar to a given album.")]
[Route("/Items/{Id}/Similar", "GET", Summary = "Gets similar items")]
[Route("/Albums/{Id}/Similar", "GET", Summary = "Finds albums similar to a given album.")]
@ -369,8 +368,6 @@ namespace MediaBrowser.Api.Library
return new string[] { "Series", "Season", "Episode" };
case CollectionType.Books:
return new string[] { "Book" };
case CollectionType.Games:
return new string[] { "Game", "GameSystem" };
case CollectionType.Music:
return new string[] { "MusicAlbum", "MusicArtist", "Audio", "MusicVideo" };
case CollectionType.HomeVideos:
@ -952,8 +949,6 @@ namespace MediaBrowser.Api.Library
{
AlbumCount = GetCount(typeof(MusicAlbum), user, request),
EpisodeCount = GetCount(typeof(Episode), user, request),
GameCount = GetCount(typeof(Game), user, request),
GameSystemCount = GetCount(typeof(GameSystem), user, request),
MovieCount = GetCount(typeof(Movie), user, request),
SeriesCount = GetCount(typeof(Series), user, request),
SongCount = GetCount(typeof(Audio), user, request),

View File

@ -194,7 +194,7 @@ namespace MediaBrowser.Api.Session
[ApiMember(Name = "Id", Description = "Session Id", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")]
public string Id { get; set; }
[ApiMember(Name = "PlayableMediaTypes", Description = "A list of playable media types, comma delimited. Audio, Video, Book, Game, Photo.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")]
[ApiMember(Name = "PlayableMediaTypes", Description = "A list of playable media types, comma delimited. Audio, Video, Book, Photo.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")]
public string PlayableMediaTypes { get; set; }
[ApiMember(Name = "SupportedCommands", Description = "A list of supported remote control commands, comma delimited", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")]

View File

@ -224,7 +224,6 @@ namespace MediaBrowser.Api.UserLibrary
dto.TrailerCount = counts.TrailerCount;
dto.AlbumCount = counts.AlbumCount;
dto.SongCount = counts.SongCount;
dto.GameCount = counts.GameCount;
dto.ArtistCount = counts.ArtistCount;
}

View File

@ -42,12 +42,6 @@ namespace MediaBrowser.Api.UserLibrary
[ApiMember(Name = "MinIndexNumber", Description = "Optional filter by minimum index number.", IsRequired = false, DataType = "int", ParameterType = "query", Verb = "GET")]
public int? MinIndexNumber { get; set; }
[ApiMember(Name = "MinPlayers", Description = "Optional filter by minimum number of game players.", IsRequired = false, DataType = "int", ParameterType = "query", Verb = "GET")]
public int? MinPlayers { get; set; }
[ApiMember(Name = "MaxPlayers", Description = "Optional filter by maximum number of game players.", IsRequired = false, DataType = "int", ParameterType = "query", Verb = "GET")]
public int? MaxPlayers { get; set; }
[ApiMember(Name = "ParentIndexNumber", Description = "Optional filter by parent index number.", IsRequired = false, DataType = "int", ParameterType = "query", Verb = "GET")]
public int? ParentIndexNumber { get; set; }

View File

@ -1,105 +0,0 @@
using System;
using System.Collections.Generic;
using MediaBrowser.Controller.Dto;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Net;
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Querying;
using MediaBrowser.Model.Services;
namespace MediaBrowser.Api.UserLibrary
{
[Route("/GameGenres", "GET", Summary = "Gets all Game genres from a given item, folder, or the entire library")]
public class GetGameGenres : GetItemsByName
{
}
[Route("/GameGenres/{Name}", "GET", Summary = "Gets a Game genre, by name")]
public class GetGameGenre : IReturn<BaseItemDto>
{
/// <summary>
/// Gets or sets the name.
/// </summary>
/// <value>The name.</value>
[ApiMember(Name = "Name", Description = "The genre name", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
public string Name { get; set; }
/// <summary>
/// Gets or sets the user id.
/// </summary>
/// <value>The user id.</value>
[ApiMember(Name = "UserId", Description = "Optional. Filter by user id, and attach user data", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
public Guid UserId { get; set; }
}
[Authenticated]
public class GameGenresService : BaseItemsByNameService<GameGenre>
{
/// <summary>
/// Gets the specified request.
/// </summary>
/// <param name="request">The request.</param>
/// <returns>System.Object.</returns>
public object Get(GetGameGenre request)
{
var result = GetItem(request);
return ToOptimizedResult(result);
}
/// <summary>
/// Gets the item.
/// </summary>
/// <param name="request">The request.</param>
/// <returns>Task{BaseItemDto}.</returns>
private BaseItemDto GetItem(GetGameGenre request)
{
var dtoOptions = GetDtoOptions(AuthorizationContext, request);
var item = GetGameGenre(request.Name, LibraryManager, dtoOptions);
if (!request.UserId.Equals(Guid.Empty))
{
var user = UserManager.GetUserById(request.UserId);
return DtoService.GetBaseItemDto(item, dtoOptions, user);
}
return DtoService.GetBaseItemDto(item, dtoOptions);
}
/// <summary>
/// Gets the specified request.
/// </summary>
/// <param name="request">The request.</param>
/// <returns>System.Object.</returns>
public object Get(GetGameGenres request)
{
var result = GetResultSlim(request);
return ToOptimizedResult(result);
}
protected override QueryResult<Tuple<BaseItem, ItemCounts>> GetItems(GetItemsByName request, InternalItemsQuery query)
{
return LibraryManager.GetGameGenres(query);
}
/// <summary>
/// Gets all items.
/// </summary>
/// <param name="request">The request.</param>
/// <param name="items">The items.</param>
/// <returns>IEnumerable{Tuple{System.StringFunc{System.Int32}}}.</returns>
protected override IEnumerable<BaseItem> GetAllItems(GetItemsByName request, IList<BaseItem> items)
{
throw new NotImplementedException();
}
public GameGenresService(IUserManager userManager, ILibraryManager libraryManager, IUserDataManager userDataRepository, IItemRepository itemRepository, IDtoService dtoService, IAuthorizationContext authorizationContext) : base(userManager, libraryManager, userDataRepository, itemRepository, dtoService, authorizationContext)
{
}
}
}

View File

@ -101,11 +101,6 @@ namespace MediaBrowser.Api.UserLibrary
return LibraryManager.GetMusicGenres(query);
}
if (string.Equals(viewType, CollectionType.Games))
{
return LibraryManager.GetGameGenres(query);
}
return LibraryManager.GetGenres(query);
}

View File

@ -304,8 +304,6 @@ namespace MediaBrowser.Api.UserLibrary
VideoTypes = request.GetVideoTypes(),
AdjacentTo = request.AdjacentTo,
ItemIds = GetGuids(request.Ids),
MinPlayers = request.MinPlayers,
MaxPlayers = request.MaxPlayers,
MinCommunityRating = request.MinCommunityRating,
MinCriticRating = request.MinCriticRating,
ParentId = string.IsNullOrWhiteSpace(request.ParentId) ? Guid.Empty : new Guid(request.ParentId),

View File

@ -1149,16 +1149,6 @@ namespace MediaBrowser.Controller.Entities
return false;
}
if (request.MinPlayers.HasValue)
{
return false;
}
if (request.MaxPlayers.HasValue)
{
return false;
}
if (request.MinCommunityRating.HasValue)
{
return false;

View File

@ -1,113 +0,0 @@
using System;
using System.Collections.Generic;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Serialization;
namespace MediaBrowser.Controller.Entities
{
public class Game : BaseItem, IHasTrailers, IHasScreenshots, ISupportsPlaceHolders, IHasLookupInfo<GameInfo>
{
public Game()
{
MultiPartGameFiles = Array.Empty<string>();
RemoteTrailers = EmptyMediaUrlArray;
LocalTrailerIds = Array.Empty<Guid>();
RemoteTrailerIds = Array.Empty<Guid>();
}
public Guid[] LocalTrailerIds { get; set; }
public Guid[] RemoteTrailerIds { get; set; }
public override bool CanDownload()
{
return IsFileProtocol;
}
[IgnoreDataMember]
public override bool SupportsThemeMedia => true;
[IgnoreDataMember]
public override bool SupportsPeople => false;
/// <summary>
/// Gets the type of the media.
/// </summary>
/// <value>The type of the media.</value>
[IgnoreDataMember]
public override string MediaType => Model.Entities.MediaType.Game;
/// <summary>
/// Gets or sets the players supported.
/// </summary>
/// <value>The players supported.</value>
public int? PlayersSupported { get; set; }
/// <summary>
/// Gets a value indicating whether this instance is place holder.
/// </summary>
/// <value><c>true</c> if this instance is place holder; otherwise, <c>false</c>.</value>
public bool IsPlaceHolder { get; set; }
/// <summary>
/// Gets or sets the game system.
/// </summary>
/// <value>The game system.</value>
public string GameSystem { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is multi part.
/// </summary>
/// <value><c>true</c> if this instance is multi part; otherwise, <c>false</c>.</value>
public bool IsMultiPart { get; set; }
/// <summary>
/// Holds the paths to the game files in the event this is a multipart game
/// </summary>
public string[] MultiPartGameFiles { get; set; }
public override List<string> GetUserDataKeys()
{
var list = base.GetUserDataKeys();
var id = this.GetProviderId(MetadataProviders.Gamesdb);
if (!string.IsNullOrEmpty(id))
{
list.Insert(0, "Game-Gamesdb-" + id);
}
return list;
}
public override IEnumerable<FileSystemMetadata> GetDeletePaths()
{
if (!IsInMixedFolder)
{
return new[] {
new FileSystemMetadata
{
FullName = System.IO.Path.GetDirectoryName(Path),
IsDirectory = true
}
};
}
return base.GetDeletePaths();
}
public override UnratedItem GetBlockUnratedType()
{
return UnratedItem.Game;
}
public GameInfo GetLookupInfo()
{
var id = GetItemLookupInfo<GameInfo>();
id.GameSystem = GameSystem;
return id;
}
}
}

View File

@ -1,109 +0,0 @@
using System;
using System.Collections.Generic;
using MediaBrowser.Controller.Extensions;
using MediaBrowser.Model.Serialization;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.Controller.Entities
{
public class GameGenre : BaseItem, IItemByName
{
public override List<string> GetUserDataKeys()
{
var list = base.GetUserDataKeys();
list.Insert(0, GetType().Name + "-" + (Name ?? string.Empty).RemoveDiacritics());
return list;
}
public override string CreatePresentationUniqueKey()
{
return GetUserDataKeys()[0];
}
public override double GetDefaultPrimaryImageAspectRatio()
{
return 1;
}
/// <summary>
/// Returns the folder containing the item.
/// If the item is a folder, it returns the folder itself
/// </summary>
/// <value>The containing folder path.</value>
[IgnoreDataMember]
public override string ContainingFolderPath => Path;
[IgnoreDataMember]
public override bool SupportsAncestors => false;
public override bool IsSaveLocalMetadataEnabled()
{
return true;
}
public override bool CanDelete()
{
return false;
}
public IList<BaseItem> GetTaggedItems(InternalItemsQuery query)
{
query.GenreIds = new[] { Id };
query.IncludeItemTypes = new[] { typeof(Game).Name };
return LibraryManager.GetItemList(query);
}
[IgnoreDataMember]
public override bool SupportsPeople => false;
public static string GetPath(string name)
{
return GetPath(name, true);
}
public static string GetPath(string name, bool normalizeName)
{
// Trim the period at the end because windows will have a hard time with that
var validName = normalizeName ?
FileSystem.GetValidFilename(name).Trim().TrimEnd('.') :
name;
return System.IO.Path.Combine(ConfigurationManager.ApplicationPaths.GameGenrePath, validName);
}
private string GetRebasedPath()
{
return GetPath(System.IO.Path.GetFileName(Path), false);
}
public override bool RequiresRefresh()
{
var newPath = GetRebasedPath();
if (!string.Equals(Path, newPath, StringComparison.Ordinal))
{
Logger.LogDebug("{0} path has changed from {1} to {2}", GetType().Name, Path, newPath);
return true;
}
return base.RequiresRefresh();
}
/// <summary>
/// This is called before any metadata refresh and returns true or false indicating if changes were made
/// </summary>
public override bool BeforeMetadataRefresh(bool replaceAllMetdata)
{
var hasChanges = base.BeforeMetadataRefresh(replaceAllMetdata);
var newPath = GetRebasedPath();
if (!string.Equals(Path, newPath, StringComparison.Ordinal))
{
Path = newPath;
hasChanges = true;
}
return hasChanges;
}
}
}

View File

@ -1,77 +0,0 @@
using System;
using System.Collections.Generic;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Serialization;
using MediaBrowser.Model.Users;
namespace MediaBrowser.Controller.Entities
{
/// <summary>
/// Class GameSystem
/// </summary>
public class GameSystem : Folder, IHasLookupInfo<GameSystemInfo>
{
/// <summary>
/// Return the id that should be used to key display prefs for this item.
/// Default is based on the type for everything except actual generic folders.
/// </summary>
/// <value>The display prefs id.</value>
[IgnoreDataMember]
public override Guid DisplayPreferencesId => Id;
[IgnoreDataMember]
public override bool SupportsPlayedStatus => false;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages => false;
public override double GetDefaultPrimaryImageAspectRatio()
{
double value = 16;
value /= 9;
return value;
}
/// <summary>
/// Gets or sets the game system.
/// </summary>
/// <value>The game system.</value>
public string GameSystemName { get; set; }
public override List<string> GetUserDataKeys()
{
var list = base.GetUserDataKeys();
if (!string.IsNullOrEmpty(GameSystemName))
{
list.Insert(0, "GameSystem-" + GameSystemName);
}
return list;
}
protected override bool GetBlockUnratedValue(UserPolicy config)
{
// Don't block. Determine by game
return false;
}
public override UnratedItem GetBlockUnratedType()
{
return UnratedItem.Game;
}
public GameSystemInfo GetLookupInfo()
{
var id = GetItemLookupInfo<GameSystemInfo>();
id.Path = Path;
return id;
}
[IgnoreDataMember]
public override bool SupportsPeople => false;
}
}

View File

@ -56,7 +56,7 @@ namespace MediaBrowser.Controller.Entities
public IList<BaseItem> GetTaggedItems(InternalItemsQuery query)
{
query.GenreIds = new[] { Id };
query.ExcludeItemTypes = new[] { typeof(Game).Name, typeof(MusicVideo).Name, typeof(Audio.Audio).Name, typeof(MusicAlbum).Name, typeof(MusicArtist).Name };
query.ExcludeItemTypes = new[] { typeof(MusicVideo).Name, typeof(Audio.Audio).Name, typeof(MusicAlbum).Name, typeof(MusicArtist).Name };
return LibraryManager.GetItemList(query);
}

View File

@ -95,9 +95,6 @@ namespace MediaBrowser.Controller.Entities
public bool? IsKids { get; set; }
public bool? IsNews { get; set; }
public bool? IsSeries { get; set; }
public int? MinPlayers { get; set; }
public int? MaxPlayers { get; set; }
public int? MinIndexNumber { get; set; }
public int? AiredDuringSeason { get; set; }
public double? MinCriticRating { get; set; }

View File

@ -150,7 +150,6 @@ namespace MediaBrowser.Controller.Entities
private static string[] OriginalFolderViewTypes = new string[]
{
MediaBrowser.Model.Entities.CollectionType.Games,
MediaBrowser.Model.Entities.CollectionType.Books,
MediaBrowser.Model.Entities.CollectionType.MusicVideos,
MediaBrowser.Model.Entities.CollectionType.HomeVideos,

View File

@ -848,52 +848,6 @@ namespace MediaBrowser.Controller.Entities
}
}
if (query.MinPlayers.HasValue)
{
var filterValue = query.MinPlayers.Value;
var game = item as Game;
if (game != null)
{
var players = game.PlayersSupported ?? 1;
var ok = players >= filterValue;
if (!ok)
{
return false;
}
}
else
{
return false;
}
}
if (query.MaxPlayers.HasValue)
{
var filterValue = query.MaxPlayers.Value;
var game = item as Game;
if (game != null)
{
var players = game.PlayersSupported ?? 1;
var ok = players <= filterValue;
if (!ok)
{
return false;
}
}
else
{
return false;
}
}
if (query.MinCommunityRating.HasValue)
{
var val = query.MinCommunityRating.Value;

View File

@ -46,12 +46,6 @@ namespace MediaBrowser.Controller
/// <value>The music genre path.</value>
string MusicGenrePath { get; }
/// <summary>
/// Gets the game genre path.
/// </summary>
/// <value>The game genre path.</value>
string GameGenrePath { get; }
/// <summary>
/// Gets the path to the Studio directory
/// </summary>

View File

@ -88,13 +88,6 @@ namespace MediaBrowser.Controller.Library
/// <returns>Task{MusicGenre}.</returns>
MusicGenre GetMusicGenre(string name);
/// <summary>
/// Gets the game genre.
/// </summary>
/// <param name="name">The name.</param>
/// <returns>Task{GameGenre}.</returns>
GameGenre GetGameGenre(string name);
/// <summary>
/// Gets a Year
/// </summary>
@ -521,8 +514,6 @@ namespace MediaBrowser.Controller.Library
Guid GetMusicGenreId(string name);
Guid GetGameGenreId(string name);
Task AddVirtualFolder(string name, string collectionType, LibraryOptions options, bool refreshLibrary);
Task RemoveVirtualFolder(string name, bool refreshLibrary);
void AddMediaPath(string virtualFolderName, MediaPathInfo path);
@ -531,7 +522,6 @@ namespace MediaBrowser.Controller.Library
QueryResult<Tuple<BaseItem, ItemCounts>> GetGenres(InternalItemsQuery query);
QueryResult<Tuple<BaseItem, ItemCounts>> GetMusicGenres(InternalItemsQuery query);
QueryResult<Tuple<BaseItem, ItemCounts>> GetGameGenres(InternalItemsQuery query);
QueryResult<Tuple<BaseItem, ItemCounts>> GetStudios(InternalItemsQuery query);
QueryResult<Tuple<BaseItem, ItemCounts>> GetArtists(InternalItemsQuery query);
QueryResult<Tuple<BaseItem, ItemCounts>> GetAlbumArtists(InternalItemsQuery query);

View File

@ -143,13 +143,11 @@ namespace MediaBrowser.Controller.Persistence
QueryResult<Tuple<BaseItem, ItemCounts>> GetGenres(InternalItemsQuery query);
QueryResult<Tuple<BaseItem, ItemCounts>> GetMusicGenres(InternalItemsQuery query);
QueryResult<Tuple<BaseItem, ItemCounts>> GetGameGenres(InternalItemsQuery query);
QueryResult<Tuple<BaseItem, ItemCounts>> GetStudios(InternalItemsQuery query);
QueryResult<Tuple<BaseItem, ItemCounts>> GetArtists(InternalItemsQuery query);
QueryResult<Tuple<BaseItem, ItemCounts>> GetAlbumArtists(InternalItemsQuery query);
QueryResult<Tuple<BaseItem, ItemCounts>> GetAllArtists(InternalItemsQuery query);
List<string> GetGameGenreNames();
List<string> GetMusicGenreNames();
List<string> GetStudioNames();
List<string> GetGenreNames();

View File

@ -1,11 +0,0 @@
namespace MediaBrowser.Controller.Providers
{
public class GameInfo : ItemLookupInfo
{
/// <summary>
/// Gets or sets the game system.
/// </summary>
/// <value>The game system.</value>
public string GameSystem { get; set; }
}
}

View File

@ -1,11 +0,0 @@
namespace MediaBrowser.Controller.Providers
{
public class GameSystemInfo : ItemLookupInfo
{
/// <summary>
/// Gets or sets the path.
/// </summary>
/// <value>The path.</value>
public string Path { get; set; }
}
}

View File

@ -128,7 +128,6 @@ namespace MediaBrowser.LocalMetadata.Images
var added = false;
var isEpisode = item is Episode;
var isSong = item.GetType() == typeof(Audio);
var isGame = item is Game;
var isPerson = item is Person;
// Logo
@ -157,7 +156,7 @@ namespace MediaBrowser.LocalMetadata.Images
added = AddImage(files, images, "disc", imagePrefix, isInMixedFolder, ImageType.Disc);
}
}
else if (isGame || item is Video || item is BoxSet)
else if (item is Video || item is BoxSet)
{
added = AddImage(files, images, "disc", imagePrefix, isInMixedFolder, ImageType.Disc);
@ -172,19 +171,6 @@ namespace MediaBrowser.LocalMetadata.Images
}
}
if (isGame)
{
AddImage(files, images, "box", imagePrefix, isInMixedFolder, ImageType.Box);
AddImage(files, images, "menu", imagePrefix, isInMixedFolder, ImageType.Menu);
added = AddImage(files, images, "back", imagePrefix, isInMixedFolder, ImageType.BoxRear);
if (!added)
{
added = AddImage(files, images, "boxrear", imagePrefix, isInMixedFolder, ImageType.BoxRear);
}
}
// Banner
if (!isEpisode && !isSong && !isPerson)
{

View File

@ -1,66 +0,0 @@
using System.Threading;
using System.Threading.Tasks;
using System.Xml;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Xml;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.LocalMetadata.Parsers
{
public class GameSystemXmlParser : BaseItemXmlParser<GameSystem>
{
public Task FetchAsync(MetadataResult<GameSystem> item, string metadataFile, CancellationToken cancellationToken)
{
Fetch(item, metadataFile, cancellationToken);
cancellationToken.ThrowIfCancellationRequested();
return Task.CompletedTask;
}
/// <summary>
/// Fetches the data from XML node.
/// </summary>
/// <param name="reader">The reader.</param>
/// <param name="result">The result.</param>
protected override void FetchDataFromXmlNode(XmlReader reader, MetadataResult<GameSystem> result)
{
var item = result.Item;
switch (reader.Name)
{
case "GameSystem":
{
var val = reader.ReadElementContentAsString();
if (!string.IsNullOrWhiteSpace(val))
{
item.GameSystemName = val;
}
break;
}
case "GamesDbId":
{
var val = reader.ReadElementContentAsString();
if (!string.IsNullOrWhiteSpace(val))
{
item.SetProviderId(MetadataProviders.Gamesdb, val);
}
break;
}
default:
base.FetchDataFromXmlNode(reader, result);
break;
}
}
public GameSystemXmlParser(ILogger logger, IProviderManager providerManager, IXmlReaderSettingsFactory xmlReaderSettingsFactory, IFileSystem fileSystem) : base(logger, providerManager, xmlReaderSettingsFactory, fileSystem)
{
}
}
}

View File

@ -1,85 +0,0 @@
using System.Globalization;
using System.Threading;
using System.Threading.Tasks;
using System.Xml;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Xml;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.LocalMetadata.Parsers
{
/// <summary>
/// Class EpisodeXmlParser
/// </summary>
public class GameXmlParser : BaseItemXmlParser<Game>
{
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
public Task FetchAsync(MetadataResult<Game> item, string metadataFile, CancellationToken cancellationToken)
{
Fetch(item, metadataFile, cancellationToken);
cancellationToken.ThrowIfCancellationRequested();
return Task.CompletedTask;
}
/// <summary>
/// Fetches the data from XML node.
/// </summary>
/// <param name="reader">The reader.</param>
/// <param name="result">The result.</param>
protected override void FetchDataFromXmlNode(XmlReader reader, MetadataResult<Game> result)
{
var item = result.Item;
switch (reader.Name)
{
case "GameSystem":
{
var val = reader.ReadElementContentAsString();
if (!string.IsNullOrWhiteSpace(val))
{
item.GameSystem = val;
}
break;
}
case "GamesDbId":
{
var val = reader.ReadElementContentAsString();
if (!string.IsNullOrWhiteSpace(val))
{
item.SetProviderId(MetadataProviders.Gamesdb, val);
}
break;
}
case "Players":
{
var val = reader.ReadElementContentAsString();
if (!string.IsNullOrWhiteSpace(val))
{
if (int.TryParse(val, NumberStyles.Integer, _usCulture, out var num))
{
item.PlayersSupported = num;
}
}
break;
}
default:
base.FetchDataFromXmlNode(reader, result);
break;
}
}
public GameXmlParser(ILogger logger, IProviderManager providerManager, IXmlReaderSettingsFactory xmlReaderSettingsFactory, IFileSystem fileSystem) : base(logger, providerManager, xmlReaderSettingsFactory, fileSystem)
{
}
}
}

View File

@ -1,36 +0,0 @@
using System.IO;
using System.Threading;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Providers;
using MediaBrowser.LocalMetadata.Parsers;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Xml;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.LocalMetadata.Providers
{
public class GameSystemXmlProvider : BaseXmlProvider<GameSystem>
{
private readonly ILogger _logger;
private readonly IProviderManager _providerManager;
private readonly IXmlReaderSettingsFactory _xmlSettings;
public GameSystemXmlProvider(IFileSystem fileSystem, ILogger logger, IProviderManager providerManager, IXmlReaderSettingsFactory xmlSettings)
: base(fileSystem)
{
_logger = logger;
_providerManager = providerManager;
_xmlSettings = xmlSettings;
}
protected override void Fetch(MetadataResult<GameSystem> result, string path, CancellationToken cancellationToken)
{
new GameSystemXmlParser(_logger, _providerManager, _xmlSettings, FileSystem).Fetch(result, path, cancellationToken);
}
protected override FileSystemMetadata GetXmlFile(ItemInfo info, IDirectoryService directoryService)
{
return directoryService.GetFile(Path.Combine(info.Path, "gamesystem.xml"));
}
}
}

View File

@ -1,39 +0,0 @@
using System.IO;
using System.Threading;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Providers;
using MediaBrowser.LocalMetadata.Parsers;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Xml;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.LocalMetadata.Providers
{
public class GameXmlProvider : BaseXmlProvider<Game>
{
private readonly ILogger _logger;
private readonly IProviderManager _providerManager;
private readonly IXmlReaderSettingsFactory _xmlSettings;
public GameXmlProvider(IFileSystem fileSystem, ILogger logger, IProviderManager providerManager, IXmlReaderSettingsFactory xmlSettings)
: base(fileSystem)
{
_logger = logger;
_providerManager = providerManager;
_xmlSettings = xmlSettings;
}
protected override void Fetch(MetadataResult<Game> result, string path, CancellationToken cancellationToken)
{
new GameXmlParser(_logger, _providerManager, _xmlSettings, FileSystem).Fetch(result, path, cancellationToken);
}
protected override FileSystemMetadata GetXmlFile(ItemInfo info, IDirectoryService directoryService)
{
var specificFile = Path.ChangeExtension(info.Path, ".xml");
var file = FileSystem.GetFileInfo(specificFile);
return info.IsInMixedFolder || file.Exists ? file : FileSystem.GetFileInfo(Path.Combine(Path.GetDirectoryName(info.Path), "game.xml"));
}
}
}

View File

@ -1,48 +0,0 @@
using System.IO;
using System.Xml;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Xml;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.LocalMetadata.Savers
{
public class GameSystemXmlSaver : BaseXmlSaver
{
public GameSystemXmlSaver(IFileSystem fileSystem, IServerConfigurationManager configurationManager, ILibraryManager libraryManager, IUserManager userManager, IUserDataManager userDataManager, ILogger logger, IXmlReaderSettingsFactory xmlReaderSettingsFactory) : base(fileSystem, configurationManager, libraryManager, userManager, userDataManager, logger, xmlReaderSettingsFactory)
{
}
public override bool IsEnabledFor(BaseItem item, ItemUpdateType updateType)
{
if (!item.SupportsLocalMetadata)
{
return false;
}
return item is GameSystem && updateType >= ItemUpdateType.MetadataDownload;
}
protected override void WriteCustomElements(BaseItem item, XmlWriter writer)
{
var gameSystem = (GameSystem)item;
if (!string.IsNullOrEmpty(gameSystem.GameSystemName))
{
writer.WriteElementString("GameSystem", gameSystem.GameSystemName);
}
}
protected override string GetLocalSavePath(BaseItem item)
{
return Path.Combine(item.Path, "gamesystem.xml");
}
protected override string GetRootElementName(BaseItem item)
{
return "Item";
}
}
}

View File

@ -1,68 +0,0 @@
using System.Globalization;
using System.IO;
using System.Xml;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Xml;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.LocalMetadata.Savers
{
/// <summary>
/// Saves game.xml for games
/// </summary>
public class GameXmlSaver : BaseXmlSaver
{
private readonly CultureInfo UsCulture = new CultureInfo("en-US");
public override bool IsEnabledFor(BaseItem item, ItemUpdateType updateType)
{
if (!item.SupportsLocalMetadata)
{
return false;
}
return item is Game && updateType >= ItemUpdateType.MetadataDownload;
}
protected override void WriteCustomElements(BaseItem item, XmlWriter writer)
{
var game = (Game)item;
if (!string.IsNullOrEmpty(game.GameSystem))
{
writer.WriteElementString("GameSystem", game.GameSystem);
}
if (game.PlayersSupported.HasValue)
{
writer.WriteElementString("Players", game.PlayersSupported.Value.ToString(UsCulture));
}
}
protected override string GetLocalSavePath(BaseItem item)
{
return GetGameSavePath((Game)item);
}
protected override string GetRootElementName(BaseItem item)
{
return "Item";
}
public static string GetGameSavePath(Game item)
{
if (item.IsInMixedFolder)
{
return Path.ChangeExtension(item.Path, ".xml");
}
return Path.Combine(item.ContainingFolderPath, "game.xml");
}
public GameXmlSaver(IFileSystem fileSystem, IServerConfigurationManager configurationManager, ILibraryManager libraryManager, IUserManager userManager, IUserDataManager userDataManager, ILogger logger, IXmlReaderSettingsFactory xmlReaderSettingsFactory) : base(fileSystem, configurationManager, libraryManager, userManager, userDataManager, logger, xmlReaderSettingsFactory)
{
}
}
}

View File

@ -16,8 +16,6 @@ namespace MediaBrowser.Model.Channels
MovieExtra = 6,
TvExtra = 7,
GameExtra = 8
TvExtra = 7
}
}

View File

@ -6,7 +6,6 @@ namespace MediaBrowser.Model.Configuration
Trailer,
Series,
Music,
Game,
Book,
LiveTvChannel,
LiveTvProgram,

View File

@ -116,16 +116,8 @@ namespace MediaBrowser.Model.Dto
/// <value>The critic rating.</value>
public float? CriticRating { get; set; }
/// <summary>
/// Gets or sets the game system.
/// </summary>
/// <value>The game system.</value>
public string GameSystem { get; set; }
public string[] ProductionLocations { get; set; }
public string[] MultiPartGameFiles { get; set; }
/// <summary>
/// Gets or sets the path.
/// </summary>
@ -604,11 +596,6 @@ namespace MediaBrowser.Model.Dto
/// <value>The episode count.</value>
public int? EpisodeCount { get; set; }
/// <summary>
/// Gets or sets the game count.
/// </summary>
/// <value>The game count.</value>
public int? GameCount { get; set; }
/// <summary>
/// Gets or sets the song count.
/// </summary>
/// <value>The song count.</value>

View File

@ -1,48 +0,0 @@
using System;
namespace MediaBrowser.Model.Dto
{
/// <summary>
/// Class GameSystemSummary
/// </summary>
public class GameSystemSummary
{
/// <summary>
/// Gets or sets the name.
/// </summary>
/// <value>The name.</value>
public string Name { get; set; }
/// <summary>
/// Gets or sets the name.
/// </summary>
/// <value>The name.</value>
public string DisplayName { get; set; }
/// <summary>
/// Gets or sets the game count.
/// </summary>
/// <value>The game count.</value>
public int GameCount { get; set; }
/// <summary>
/// Gets or sets the game extensions.
/// </summary>
/// <value>The game extensions.</value>
public string[] GameFileExtensions { get; set; }
/// <summary>
/// Gets or sets the client installed game count.
/// </summary>
/// <value>The client installed game count.</value>
public int ClientInstalledGameCount { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="GameSystemSummary"/> class.
/// </summary>
public GameSystemSummary()
{
GameFileExtensions = Array.Empty<string>();
}
}
}

View File

@ -20,19 +20,9 @@ namespace MediaBrowser.Model.Dto
/// </summary>
/// <value>The episode count.</value>
public int EpisodeCount { get; set; }
/// <summary>
/// Gets or sets the game count.
/// </summary>
/// <value>The game count.</value>
public int GameCount { get; set; }
public int ArtistCount { get; set; }
public int ProgramCount { get; set; }
/// <summary>
/// Gets or sets the game system count.
/// </summary>
/// <value>The game system count.</value>
public int GameSystemCount { get; set; }
/// <summary>
/// Gets or sets the trailer count.
/// </summary>
/// <value>The trailer count.</value>

View File

@ -18,7 +18,6 @@ namespace MediaBrowser.Model.Entities
public const string Books = "books";
public const string Photos = "photos";
public const string Games = "games";
public const string LiveTv = "livetv";
public const string Playlists = "playlists";
public const string Folders = "folders";

View File

@ -14,10 +14,6 @@ namespace MediaBrowser.Model.Entities
/// </summary>
public const string Audio = "Audio";
/// <summary>
/// The game
/// </summary>
public const string Game = "Game";
/// <summary>
/// The photo
/// </summary>
public const string Photo = "Photo";

View File

@ -5,7 +5,6 @@ namespace MediaBrowser.Model.Entities
/// </summary>
public enum MetadataProviders
{
Gamesdb = 1,
/// <summary>
/// The imdb
/// </summary>

View File

@ -5,10 +5,8 @@ namespace MediaBrowser.Model.Notifications
ApplicationUpdateAvailable,
ApplicationUpdateInstalled,
AudioPlayback,
GamePlayback,
VideoPlayback,
AudioPlaybackStopped,
GamePlaybackStopped,
VideoPlaybackStopped,
InstallationFailed,
PluginError,

View File

@ -30,8 +30,6 @@ namespace MediaBrowser.Model.Providers
public string ImageUrl { get; set; }
public string SearchProviderName { get; set; }
public string GameSystem { get; set; }
public string Overview { get; set; }
public RemoteSearchResult AlbumArtist { get; set; }

View File

@ -71,8 +71,6 @@ namespace MediaBrowser.Model.Querying
public const string VideoBitRate = "VideoBitRate";
public const string AirTime = "AirTime";
public const string Studio = "Studio";
public const string Players = "Players";
public const string GameSystem = "GameSystem";
public const string IsFavoriteOrLiked = "IsFavoriteOrLiked";
public const string DateLastContentAdded = "DateLastContentAdded";
public const string SeriesDatePlayed = "SeriesDatePlayed";

View File

@ -1,23 +0,0 @@
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.IO;
using MediaBrowser.Providers.Manager;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.Providers.GameGenres
{
public class GameGenreMetadataService : MetadataService<GameGenre, ItemLookupInfo>
{
protected override void MergeData(MetadataResult<GameGenre> source, MetadataResult<GameGenre> target, MetadataFields[] lockedFields, bool replaceData, bool mergeMetadataSettings)
{
ProviderUtils.MergeBaseItemData(source, target, lockedFields, replaceData, mergeMetadataSettings);
}
public GameGenreMetadataService(IServerConfigurationManager serverConfigurationManager, ILogger logger, IProviderManager providerManager, IFileSystem fileSystem, IUserDataManager userDataManager, ILibraryManager libraryManager) : base(serverConfigurationManager, logger, providerManager, fileSystem, userDataManager, libraryManager)
{
}
}
}

View File

@ -1,36 +0,0 @@
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.IO;
using MediaBrowser.Providers.Manager;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.Providers.Games
{
public class GameMetadataService : MetadataService<Game, GameInfo>
{
protected override void MergeData(MetadataResult<Game> source, MetadataResult<Game> target, MetadataFields[] lockedFields, bool replaceData, bool mergeMetadataSettings)
{
ProviderUtils.MergeBaseItemData(source, target, lockedFields, replaceData, mergeMetadataSettings);
var sourceItem = source.Item;
var targetItem = target.Item;
if (replaceData || string.IsNullOrEmpty(targetItem.GameSystem))
{
targetItem.GameSystem = sourceItem.GameSystem;
}
if (replaceData || !targetItem.PlayersSupported.HasValue)
{
targetItem.PlayersSupported = sourceItem.PlayersSupported;
}
}
public GameMetadataService(IServerConfigurationManager serverConfigurationManager, ILogger logger, IProviderManager providerManager, IFileSystem fileSystem, IUserDataManager userDataManager, ILibraryManager libraryManager) : base(serverConfigurationManager, logger, providerManager, fileSystem, userDataManager, libraryManager)
{
}
}
}

View File

@ -1,31 +0,0 @@
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.IO;
using MediaBrowser.Providers.Manager;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.Providers.Games
{
public class GameSystemMetadataService : MetadataService<GameSystem, GameSystemInfo>
{
protected override void MergeData(MetadataResult<GameSystem> source, MetadataResult<GameSystem> target, MetadataFields[] lockedFields, bool replaceData, bool mergeMetadataSettings)
{
ProviderUtils.MergeBaseItemData(source, target, lockedFields, replaceData, mergeMetadataSettings);
var sourceItem = source.Item;
var targetItem = target.Item;
if (replaceData || string.IsNullOrEmpty(targetItem.GameSystemName))
{
targetItem.GameSystemName = sourceItem.GameSystemName;
}
}
public GameSystemMetadataService(IServerConfigurationManager serverConfigurationManager, ILogger logger, IProviderManager providerManager, IFileSystem fileSystem, IUserDataManager userDataManager, ILibraryManager libraryManager) : base(serverConfigurationManager, logger, providerManager, fileSystem, userDataManager, libraryManager)
{
}
}
}

Some files were not shown because too many files have changed in this diff Show More