mirror of
https://github.com/Sonarr/Sonarr
synced 2026-05-08 13:01:10 +02:00
New: Warning on add series list for Import list exclusions
Closes #8433
This commit is contained in:
parent
6c329e8a6f
commit
d99f8b5685
7 changed files with 31 additions and 3 deletions
|
|
@ -97,6 +97,12 @@
|
|||
pointer-events: all;
|
||||
}
|
||||
|
||||
.excludedIcon {
|
||||
margin-left: 10px;
|
||||
color: var(--dangerColor);
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
.overview {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
interface CssExports {
|
||||
'alreadyExistsIcon': string;
|
||||
'content': string;
|
||||
'excludedIcon': string;
|
||||
'genres': string;
|
||||
'icons': string;
|
||||
'network': string;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ function AddNewSeriesSearchResult({ series }: AddNewSeriesSearchResultProps) {
|
|||
overview,
|
||||
seriesType,
|
||||
images,
|
||||
isExcluded,
|
||||
} = series;
|
||||
|
||||
const isExistingSeries = useExistingSeries(tvdbId);
|
||||
|
|
@ -100,6 +101,15 @@ function AddNewSeriesSearchResult({ series }: AddNewSeriesSearchResultProps) {
|
|||
/>
|
||||
) : null}
|
||||
|
||||
{isExcluded ? (
|
||||
<Icon
|
||||
className={styles.excludedIcon}
|
||||
name={icons.DANGER}
|
||||
size={36}
|
||||
title={translate('SeriesInImportListExclusions')}
|
||||
/>
|
||||
) : null}
|
||||
|
||||
<Link
|
||||
className={styles.tvdbLink}
|
||||
to={`https://www.thetvdb.com/?tab=series&id=${tvdbId}`}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import Series from 'Series/Series';
|
|||
|
||||
interface AddSeries extends Series {
|
||||
folder: string;
|
||||
isExcluded: boolean;
|
||||
}
|
||||
|
||||
export default AddSeries;
|
||||
|
|
|
|||
|
|
@ -1958,6 +1958,7 @@
|
|||
"SeriesFolderImportedTooltip": "Episode imported from series folder",
|
||||
"SeriesFootNote": "Optionally control truncation to a maximum number of bytes including ellipsis (`...`). Truncating from the end (e.g. `{Series Title:30}`) or the beginning (e.g. `{Series Title:-30}`) are both supported.",
|
||||
"SeriesID": "Series ID",
|
||||
"SeriesInImportListExclusions": "Series is in Import List Exclusions",
|
||||
"SeriesIndexFooterContinuing": "Continuing (All episodes downloaded)",
|
||||
"SeriesIndexFooterDownloading": "Downloading (One or more episodes)",
|
||||
"SeriesIndexFooterEnded": "Ended (All episodes downloaded)",
|
||||
|
|
@ -2097,8 +2098,8 @@
|
|||
"TheTvdb": "TheTVDB",
|
||||
"Theme": "Theme",
|
||||
"ThemeHelpText": "Change Application UI Theme, 'Auto' Theme will use your OS Theme to set Light or Dark mode. Inspired by Theme.Park",
|
||||
"Thursday": "Thursday",
|
||||
"Threshold": "Threshold",
|
||||
"Thursday": "Thursday",
|
||||
"Time": "Time",
|
||||
"TimeFormat": "Time Format",
|
||||
"TimeLeft": "Time Left",
|
||||
|
|
@ -2129,9 +2130,9 @@
|
|||
"TotalFileSize": "Total File Size",
|
||||
"TotalRecords": "Total records: {totalRecords}",
|
||||
"TotalSpace": "Total Space",
|
||||
"Tuesday": "Tuesday",
|
||||
"Trace": "Trace",
|
||||
"True": "True",
|
||||
"Tuesday": "Tuesday",
|
||||
"TvdbId": "TVDB ID",
|
||||
"TvdbIdExcludeHelpText": "The TVDB ID of the series to exclude",
|
||||
"Twitter": "Twitter",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using NzbDrone.Core.ImportLists.Exclusions;
|
||||
using NzbDrone.Core.MediaCover;
|
||||
using NzbDrone.Core.MetadataSource;
|
||||
using NzbDrone.Core.Organizer;
|
||||
|
|
@ -13,12 +14,14 @@ public class SeriesLookupController : Controller
|
|||
private readonly ISearchForNewSeries _searchProxy;
|
||||
private readonly IBuildFileNames _fileNameBuilder;
|
||||
private readonly IMapCoversToLocal _coverMapper;
|
||||
private readonly IImportListExclusionService _importListExclusionService;
|
||||
|
||||
public SeriesLookupController(ISearchForNewSeries searchProxy, IBuildFileNames fileNameBuilder, IMapCoversToLocal coverMapper)
|
||||
public SeriesLookupController(ISearchForNewSeries searchProxy, IBuildFileNames fileNameBuilder, IMapCoversToLocal coverMapper, IImportListExclusionService importListExclusionService)
|
||||
{
|
||||
_searchProxy = searchProxy;
|
||||
_fileNameBuilder = fileNameBuilder;
|
||||
_coverMapper = coverMapper;
|
||||
_importListExclusionService = importListExclusionService;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
|
|
@ -45,6 +48,7 @@ private IEnumerable<SeriesResource> MapToResource(IEnumerable<NzbDrone.Core.Tv.S
|
|||
|
||||
resource.Folder = _fileNameBuilder.GetSeriesFolder(currentSeries);
|
||||
resource.Statistics = new SeriesStatistics().ToResource(resource.Seasons);
|
||||
resource.IsExcluded = _importListExclusionService.FindByTvdbId(currentSeries.TvdbId) is not null;
|
||||
|
||||
yield return resource;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
using System.Text.Json.Serialization;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Core.Languages;
|
||||
using NzbDrone.Core.MediaCover;
|
||||
using NzbDrone.Core.Tv;
|
||||
using Sonarr.Http.REST;
|
||||
using Swashbuckle.AspNetCore.Annotations;
|
||||
|
||||
namespace Sonarr.Api.V5.Series;
|
||||
|
||||
|
|
@ -54,6 +56,9 @@ public class SeriesResource : RestResource
|
|||
public Ratings? Ratings { get; set; }
|
||||
public SeriesStatisticsResource? Statistics { get; set; }
|
||||
public bool? EpisodesChanged { get; set; }
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
[SwaggerIgnore]
|
||||
public bool? IsExcluded { get; set; }
|
||||
}
|
||||
|
||||
public static class SeriesResourceMapper
|
||||
|
|
|
|||
Loading…
Reference in a new issue