1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-03-09 15:01:39 -04:00

Compare commits

...

24 Commits

Author SHA1 Message Date
Servarr
fa6804767c Automated API Docs update 2023-05-19 04:15:36 +03:00
Bogdan
2e252771de Remove unused imports
(cherry picked from commit c6b543e0729bc20f15e37d074fbf31d8c76c187a)
2023-05-19 04:14:48 +03:00
Bogdan
fd76d67bae Remove empty constructors 2023-05-19 04:14:48 +03:00
Qstick
156def3138 New: Advanced settings toggle in indexer edit/add modal
(cherry picked from commit 94a8ef63044f47b615facbb6e04200bdd3797189)

Fixes #8538
2023-05-19 03:58:04 +03:00
Qstick
9175c737d3 New: Add path mapping for partial library updates in Plex Server Notifications
(cherry picked from commit de08d372677052f5dcf9ee689cd48282746bfbec)

Closes #8539
2023-05-19 03:51:04 +03:00
Bogdan
19a1f97be8 Add forceSave to the OpenAPI docs
(cherry picked from commit ef0b91b45bc7f1295efb03dc44630f1442e18be1)

Fixes #8538
2023-05-19 03:47:44 +03:00
Bogdan
112550399b Fixed: Use indexer errors from response if Content-Type is XML before processing response
(cherry picked from commit 9bdc6183663a3510e53433a30ad701065e7ee9d9)
2023-05-19 03:44:13 +03:00
Bogdan
574d1c8d0f Fixed: Log name of mount point failure
(cherry picked from commit b5050d02d6adbaaaa0f8ae9f8426551e5606fff1)
2023-05-18 03:58:25 +03:00
Bogdan
3feaee25e2 Sort tags by label
Co-authored-by: Mark McDowall <markus.mcd5@gmail.com>
(cherry picked from commit f32a3cd41c17bb9cb829ac24732cfeec6a18d569)

Fixes #8531
2023-05-18 03:43:03 +03:00
Bogdan
bb77538701 Fix checking for SameTorrent when the indexer is null
(cherry picked from commit 3ece1533d86c559ec1bf7689c908802f31e38e91)
2023-05-18 03:37:08 +03:00
Qstick
731db1ad79 New: Add TmdbId and ImdbId to manual import movie selection
Fixes #8483
2023-05-16 21:07:42 -05:00
Qstick
fe76cbfc6b Avoid double movie fetch on UI load 2023-05-16 20:27:55 -05:00
Weblate
695cab3f3a Translated using Weblate (Portuguese (Brazil)) [skip ci]
Currently translated at 100.0% (1173 of 1173 strings)

Translated using Weblate (French) [skip ci]

Currently translated at 99.8% (1171 of 1173 strings)

Translated using Weblate (French) [skip ci]

Currently translated at 99.8% (1171 of 1173 strings)

Translated using Weblate (Indonesian) [skip ci]

Currently translated at 2.9% (35 of 1173 strings)

Translated using Weblate (Portuguese (Brazil)) [skip ci]

Currently translated at 100.0% (1173 of 1173 strings)

Co-authored-by: HanaO00 <lwin24452@gmail.com>
Co-authored-by: Havok Dan <havokdan@yahoo.com.br>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: foXaCe <foxace66@gmail.com>
Co-authored-by: liimee <git.taaa@fedora.email>
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/fr/
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/id/
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/pt_BR/
Translation: Servarr/Radarr
2023-05-17 01:49:39 +03:00
Bogdan
e1d76689f7 Fixed: (Notifications) Calculate mapped path in Plex only when MapTo is not empty 2023-05-17 00:30:58 +03:00
Bogdan
24bd2ae59b Log path in MediaFileAttributeService 2023-05-16 18:33:33 +03:00
bakerboy448
42267da4ef Fixed: List Sync Help Text
Fixes #8522
2023-05-16 00:12:48 +03:00
Servarr
a28b9ceff0 Automated API Docs update 2023-05-15 14:51:39 +03:00
Bogdan
48b9bb9427 Fix validation for boolean query parameters
(cherry picked from commit 2fecd280016630d5afe2d60e52cbb52338c155b5)

Closes #8517
2023-05-15 14:37:13 +03:00
Bogdan
10bb8fa263 Use string interpolation in formatBytes
Fixes #8519
2023-05-15 14:32:04 +03:00
Mark McDowall
588c8fb074 New: Plex Watchlist RSS support
(cherry picked from commit 6d88a98282d1441f903d567470a9f1ce6ba0b52f)
2023-05-15 06:18:30 +03:00
Mark McDowall
f14482cb59 Use QualityProfile instead of any
(cherry picked from commit f63e060ac49c5bb0c498faac364632de7d5e9f1c)

Closes #8493
2023-05-15 04:56:59 +03:00
Qstick
7ff48a197a Bump version to 4.5.2 2023-05-14 20:29:59 -05:00
Bogdan
84bf30dcda Fixed: Prevent unknown settings implementation from failing to deserialize
(cherry picked from commit 0e2cc7851f556e928e52bb2886c7d60c13b0741e)

Log removal of invalid definitions as warnings

(cherry picked from commit 3d61719a2cc9c87ac3c92b5358bb5034aed4c2ff)

(cherry picked from commit 498722b240c17d310863ed604c441a9c507ddcd6)
2023-05-15 01:13:07 +03:00
Qstick
8b291d932f Cleanup distribution files 2023-05-14 09:48:12 -05:00
176 changed files with 765 additions and 427 deletions

View File

