diff --git a/frontend/src/Indexer/Info/IndexerInfoModalContent.tsx b/frontend/src/Indexer/Info/IndexerInfoModalContent.tsx index fb796a398..8cb10993a 100644 --- a/frontend/src/Indexer/Info/IndexerInfoModalContent.tsx +++ b/frontend/src/Indexer/Info/IndexerInfoModalContent.tsx @@ -1,3 +1,4 @@ +import { uniqBy } from 'lodash'; import React, { useCallback, useState } from 'react'; import { useSelector } from 'react-redux'; import { createSelector } from 'reselect'; @@ -249,8 +250,7 @@ function IndexerInfoModalContent(props: IndexerInfoModalContentProps) { - {capabilities.categories !== null && - capabilities.categories.length > 0 ? ( + {capabilities?.categories?.length > 0 ? (
- {capabilities.categories + {uniqBy(capabilities.categories, 'id') .sort((a, b) => a.id - b.id) .map((category) => { return ( @@ -275,9 +275,8 @@ function IndexerInfoModalContent(props: IndexerInfoModalContentProps) { {category.id}{category.name} - {category.subCategories !== null && - category.subCategories.length > 0 - ? category.subCategories + {category?.subCategories?.length > 0 + ? uniqBy(category.subCategories, 'id') .sort((a, b) => a.id - b.id) .map((subCategory) => { return ( diff --git a/src/NzbDrone.Core/Indexers/Definitions/AnimeBytes.cs b/src/NzbDrone.Core/Indexers/Definitions/AnimeBytes.cs index 54f3f4f83..34841a925 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/AnimeBytes.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/AnimeBytes.cs @@ -124,7 +124,9 @@ namespace NzbDrone.Core.Indexers.Definitions caps.Categories.AddCategoryMapping("anime[bd_special]", NewznabStandardCategory.TVAnime, "BD Special"); caps.Categories.AddCategoryMapping("anime[movie]", NewznabStandardCategory.Movies, "Movie"); caps.Categories.AddCategoryMapping("audio", NewznabStandardCategory.Audio, "Music"); + caps.Categories.AddCategoryMapping("gamec[game]", NewznabStandardCategory.Console, "Game"); caps.Categories.AddCategoryMapping("gamec[game]", NewznabStandardCategory.PCGames, "Game"); + caps.Categories.AddCategoryMapping("gamec[visual_novel]", NewznabStandardCategory.Console, "Game Visual Novel"); caps.Categories.AddCategoryMapping("gamec[visual_novel]", NewznabStandardCategory.PCGames, "Game Visual Novel"); caps.Categories.AddCategoryMapping("printedtype[manga]", NewznabStandardCategory.BooksComics, "Manga"); caps.Categories.AddCategoryMapping("printedtype[oneshot]", NewznabStandardCategory.BooksComics, "Oneshot"); @@ -364,7 +366,7 @@ namespace NzbDrone.Core.Indexers.Definitions var minimumSeedTime = 259200 + (int)(size / (int)Math.Pow(1024, 3) * 18000); var propertyList = WebUtility.HtmlDecode(torrent.Property) - .Split('|', StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries) + .Split(new[] { " | ", " / " }, StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries) .ToList(); propertyList.RemoveAll(p => ExcludedProperties.Any(p.ContainsIgnoreCase)); @@ -386,7 +388,6 @@ namespace NzbDrone.Core.Indexers.Definitions } if (_settings.ExcludeRaw && - categoryName == "Anime" && properties.Any(p => p.StartsWithIgnoreCase("RAW") || p.Contains("BR-DISK"))) { continue; @@ -467,32 +468,34 @@ namespace NzbDrone.Core.Indexers.Definitions { if (properties.Contains("PSP")) { - categories = new List { NewznabStandardCategory.ConsolePSP }; + categories = new List { NewznabStandardCategory.Console, NewznabStandardCategory.ConsolePSP }; } if (properties.Contains("PS3")) { - categories = new List { NewznabStandardCategory.ConsolePS3 }; + categories = new List { NewznabStandardCategory.Console, NewznabStandardCategory.ConsolePS3 }; } if (properties.Contains("PS Vita")) { - categories = new List { NewznabStandardCategory.ConsolePSVita }; + categories = new List { NewznabStandardCategory.Console, NewznabStandardCategory.ConsolePSVita }; } if (properties.Contains("3DS")) { - categories = new List { NewznabStandardCategory.Console3DS }; + categories = new List { NewznabStandardCategory.Console, NewznabStandardCategory.Console3DS }; } if (properties.Contains("NDS")) { - categories = new List { NewznabStandardCategory.ConsoleNDS }; + categories = new List { NewznabStandardCategory.Console, NewznabStandardCategory.ConsoleNDS }; } - if (properties.Contains("PSX") || properties.Contains("PS2") || properties.Contains("SNES") || properties.Contains("NES") || properties.Contains("GBA") || properties.Contains("Switch")) + if (properties.Contains("PSX") || properties.Contains("PS2") || properties.Contains("SNES") || + properties.Contains("NES") || properties.Contains("GBA") || properties.Contains("Switch") || + properties.Contains("N64")) { - categories = new List { NewznabStandardCategory.ConsoleOther }; + categories = new List { NewznabStandardCategory.Console, NewznabStandardCategory.ConsoleOther }; } if (properties.Contains("PC")) @@ -505,15 +508,15 @@ namespace NzbDrone.Core.Indexers.Definitions { if (properties.Any(p => p.Contains("Lossless"))) { - categories = new List { NewznabStandardCategory.AudioLossless }; + categories = new List { NewznabStandardCategory.Audio, NewznabStandardCategory.AudioLossless }; } else if (properties.Any(p => p.Contains("MP3"))) { - categories = new List { NewznabStandardCategory.AudioMP3 }; + categories = new List { NewznabStandardCategory.Audio, NewznabStandardCategory.AudioMP3 }; } else { - categories = new List { NewznabStandardCategory.AudioOther }; + categories = new List { NewznabStandardCategory.Audio, NewznabStandardCategory.AudioOther }; } }