mirror of
https://github.com/Radarr/Radarr.git
synced 2026-03-08 14:51:41 -04:00
Compare commits
17 Commits
v6.0.2.102
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89110c2cc8 | ||
|
|
a126835028 | ||
|
|
4c00729183 | ||
|
|
b59ff0a3b1 | ||
|
|
b9c2563c9b | ||
|
|
949922b9a1 | ||
|
|
1b9662d588 | ||
|
|
005c870f69 | ||
|
|
90cd8df1ae | ||
|
|
7d8444c435 | ||
|
|
1883ae52ac | ||
|
|
47d4ebbeac | ||
|
|
ef9836d71d | ||
|
|
955ee2f29b | ||
|
|
abf3fc4557 | ||
|
|
1e72cc6b5a | ||
|
|
24639a7016 |
@@ -9,7 +9,7 @@ variables:
|
||||
testsFolder: './_tests'
|
||||
yarnCacheFolder: $(Pipeline.Workspace)/.yarn
|
||||
nugetCacheFolder: $(Pipeline.Workspace)/.nuget/packages
|
||||
majorVersion: '6.0.2'
|
||||
majorVersion: '6.1.1'
|
||||
minorVersion: $[counter('minorVersion', 2000)]
|
||||
radarrVersion: '$(majorVersion).$(minorVersion)'
|
||||
buildName: '$(Build.SourceBranchName).$(radarrVersion)'
|
||||
@@ -18,9 +18,9 @@ variables:
|
||||
dotnetVersion: '8.0.405'
|
||||
nodeVersion: '20.X'
|
||||
innoVersion: '6.2.2'
|
||||
windowsImage: 'windows-2022'
|
||||
linuxImage: 'ubuntu-22.04'
|
||||
macImage: 'macOS-13'
|
||||
windowsImage: 'windows-2025'
|
||||
linuxImage: 'ubuntu-24.04'
|
||||
macImage: 'macOS-15'
|
||||
|
||||
trigger:
|
||||
branches:
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB |
@@ -67,6 +67,7 @@ function MovieIndexOverview(props: MovieIndexOverviewProps) {
|
||||
monitored,
|
||||
status,
|
||||
path,
|
||||
titleSlug,
|
||||
overview,
|
||||
statistics = {} as Statistics,
|
||||
images,
|
||||
@@ -141,7 +142,9 @@ function MovieIndexOverview(props: MovieIndexOverviewProps) {
|
||||
<div className={styles.content}>
|
||||
<div className={styles.poster}>
|
||||
<div className={styles.posterContainer}>
|
||||
{isSelectMode ? <MovieIndexPosterSelect movieId={movieId} /> : null}
|
||||
{isSelectMode ? (
|
||||
<MovieIndexPosterSelect movieId={movieId} titleSlug={titleSlug} />
|
||||
) : null}
|
||||
|
||||
{status === 'deleted' ? (
|
||||
<div className={styles.deleted} title={translate('Deleted')} />
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import React, { SyntheticEvent, useCallback, useState } from 'react';
|
||||
import React, { useCallback, useState } from 'react';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import { useSelect } from 'App/SelectContext';
|
||||
import { MOVIE_SEARCH, REFRESH_MOVIE } from 'Commands/commandNames';
|
||||
import Icon from 'Components/Icon';
|
||||
import ImdbRating from 'Components/ImdbRating';
|
||||
@@ -70,6 +69,7 @@ function MovieIndexPoster(props: MovieIndexPosterProps) {
|
||||
monitored,
|
||||
status,
|
||||
images,
|
||||
titleSlug,
|
||||
tmdbId,
|
||||
imdbId,
|
||||
youTubeTrailerId,
|
||||
@@ -142,30 +142,7 @@ function MovieIndexPoster(props: MovieIndexPosterProps) {
|
||||
setIsDeleteMovieModalOpen(false);
|
||||
}, [setIsDeleteMovieModalOpen]);
|
||||
|
||||
const [selectState, selectDispatch] = useSelect();
|
||||
|
||||
const onSelectPress = useCallback(
|
||||
(event: SyntheticEvent<HTMLElement, MouseEvent>) => {
|
||||
if (event.nativeEvent.ctrlKey || event.nativeEvent.metaKey) {
|
||||
window.open(`/movie/${tmdbId}`, '_blank');
|
||||
return;
|
||||
}
|
||||
|
||||
const shiftKey = event.nativeEvent.shiftKey;
|
||||
|
||||
selectDispatch({
|
||||
type: 'toggleSelected',
|
||||
id: movieId,
|
||||
isSelected: !selectState.selectedState[movieId],
|
||||
shiftKey,
|
||||
});
|
||||
},
|
||||
[movieId, selectState.selectedState, selectDispatch, tmdbId]
|
||||
);
|
||||
|
||||
const link = `/movie/${tmdbId}`;
|
||||
|
||||
const linkProps = isSelectMode ? { onPress: onSelectPress } : { to: link };
|
||||
const link = `/movie/${titleSlug}`;
|
||||
|
||||
const elementStyle = {
|
||||
width: `${posterWidth}px`,
|
||||
@@ -175,7 +152,9 @@ function MovieIndexPoster(props: MovieIndexPosterProps) {
|
||||
return (
|
||||
<div className={styles.content}>
|
||||
<div className={styles.posterContainer} title={title}>
|
||||
{isSelectMode ? <MovieIndexPosterSelect movieId={movieId} /> : null}
|
||||
{isSelectMode ? (
|
||||
<MovieIndexPosterSelect movieId={movieId} titleSlug={titleSlug} />
|
||||
) : null}
|
||||
|
||||
<Label className={styles.controls}>
|
||||
<SpinnerIconButton
|
||||
@@ -220,7 +199,7 @@ function MovieIndexPoster(props: MovieIndexPosterProps) {
|
||||
<div className={styles.deleted} title={translate('Deleted')} />
|
||||
) : null}
|
||||
|
||||
<Link className={styles.link} style={elementStyle} {...linkProps}>
|
||||
<Link className={styles.link} style={elementStyle} to={link}>
|
||||
<MoviePoster
|
||||
style={elementStyle}
|
||||
images={images}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 3;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.checkContainer {
|
||||
|
||||
@@ -7,15 +7,23 @@ import styles from './MovieIndexPosterSelect.css';
|
||||
|
||||
interface MovieIndexPosterSelectProps {
|
||||
movieId: number;
|
||||
titleSlug: string;
|
||||
}
|
||||
|
||||
function MovieIndexPosterSelect(props: MovieIndexPosterSelectProps) {
|
||||
const { movieId } = props;
|
||||
function MovieIndexPosterSelect({
|
||||
movieId,
|
||||
titleSlug,
|
||||
}: MovieIndexPosterSelectProps) {
|
||||
const [selectState, selectDispatch] = useSelect();
|
||||
const isSelected = selectState.selectedState[movieId];
|
||||
|
||||
const onSelectPress = useCallback(
|
||||
(event: SyntheticEvent<HTMLElement, PointerEvent>) => {
|
||||
if (event.nativeEvent.ctrlKey || event.nativeEvent.metaKey) {
|
||||
window.open(`${window.Radarr.urlBase}/movie/${titleSlug}`, '_blank');
|
||||
return;
|
||||
}
|
||||
|
||||
const shiftKey = event.nativeEvent.shiftKey;
|
||||
|
||||
selectDispatch({
|
||||
@@ -25,7 +33,7 @@ function MovieIndexPosterSelect(props: MovieIndexPosterSelectProps) {
|
||||
shiftKey,
|
||||
});
|
||||
},
|
||||
[movieId, isSelected, selectDispatch]
|
||||
[movieId, titleSlug, isSelected, selectDispatch]
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
@@ -116,7 +116,12 @@ const movieTokens = [
|
||||
},
|
||||
{
|
||||
token: '{Movie CollectionThe}',
|
||||
example: 'Movie Collection, The',
|
||||
example: "Movie's Collection, The",
|
||||
footNotes: '1',
|
||||
},
|
||||
{
|
||||
token: '{Movie CleanCollectionThe}',
|
||||
example: 'Movies Collection, The',
|
||||
footNotes: '1',
|
||||
},
|
||||
{ token: '{Movie Certification}', example: 'R' },
|
||||
|
||||
@@ -23,14 +23,6 @@ function Donations() {
|
||||
/>
|
||||
</Link>
|
||||
</div>
|
||||
<div className={styles.logoContainer} title="Readarr">
|
||||
<Link to="https://readarr.com/donate">
|
||||
<img
|
||||
className={styles.logo}
|
||||
src={`${window.Radarr.urlBase}/Content/Images/Icons/logo-readarr.png`}
|
||||
/>
|
||||
</Link>
|
||||
</div>
|
||||
<div className={styles.logoContainer} title="Prowlarr">
|
||||
<Link to="https://prowlarr.com/donate">
|
||||
<img
|
||||
|
||||
@@ -18,9 +18,19 @@ import TableOptionsModalWrapper from 'Components/Table/TableOptions/TableOptions
|
||||
import TablePager from 'Components/Table/TablePager';
|
||||
import usePaging from 'Components/Table/usePaging';
|
||||
import useCurrentPage from 'Helpers/Hooks/useCurrentPage';
|
||||
import usePrevious from 'Helpers/Hooks/usePrevious';
|
||||
import useSelectState from 'Helpers/Hooks/useSelectState';
|
||||
import { align, icons, kinds } from 'Helpers/Props';
|
||||
import Movie from 'Movie/Movie';
|
||||
import { executeCommand } from 'Store/Actions/commandActions';
|
||||
import {
|
||||
clearMovieFiles,
|
||||
fetchMovieFiles,
|
||||
} from 'Store/Actions/movieFileActions';
|
||||
import {
|
||||
clearQueueDetails,
|
||||
fetchQueueDetails,
|
||||
} from 'Store/Actions/queueActions';
|
||||
import {
|
||||
batchToggleCutoffUnmetMovies,
|
||||
clearCutoffUnmet,
|
||||
@@ -35,6 +45,8 @@ import { CheckInputChanged } from 'typings/inputs';
|
||||
import { SelectStateInputProps } from 'typings/props';
|
||||
import { TableOptionsChangePayload } from 'typings/Table';
|
||||
import getFilterValue from 'Utilities/Filter/getFilterValue';
|
||||
import hasDifferentItems from 'Utilities/Object/hasDifferentItems';
|
||||
import selectUniqueIds from 'Utilities/Object/selectUniqueIds';
|
||||
import {
|
||||
registerPagePopulator,
|
||||
unregisterPagePopulator,
|
||||
@@ -108,6 +120,8 @@ function CutoffUnmet() {
|
||||
const isSearchingForMovies =
|
||||
isSearchingForAllMovies || isSearchingForSelectedMovies;
|
||||
|
||||
const previousItems = usePrevious(items);
|
||||
|
||||
const handleSelectAllChange = useCallback(
|
||||
({ value }: CheckInputChanged) => {
|
||||
setSelectState({ type: value ? 'selectAll' : 'unselectAll', items });
|
||||
@@ -204,6 +218,8 @@ function CutoffUnmet() {
|
||||
|
||||
return () => {
|
||||
dispatch(clearCutoffUnmet());
|
||||
dispatch(clearQueueDetails());
|
||||
dispatch(clearMovieFiles());
|
||||
};
|
||||
}, [requestCurrentPage, dispatch]);
|
||||
|
||||
@@ -223,6 +239,21 @@ function CutoffUnmet() {
|
||||
};
|
||||
}, [dispatch]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!previousItems || hasDifferentItems(items, previousItems)) {
|
||||
const movieIds = selectUniqueIds<Movie, number>(items, 'id');
|
||||
const movieFileIds = selectUniqueIds<Movie, number>(items, 'movieFileId');
|
||||
|
||||
if (movieIds.length) {
|
||||
dispatch(fetchQueueDetails({ movieIds }));
|
||||
}
|
||||
|
||||
if (movieFileIds.length) {
|
||||
dispatch(fetchMovieFiles({ movieFileIds }));
|
||||
}
|
||||
}
|
||||
}, [items, previousItems, dispatch]);
|
||||
|
||||
return (
|
||||
<PageContent title={translate('CutoffUnmet')}>
|
||||
<PageToolbar>
|
||||
|
||||
@@ -18,10 +18,16 @@ import TableOptionsModalWrapper from 'Components/Table/TableOptions/TableOptions
|
||||
import TablePager from 'Components/Table/TablePager';
|
||||
import usePaging from 'Components/Table/usePaging';
|
||||
import useCurrentPage from 'Helpers/Hooks/useCurrentPage';
|
||||
import usePrevious from 'Helpers/Hooks/usePrevious';
|
||||
import useSelectState from 'Helpers/Hooks/useSelectState';
|
||||
import { align, icons, kinds } from 'Helpers/Props';
|
||||
import InteractiveImportModal from 'InteractiveImport/InteractiveImportModal';
|
||||
import Movie from 'Movie/Movie';
|
||||
import { executeCommand } from 'Store/Actions/commandActions';
|
||||
import {
|
||||
clearQueueDetails,
|
||||
fetchQueueDetails,
|
||||
} from 'Store/Actions/queueActions';
|
||||
import {
|
||||
batchToggleMissingMovies,
|
||||
clearMissing,
|
||||
@@ -36,6 +42,8 @@ import { CheckInputChanged } from 'typings/inputs';
|
||||
import { SelectStateInputProps } from 'typings/props';
|
||||
import { TableOptionsChangePayload } from 'typings/Table';
|
||||
import getFilterValue from 'Utilities/Filter/getFilterValue';
|
||||
import hasDifferentItems from 'Utilities/Object/hasDifferentItems';
|
||||
import selectUniqueIds from 'Utilities/Object/selectUniqueIds';
|
||||
import {
|
||||
registerPagePopulator,
|
||||
unregisterPagePopulator,
|
||||
@@ -112,6 +120,8 @@ function Missing() {
|
||||
const isSearchingForMovies =
|
||||
isSearchingForAllMovies || isSearchingForSelectedMovies;
|
||||
|
||||
const previousItems = usePrevious(items);
|
||||
|
||||
const handleSelectAllChange = useCallback(
|
||||
({ value }: CheckInputChanged) => {
|
||||
setSelectState({ type: value ? 'selectAll' : 'unselectAll', items });
|
||||
@@ -216,6 +226,7 @@ function Missing() {
|
||||
|
||||
return () => {
|
||||
dispatch(clearMissing());
|
||||
dispatch(clearQueueDetails());
|
||||
};
|
||||
}, [requestCurrentPage, dispatch]);
|
||||
|
||||
@@ -235,6 +246,16 @@ function Missing() {
|
||||
};
|
||||
}, [dispatch]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!previousItems || hasDifferentItems(items, previousItems)) {
|
||||
const movieIds = selectUniqueIds<Movie, number>(items, 'id');
|
||||
|
||||
if (movieIds.length) {
|
||||
dispatch(fetchQueueDetails({ movieIds }));
|
||||
}
|
||||
}
|
||||
}, [items, previousItems, dispatch]);
|
||||
|
||||
return (
|
||||
<PageContent title={translate('Missing')}>
|
||||
<PageToolbar>
|
||||
|
||||
@@ -8,6 +8,7 @@ using NzbDrone.Test.Common;
|
||||
namespace NzbDrone.Core.Test.Http
|
||||
{
|
||||
[TestFixture]
|
||||
[Platform(Exclude = "MacOsX")]
|
||||
public class HttpProxySettingsProviderFixture : TestBase<HttpProxySettingsProvider>
|
||||
{
|
||||
private HttpProxySettings GetProxySettings()
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using FizzWare.NBuilder;
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.CustomFormats;
|
||||
using NzbDrone.Core.MediaFiles;
|
||||
using NzbDrone.Core.Movies;
|
||||
using NzbDrone.Core.Organizer;
|
||||
using NzbDrone.Core.Qualities;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class CleanCollectionTheFixture : CoreTest<FileNameBuilder>
|
||||
{
|
||||
private Movie _movie;
|
||||
private MovieFile _movieFile;
|
||||
private NamingConfig _namingConfig;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
_movie = Builder<Movie>
|
||||
.CreateNew()
|
||||
.With(e => e.Title = "Movie Title")
|
||||
.Build();
|
||||
|
||||
_movieFile = new MovieFile { Quality = new QualityModel(Quality.HDTV720p), ReleaseGroup = "RadarrTest" };
|
||||
|
||||
_namingConfig = NamingConfig.Default;
|
||||
_namingConfig.RenameMovies = true;
|
||||
|
||||
Mocker.GetMock<INamingConfigService>()
|
||||
.Setup(c => c.GetConfig()).Returns(_namingConfig);
|
||||
|
||||
Mocker.GetMock<IQualityDefinitionService>()
|
||||
.Setup(v => v.Get(Moq.It.IsAny<Quality>()))
|
||||
.Returns<Quality>(v => Quality.DefaultQualityDefinitions.First(c => c.Quality == v));
|
||||
|
||||
Mocker.GetMock<ICustomFormatService>()
|
||||
.Setup(v => v.All())
|
||||
.Returns(new List<CustomFormat>());
|
||||
}
|
||||
|
||||
[TestCase("The Badger's Collection", "Badgers Collection, The")]
|
||||
[TestCase("@ The Movies Collection", "@ The Movies Collection")] // This doesn't seem right; see: FileNameBuilder.ScenifyRemoveChars, looks like it has the "at sign" in the regex
|
||||
[TestCase("A Stupid/Idiotic Collection", "Stupid Idiotic Collection, A")]
|
||||
[TestCase("An Astounding & Amazing Collection", "Astounding and Amazing Collection, An")]
|
||||
[TestCase("The Amazing Animal-Hero's Collection (2001)", "Amazing Animal-Heros Collection, The 2001")]
|
||||
[TestCase("A Different Movië (AU)", "Different Movie, A AU")]
|
||||
[TestCase("The Repairër (ZH) (2015)", "Repairer, The ZH 2015")]
|
||||
[TestCase("The Eighth Sensë 2 (Thai)", "Eighth Sense 2, The Thai")]
|
||||
[TestCase("The Astonishing Jæg (Latin America)", "Astonishing Jaeg, The Latin America")]
|
||||
[TestCase("The Hampster Pack (B&F)", "Hampster Pack, The BandF")]
|
||||
[TestCase("The Gásm: I (Almost) Got Away With It (1900)", "Gasm I Almost Got Away With It, The 1900")]
|
||||
[TestCase(null, "")]
|
||||
public void should_get_expected_title_back(string collection, string expected)
|
||||
{
|
||||
SetCollectionName(_movie, collection);
|
||||
_namingConfig.StandardMovieFormat = "{Movie CleanCollectionThe}";
|
||||
|
||||
Subject.BuildFileName(_movie, _movieFile)
|
||||
.Should().Be(expected);
|
||||
}
|
||||
|
||||
[TestCase("A")]
|
||||
[TestCase("Anne")]
|
||||
[TestCase("Theodore")]
|
||||
[TestCase("3%")]
|
||||
public void should_not_change_title(string collection)
|
||||
{
|
||||
SetCollectionName(_movie, collection);
|
||||
_namingConfig.StandardMovieFormat = "{Movie CleanCollectionThe}";
|
||||
|
||||
Subject.BuildFileName(_movie, _movieFile)
|
||||
.Should().Be(collection);
|
||||
}
|
||||
|
||||
private void SetCollectionName(Movie movie, string collectionName)
|
||||
{
|
||||
var metadata = new MovieMetadata()
|
||||
{
|
||||
CollectionTitle = collectionName,
|
||||
};
|
||||
movie.MovieMetadata = new Core.Datastore.LazyLoaded<MovieMetadata>(metadata);
|
||||
movie.MovieMetadata.Value.CollectionTitle = collectionName;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,6 +53,7 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
|
||||
[TestCase("The Amazing Race (Latin America)", "Amazing Race, The Latin America")]
|
||||
[TestCase("The Rat Pack (A&E)", "Rat Pack, The AandE")]
|
||||
[TestCase("The Climax: I (Almost) Got Away With It (2016)", "Climax I Almost Got Away With It, The 2016")]
|
||||
[TestCase(null, "")]
|
||||
public void should_get_expected_title_back(string title, string expected)
|
||||
{
|
||||
_movie.Title = title;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.IO;
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.Movies;
|
||||
@@ -32,5 +33,30 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
||||
|
||||
Subject.GetMovieFolder(movie).Should().Be(expected);
|
||||
}
|
||||
|
||||
[TestCase("The Y-Women Collection", "The Y-Women 14", 2005, "{Movie CollectionThe}/{Movie TitleThe} ({Release Year})", "Y-Women Collection, The", "Y-Women 14, The (2005)")]
|
||||
[TestCase("A Decade's Worth of Changes", "The First Year", 1980, "{Movie CleanCollectionThe}/{Movie TitleThe} ({Release Year})", "Decades Worth of Changes, A", "First Year, The (1980)")]
|
||||
[TestCase(null, "Just a Movie", 1999, "{Movie Title} ({Release Year})", null, "Just a Movie (1999)")]
|
||||
[TestCase(null, "Collectionless Slop", 1949, "{Movie CollectionThe}/{Movie TitleThe} ({Release Year})", null, "Collectionless Slop (1949)")]
|
||||
public void should_use_movieFolderFormat_and_CollectionFormat_to_build_folder_name(string collectionTitle, string movieTitle, int year, string format, string expectedCollection, string expectedTitle)
|
||||
{
|
||||
_namingConfig.MovieFolderFormat = format;
|
||||
|
||||
var movie = new Movie
|
||||
{
|
||||
MovieMetadata = new MovieMetadata
|
||||
{
|
||||
CollectionTitle = collectionTitle,
|
||||
Title = movieTitle,
|
||||
Year = year,
|
||||
},
|
||||
};
|
||||
|
||||
var result = Subject.GetMovieFolder(movie);
|
||||
var expected = !string.IsNullOrWhiteSpace(expectedCollection)
|
||||
? Path.Combine(expectedCollection, expectedTitle)
|
||||
: expectedTitle;
|
||||
result.Should().Be(expected);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,6 +108,8 @@ namespace NzbDrone.Core.Test.ParserTests
|
||||
[TestCase("A Movie in the Name (1964) (1080p BluRay x265 r00t)", "r00t")]
|
||||
[TestCase("Movie Title (2022) (2160p ATV WEB-DL Hybrid H265 DV HDR DDP Atmos 5.1 English - HONE)", "HONE")]
|
||||
[TestCase("Movie Title (2009) (2160p PMTP WEB-DL Hybrid H265 DV HDR10+ DDP Atmos 5.1 English - HONE)", "HONE")]
|
||||
[TestCase("Movie Title (2022) (1080p PCOK WEB-DL H265 DV HDR DDP Atmos 5.1 English - GiLG)", "GiLG")]
|
||||
[TestCase("Movie Title (2022) Extended (2160p PCOK WEB-DL H265 DV HDR DDP Atmos 5.1 English - GiLG)", "GiLG")]
|
||||
[TestCase("Why.Cant.You.Use.Normal.Characters.2021.2160p.UHD.HDR10+.BluRay.TrueHD.Atmos.7.1.x265-ZØNEHD", "ZØNEHD")]
|
||||
[TestCase("Movie.Should.Not.Use.Dots.2022.1080p.BluRay.x265.10bit.Tigole)", "Tigole")]
|
||||
[TestCase("Movie.Should.Not.Use.Dots.2022.1080p.BluRay.x265.10bit.Tigole", null)]
|
||||
|
||||
@@ -424,8 +424,8 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
|
||||
}
|
||||
catch (HttpException ex)
|
||||
{
|
||||
_logger.Debug("qbitTorrent authentication failed.");
|
||||
if (ex.Response.StatusCode == HttpStatusCode.Forbidden)
|
||||
_logger.Debug(ex, "qbitTorrent authentication failed.");
|
||||
if (ex.Response.StatusCode is HttpStatusCode.Unauthorized or HttpStatusCode.Forbidden)
|
||||
{
|
||||
throw new DownloadClientAuthenticationException("Failed to authenticate with qBittorrent.", ex);
|
||||
}
|
||||
@@ -437,7 +437,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
|
||||
throw new DownloadClientUnavailableException("Failed to connect to qBittorrent, please check your settings.", ex);
|
||||
}
|
||||
|
||||
if (response.Content != "Ok.")
|
||||
if (response.Content.IsNotNullOrWhiteSpace() && response.Content != "Ok.")
|
||||
{
|
||||
// returns "Fails." on bad login
|
||||
_logger.Debug("qbitTorrent authentication failed.");
|
||||
|
||||
@@ -1340,11 +1340,13 @@
|
||||
"NotificationsPushoverSettingsDevices": "Devices",
|
||||
"NotificationsPushoverSettingsDevicesHelpText": "List of device names (leave blank to send to all devices)",
|
||||
"NotificationsPushoverSettingsExpire": "Expire",
|
||||
"NotificationsPushoverSettingsExpireHelpText": "Maximum time to retry Emergency alerts, maximum 86400 seconds\"",
|
||||
"NotificationsPushoverSettingsExpireHelpText": "Maximum time to retry Emergency alerts, maximum 86400 seconds",
|
||||
"NotificationsPushoverSettingsRetry": "Retry",
|
||||
"NotificationsPushoverSettingsRetryHelpText": "Interval to retry Emergency alerts, minimum 30 seconds",
|
||||
"NotificationsPushoverSettingsSound": "Sound",
|
||||
"NotificationsPushoverSettingsSoundHelpText": "Notification sound, leave blank to use the default",
|
||||
"NotificationsPushoverSettingsTtl": "Time To Live",
|
||||
"NotificationsPushoverSettingsTtlHelpText": "Time in seconds before the message expires. Set to 0 for unlimited duration",
|
||||
"NotificationsPushoverSettingsUserKey": "User Key",
|
||||
"NotificationsSendGridSettingsApiKeyHelpText": "The API Key generated by SendGrid",
|
||||
"NotificationsSettingsUpdateLibrary": "Update Library",
|
||||
|
||||
@@ -45,6 +45,11 @@ namespace NzbDrone.Core.Notifications.Pushover
|
||||
requestBuilder.AddFormParameter("expire", settings.Expire);
|
||||
}
|
||||
|
||||
if (settings.Ttl > 0)
|
||||
{
|
||||
requestBuilder.AddFormParameter("ttl", settings.Ttl);
|
||||
}
|
||||
|
||||
if (!settings.Sound.IsNullOrWhiteSpace())
|
||||
{
|
||||
requestBuilder.AddFormParameter("sound", settings.Sound);
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace NzbDrone.Core.Notifications.Pushover
|
||||
RuleFor(c => c.UserKey).NotEmpty();
|
||||
RuleFor(c => c.Retry).GreaterThanOrEqualTo(30).LessThanOrEqualTo(86400).When(c => (PushoverPriority)c.Priority == PushoverPriority.Emergency);
|
||||
RuleFor(c => c.Retry).GreaterThanOrEqualTo(0).LessThanOrEqualTo(86400).When(c => (PushoverPriority)c.Priority == PushoverPriority.Emergency);
|
||||
RuleFor(c => c.Ttl).GreaterThanOrEqualTo(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +45,10 @@ namespace NzbDrone.Core.Notifications.Pushover
|
||||
[FieldDefinition(5, Label = "NotificationsPushoverSettingsExpire", Type = FieldType.Textbox, HelpText = "NotificationsPushoverSettingsExpireHelpText")]
|
||||
public int Expire { get; set; }
|
||||
|
||||
[FieldDefinition(6, Label = "NotificationsPushoverSettingsSound", Type = FieldType.Textbox, HelpText = "NotificationsPushoverSettingsSoundHelpText", HelpLink = "https://pushover.net/api#sounds")]
|
||||
[FieldDefinition(6, Label = "NotificationsPushoverSettingsTtl", Type = FieldType.Textbox, HelpText = "NotificationsPushoverSettingsTtlHelpText", Advanced = true)]
|
||||
public int Ttl { get; set; }
|
||||
|
||||
[FieldDefinition(7, Label = "NotificationsPushoverSettingsSound", Type = FieldType.Textbox, HelpText = "NotificationsPushoverSettingsSoundHelpText", HelpLink = "https://pushover.net/api#sounds")]
|
||||
public string Sound { get; set; }
|
||||
|
||||
public bool IsValid => !string.IsNullOrWhiteSpace(UserKey) && Priority >= -1 && Priority <= 2;
|
||||
|
||||
@@ -213,11 +213,21 @@ namespace NzbDrone.Core.Organizer
|
||||
|
||||
public static string TitleThe(string title)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(title))
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
return TitlePrefixRegex.Replace(title, "$2, $1$3");
|
||||
}
|
||||
|
||||
public static string CleanTitleThe(string title)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(title))
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
if (TitlePrefixRegex.IsMatch(title))
|
||||
{
|
||||
var splitResult = TitlePrefixRegex.Split(title);
|
||||
@@ -269,6 +279,7 @@ namespace NzbDrone.Core.Organizer
|
||||
tokenHandlers["{Movie Certification}"] = m => movie.MovieMetadata.Value.Certification ?? string.Empty;
|
||||
tokenHandlers["{Movie Collection}"] = m => Truncate(movie.MovieMetadata.Value.CollectionTitle, m.CustomFormat) ?? string.Empty;
|
||||
tokenHandlers["{Movie CollectionThe}"] = m => Truncate(TitleThe(movie.MovieMetadata.Value.CollectionTitle), m.CustomFormat) ?? string.Empty;
|
||||
tokenHandlers["{Movie CleanCollectionThe}"] = m => Truncate(CleanTitleThe(movie.MovieMetadata.Value.CollectionTitle), m.CustomFormat) ?? string.Empty;
|
||||
}
|
||||
|
||||
private string GetLanguageTitle(Movie movie, string isoCodes)
|
||||
|
||||
@@ -19,7 +19,7 @@ public static class ReleaseGroupParser
|
||||
private static readonly Regex ExceptionReleaseGroupRegexExact = new (@"\b(?<releasegroup>KRaLiMaRKo|E\.N\.D|D\-Z0N3|Koten_Gars|BluDragon|ZØNEHD|HQMUX|VARYG|YIFY|YTS(.(MX|LT|AG))?|TMd|Eml HDTeam|LMain|DarQ|BEN THE MEN|TAoE|QxR|126811)\b", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
|
||||
// groups whose releases end with RlsGroup) or RlsGroup]
|
||||
private static readonly Regex ExceptionReleaseGroupRegex = new (@"(?<=[._ \[])(?<releasegroup>(Silence|afm72|Panda|Ghost|MONOLITH|Tigole|Joy|ImE|UTR|t3nzin|Anime Time|Project Angel|Hakata Ramen|HONE|Vyndros|SEV|Garshasp|Kappa|Natty|RCVR|SAMPA|YOGI|r00t|EDGE2020|RZeroX|FreetheFish|Anna|Bandi|Qman|theincognito|HDO|DusIctv|DHD|CtrlHD|-ZR-|ADC|XZVN|RH|Kametsu)(?=\]|\)))", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
private static readonly Regex ExceptionReleaseGroupRegex = new (@"(?<=[._ \[])(?<releasegroup>(Silence|afm72|Panda|Ghost|MONOLITH|Tigole|Joy|ImE|UTR|t3nzin|Anime Time|Project Angel|Hakata Ramen|HONE|GiLG|Vyndros|SEV|Garshasp|Kappa|Natty|RCVR|SAMPA|YOGI|r00t|EDGE2020|RZeroX|FreetheFish|Anna|Bandi|Qman|theincognito|HDO|DusIctv|DHD|CtrlHD|-ZR-|ADC|XZVN|RH|Kametsu)(?=\]|\)))", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
|
||||
private static readonly RegexReplace CleanReleaseGroupRegex = new (@"(-(RP|1|NZBGeek|Obfuscated|Obfuscation|Scrambled|sample|Pre|postbot|xpost|Rakuv[a-z0-9]*|WhiteRev|BUYMORE|AsRequested|AlternativeToRequested|GEROV|Z0iDS3N|Chamele0n|4P|4Planet|AlteZachen|RePACKPOST))+$",
|
||||
string.Empty,
|
||||
|
||||
@@ -13,11 +13,12 @@
|
||||
<PackageReference Include="Polly" Version="8.6.0" />
|
||||
<PackageReference Include="Servarr.FFMpegCore" Version="4.7.0-26" />
|
||||
<PackageReference Include="Servarr.FFprobe" Version="5.1.4.112" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="8.0.20" />
|
||||
<PackageReference Include="System.Memory" Version="4.6.3" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
|
||||
<PackageReference Include="FluentMigrator.Runner" Version="6.2.0" />
|
||||
<PackageReference Include="FluentMigrator.Runner.Core" Version="6.2.0" />
|
||||
<PackageReference Include="FluentMigrator.Runner.SQLite" Version="6.2.0" />
|
||||
<PackageReference Include="FluentMigrator.Runner.Postgres" Version="6.2.0" />
|
||||
<PackageReference Include="FluentValidation" Version="9.5.4" />
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using DryIoc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
@@ -32,6 +33,7 @@ using Radarr.Http.ClientSchema;
|
||||
using Radarr.Http.ErrorManagement;
|
||||
using Radarr.Http.Frontend;
|
||||
using Radarr.Http.Middleware;
|
||||
using IPNetwork = Microsoft.AspNetCore.HttpOverrides.IPNetwork;
|
||||
using LogLevel = Microsoft.Extensions.Logging.LogLevel;
|
||||
|
||||
namespace NzbDrone.Host
|
||||
@@ -60,8 +62,11 @@ namespace NzbDrone.Host
|
||||
services.Configure<ForwardedHeadersOptions>(options =>
|
||||
{
|
||||
options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto | ForwardedHeaders.XForwardedHost;
|
||||
options.KnownNetworks.Clear();
|
||||
options.KnownProxies.Clear();
|
||||
options.KnownNetworks.Add(new IPNetwork(IPAddress.Parse("10.0.0.0"), 8));
|
||||
options.KnownNetworks.Add(new IPNetwork(IPAddress.Parse("172.16.0.0"), 12));
|
||||
options.KnownNetworks.Add(new IPNetwork(IPAddress.Parse("192.168.0.0"), 16));
|
||||
options.KnownNetworks.Add(new IPNetwork(IPAddress.Parse("fc00::"), 7));
|
||||
options.KnownNetworks.Add(new IPNetwork(IPAddress.Parse("fe80::"), 10));
|
||||
});
|
||||
|
||||
services.AddRouting(options => options.LowercaseUrls = true);
|
||||
|
||||
Reference in New Issue
Block a user