@@ -44,6 +44,9 @@ csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = true:suggestion
# Using directive is unnecessary.
dotnet_diagnostic.IDE0005.severity = error
# Stylecop Rules
dotnet_diagnostic.SA0001.severity = none
dotnet_diagnostic.SA1025.severity = none

2
.gitattributes vendored
View File

@@ -3,7 +3,7 @@
# Explicitly set bash scripts to have unix endings
*.sh text eol=lf
macOS/Radarr text eol=lf
distribution/osx/Radarr text eol=lf
# Custom for Visual Studio
*.cs diff=csharp

View File

@@ -9,7 +9,7 @@ variables:
testsFolder: './_tests'
yarnCacheFolder: $(Pipeline.Workspace)/.yarn
nugetCacheFolder: $(Pipeline.Workspace)/.nuget/packages
majorVersion: '4.5.1'
majorVersion: '4.5.2'
minorVersion: $[counter('minorVersion', 2000)]
radarrVersion: '$(majorVersion).$(minorVersion)'
buildName: '$(Build.SourceBranchName).$(radarrVersion)'
@@ -211,8 +211,8 @@ stages:
displayName: Fetch Frontend
- bash: |
./build.sh --packages --installer
cp setup/output/Radarr.*win-x64.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Radarr.${BUILDNAME}.windows-core-x64-installer.exe
cp setup/output/Radarr.*win-x86.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Radarr.${BUILDNAME}.windows-core-x86-installer.exe
cp distribution/windows/setup/output/Radarr.*win-x64.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Radarr.${BUILDNAME}.windows-core-x64-installer.exe
cp distribution/windows/setup/output/Radarr.*win-x86.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Radarr.${BUILDNAME}.windows-core-x86-installer.exe
displayName: Create Installers
- publish: $(Build.ArtifactStagingDirectory)
artifact: 'WindowsInstaller'

View File

@@ -21,7 +21,7 @@ UpdateVersionNumber()
echo "Updating Version Info"
sed -i'' -e "s/<AssemblyVersion>[0-9.*]\+<\/AssemblyVersion>/<AssemblyVersion>$RADARRVERSION<\/AssemblyVersion>/g" src/Directory.Build.props
sed -i'' -e "s/<AssemblyConfiguration>[\$()A-Za-z-]\+<\/AssemblyConfiguration>/<AssemblyConfiguration>${BUILD_SOURCEBRANCHNAME}<\/AssemblyConfiguration>/g" src/Directory.Build.props
sed -i'' -e "s/<string>10.0.0.0<\/string>/<string>$RADARRVERSION<\/string>/g" macOS/Radarr.app/Contents/Info.plist
sed -i'' -e "s/<string>10.0.0.0<\/string>/<string>$RADARRVERSION<\/string>/g" distribution/osx/Radarr.app/Contents/Info.plist
fi
}
@@ -184,7 +184,7 @@ PackageMacOSApp()
rm -rf $folder
mkdir -p $folder
cp -r macOS/Radarr.app $folder
cp -r distribution/osx/Radarr.app $folder
mkdir -p $folder/Radarr.app/Contents/MacOS
echo "Copying Binaries"
@@ -246,7 +246,7 @@ BuildInstaller()
local framework="$1"
local runtime="$2"
./_inno/ISCC.exe setup/radarr.iss "//DFramework=$framework" "//DRuntime=$runtime"
./_inno/ISCC.exe distribution/windows/setup/radarr.iss "//DFramework=$framework" "//DRuntime=$runtime"
}
InstallInno()

5
debian/changelog vendored
View File

@@ -1,5 +0,0 @@
nzbdrone {version} {branch}; urgency=low
* Automatic Release.
-- NzbDrone <contact@nzbdrone.com> Mon, 26 Aug 2013 00:00:00 -0700

1
debian/compat vendored
View File

@@ -1 +0,0 @@
8

12
debian/control vendored
View File

@@ -1,12 +0,0 @@
Section: web
Priority: optional
Maintainer: Sonarr <contact@nzbdrone.com>
Source: nzbdrone
Homepage: https://sonarr.tv
Vcs-Git: git@github.com:Sonarr/Sonarr.git
Vcs-Browser: https://github.com/Sonarr/Sonarr
Package: nzbdrone
Architecture: all
Depends: libmono-cil-dev (>= 3.2), sqlite3 (>= 3.7), mediainfo (>= 0.7.52)
Description: Sonarr is an internet PVR

24
debian/copyright vendored
View File

@@ -1,24 +0,0 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: nzbdrone
Source: https://github.com/Sonarr/Sonarr
Files: *
Copyright: 2010-2016 Sonarr <hello@sonarr.tv>
License: GPL-3.0+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".

1
debian/install vendored
View File

@@ -1 +0,0 @@
nzbdrone_bin/* opt/NzbDrone

13
debian/rules vendored
View File

@@ -1,13 +0,0 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
dh $@

View File

@@ -52,8 +52,8 @@ Name: "none"; Description: "Do not start automatically"; GroupDescription: "Star
Name: "{app}"; Permissions: users-modify
[Files]
Source: "..\_artifacts\{#Runtime}\{#Framework}\Radarr\Radarr.exe"; DestDir: "{app}\bin"; Flags: ignoreversion
Source: "..\_artifacts\{#Runtime}\{#Framework}\Radarr\*"; Excludes: "Radarr.Update"; DestDir: "{app}\bin"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "..\..\..\_artifacts\{#Runtime}\{#Framework}\Radarr\Radarr.exe"; DestDir: "{app}\bin"; Flags: ignoreversion
Source: "..\..\..\_artifacts\{#Runtime}\{#Framework}\Radarr\*"; Excludes: "Radarr.Update"; DestDir: "{app}\bin"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]

View File

@@ -0,0 +1,4 @@
.row {
composes: link from '~Components/Link/Link.css';
composes: row from '~./VirtualTableRow.css';
}

View File

@@ -0,0 +1,7 @@
// This file is automatically generated.
// Please do not change this file!
interface CssExports {
'row': string;
}
export const cssExports: CssExports;
export default cssExports;

View File

@@ -0,0 +1,16 @@
import React from 'react';
import Link from 'Components/Link/Link';
import VirtualTableRow from './VirtualTableRow';
import styles from './VirtualTableRowButton.css';
function VirtualTableRowButton(props) {
return (
<Link
className={styles.row}
component={VirtualTableRow}
{...props}
/>
);
}
export default VirtualTableRowButton;

View File

@@ -1,4 +1,3 @@
import _ from 'lodash';
import PropTypes from 'prop-types';
import React from 'react';
import { kinds } from 'Helpers/Props';
@@ -6,16 +5,15 @@ import Label from './Label';
import styles from './TagList.css';
function TagList({ tags, tagList }) {
const sortedTags = tags
.map((tagId) => tagList.find((tag) => tag.id === tagId))
.filter((tag) => !!tag)
.sort((a, b) => a.label.localeCompare(b.label));
return (
<div className={styles.tags}>
{
tags.map((t) => {
const tag = _.find(tagList, { id: t });
if (!tag) {
return null;
}
sortedTags.map((tag) => {
return (
<Label
key={tag.id}

View File

@@ -15,13 +15,40 @@ import ModalContent from 'Components/Modal/ModalContent';
import ModalFooter from 'Components/Modal/ModalFooter';
import ModalHeader from 'Components/Modal/ModalHeader';
import Scroller from 'Components/Scroller/Scroller';
import Column from 'Components/Table/Column';
import VirtualTableRowButton from 'Components/Table/VirtualTableRowButton';
import { scrollDirections } from 'Helpers/Props';
import Movie from 'Movie/Movie';
import createAllMoviesSelector from 'Store/Selectors/createAllMoviesSelector';
import dimensions from 'Styles/Variables/dimensions';
import translate from 'Utilities/String/translate';
import SelectMovieModalTableHeader from './SelectMovieModalTableHeader';
import SelectMovieRow from './SelectMovieRow';
import styles from './SelectMovieModalContent.css';
const columns = [
{
name: 'title',
label: translate('Title'),
isVisible: true,
},
{
name: 'year',
label: translate('Year'),
isVisible: true,
},
{
name: 'imdbId',
label: translate('ImdbId'),
isVisible: true,
},
{
name: 'tmdbId',
label: translate('TmdbId'),
isVisible: true,
},
];
const bodyPadding = parseInt(dimensions.pageContentBodyPadding);
interface SelectMovieModalContentProps {
@@ -32,6 +59,7 @@ interface SelectMovieModalContentProps {
interface RowItemData {
items: Movie[];
columns: Column[];
onMovieSelect(movieId: number): void;
}
@@ -40,7 +68,7 @@ const Row: React.FC<ListChildComponentProps<RowItemData>> = ({
style,
data,
}) => {
const { items, onMovieSelect } = data;
const { items, columns, onMovieSelect } = data;
if (index >= items.length) {
return null;
@@ -49,20 +77,24 @@ const Row: React.FC<ListChildComponentProps<RowItemData>> = ({
const movie = items[index];
return (
<div
<VirtualTableRowButton
style={{
display: 'flex',
justifyContent: 'space-between',
...style,
}}
onPress={() => onMovieSelect(movie.id)}
>
<SelectMovieRow
id={movie.id}
title={movie.title}
tmdbId={movie.tmdbId}
imdbId={movie.imdbId}
year={movie.year}
columns={columns}
onMovieSelect={onMovieSelect}
/>
</div>
</VirtualTableRowButton>
);
};
@@ -161,6 +193,7 @@ function SelectMovieModalContent(props: SelectMovieModalContentProps) {
autoFocus={false}
ref={scrollerRef}
>
<SelectMovieModalTableHeader columns={columns} />
<List<RowItemData>
ref={listRef}
style={{
@@ -174,6 +207,7 @@ function SelectMovieModalContent(props: SelectMovieModalContentProps) {
itemSize={38}
itemData={{
items,
columns,
onMovieSelect: onMovieSelectWrapper,
}}
>

View File

@@ -0,0 +1,18 @@
.title {
composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css';
flex: 4 0 140px;
}
.year {
composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css';
flex: 0 0 70px;
}
.imdbId,
.tmdbId {
composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css';
flex: 0 0 110px;
}

View File

@@ -0,0 +1,10 @@
// This file is automatically generated.
// Please do not change this file!
interface CssExports {
'imdbId': string;
'title': string;
'tmdbId': string;
'year': string;
}
export const cssExports: CssExports;
export default cssExports;

View File

@@ -0,0 +1,41 @@
import React from 'react';
import Column from 'Components/Table/Column';
import VirtualTableHeader from 'Components/Table/VirtualTableHeader';
import VirtualTableHeaderCell from 'Components/Table/VirtualTableHeaderCell';
import styles from './SelectMovieModalTableHeader.css';
interface SelectMovieModalTableHeaderProps {
columns: Column[];
}
function SelectMovieModalTableHeader(props: SelectMovieModalTableHeaderProps) {
const { columns } = props;
return (
<VirtualTableHeader>
{columns.map((column) => {
const { name, label, isVisible } = column;
if (!isVisible) {
return null;
}
return (
<VirtualTableHeaderCell
key={name}
className={
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
styles[name]
}
name={name}
>
{label}
</VirtualTableHeaderCell>
);
})}
</VirtualTableHeader>
);
}
export default SelectMovieModalTableHeader;

View File

@@ -1,5 +1,25 @@
.movie {
padding: 8px;
width: 100%;
border-bottom: 1px solid var(--borderColor);
.cell {
composes: cell from '~Components/Table/Cells/VirtualTableRowCell.css';
display: flex;
align-items: center;
}
.title {
composes: cell;
flex: 4 0 140px;
}
.year {
composes: cell;
flex: 0 0 70px;
}
.tmdbId,
.imdbId {
composes: cell;
flex: 0 0 110px;
}

View File

@@ -1,7 +1,11 @@
// This file is automatically generated.
// Please do not change this file!
interface CssExports {
'movie': string;
'cell': string;
'imdbId': string;
'title': string;
'tmdbId': string;
'year': string;
}
export const cssExports: CssExports;
export default cssExports;

View File

@@ -1,6 +1,7 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import Link from 'Components/Link/Link';
import Label from 'Components/Label';
import VirtualTableRowCell from 'Components/Table/Cells/VirtualTableRowCell';
import styles from './SelectMovieRow.css';
class SelectMovieRow extends Component {
@@ -17,13 +18,23 @@ class SelectMovieRow extends Component {
render() {
return (
<Link
className={styles.movie}
component="div"
onPress={this.onPress}
>
{this.props.title} ({this.props.year})
</Link>
<>
<VirtualTableRowCell className={styles.title}>
{this.props.title}
</VirtualTableRowCell>
<VirtualTableRowCell className={styles.year}>
{this.props.year}
</VirtualTableRowCell>
<VirtualTableRowCell className={styles.imdbId}>
<Label>{this.props.imdbId}</Label>
</VirtualTableRowCell>
<VirtualTableRowCell className={styles.tmdbId}>
<Label>{this.props.tmdbId}</Label>
</VirtualTableRowCell>
</>
);
}
}
@@ -31,6 +42,8 @@ class SelectMovieRow extends Component {
SelectMovieRow.propTypes = {
id: PropTypes.number.isRequired,
title: PropTypes.string.isRequired,
tmdbId: PropTypes.number.isRequired,
imdbId: PropTypes.string.isRequired,
year: PropTypes.number.isRequired,
onMovieSelect: PropTypes.func.isRequired
};

View File

@@ -1,4 +1,3 @@
import _ from 'lodash';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import createMovieSelector from 'Store/Selectors/createMovieSelector';
@@ -10,15 +9,11 @@ function createMapStateToProps() {
createMovieSelector(),
createTagsSelector(),
(movie, tagList) => {
const tags = _.reduce(movie.tags, (acc, tag) => {
const matchingTag = _.find(tagList, { id: tag });
if (matchingTag) {
acc.push(matchingTag.label);
}
return acc;
}, []);
const tags = movie.tags
.map((tagId) => tagList.find((tag) => tag.id === tagId))
.filter((tag) => !!tag)
.map((tag) => tag.label)
.sort((a, b) => a.localeCompare(b));
return {
tags

View File

@@ -25,7 +25,6 @@ import SortDirection from 'Helpers/Props/SortDirection';
import InteractiveImportModal from 'InteractiveImport/InteractiveImportModal';
import NoMovie from 'Movie/NoMovie';
import { executeCommand } from 'Store/Actions/commandActions';
import { fetchMovies } from 'Store/Actions/movieActions';
import {
setMovieFilter,
setMovieSort,
@@ -105,7 +104,6 @@ const MovieIndex = withScrollPosition((props: MovieIndexProps) => {
const [isSelectMode, setIsSelectMode] = useState(false);
useEffect(() => {
dispatch(fetchMovies());
dispatch(fetchQueueDetails({ all: true }));
}, [dispatch]);

View File

@@ -1,6 +1,7 @@
import React from 'react';
import Icon from 'Components/Icon';
import { icons } from 'Helpers/Props';
import QualityProfile from 'typings/QualityProfile';
import getRelativeDate from 'Utilities/Date/getRelativeDate';
import formatBytes from 'Utilities/Number/formatBytes';
import translate from 'Utilities/String/translate';
@@ -9,8 +10,7 @@ import styles from './MovieIndexPosterInfo.css';
interface MovieIndexPosterInfoProps {
studio?: string;
showQualityProfile: boolean;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
qualityProfile: any;
qualityProfile: QualityProfile;
added?: string;
inCinemas?: string;
digitalRelease?: string;

View File

@@ -10,7 +10,8 @@ import styles from './AdvancedSettingsButton.css';
function AdvancedSettingsButton(props) {
const {
advancedSettings,
onAdvancedSettingsPress
onAdvancedSettingsPress,
showLabel
} = props;
return (
@@ -43,18 +44,27 @@ function AdvancedSettingsButton(props) {
/>
</span>
<div className={styles.labelContainer}>
<div className={styles.label}>
{advancedSettings ? translate('HideAdvanced') : translate('ShowAdvanced')}
</div>
</div>
{
showLabel ?
<div className={styles.labelContainer}>
<div className={styles.label}>
{advancedSettings ? translate('HideAdvanced') : translate('ShowAdvanced')}
</div>
</div> :
null
}
</Link>
);
}
AdvancedSettingsButton.propTypes = {
advancedSettings: PropTypes.bool.isRequired,
onAdvancedSettingsPress: PropTypes.func.isRequired
onAdvancedSettingsPress: PropTypes.func.isRequired,
showLabel: PropTypes.bool.isRequired
};
AdvancedSettingsButton.defaultProps = {
showLabel: true
};
export default AdvancedSettingsButton;

View File

@@ -13,6 +13,7 @@ import ModalContent from 'Components/Modal/ModalContent';
import ModalFooter from 'Components/Modal/ModalFooter';
import ModalHeader from 'Components/Modal/ModalHeader';
import { inputTypes, kinds } from 'Helpers/Props';
import AdvancedSettingsButton from 'Settings/AdvancedSettingsButton';
import translate from 'Utilities/String/translate';
import styles from './EditIndexerModalContent.css';
@@ -31,6 +32,7 @@ function EditIndexerModalContent(props) {
onSavePress,
onTestPress,
onDeleteIndexerPress,
onAdvancedSettingsPress,
...otherProps
} = props;
@@ -200,6 +202,12 @@ function EditIndexerModalContent(props) {
</Button>
}
<AdvancedSettingsButton
advancedSettings={advancedSettings}
onAdvancedSettingsPress={onAdvancedSettingsPress}
showLabel={false}
/>
<SpinnerErrorButton
isSpinning={isTesting}
error={saveError}
@@ -239,6 +247,7 @@ EditIndexerModalContent.propTypes = {
onModalClose: PropTypes.func.isRequired,
onSavePress: PropTypes.func.isRequired,
onTestPress: PropTypes.func.isRequired,
onAdvancedSettingsPress: PropTypes.func.isRequired,
onDeleteIndexerPress: PropTypes.func
};

View File

@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { saveIndexer, setIndexerFieldValue, setIndexerValue, testIndexer } from 'Store/Actions/settingsActions';
import { saveIndexer, setIndexerFieldValue, setIndexerValue, testIndexer, toggleAdvancedSettings } from 'Store/Actions/settingsActions';
import createProviderSettingsSelector from 'Store/Selectors/createProviderSettingsSelector';
import EditIndexerModalContent from './EditIndexerModalContent';
@@ -23,7 +23,8 @@ const mapDispatchToProps = {
setIndexerValue,
setIndexerFieldValue,
saveIndexer,
testIndexer
testIndexer,
toggleAdvancedSettings
};
class EditIndexerModalContentConnector extends Component {
@@ -56,6 +57,10 @@ class EditIndexerModalContentConnector extends Component {
this.props.testIndexer({ id: this.props.id });
};
onAdvancedSettingsPress = () => {
this.props.toggleAdvancedSettings();
};
//
// Render
@@ -65,6 +70,7 @@ class EditIndexerModalContentConnector extends Component {
{...this.props}
onSavePress={this.onSavePress}
onTestPress={this.onTestPress}
onAdvancedSettingsPress={this.onAdvancedSettingsPress}
onInputChange={this.onInputChange}
onFieldChange={this.onFieldChange}
/>
@@ -80,6 +86,7 @@ EditIndexerModalContentConnector.propTypes = {
item: PropTypes.object.isRequired,
setIndexerValue: PropTypes.func.isRequired,
setIndexerFieldValue: PropTypes.func.isRequired,
toggleAdvancedSettings: PropTypes.func.isRequired,
saveIndexer: PropTypes.func.isRequired,
testIndexer: PropTypes.func.isRequired,
onModalClose: PropTypes.func.isRequired

View File

@@ -7,10 +7,10 @@ function formatBytes(input) {
return '';
}
return filesize(size, {
return `${filesize(size, {
base: 2,
round: 1
}).toString();
})}`;
}
export default formatBytes;

View File

@@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;

View File

@@ -1,4 +1,3 @@
using System.Globalization;
using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Common.Extensions;

View File

@@ -3,7 +3,6 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using NzbDrone.Common.EnsureThat;
using NzbDrone.Common.Extensions;
namespace NzbDrone.Common.Cache
{

View File

@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Security.AccessControl;
using System.Security.Principal;
namespace NzbDrone.Common.Disk
{

View File

@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using NzbDrone.Common.Extensions;
namespace NzbDrone.Common.Disk

View File

@@ -1,4 +1,3 @@
using System.Net.Http;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;

View File

@@ -4,7 +4,6 @@ using System.Collections.Generic;
using System.Collections.Specialized;
using System.Globalization;
using System.Linq;
using System.Net;
using System.Net.Http.Headers;
using System.Text;
using NzbDrone.Common.Extensions;

View File

@@ -1,9 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NzbDrone.Common.Http
{
public static class UserAgentParser

View File

@@ -1,4 +1,3 @@
using System;
using System.Linq;
using System.Net;
using System.Text.RegularExpressions;

View File

@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using NLog;
using NLog.Fluent;
namespace NzbDrone.Common.Instrumentation.Extensions
{

View File

@@ -1,7 +1,6 @@
using System;
using System.Threading.Tasks;
using NLog;
using NzbDrone.Common.EnvironmentInfo;
namespace NzbDrone.Common.Instrumentation
{

View File

@@ -1,4 +1,3 @@
using System;
using System.Text;
using NLog;
using NLog.Targets;

View File

@@ -1,7 +1,6 @@
using System;
using System.Linq;
using Sentry;
using Sentry.Protocol;
namespace NzbDrone.Common.Instrumentation.Sentry
{

View File

@@ -10,9 +10,7 @@ using NLog.Common;
using NLog.Targets;
using Npgsql;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Common.Extensions;
using Sentry;
using Sentry.Protocol;
namespace NzbDrone.Common.Instrumentation.Sentry
{

View File

@@ -1,5 +1,4 @@
using System.Collections.Generic;
using NzbDrone.Common.Disk;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Common.Extensions;

View File

@@ -1,5 +1,4 @@
using System;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using NLog;

View File

@@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using FluentAssertions;

View File

@@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Common.Serializer;

View File

@@ -1,4 +1,3 @@
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using FluentAssertions;

View File

@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using FluentAssertions;
using Newtonsoft.Json.Linq;
using NUnit.Framework;
using NzbDrone.Common.Serializer;
using NzbDrone.Core.Datastore.Migration;

View File

@@ -1,4 +1,3 @@
using System;
using FizzWare.NBuilder;
using FluentAssertions;
using NUnit.Framework;

View File

@@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Linq;
using FizzWare.NBuilder;
using FluentAssertions;
using NUnit.Framework;

View File

@@ -10,7 +10,6 @@ using NzbDrone.Core.Download;
using NzbDrone.Core.Download.Clients;
using NzbDrone.Core.Download.Clients.FreeboxDownload;
using NzbDrone.Core.Download.Clients.FreeboxDownload.Responses;
using NzbDrone.Core.Movies;
using NzbDrone.Core.Parser.Model;
namespace NzbDrone.Core.Test.Download.DownloadClientTests.FreeboxDownloadTests

View File

@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using FizzWare.NBuilder;
using Moq;
using NUnit.Framework;

View File

@@ -1,5 +1,4 @@
using System;
using Moq;
using NUnit.Framework;
using NzbDrone.Common.Cache;
using NzbDrone.Common.Cloud;
@@ -10,7 +9,6 @@ using NzbDrone.Common.Http.Proxy;
using NzbDrone.Common.TPL;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Http;
using NzbDrone.Core.Parser;
using NzbDrone.Core.Security;
using NzbDrone.Test.Common;

View File

@@ -1,13 +1,10 @@
using System;
using System.Collections.Generic;
using Moq;
using NUnit.Framework;
using NzbDrone.Common.Disk;
using NzbDrone.Core.Download;
using NzbDrone.Core.Download.Clients;
using NzbDrone.Core.HealthCheck.Checks;
using NzbDrone.Core.Localization;
using NzbDrone.Core.RootFolders;
using NzbDrone.Core.Test.Framework;
using NzbDrone.Test.Common;

View File

@@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
using Moq;
using NUnit.Framework;

View File

@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using FizzWare.NBuilder;
using FluentAssertions;
using NUnit.Framework;

View File

@@ -3,9 +3,7 @@ using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Core.Housekeeping.Housekeepers;
using NzbDrone.Core.ImportLists.ImportListMovies;
using NzbDrone.Core.Languages;
using NzbDrone.Core.Movies;
using NzbDrone.Core.Movies.Translations;
using NzbDrone.Core.Test.Framework;
namespace NzbDrone.Core.Test.Housekeeping.Housekeepers

View File

@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using FizzWare.NBuilder;
using FluentAssertions;

View File

@@ -6,7 +6,6 @@ using NUnit.Framework;
using NzbDrone.Common.Http;
using NzbDrone.Core.Indexers.Newznab;
using NzbDrone.Core.Test.Framework;
using NzbDrone.Test.Common;
namespace NzbDrone.Core.Test.IndexerTests.NewznabTests
{

View File

@@ -5,7 +5,6 @@ using System.Net.Http;
using FluentAssertions;
using Moq;
using NUnit.Framework;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Common.Http;
using NzbDrone.Core.Indexers;
using NzbDrone.Core.Indexers.Rarbg;

View File

@@ -1,10 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using FizzWare.NBuilder;
using FluentAssertions;
using FluentValidation.Results;
using Moq;
using NUnit.Framework;
using NzbDrone.Common.Http;

View File

@@ -1,4 +1,3 @@
using System;
using System.IO;
using System.Linq;
using System.Reflection;

View File

@@ -1,4 +1,3 @@
using System.Linq;
using FizzWare.NBuilder;
using FluentAssertions;
using NUnit.Framework;

View File

@@ -1,11 +1,9 @@
using System.Collections.Generic;
using System.Linq;
using FizzWare.NBuilder;
using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.CustomFormats;
using NzbDrone.Core.Datastore;
using NzbDrone.Core.MediaFiles;
using NzbDrone.Core.MediaFiles.MovieImport.Specifications;
using NzbDrone.Core.Movies;

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Threading;
using Moq;
using NUnit.Framework;
@@ -210,10 +210,6 @@ namespace NzbDrone.Core.Test.Messaging.Commands
public class CommandB : Command
{
public CommandB()
{
}
public override string CompletionMessage => null;
}
}

View File

@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using FizzWare.NBuilder;
using Moq;
using NUnit.Framework;

View File

@@ -12,7 +12,6 @@ using NzbDrone.Core.Languages;
using NzbDrone.Core.MediaFiles;
using NzbDrone.Core.MediaFiles.MediaInfo;
using NzbDrone.Core.Movies;
using NzbDrone.Core.Movies.Collections;
using NzbDrone.Core.Movies.Translations;
using NzbDrone.Core.Organizer;
using NzbDrone.Core.Qualities;

View File

@@ -1,7 +1,6 @@
using FizzWare.NBuilder;
using FluentAssertions;
using NUnit.Framework;
using NUnit.Framework.Internal;
using NzbDrone.Core.Movies;
using NzbDrone.Core.Organizer;
using NzbDrone.Core.Test.Framework;

View File

@@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using FluentAssertions;

View File

@@ -131,7 +131,7 @@ namespace NzbDrone.Core.Blocklisting
return release.InfoHash.Equals(item.TorrentInfoHash);
}
return item.Indexer.Equals(release.Indexer, StringComparison.InvariantCultureIgnoreCase);
return HasSameIndexer(item, release.Indexer);
}
private bool HasSameIndexer(Blocklist item, string indexer)

View File

@@ -1,8 +1,7 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using NzbDrone.Common.Cache;
using NzbDrone.Core.CustomFormats.Events;
using NzbDrone.Core.Datastore;
using NzbDrone.Core.Messaging.Events;
namespace NzbDrone.Core.CustomFormats

View File

@@ -1,4 +1,3 @@
using NzbDrone.Core.Parser.Model;
using NzbDrone.Core.Validation;
namespace NzbDrone.Core.CustomFormats

View File

@@ -1,4 +1,3 @@
using NzbDrone.Core.Parser.Model;
using NzbDrone.Core.Validation;
namespace NzbDrone.Core.CustomFormats

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using FluentValidation;
using NzbDrone.Core.Annotations;
using NzbDrone.Core.Parser.Model;

View File

@@ -2,7 +2,6 @@ using System.Linq;
using FluentValidation;
using NzbDrone.Core.Annotations;
using NzbDrone.Core.Languages;
using NzbDrone.Core.Parser.Model;
using NzbDrone.Core.Validation;
namespace NzbDrone.Core.CustomFormats

View File

@@ -1,7 +1,6 @@
using System;
using FluentValidation;
using NzbDrone.Core.Annotations;
using NzbDrone.Core.Parser.Model;
using NzbDrone.Core.Qualities;
using NzbDrone.Core.Validation;

View File

@@ -1,5 +1,3 @@
using NzbDrone.Core.Parser.Model;
namespace NzbDrone.Core.CustomFormats
{
public class ReleaseGroupSpecification : RegexSpecificationBase

View File

@@ -1,6 +1,3 @@
using System.Collections.Generic;
using NzbDrone.Core.Parser.Model;
namespace NzbDrone.Core.CustomFormats
{
public class ReleaseTitleSpecification : RegexSpecificationBase

View File

@@ -1,7 +1,6 @@
using FluentValidation;
using NzbDrone.Core.Annotations;
using NzbDrone.Core.Parser;
using NzbDrone.Core.Parser.Model;
using NzbDrone.Core.Validation;
namespace NzbDrone.Core.CustomFormats

View File

@@ -1,7 +1,5 @@
using System.Collections.Generic;
using FluentValidation;
using NzbDrone.Core.Annotations;
using NzbDrone.Core.Parser.Model;
using NzbDrone.Core.Validation;
namespace NzbDrone.Core.CustomFormats

View File

@@ -1,6 +1,5 @@
using FluentValidation;
using NzbDrone.Core.Annotations;
using NzbDrone.Core.Parser.Model;
using NzbDrone.Core.Qualities;
using NzbDrone.Core.Validation;

View File

@@ -1,5 +1,3 @@
using System;
using System.Collections.Generic;
using FluentMigrator;
using NzbDrone.Core.Datastore.Migration.Framework;

View File

@@ -9,7 +9,6 @@ using NzbDrone.Common.Extensions;
using NzbDrone.Common.Http;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Download.Clients.FreeboxDownload.Responses;
using NzbDrone.Core.Download.Clients.QBittorrent;
using NzbDrone.Core.MediaFiles.TorrentInfo;
using NzbDrone.Core.Organizer;
using NzbDrone.Core.Parser.Model;

View File

@@ -4,8 +4,5 @@ namespace NzbDrone.Core.Download
{
public class DownloadsProcessedEvent : IEvent
{
public DownloadsProcessedEvent()
{
}
}
}

View File

@@ -10,7 +10,6 @@ using NzbDrone.Core.DecisionEngine;
using NzbDrone.Core.Download.Aggregation;
using NzbDrone.Core.Indexers;
using NzbDrone.Core.Jobs;
using NzbDrone.Core.Languages;
using NzbDrone.Core.Messaging.Events;
using NzbDrone.Core.Movies;
using NzbDrone.Core.Movies.Events;

View File

@@ -7,9 +7,6 @@ namespace NzbDrone.Core.Extras.Metadata.Consumers.MediaBrowser
{
public class MediaBrowserSettingsValidator : AbstractValidator<MediaBrowserMetadataSettings>
{
public MediaBrowserSettingsValidator()
{
}
}
public class MediaBrowserMetadataSettings : IProviderConfig

View File

@@ -7,9 +7,6 @@ namespace NzbDrone.Core.Extras.Metadata.Consumers.Roksbox
{
public class RoksboxSettingsValidator : AbstractValidator<RoksboxMetadataSettings>
{
public RoksboxSettingsValidator()
{
}
}
public class RoksboxMetadataSettings : IProviderConfig

View File

@@ -7,9 +7,6 @@ namespace NzbDrone.Core.Extras.Metadata.Consumers.Wdtv
{
public class WdtvSettingsValidator : AbstractValidator<WdtvMetadataSettings>
{
public WdtvSettingsValidator()
{
}
}
public class WdtvMetadataSettings : IProviderConfig

View File

@@ -8,9 +8,6 @@ namespace NzbDrone.Core.Extras.Metadata.Consumers.Xbmc
{
public class XbmcSettingsValidator : AbstractValidator<XbmcMetadataSettings>
{
public XbmcSettingsValidator()
{
}
}
public class XbmcMetadataSettings : IProviderConfig

View File

@@ -12,10 +12,6 @@ namespace NzbDrone.Core.ImportLists.CouchPotato
{
private ImportListResponse _importListResponse;
public CouchPotatoParser()
{
}
public IList<ImportListMovie> ParseResponse(ImportListResponse importListResponse)
{
_importListResponse = importListResponse;

View File

@@ -14,10 +14,6 @@ namespace NzbDrone.Core.ImportLists.Plex
{
private ImportListResponse _importResponse;
public PlexParser()
{
}
public virtual IList<ImportListMovie> ParseResponse(ImportListResponse importResponse)
{
List<PlexWatchlistItem> items;

View File

@@ -9,10 +9,6 @@ namespace NzbDrone.Core.ImportLists.RadarrList
{
public class RadarrListParser : IParseImportListResponse
{
public RadarrListParser()
{
}
public IList<ImportListMovie> ParseResponse(ImportListResponse importListResponse)
{
var importResponse = importListResponse;

View File

@@ -1,4 +1,4 @@
using FluentValidation;
using FluentValidation;
using NzbDrone.Core.Annotations;
using NzbDrone.Core.ThingiProvider;
using NzbDrone.Core.Validation;
@@ -19,10 +19,6 @@ namespace NzbDrone.Core.ImportLists.RadarrList2.IMDbList
{
private static readonly IMDbSettingsValidator Validator = new IMDbSettingsValidator();
public IMDbListSettings()
{
}
[FieldDefinition(1, Label = "List/User ID", HelpText = "IMDb list ID (e.g ls12345678), IMDb user ID (e.g. ur12345678), 'top250' or 'popular'")]
public string ListId { get; set; }

View File

@@ -0,0 +1,27 @@
using NLog;
using NzbDrone.Common.Http;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Parser;
namespace NzbDrone.Core.ImportLists.Rss.Plex
{
public class PlexRssImport : RssImportBase<PlexRssImportSettings>
{
public override string Name => "Plex Watchlist RSS";
public override ImportListType ListType => ImportListType.Plex;
public PlexRssImport(IHttpClient httpClient,
IImportListStatusService importListStatusService,
IConfigService configService,
IParsingService parsingService,
Logger logger)
: base(httpClient, importListStatusService, configService, parsingService, logger)
{
}
public override IParseImportListResponse GetParser()
{
return new PlexRssImportParser(_logger);
}
}
}

View File

@@ -0,0 +1,46 @@
using System.Xml.Linq;
using NLog;
using NzbDrone.Common.Extensions;
using NzbDrone.Core.ImportLists.ImportListMovies;
using NzbDrone.Core.Indexers;
using NzbDrone.Core.Indexers.Exceptions;
namespace NzbDrone.Core.ImportLists.Rss.Plex
{
public class PlexRssImportParser : RssImportBaseParser
{
public PlexRssImportParser(Logger logger)
: base(logger)
{
}
protected override ImportListMovie ProcessItem(XElement item)
{
var category = item.TryGetValue("category");
if (category != "movie")
{
return null;
}
var info = new ImportListMovie
{
Title = item.TryGetValue("title", "Unknown")
};
var guid = item.TryGetValue("guid", string.Empty);
if (guid.IsNotNullOrWhiteSpace() && guid.StartsWith("imdb://"))
{
info.ImdbId = Parser.Parser.ParseImdbId(guid.Replace("imdb://", ""));
}
if (info.ImdbId.IsNullOrWhiteSpace())
{
throw new UnsupportedFeedException("Each item in the RSS feed must have a guid element with a IMDB ID");
}
return info;
}
}
}

View File

@@ -0,0 +1,27 @@
using FluentValidation;
using NzbDrone.Core.Annotations;
using NzbDrone.Core.Validation;
namespace NzbDrone.Core.ImportLists.Rss.Plex
{
public class PlexRssImportSettingsValidator : AbstractValidator<PlexRssImportSettings>
{
public PlexRssImportSettingsValidator()
{
RuleFor(c => c.Url).NotEmpty();
}
}
public class PlexRssImportSettings : RssImportBaseSettings
{
private PlexRssImportSettingsValidator Validator => new ();
[FieldDefinition(0, Label = "Url", Type = FieldType.Textbox, HelpLink = "https://app.plex.tv/desktop/#!/settings/watchlist")]
public override string Url { get; set; }
public override NzbDroneValidationResult Validate()
{
return new NzbDroneValidationResult(Validator.Validate(this));
}
}
}

View File

@@ -0,0 +1,43 @@
using NLog;
using NzbDrone.Common.Http;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Parser;
namespace NzbDrone.Core.ImportLists.Rss
{
public abstract class RssImportBase<TSettings> : HttpImportListBase<TSettings>
where TSettings : RssImportBaseSettings, new()
{
public override bool Enabled => true;
public override bool EnableAuto => false;
public RssImportBase(IHttpClient httpClient,
IImportListStatusService importListStatusService,
IConfigService configService,
IParsingService parsingService,
Logger logger)
: base(httpClient, importListStatusService, configService, parsingService, logger)
{
}
public override ImportListFetchResult Fetch()
{
var generator = GetRequestGenerator();
return FetchMovies(generator.GetMovies());
}
public override IParseImportListResponse GetParser()
{
return new RssImportBaseParser(_logger);
}
public override IImportListRequestGenerator GetRequestGenerator()
{
return new RssImportRequestGenerator
{
Settings = Settings
};
}
}
}

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