mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 13:10:13 -07:00
Compare commits
123 commits
v2.9.4.453
...
develop
Author | SHA1 | Date | |
---|---|---|---|
|
d2330a3232 |
||
|
4cb306780f | ||
|
393db165f3 | ||
|
eb861f06d3 | ||
|
6f1b370772 |
||
|
074f06442a |
||
|
fef111d396 | ||
|
76b7713870 | ||
|
d50ed84541 | ||
|
002e8f5b69 | ||
|
c7b8aa8a04 | ||
|
91f06801ca |
||
|
dc61618711 | ||
|
fd00a5627c | ||
|
66ea1b1dfb | ||
|
72fa05cf41 | ||
|
c51b5c6fba | ||
|
efebab9ba2 | ||
|
47c32c9963 | ||
|
9f229bb684 | ||
|
f9b2e57696 | ||
|
4b48edab0a | ||
|
e087574de7 | ||
|
8877cf99f1 | ||
|
a56e5b3f9a | ||
|
5bb1949ea2 | ||
|
979042948d | ||
|
ebe59b18d9 | ||
|
086a451dff | ||
|
1bcb82eed0 | ||
|
ae9b4cec75 | ||
|
ed777de015 | ||
|
96f956a5d6 | ||
|
68a8f40746 | ||
|
c518cf63e7 |
||
|
da55b8578a | ||
|
234c29ef49 |
||
|
de169e8a1f | ||
|
4b300a448a | ||
|
785bcfda0b |
||
|
94ea751ad2 | ||
|
0c172b58f1 |
||
|
ea2ee70208 | ||
|
8b63928a25 |
||
|
7217e891f7 | ||
|
345bbcd992 |
||
|
bd9d7ba085 | ||
|
3937bebfea | ||
|
767b0930a5 | ||
|
c3f0fc640c | ||
|
9dbcc79436 | ||
|
3dd04cecbf | ||
|
d8850af019 | ||
|
fbfd24e226 |
||
|
d9562c701e | ||
|
d21ad2ad68 | ||
|
556f0ea54b | ||
|
e4a36ca388 | ||
|
1045684935 | ||
|
9ba71ae6b1 | ||
|
89b9352fef | ||
|
c83332e58c | ||
|
4677a1115a |
||
|
6150a57596 | ||
|
13f6b1a086 |
||
|
8027ab5d2e |
||
|
5bdc119b98 | ||
|
1b9b57ae9b | ||
|
c28a97cafd | ||
|
099d19a04d | ||
|
d381463b60 | ||
|
a86bd8e862 | ||
|
4bea38ab9c | ||
|
950c51bc59 | ||
|
18f13fe7f8 | ||
|
f8d4b3a59b | ||
|
5cf9624e55 |
||
|
81895f8033 | ||
|
a1c2bfa527 | ||
|
33049910de |
||
|
6dd87fd348 |
||
|
9314eb34ab | ||
|
84b91ba6c1 | ||
|
6c6f92fbed | ||
|
1e42ae94aa | ||
|
29f5810865 | ||
|
342c82aa1f | ||
|
5a3f879442 | ||
|
6e57c14e57 | ||
|
9fc549b43b | ||
|
a2201001c5 | ||
|
8c99280f07 | ||
|
07db508580 | ||
|
031f32a52c | ||
|
2997c16346 | ||
|
a1a53dbb5e | ||
|
e8bb78e5bb | ||
|
6292f223ac | ||
|
f4dc294ab3 | ||
|
23611cb116 |
||
|
f177345d01 | ||
|
ec050a7b3c | ||
|
860bd04c59 | ||
|
261f30d268 | ||
|
36998abba0 | ||
|
ad12617694 | ||
|
be115da157 | ||
|
664b972494 |
||
|
2b2fd5a175 | ||
|
d8222c066c |
||
|
bc6417229e | ||
|
e0e17a2ea7 | ||
|
5bf2ae9e6f |
||
|
8e01ba5f21 |
||
|
45e8ecffa0 | ||
|
3c4b438d27 | ||
|
8fd79d7291 | ||
|
477a799b8a | ||
|
51a38bc648 | ||
|
917f705695 | ||
|
5a1092b511 | ||
|
ef2c6366c4 | ||
|
1ffb82e364 |
190 changed files with 3122 additions and 906 deletions
|
@ -6,7 +6,7 @@
|
||||||
"features": {
|
"features": {
|
||||||
"ghcr.io/devcontainers/features/node:1": {
|
"ghcr.io/devcontainers/features/node:1": {
|
||||||
"nodeGypDependencies": true,
|
"nodeGypDependencies": true,
|
||||||
"version": "16",
|
"version": "20",
|
||||||
"nvmVersion": "latest"
|
"nvmVersion": "latest"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
1
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
1
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
|
@ -60,6 +60,7 @@ body:
|
||||||
- Master
|
- Master
|
||||||
- Develop
|
- Develop
|
||||||
- Nightly
|
- Nightly
|
||||||
|
- Plugins (experimental)
|
||||||
- Other (This issue will be closed)
|
- Other (This issue will be closed)
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
28
.gitignore
vendored
28
.gitignore
vendored
|
@ -158,34 +158,12 @@ Thumbs.db
|
||||||
/tools/Addins/*
|
/tools/Addins/*
|
||||||
packages.config.md5sum
|
packages.config.md5sum
|
||||||
|
|
||||||
|
|
||||||
# Common IntelliJ Platform excludes
|
|
||||||
|
|
||||||
# User specific
|
|
||||||
**/.idea/**/workspace.xml
|
|
||||||
**/.idea/**/tasks.xml
|
|
||||||
**/.idea/shelf/*
|
|
||||||
**/.idea/dictionaries
|
|
||||||
**/.idea/.idea.Radarr.Posix
|
|
||||||
**/.idea/.idea.Radarr.Windows
|
|
||||||
|
|
||||||
# Sensitive or high-churn files
|
|
||||||
**/.idea/**/dataSources/
|
|
||||||
**/.idea/**/dataSources.ids
|
|
||||||
**/.idea/**/dataSources.xml
|
|
||||||
**/.idea/**/dataSources.local.xml
|
|
||||||
**/.idea/**/sqlDataSources.xml
|
|
||||||
**/.idea/**/dynamic.xml
|
|
||||||
|
|
||||||
# Rider
|
|
||||||
# Rider auto-generates .iml files, and contentModel.xml
|
|
||||||
**/.idea/**/*.iml
|
|
||||||
**/.idea/**/contentModel.xml
|
|
||||||
**/.idea/**/modules.xml
|
|
||||||
|
|
||||||
# ignore node_modules symlink
|
# ignore node_modules symlink
|
||||||
node_modules
|
node_modules
|
||||||
node_modules.nosync
|
node_modules.nosync
|
||||||
|
|
||||||
# API doc generation
|
# API doc generation
|
||||||
.config/
|
.config/
|
||||||
|
|
||||||
|
# Ignore Jetbrains IntelliJ Workspace Directories
|
||||||
|
.idea/
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
|
|
||||||
Lidarr is a music collection manager for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new tracks from your favorite artists and will grab, sort and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available.
|
Lidarr is a music collection manager for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new tracks from your favorite artists and will grab, sort and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available.
|
||||||
|
|
||||||
|
> [!WARNING]
|
||||||
|
> NOTICE - The Lidarr Metadata Server is currently down impacting adding artists, etc. Please follow [GHI 5498](https://github.com/Lidarr/Lidarr/issues/5498) or see Discord for detaila.
|
||||||
|
|
||||||
## Major Features Include:
|
## Major Features Include:
|
||||||
|
|
||||||
* Support for major platforms: Windows, Linux, macOS, Raspberry Pi, etc.
|
* Support for major platforms: Windows, Linux, macOS, Raspberry Pi, etc.
|
||||||
|
|
|
@ -9,7 +9,7 @@ variables:
|
||||||
testsFolder: './_tests'
|
testsFolder: './_tests'
|
||||||
yarnCacheFolder: $(Pipeline.Workspace)/.yarn
|
yarnCacheFolder: $(Pipeline.Workspace)/.yarn
|
||||||
nugetCacheFolder: $(Pipeline.Workspace)/.nuget/packages
|
nugetCacheFolder: $(Pipeline.Workspace)/.nuget/packages
|
||||||
majorVersion: '2.9.4'
|
majorVersion: '2.13.3'
|
||||||
minorVersion: $[counter('minorVersion', 1076)]
|
minorVersion: $[counter('minorVersion', 1076)]
|
||||||
lidarrVersion: '$(majorVersion).$(minorVersion)'
|
lidarrVersion: '$(majorVersion).$(minorVersion)'
|
||||||
buildName: '$(Build.SourceBranchName).$(lidarrVersion)'
|
buildName: '$(Build.SourceBranchName).$(lidarrVersion)'
|
||||||
|
@ -19,7 +19,7 @@ variables:
|
||||||
nodeVersion: '20.X'
|
nodeVersion: '20.X'
|
||||||
innoVersion: '6.2.0'
|
innoVersion: '6.2.0'
|
||||||
windowsImage: 'windows-2022'
|
windowsImage: 'windows-2022'
|
||||||
linuxImage: 'ubuntu-20.04'
|
linuxImage: 'ubuntu-22.04'
|
||||||
macImage: 'macOS-13'
|
macImage: 'macOS-13'
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
|
|
15
docs.sh
15
docs.sh
|
@ -1,13 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
FRAMEWORK="net6.0"
|
||||||
PLATFORM=$1
|
PLATFORM=$1
|
||||||
|
ARCHITECTURE="${2:-x64}"
|
||||||
|
|
||||||
if [ "$PLATFORM" = "Windows" ]; then
|
if [ "$PLATFORM" = "Windows" ]; then
|
||||||
RUNTIME="win-x64"
|
RUNTIME="win-$ARCHITECTURE"
|
||||||
elif [ "$PLATFORM" = "Linux" ]; then
|
elif [ "$PLATFORM" = "Linux" ]; then
|
||||||
RUNTIME="linux-x64"
|
RUNTIME="linux-$ARCHITECTURE"
|
||||||
elif [ "$PLATFORM" = "Mac" ]; then
|
elif [ "$PLATFORM" = "Mac" ]; then
|
||||||
RUNTIME="osx-x64"
|
RUNTIME="osx-$ARCHITECTURE"
|
||||||
else
|
else
|
||||||
echo "Platform must be provided as first arguement: Windows, Linux or Mac"
|
echo "Platform must be provided as first argument: Windows, Linux or Mac"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -35,7 +40,7 @@ dotnet msbuild -restore $slnFile -p:Configuration=Debug -p:Platform=$platform -p
|
||||||
dotnet new tool-manifest
|
dotnet new tool-manifest
|
||||||
dotnet tool install --version 6.6.2 Swashbuckle.AspNetCore.Cli
|
dotnet tool install --version 6.6.2 Swashbuckle.AspNetCore.Cli
|
||||||
|
|
||||||
dotnet tool run swagger tofile --output ./src/Lidarr.Api.V1/openapi.json "$outputFolder/net6.0/$RUNTIME/$application" v1 &
|
dotnet tool run swagger tofile --output ./src/Lidarr.Api.V1/openapi.json "$outputFolder/$FRAMEWORK/$RUNTIME/$application" v1 &
|
||||||
|
|
||||||
sleep 45
|
sleep 45
|
||||||
|
|
||||||
|
|
|
@ -188,7 +188,7 @@ module.exports = (env) => {
|
||||||
loose: true,
|
loose: true,
|
||||||
debug: false,
|
debug: false,
|
||||||
useBuiltIns: 'entry',
|
useBuiltIns: 'entry',
|
||||||
corejs: '3.39'
|
corejs: '3.41'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
|
@ -172,7 +172,8 @@ function HistoryDetails(props) {
|
||||||
|
|
||||||
if (eventType === 'downloadFailed') {
|
if (eventType === 'downloadFailed') {
|
||||||
const {
|
const {
|
||||||
message
|
message,
|
||||||
|
indexer
|
||||||
} = data;
|
} = data;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -192,6 +193,14 @@ function HistoryDetails(props) {
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
indexer ? (
|
||||||
|
<DescriptionListItem
|
||||||
|
title={translate('Indexer')}
|
||||||
|
data={indexer}
|
||||||
|
/>
|
||||||
|
) : null}
|
||||||
|
|
||||||
{
|
{
|
||||||
message ?
|
message ?
|
||||||
<DescriptionListItem
|
<DescriptionListItem
|
||||||
|
|
|
@ -57,30 +57,40 @@ function QueueStatusCell(props) {
|
||||||
|
|
||||||
if (status === 'paused') {
|
if (status === 'paused') {
|
||||||
iconName = icons.PAUSED;
|
iconName = icons.PAUSED;
|
||||||
title = 'Paused';
|
title = translate('Paused');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status === 'queued') {
|
if (status === 'queued') {
|
||||||
iconName = icons.QUEUED;
|
iconName = icons.QUEUED;
|
||||||
title = 'Queued';
|
title = translate('Queued');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status === 'completed') {
|
if (status === 'completed') {
|
||||||
iconName = icons.DOWNLOADED;
|
iconName = icons.DOWNLOADED;
|
||||||
title = 'Downloaded';
|
title = translate('Downloaded');
|
||||||
|
|
||||||
|
if (trackedDownloadState === 'importBlocked') {
|
||||||
|
title += ` - ${translate('UnableToImportAutomatically')}`;
|
||||||
|
iconKind = kinds.WARNING;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (trackedDownloadState === 'importFailed') {
|
||||||
|
title += ` - ${translate('ImportFailed', { sourceTitle })}`;
|
||||||
|
iconKind = kinds.WARNING;
|
||||||
|
}
|
||||||
|
|
||||||
if (trackedDownloadState === 'importPending') {
|
if (trackedDownloadState === 'importPending') {
|
||||||
title += ' - Waiting to Import';
|
title += ` - ${translate('WaitingToImport')}`;
|
||||||
iconKind = kinds.PURPLE;
|
iconKind = kinds.PURPLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (trackedDownloadState === 'importing') {
|
if (trackedDownloadState === 'importing') {
|
||||||
title += ' - Importing';
|
title += ` - ${translate('Importing')}`;
|
||||||
iconKind = kinds.PURPLE;
|
iconKind = kinds.PURPLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (trackedDownloadState === 'failedPending') {
|
if (trackedDownloadState === 'failedPending') {
|
||||||
title += ' - Waiting to Process';
|
title += ` - ${translate('WaitingToProcess')}`;
|
||||||
iconKind = kinds.DANGER;
|
iconKind = kinds.DANGER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -91,36 +101,38 @@ function QueueStatusCell(props) {
|
||||||
|
|
||||||
if (status === 'delay') {
|
if (status === 'delay') {
|
||||||
iconName = icons.PENDING;
|
iconName = icons.PENDING;
|
||||||
title = 'Pending';
|
title = translate('Pending');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status === 'downloadClientUnavailable') {
|
if (status === 'downloadClientUnavailable') {
|
||||||
iconName = icons.PENDING;
|
iconName = icons.PENDING;
|
||||||
iconKind = kinds.WARNING;
|
iconKind = kinds.WARNING;
|
||||||
title = 'Pending - Download client is unavailable';
|
title = translate('PendingDownloadClientUnavailable');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status === 'failed') {
|
if (status === 'failed') {
|
||||||
iconName = icons.DOWNLOADING;
|
iconName = icons.DOWNLOADING;
|
||||||
iconKind = kinds.DANGER;
|
iconKind = kinds.DANGER;
|
||||||
title = 'Download failed';
|
title = translate('DownloadFailed');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status === 'warning') {
|
if (status === 'warning') {
|
||||||
iconName = icons.DOWNLOADING;
|
iconName = icons.DOWNLOADING;
|
||||||
iconKind = kinds.WARNING;
|
iconKind = kinds.WARNING;
|
||||||
title = `Download warning: ${errorMessage || 'check download client for more details'}`;
|
const warningMessage =
|
||||||
|
errorMessage || translate('CheckDownloadClientForDetails');
|
||||||
|
title = translate('DownloadWarning', { warningMessage });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasError) {
|
if (hasError) {
|
||||||
if (status === 'completed') {
|
if (status === 'completed') {
|
||||||
iconName = icons.DOWNLOAD;
|
iconName = icons.DOWNLOAD;
|
||||||
iconKind = kinds.DANGER;
|
iconKind = kinds.DANGER;
|
||||||
title = `Import failed: ${sourceTitle}`;
|
title = translate('ImportFailed', { sourceTitle });
|
||||||
} else {
|
} else {
|
||||||
iconName = icons.DOWNLOADING;
|
iconName = icons.DOWNLOADING;
|
||||||
iconKind = kinds.DANGER;
|
iconKind = kinds.DANGER;
|
||||||
title = 'Download failed';
|
title = translate('DownloadFailed');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,17 +8,17 @@ function ArtistMonitorNewItemsOptionsPopoverContent() {
|
||||||
<DescriptionList>
|
<DescriptionList>
|
||||||
<DescriptionListItem
|
<DescriptionListItem
|
||||||
title={translate('AllAlbums')}
|
title={translate('AllAlbums')}
|
||||||
data="Monitor all new albums"
|
data={translate('MonitorAllAlbums')}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<DescriptionListItem
|
<DescriptionListItem
|
||||||
title={translate('NewAlbums')}
|
title={translate('NewAlbums')}
|
||||||
data="Monitor new albums released after the newest existing album"
|
data={translate('MonitorNewAlbumsData')}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<DescriptionListItem
|
<DescriptionListItem
|
||||||
title={translate('None')}
|
title={translate('None')}
|
||||||
data="Don't monitor any new albums"
|
data={translate('MonitorNoAlbumsData')}
|
||||||
/>
|
/>
|
||||||
</DescriptionList>
|
</DescriptionList>
|
||||||
);
|
);
|
||||||
|
|
|
@ -15,7 +15,7 @@ import ModalContent from 'Components/Modal/ModalContent';
|
||||||
import ModalFooter from 'Components/Modal/ModalFooter';
|
import ModalFooter from 'Components/Modal/ModalFooter';
|
||||||
import ModalHeader from 'Components/Modal/ModalHeader';
|
import ModalHeader from 'Components/Modal/ModalHeader';
|
||||||
import Popover from 'Components/Tooltip/Popover';
|
import Popover from 'Components/Tooltip/Popover';
|
||||||
import { icons, inputTypes, kinds, tooltipPositions } from 'Helpers/Props';
|
import { icons, inputTypes, kinds, sizes, tooltipPositions } from 'Helpers/Props';
|
||||||
import translate from 'Utilities/String/translate';
|
import translate from 'Utilities/String/translate';
|
||||||
import styles from './EditArtistModalContent.css';
|
import styles from './EditArtistModalContent.css';
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ class EditArtistModalContent extends Component {
|
||||||
|
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Form {...otherProps}>
|
<Form {...otherProps}>
|
||||||
<FormGroup>
|
<FormGroup size={sizes.MEDIUM}>
|
||||||
<FormLabel>
|
<FormLabel>
|
||||||
{translate('Monitored')}
|
{translate('Monitored')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
|
@ -107,9 +107,10 @@ class EditArtistModalContent extends Component {
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
|
|
||||||
<FormGroup>
|
<FormGroup size={sizes.MEDIUM}>
|
||||||
<FormLabel>
|
<FormLabel>
|
||||||
{translate('MonitorNewItems')}
|
{translate('MonitorNewItems')}
|
||||||
|
|
||||||
<Popover
|
<Popover
|
||||||
anchor={
|
anchor={
|
||||||
<Icon
|
<Icon
|
||||||
|
@ -132,7 +133,7 @@ class EditArtistModalContent extends Component {
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
|
|
||||||
<FormGroup>
|
<FormGroup size={sizes.MEDIUM}>
|
||||||
<FormLabel>
|
<FormLabel>
|
||||||
{translate('QualityProfile')}
|
{translate('QualityProfile')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
|
@ -146,10 +147,10 @@ class EditArtistModalContent extends Component {
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
|
|
||||||
{
|
{
|
||||||
showMetadataProfile &&
|
showMetadataProfile ?
|
||||||
<FormGroup>
|
<FormGroup size={sizes.MEDIUM}>
|
||||||
<FormLabel>
|
<FormLabel>
|
||||||
Metadata Profile
|
{translate('MetadataProfile')}
|
||||||
|
|
||||||
<Popover
|
<Popover
|
||||||
anchor={
|
anchor={
|
||||||
|
@ -173,10 +174,11 @@ class EditArtistModalContent extends Component {
|
||||||
{...metadataProfileId}
|
{...metadataProfileId}
|
||||||
onChange={onInputChange}
|
onChange={onInputChange}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup> :
|
||||||
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
<FormGroup>
|
<FormGroup size={sizes.MEDIUM}>
|
||||||
<FormLabel>
|
<FormLabel>
|
||||||
{translate('Path')}
|
{translate('Path')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
|
@ -189,7 +191,7 @@ class EditArtistModalContent extends Component {
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
|
|
||||||
<FormGroup>
|
<FormGroup size={sizes.MEDIUM}>
|
||||||
<FormLabel>
|
<FormLabel>
|
||||||
{translate('Tags')}
|
{translate('Tags')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
|
@ -209,7 +211,7 @@ class EditArtistModalContent extends Component {
|
||||||
kind={kinds.DANGER}
|
kind={kinds.DANGER}
|
||||||
onPress={onDeleteArtistPress}
|
onPress={onDeleteArtistPress}
|
||||||
>
|
>
|
||||||
Delete
|
{translate('Delete')}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
|
|
@ -25,7 +25,7 @@ const EVENT_TYPE_OPTIONS = [
|
||||||
{
|
{
|
||||||
id: 7,
|
id: 7,
|
||||||
get name() {
|
get name() {
|
||||||
return translate('ImportFailed');
|
return translate('ImportCompleteFailed');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,6 +20,8 @@ import HintedSelectInputSelectedValue from './HintedSelectInputSelectedValue';
|
||||||
import TextInput from './TextInput';
|
import TextInput from './TextInput';
|
||||||
import styles from './EnhancedSelectInput.css';
|
import styles from './EnhancedSelectInput.css';
|
||||||
|
|
||||||
|
const MINIMUM_DISTANCE_FROM_EDGE = 10;
|
||||||
|
|
||||||
function isArrowKey(keyCode) {
|
function isArrowKey(keyCode) {
|
||||||
return keyCode === keyCodes.UP_ARROW || keyCode === keyCodes.DOWN_ARROW;
|
return keyCode === keyCodes.UP_ARROW || keyCode === keyCodes.DOWN_ARROW;
|
||||||
}
|
}
|
||||||
|
@ -137,18 +139,9 @@ class EnhancedSelectInput extends Component {
|
||||||
// Listeners
|
// Listeners
|
||||||
|
|
||||||
onComputeMaxHeight = (data) => {
|
onComputeMaxHeight = (data) => {
|
||||||
const {
|
|
||||||
top,
|
|
||||||
bottom
|
|
||||||
} = data.offsets.reference;
|
|
||||||
|
|
||||||
const windowHeight = window.innerHeight;
|
const windowHeight = window.innerHeight;
|
||||||
|
|
||||||
if ((/^botton/).test(data.placement)) {
|
data.styles.maxHeight = windowHeight - MINIMUM_DISTANCE_FROM_EDGE;
|
||||||
data.styles.maxHeight = windowHeight - bottom;
|
|
||||||
} else {
|
|
||||||
data.styles.maxHeight = top;
|
|
||||||
}
|
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
|
@ -457,6 +450,10 @@ class EnhancedSelectInput extends Component {
|
||||||
order: 851,
|
order: 851,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
fn: this.onComputeMaxHeight
|
fn: this.onComputeMaxHeight
|
||||||
|
},
|
||||||
|
preventOverflow: {
|
||||||
|
enabled: true,
|
||||||
|
boundariesElement: 'viewport'
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
|
@ -83,13 +83,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: $breakpointMedium) {
|
@media only screen and (max-width: $breakpointMedium) {
|
||||||
.modal.small,
|
|
||||||
.modal.medium {
|
|
||||||
width: 90%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media only screen and (max-width: $breakpointSmall) {
|
|
||||||
.modalContainer {
|
.modalContainer {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,7 +172,7 @@ class SignalRConnector extends Component {
|
||||||
const status = resource.status;
|
const status = resource.status;
|
||||||
|
|
||||||
// Both successful and failed commands need to be
|
// Both successful and failed commands need to be
|
||||||
// completed, otherwise they spin until they timeout.
|
// completed, otherwise they spin until they time out.
|
||||||
|
|
||||||
if (status === 'completed' || status === 'failed') {
|
if (status === 'completed' || status === 'failed') {
|
||||||
this.props.dispatchFinishCommand(resource);
|
this.props.dispatchFinishCommand(resource);
|
||||||
|
@ -224,10 +224,58 @@ class SignalRConnector extends Component {
|
||||||
repopulatePage('trackFileUpdated');
|
repopulatePage('trackFileUpdated');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
handleDownloadclient = ({ action, resource }) => {
|
||||||
|
const section = 'settings.downloadClients';
|
||||||
|
|
||||||
|
if (action === 'created' || action === 'updated') {
|
||||||
|
this.props.dispatchUpdateItem({ section, ...resource });
|
||||||
|
} else if (action === 'deleted') {
|
||||||
|
this.props.dispatchRemoveItem({ section, id: resource.id });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
handleHealth = () => {
|
handleHealth = () => {
|
||||||
this.props.dispatchFetchHealth();
|
this.props.dispatchFetchHealth();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
handleImportlist = ({ action, resource }) => {
|
||||||
|
const section = 'settings.importLists';
|
||||||
|
|
||||||
|
if (action === 'created' || action === 'updated') {
|
||||||
|
this.props.dispatchUpdateItem({ section, ...resource });
|
||||||
|
} else if (action === 'deleted') {
|
||||||
|
this.props.dispatchRemoveItem({ section, id: resource.id });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
handleIndexer = ({ action, resource }) => {
|
||||||
|
const section = 'settings.indexers';
|
||||||
|
|
||||||
|
if (action === 'created' || action === 'updated') {
|
||||||
|
this.props.dispatchUpdateItem({ section, ...resource });
|
||||||
|
} else if (action === 'deleted') {
|
||||||
|
this.props.dispatchRemoveItem({ section, id: resource.id });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
handleMetadata = ({ action, resource }) => {
|
||||||
|
const section = 'settings.metadata';
|
||||||
|
|
||||||
|
if (action === 'updated') {
|
||||||
|
this.props.dispatchUpdateItem({ section, ...resource });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
handleNotification = ({ action, resource }) => {
|
||||||
|
const section = 'settings.notifications';
|
||||||
|
|
||||||
|
if (action === 'created' || action === 'updated') {
|
||||||
|
this.props.dispatchUpdateItem({ section, ...resource });
|
||||||
|
} else if (action === 'deleted') {
|
||||||
|
this.props.dispatchRemoveItem({ section, id: resource.id });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
handleArtist = (body) => {
|
handleArtist = (body) => {
|
||||||
const action = body.action;
|
const action = body.action;
|
||||||
const section = 'artist';
|
const section = 'artist';
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
line-height: 1.52857143;
|
line-height: 1.52857143;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: $breakpointSmall) {
|
@media only screen and (max-width: $breakpointMedium) {
|
||||||
.cell {
|
.cell {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: $breakpointSmall) {
|
@media only screen and (max-width: $breakpointMedium) {
|
||||||
.cell {
|
.cell {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: $breakpointSmall) {
|
@media only screen and (max-width: $breakpointMedium) {
|
||||||
.tableContainer {
|
.tableContainer {
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: $breakpointSmall) {
|
@media only screen and (max-width: $breakpointMedium) {
|
||||||
.headerCell {
|
.headerCell {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
height: 25px;
|
height: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: $breakpointSmall) {
|
@media only screen and (max-width: $breakpointMedium) {
|
||||||
.pager {
|
.pager {
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: $breakpointSmall) {
|
@media only screen and (max-width: $breakpointMedium) {
|
||||||
.headerCell {
|
.headerCell {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,11 +10,11 @@ import ModalBody from 'Components/Modal/ModalBody';
|
||||||
import ModalContent from 'Components/Modal/ModalContent';
|
import ModalContent from 'Components/Modal/ModalContent';
|
||||||
import ModalFooter from 'Components/Modal/ModalFooter';
|
import ModalFooter from 'Components/Modal/ModalFooter';
|
||||||
import ModalHeader from 'Components/Modal/ModalHeader';
|
import ModalHeader from 'Components/Modal/ModalHeader';
|
||||||
|
import Column from 'Components/Table/Column';
|
||||||
import Table from 'Components/Table/Table';
|
import Table from 'Components/Table/Table';
|
||||||
import TableBody from 'Components/Table/TableBody';
|
import TableBody from 'Components/Table/TableBody';
|
||||||
import useSelectState from 'Helpers/Hooks/useSelectState';
|
import useSelectState from 'Helpers/Hooks/useSelectState';
|
||||||
import { kinds } from 'Helpers/Props';
|
import { kinds } from 'Helpers/Props';
|
||||||
import SortDirection from 'Helpers/Props/SortDirection';
|
|
||||||
import {
|
import {
|
||||||
bulkDeleteCustomFormats,
|
bulkDeleteCustomFormats,
|
||||||
bulkEditCustomFormats,
|
bulkEditCustomFormats,
|
||||||
|
@ -34,7 +34,7 @@ type OnSelectedChangeCallback = React.ComponentProps<
|
||||||
typeof ManageCustomFormatsModalRow
|
typeof ManageCustomFormatsModalRow
|
||||||
>['onSelectedChange'];
|
>['onSelectedChange'];
|
||||||
|
|
||||||
const COLUMNS = [
|
const COLUMNS: Column[] = [
|
||||||
{
|
{
|
||||||
name: 'name',
|
name: 'name',
|
||||||
label: () => translate('Name'),
|
label: () => translate('Name'),
|
||||||
|
@ -56,8 +56,6 @@ const COLUMNS = [
|
||||||
|
|
||||||
interface ManageCustomFormatsModalContentProps {
|
interface ManageCustomFormatsModalContentProps {
|
||||||
onModalClose(): void;
|
onModalClose(): void;
|
||||||
sortKey?: string;
|
|
||||||
sortDirection?: SortDirection;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function ManageCustomFormatsModalContent(
|
function ManageCustomFormatsModalContent(
|
||||||
|
|
|
@ -10,11 +10,11 @@ import ModalBody from 'Components/Modal/ModalBody';
|
||||||
import ModalContent from 'Components/Modal/ModalContent';
|
import ModalContent from 'Components/Modal/ModalContent';
|
||||||
import ModalFooter from 'Components/Modal/ModalFooter';
|
import ModalFooter from 'Components/Modal/ModalFooter';
|
||||||
import ModalHeader from 'Components/Modal/ModalHeader';
|
import ModalHeader from 'Components/Modal/ModalHeader';
|
||||||
|
import Column from 'Components/Table/Column';
|
||||||
import Table from 'Components/Table/Table';
|
import Table from 'Components/Table/Table';
|
||||||
import TableBody from 'Components/Table/TableBody';
|
import TableBody from 'Components/Table/TableBody';
|
||||||
import useSelectState from 'Helpers/Hooks/useSelectState';
|
import useSelectState from 'Helpers/Hooks/useSelectState';
|
||||||
import { kinds } from 'Helpers/Props';
|
import { kinds } from 'Helpers/Props';
|
||||||
import SortDirection from 'Helpers/Props/SortDirection';
|
|
||||||
import {
|
import {
|
||||||
bulkDeleteDownloadClients,
|
bulkDeleteDownloadClients,
|
||||||
bulkEditDownloadClients,
|
bulkEditDownloadClients,
|
||||||
|
@ -35,7 +35,7 @@ type OnSelectedChangeCallback = React.ComponentProps<
|
||||||
typeof ManageDownloadClientsModalRow
|
typeof ManageDownloadClientsModalRow
|
||||||
>['onSelectedChange'];
|
>['onSelectedChange'];
|
||||||
|
|
||||||
const COLUMNS = [
|
const COLUMNS: Column[] = [
|
||||||
{
|
{
|
||||||
name: 'name',
|
name: 'name',
|
||||||
label: () => translate('Name'),
|
label: () => translate('Name'),
|
||||||
|
@ -82,8 +82,6 @@ const COLUMNS = [
|
||||||
|
|
||||||
interface ManageDownloadClientsModalContentProps {
|
interface ManageDownloadClientsModalContentProps {
|
||||||
onModalClose(): void;
|
onModalClose(): void;
|
||||||
sortKey?: string;
|
|
||||||
sortDirection?: SortDirection;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function ManageDownloadClientsModalContent(
|
function ManageDownloadClientsModalContent(
|
||||||
|
|
|
@ -10,11 +10,11 @@ import ModalBody from 'Components/Modal/ModalBody';
|
||||||
import ModalContent from 'Components/Modal/ModalContent';
|
import ModalContent from 'Components/Modal/ModalContent';
|
||||||
import ModalFooter from 'Components/Modal/ModalFooter';
|
import ModalFooter from 'Components/Modal/ModalFooter';
|
||||||
import ModalHeader from 'Components/Modal/ModalHeader';
|
import ModalHeader from 'Components/Modal/ModalHeader';
|
||||||
|
import Column from 'Components/Table/Column';
|
||||||
import Table from 'Components/Table/Table';
|
import Table from 'Components/Table/Table';
|
||||||
import TableBody from 'Components/Table/TableBody';
|
import TableBody from 'Components/Table/TableBody';
|
||||||
import useSelectState from 'Helpers/Hooks/useSelectState';
|
import useSelectState from 'Helpers/Hooks/useSelectState';
|
||||||
import { kinds } from 'Helpers/Props';
|
import { kinds } from 'Helpers/Props';
|
||||||
import SortDirection from 'Helpers/Props/SortDirection';
|
|
||||||
import {
|
import {
|
||||||
bulkDeleteIndexers,
|
bulkDeleteIndexers,
|
||||||
bulkEditIndexers,
|
bulkEditIndexers,
|
||||||
|
@ -35,7 +35,7 @@ type OnSelectedChangeCallback = React.ComponentProps<
|
||||||
typeof ManageIndexersModalRow
|
typeof ManageIndexersModalRow
|
||||||
>['onSelectedChange'];
|
>['onSelectedChange'];
|
||||||
|
|
||||||
const COLUMNS = [
|
const COLUMNS: Column[] = [
|
||||||
{
|
{
|
||||||
name: 'name',
|
name: 'name',
|
||||||
label: () => translate('Name'),
|
label: () => translate('Name'),
|
||||||
|
@ -82,8 +82,6 @@ const COLUMNS = [
|
||||||
|
|
||||||
interface ManageIndexersModalContentProps {
|
interface ManageIndexersModalContentProps {
|
||||||
onModalClose(): void;
|
onModalClose(): void;
|
||||||
sortKey?: string;
|
|
||||||
sortDirection?: SortDirection;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function ManageIndexersModalContent(props: ManageIndexersModalContentProps) {
|
function ManageIndexersModalContent(props: ManageIndexersModalContentProps) {
|
||||||
|
|
|
@ -94,9 +94,9 @@ class RootFolder extends Component {
|
||||||
<ConfirmModal
|
<ConfirmModal
|
||||||
isOpen={this.state.isDeleteRootFolderModalOpen}
|
isOpen={this.state.isDeleteRootFolderModalOpen}
|
||||||
kind={kinds.DANGER}
|
kind={kinds.DANGER}
|
||||||
title={translate('DeleteRootFolder')}
|
title={translate('RemoveRootFolder')}
|
||||||
message={translate('DeleteRootFolderMessageText', { name })}
|
message={translate('RemoveRootFolderArtistsMessageText', { name })}
|
||||||
confirmLabel={translate('Delete')}
|
confirmLabel={translate('Remove')}
|
||||||
onConfirm={this.onConfirmDeleteRootFolder}
|
onConfirm={this.onConfirmDeleteRootFolder}
|
||||||
onCancel={this.onDeleteRootFolderModalClose}
|
onCancel={this.onDeleteRootFolderModalClose}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -24,19 +24,19 @@
|
||||||
height: 20px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bar {
|
.track {
|
||||||
top: 9px;
|
top: 9px;
|
||||||
margin: 0 5px;
|
margin: 0 5px;
|
||||||
height: 3px;
|
height: 3px;
|
||||||
background-color: var(--sliderAccentColor);
|
background-color: var(--sliderAccentColor);
|
||||||
box-shadow: 0 0 0 #000;
|
box-shadow: 0 0 0 #000;
|
||||||
|
|
||||||
&:nth-child(3n+1) {
|
&:nth-child(3n + 1) {
|
||||||
background-color: #ddd;
|
background-color: #ddd;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.handle {
|
.thumb {
|
||||||
top: 1px;
|
top: 1px;
|
||||||
z-index: 0 !important;
|
z-index: 0 !important;
|
||||||
width: 18px;
|
width: 18px;
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
// This file is automatically generated.
|
// This file is automatically generated.
|
||||||
// Please do not change this file!
|
// Please do not change this file!
|
||||||
interface CssExports {
|
interface CssExports {
|
||||||
'bar': string;
|
|
||||||
'handle': string;
|
|
||||||
'kilobitsPerSecond': string;
|
'kilobitsPerSecond': string;
|
||||||
'quality': string;
|
'quality': string;
|
||||||
'qualityDefinition': string;
|
'qualityDefinition': string;
|
||||||
|
@ -10,7 +8,9 @@ interface CssExports {
|
||||||
'sizeLimit': string;
|
'sizeLimit': string;
|
||||||
'sizes': string;
|
'sizes': string;
|
||||||
'slider': string;
|
'slider': string;
|
||||||
|
'thumb': string;
|
||||||
'title': string;
|
'title': string;
|
||||||
|
'track': string;
|
||||||
}
|
}
|
||||||
export const cssExports: CssExports;
|
export const cssExports: CssExports;
|
||||||
export default cssExports;
|
export default cssExports;
|
||||||
|
|
|
@ -55,6 +55,27 @@ class QualityDefinition extends Component {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Control
|
||||||
|
|
||||||
|
trackRenderer(props, state) {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
{...props}
|
||||||
|
className={styles.track}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
thumbRenderer(props, state) {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
{...props}
|
||||||
|
className={styles.thumb}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Listeners
|
// Listeners
|
||||||
|
|
||||||
|
@ -174,6 +195,7 @@ class QualityDefinition extends Component {
|
||||||
|
|
||||||
<div className={styles.sizeLimit}>
|
<div className={styles.sizeLimit}>
|
||||||
<ReactSlider
|
<ReactSlider
|
||||||
|
className={styles.slider}
|
||||||
min={slider.min}
|
min={slider.min}
|
||||||
max={slider.max}
|
max={slider.max}
|
||||||
step={slider.step}
|
step={slider.step}
|
||||||
|
@ -182,9 +204,9 @@ class QualityDefinition extends Component {
|
||||||
withTracks={true}
|
withTracks={true}
|
||||||
allowCross={false}
|
allowCross={false}
|
||||||
snapDragDisabled={true}
|
snapDragDisabled={true}
|
||||||
className={styles.slider}
|
pearling={true}
|
||||||
trackClassName={styles.bar}
|
renderThumb={this.thumbRenderer}
|
||||||
thumbClassName={styles.handle}
|
renderTrack={this.trackRenderer}
|
||||||
onChange={this.onSliderChange}
|
onChange={this.onSliderChange}
|
||||||
onAfterChange={this.onAfterSliderChange}
|
onAfterChange={this.onAfterSliderChange}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -151,7 +151,7 @@ export const defaultState = {
|
||||||
{
|
{
|
||||||
name: 'genres',
|
name: 'genres',
|
||||||
label: () => translate('Genres'),
|
label: () => translate('Genres'),
|
||||||
isSortable: false,
|
isSortable: true,
|
||||||
isVisible: false
|
isVisible: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -150,7 +150,7 @@ export const defaultState = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'importFailed',
|
key: 'importFailed',
|
||||||
label: () => translate('ImportFailed'),
|
label: () => translate('ImportCompleteFailed'),
|
||||||
filters: [
|
filters: [
|
||||||
{
|
{
|
||||||
key: 'eventType',
|
key: 'eventType',
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import Alert from 'Components/Alert';
|
import Alert from 'Components/Alert';
|
||||||
import Link from 'Components/Link/Link';
|
|
||||||
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
||||||
|
import InlineMarkdown from 'Components/Markdown/InlineMarkdown';
|
||||||
import PageContent from 'Components/Page/PageContent';
|
import PageContent from 'Components/Page/PageContent';
|
||||||
import PageContentBody from 'Components/Page/PageContentBody';
|
import PageContentBody from 'Components/Page/PageContentBody';
|
||||||
import PageToolbar from 'Components/Page/Toolbar/PageToolbar';
|
import PageToolbar from 'Components/Page/Toolbar/PageToolbar';
|
||||||
|
@ -77,15 +77,16 @@ class LogFiles extends Component {
|
||||||
<PageContentBody>
|
<PageContentBody>
|
||||||
<Alert>
|
<Alert>
|
||||||
<div>
|
<div>
|
||||||
Log files are located in: {location}
|
{translate('LogFilesLocation', {
|
||||||
|
location
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{
|
{currentLogView === 'Log Files' ? (
|
||||||
currentLogView === 'Log Files' &&
|
|
||||||
<div>
|
<div>
|
||||||
The log level defaults to 'Info' and can be changed in <Link to="/settings/general">General Settings</Link>
|
<InlineMarkdown data={translate('TheLogLevelDefault')} />
|
||||||
</div>
|
</div>
|
||||||
}
|
) : null}
|
||||||
</Alert>
|
</Alert>
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -270,7 +270,7 @@ function Updates() {
|
||||||
|
|
||||||
{generalSettingsError ? (
|
{generalSettingsError ? (
|
||||||
<Alert kind={kinds.DANGER}>
|
<Alert kind={kinds.DANGER}>
|
||||||
{translate('FailedToUpdateSettings')}
|
{translate('FailedToFetchSettings')}
|
||||||
</Alert>
|
</Alert>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
|
|
|
@ -23,12 +23,13 @@ const error = console.error;
|
||||||
function logError(...parameters: any[]) {
|
function logError(...parameters: any[]) {
|
||||||
const filter = parameters.find((parameter) => {
|
const filter = parameters.find((parameter) => {
|
||||||
return (
|
return (
|
||||||
parameter.includes(
|
typeof parameter === 'string' &&
|
||||||
|
(parameter.includes(
|
||||||
'Support for defaultProps will be removed from function components in a future major release'
|
'Support for defaultProps will be removed from function components in a future major release'
|
||||||
) ||
|
) ||
|
||||||
parameter.includes(
|
parameter.includes(
|
||||||
'findDOMNode is deprecated and will be removed in the next major release'
|
'findDOMNode is deprecated and will be removed in the next major release'
|
||||||
)
|
))
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,7 @@
|
||||||
"babel-loader": "9.2.1",
|
"babel-loader": "9.2.1",
|
||||||
"babel-plugin-inline-classnames": "2.0.1",
|
"babel-plugin-inline-classnames": "2.0.1",
|
||||||
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
|
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
|
||||||
"core-js": "3.39.0",
|
"core-js": "3.41.0",
|
||||||
"css-loader": "6.7.3",
|
"css-loader": "6.7.3",
|
||||||
"css-modules-typescript-loader": "4.0.1",
|
"css-modules-typescript-loader": "4.0.1",
|
||||||
"eslint": "8.57.1",
|
"eslint": "8.57.1",
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
|
using FluentValidation;
|
||||||
using Lidarr.Http;
|
using Lidarr.Http;
|
||||||
using NzbDrone.Core.Download;
|
using NzbDrone.Core.Download;
|
||||||
|
using NzbDrone.SignalR;
|
||||||
|
|
||||||
namespace Lidarr.Api.V1.DownloadClient
|
namespace Lidarr.Api.V1.DownloadClient
|
||||||
{
|
{
|
||||||
|
@ -9,9 +11,10 @@ namespace Lidarr.Api.V1.DownloadClient
|
||||||
public static readonly DownloadClientResourceMapper ResourceMapper = new ();
|
public static readonly DownloadClientResourceMapper ResourceMapper = new ();
|
||||||
public static readonly DownloadClientBulkResourceMapper BulkResourceMapper = new ();
|
public static readonly DownloadClientBulkResourceMapper BulkResourceMapper = new ();
|
||||||
|
|
||||||
public DownloadClientController(IDownloadClientFactory downloadClientFactory)
|
public DownloadClientController(IBroadcastSignalRMessage signalRBroadcaster, IDownloadClientFactory downloadClientFactory)
|
||||||
: base(downloadClientFactory, "downloadclient", ResourceMapper, BulkResourceMapper)
|
: base(signalRBroadcaster, downloadClientFactory, "downloadclient", ResourceMapper, BulkResourceMapper)
|
||||||
{
|
{
|
||||||
|
SharedValidator.RuleFor(c => c.Priority).InclusiveBetween(1, 50);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Lidarr.Http.REST;
|
using Lidarr.Http.REST;
|
||||||
using NzbDrone.Common.Http;
|
|
||||||
using NzbDrone.Core.HealthCheck;
|
using NzbDrone.Core.HealthCheck;
|
||||||
|
|
||||||
namespace Lidarr.Api.V1.Health
|
namespace Lidarr.Api.V1.Health
|
||||||
|
@ -11,7 +10,7 @@ namespace Lidarr.Api.V1.Health
|
||||||
public string Source { get; set; }
|
public string Source { get; set; }
|
||||||
public HealthCheckResult Type { get; set; }
|
public HealthCheckResult Type { get; set; }
|
||||||
public string Message { get; set; }
|
public string Message { get; set; }
|
||||||
public HttpUri WikiUrl { get; set; }
|
public string WikiUrl { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class HealthResourceMapper
|
public static class HealthResourceMapper
|
||||||
|
@ -29,7 +28,7 @@ namespace Lidarr.Api.V1.Health
|
||||||
Source = model.Source.Name,
|
Source = model.Source.Name,
|
||||||
Type = model.Type,
|
Type = model.Type,
|
||||||
Message = model.Message,
|
Message = model.Message,
|
||||||
WikiUrl = model.WikiUrl
|
WikiUrl = model.WikiUrl.FullUri
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ using Lidarr.Http;
|
||||||
using NzbDrone.Core.ImportLists;
|
using NzbDrone.Core.ImportLists;
|
||||||
using NzbDrone.Core.Validation;
|
using NzbDrone.Core.Validation;
|
||||||
using NzbDrone.Core.Validation.Paths;
|
using NzbDrone.Core.Validation.Paths;
|
||||||
|
using NzbDrone.SignalR;
|
||||||
|
|
||||||
namespace Lidarr.Api.V1.ImportLists
|
namespace Lidarr.Api.V1.ImportLists
|
||||||
{
|
{
|
||||||
|
@ -12,11 +13,12 @@ namespace Lidarr.Api.V1.ImportLists
|
||||||
public static readonly ImportListResourceMapper ResourceMapper = new ();
|
public static readonly ImportListResourceMapper ResourceMapper = new ();
|
||||||
public static readonly ImportListBulkResourceMapper BulkResourceMapper = new ();
|
public static readonly ImportListBulkResourceMapper BulkResourceMapper = new ();
|
||||||
|
|
||||||
public ImportListController(IImportListFactory importListFactory,
|
public ImportListController(IBroadcastSignalRMessage signalRBroadcaster,
|
||||||
|
IImportListFactory importListFactory,
|
||||||
RootFolderExistsValidator rootFolderExistsValidator,
|
RootFolderExistsValidator rootFolderExistsValidator,
|
||||||
QualityProfileExistsValidator qualityProfileExistsValidator,
|
QualityProfileExistsValidator qualityProfileExistsValidator,
|
||||||
MetadataProfileExistsValidator metadataProfileExistsValidator)
|
MetadataProfileExistsValidator metadataProfileExistsValidator)
|
||||||
: base(importListFactory, "importlist", ResourceMapper, BulkResourceMapper)
|
: base(signalRBroadcaster, importListFactory, "importlist", ResourceMapper, BulkResourceMapper)
|
||||||
{
|
{
|
||||||
SharedValidator.RuleFor(c => c.RootFolderPath).Cascade(CascadeMode.Stop)
|
SharedValidator.RuleFor(c => c.RootFolderPath).Cascade(CascadeMode.Stop)
|
||||||
.IsValidPath()
|
.IsValidPath()
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
|
using FluentValidation;
|
||||||
using Lidarr.Http;
|
using Lidarr.Http;
|
||||||
using NzbDrone.Core.Indexers;
|
using NzbDrone.Core.Indexers;
|
||||||
using NzbDrone.Core.Validation;
|
using NzbDrone.Core.Validation;
|
||||||
|
using NzbDrone.SignalR;
|
||||||
|
|
||||||
namespace Lidarr.Api.V1.Indexers
|
namespace Lidarr.Api.V1.Indexers
|
||||||
{
|
{
|
||||||
|
@ -10,9 +12,12 @@ namespace Lidarr.Api.V1.Indexers
|
||||||
public static readonly IndexerResourceMapper ResourceMapper = new ();
|
public static readonly IndexerResourceMapper ResourceMapper = new ();
|
||||||
public static readonly IndexerBulkResourceMapper BulkResourceMapper = new ();
|
public static readonly IndexerBulkResourceMapper BulkResourceMapper = new ();
|
||||||
|
|
||||||
public IndexerController(IndexerFactory indexerFactory, DownloadClientExistsValidator downloadClientExistsValidator)
|
public IndexerController(IBroadcastSignalRMessage signalRBroadcaster,
|
||||||
: base(indexerFactory, "indexer", ResourceMapper, BulkResourceMapper)
|
IndexerFactory indexerFactory,
|
||||||
|
DownloadClientExistsValidator downloadClientExistsValidator)
|
||||||
|
: base(signalRBroadcaster, indexerFactory, "indexer", ResourceMapper, BulkResourceMapper)
|
||||||
{
|
{
|
||||||
|
SharedValidator.RuleFor(c => c.Priority).InclusiveBetween(1, 50);
|
||||||
SharedValidator.RuleFor(c => c.DownloadClientId).SetValidator(downloadClientExistsValidator);
|
SharedValidator.RuleFor(c => c.DownloadClientId).SetValidator(downloadClientExistsValidator);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.7.0" />
|
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.7.0" />
|
||||||
<PackageReference Include="FluentValidation" Version="9.5.4" />
|
<PackageReference Include="FluentValidation" Version="9.5.4" />
|
||||||
<PackageReference Include="Ical.Net" Version="4.3.1" />
|
<PackageReference Include="Ical.Net" Version="4.3.1" />
|
||||||
<PackageReference Include="NLog" Version="5.3.4" />
|
<PackageReference Include="NLog" Version="5.4.0" />
|
||||||
<PackageReference Include="System.IO.Abstractions" Version="17.0.24" />
|
<PackageReference Include="System.IO.Abstractions" Version="17.0.24" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -2,6 +2,7 @@ using System;
|
||||||
using Lidarr.Http;
|
using Lidarr.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using NzbDrone.Core.Extras.Metadata;
|
using NzbDrone.Core.Extras.Metadata;
|
||||||
|
using NzbDrone.SignalR;
|
||||||
|
|
||||||
namespace Lidarr.Api.V1.Metadata
|
namespace Lidarr.Api.V1.Metadata
|
||||||
{
|
{
|
||||||
|
@ -11,8 +12,8 @@ namespace Lidarr.Api.V1.Metadata
|
||||||
public static readonly MetadataResourceMapper ResourceMapper = new ();
|
public static readonly MetadataResourceMapper ResourceMapper = new ();
|
||||||
public static readonly MetadataBulkResourceMapper BulkResourceMapper = new ();
|
public static readonly MetadataBulkResourceMapper BulkResourceMapper = new ();
|
||||||
|
|
||||||
public MetadataController(IMetadataFactory metadataFactory)
|
public MetadataController(IBroadcastSignalRMessage signalRBroadcaster, IMetadataFactory metadataFactory)
|
||||||
: base(metadataFactory, "metadata", ResourceMapper, BulkResourceMapper)
|
: base(signalRBroadcaster, metadataFactory, "metadata", ResourceMapper, BulkResourceMapper)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ using System;
|
||||||
using Lidarr.Http;
|
using Lidarr.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using NzbDrone.Core.Notifications;
|
using NzbDrone.Core.Notifications;
|
||||||
|
using NzbDrone.SignalR;
|
||||||
|
|
||||||
namespace Lidarr.Api.V1.Notifications
|
namespace Lidarr.Api.V1.Notifications
|
||||||
{
|
{
|
||||||
|
@ -11,8 +12,8 @@ namespace Lidarr.Api.V1.Notifications
|
||||||
public static readonly NotificationResourceMapper ResourceMapper = new ();
|
public static readonly NotificationResourceMapper ResourceMapper = new ();
|
||||||
public static readonly NotificationBulkResourceMapper BulkResourceMapper = new ();
|
public static readonly NotificationBulkResourceMapper BulkResourceMapper = new ();
|
||||||
|
|
||||||
public NotificationController(NotificationFactory notificationFactory)
|
public NotificationController(IBroadcastSignalRMessage signalRBroadcaster, NotificationFactory notificationFactory)
|
||||||
: base(notificationFactory, "notification", ResourceMapper, BulkResourceMapper)
|
: base(signalRBroadcaster, notificationFactory, "notification", ResourceMapper, BulkResourceMapper)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,12 +7,19 @@ using Lidarr.Http.REST.Attributes;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using NzbDrone.Common.Extensions;
|
using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Common.Serializer;
|
using NzbDrone.Common.Serializer;
|
||||||
|
using NzbDrone.Core.Datastore.Events;
|
||||||
|
using NzbDrone.Core.Messaging.Events;
|
||||||
using NzbDrone.Core.ThingiProvider;
|
using NzbDrone.Core.ThingiProvider;
|
||||||
|
using NzbDrone.Core.ThingiProvider.Events;
|
||||||
using NzbDrone.Core.Validation;
|
using NzbDrone.Core.Validation;
|
||||||
|
using NzbDrone.SignalR;
|
||||||
|
|
||||||
namespace Lidarr.Api.V1
|
namespace Lidarr.Api.V1
|
||||||
{
|
{
|
||||||
public abstract class ProviderControllerBase<TProviderResource, TBulkProviderResource, TProvider, TProviderDefinition> : RestController<TProviderResource>
|
public abstract class ProviderControllerBase<TProviderResource, TBulkProviderResource, TProvider, TProviderDefinition> : RestControllerWithSignalR<TProviderResource, TProviderDefinition>,
|
||||||
|
IHandle<ProviderAddedEvent<TProvider>>,
|
||||||
|
IHandle<ProviderUpdatedEvent<TProvider>>,
|
||||||
|
IHandle<ProviderDeletedEvent<TProvider>>
|
||||||
where TProviderDefinition : ProviderDefinition, new()
|
where TProviderDefinition : ProviderDefinition, new()
|
||||||
where TProvider : IProvider
|
where TProvider : IProvider
|
||||||
where TProviderResource : ProviderResource<TProviderResource>, new()
|
where TProviderResource : ProviderResource<TProviderResource>, new()
|
||||||
|
@ -22,11 +29,13 @@ namespace Lidarr.Api.V1
|
||||||
private readonly ProviderResourceMapper<TProviderResource, TProviderDefinition> _resourceMapper;
|
private readonly ProviderResourceMapper<TProviderResource, TProviderDefinition> _resourceMapper;
|
||||||
private readonly ProviderBulkResourceMapper<TBulkProviderResource, TProviderDefinition> _bulkResourceMapper;
|
private readonly ProviderBulkResourceMapper<TBulkProviderResource, TProviderDefinition> _bulkResourceMapper;
|
||||||
|
|
||||||
protected ProviderControllerBase(IProviderFactory<TProvider,
|
protected ProviderControllerBase(IBroadcastSignalRMessage signalRBroadcaster,
|
||||||
|
IProviderFactory<TProvider,
|
||||||
TProviderDefinition> providerFactory,
|
TProviderDefinition> providerFactory,
|
||||||
string resource,
|
string resource,
|
||||||
ProviderResourceMapper<TProviderResource, TProviderDefinition> resourceMapper,
|
ProviderResourceMapper<TProviderResource, TProviderDefinition> resourceMapper,
|
||||||
ProviderBulkResourceMapper<TBulkProviderResource, TProviderDefinition> bulkResourceMapper)
|
ProviderBulkResourceMapper<TBulkProviderResource, TProviderDefinition> bulkResourceMapper)
|
||||||
|
: base(signalRBroadcaster)
|
||||||
{
|
{
|
||||||
_providerFactory = providerFactory;
|
_providerFactory = providerFactory;
|
||||||
_resourceMapper = resourceMapper;
|
_resourceMapper = resourceMapper;
|
||||||
|
@ -261,6 +270,24 @@ namespace Lidarr.Api.V1
|
||||||
return Content(data.ToJson(), "application/json");
|
return Content(data.ToJson(), "application/json");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[NonAction]
|
||||||
|
public virtual void Handle(ProviderAddedEvent<TProvider> message)
|
||||||
|
{
|
||||||
|
BroadcastResourceChange(ModelAction.Created, message.Definition.Id);
|
||||||
|
}
|
||||||
|
|
||||||
|
[NonAction]
|
||||||
|
public virtual void Handle(ProviderUpdatedEvent<TProvider> message)
|
||||||
|
{
|
||||||
|
BroadcastResourceChange(ModelAction.Updated, message.Definition.Id);
|
||||||
|
}
|
||||||
|
|
||||||
|
[NonAction]
|
||||||
|
public virtual void Handle(ProviderDeletedEvent<TProvider> message)
|
||||||
|
{
|
||||||
|
BroadcastResourceChange(ModelAction.Deleted, message.ProviderId);
|
||||||
|
}
|
||||||
|
|
||||||
protected virtual void Validate(TProviderDefinition definition, bool includeWarnings)
|
protected virtual void Validate(TProviderDefinition definition, bool includeWarnings)
|
||||||
{
|
{
|
||||||
var validationResult = definition.Settings.Validate();
|
var validationResult = definition.Settings.Validate();
|
||||||
|
|
|
@ -302,7 +302,7 @@ namespace Lidarr.Api.V1.Queue
|
||||||
|
|
||||||
if (blocklist)
|
if (blocklist)
|
||||||
{
|
{
|
||||||
_failedDownloadService.MarkAsFailed(trackedDownload.DownloadItem.DownloadId, skipRedownload);
|
_failedDownloadService.MarkAsFailed(trackedDownload, skipRedownload);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!removeFromClient && !blocklist && !changeCategory)
|
if (!removeFromClient && !blocklist && !changeCategory)
|
||||||
|
|
|
@ -4,6 +4,7 @@ using Lidarr.Http;
|
||||||
using Lidarr.Http.REST;
|
using Lidarr.Http.REST;
|
||||||
using Lidarr.Http.REST.Attributes;
|
using Lidarr.Http.REST.Attributes;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Core.RemotePathMappings;
|
using NzbDrone.Core.RemotePathMappings;
|
||||||
using NzbDrone.Core.Validation.Paths;
|
using NzbDrone.Core.Validation.Paths;
|
||||||
|
|
||||||
|
@ -27,11 +28,22 @@ namespace Lidarr.Api.V1.RemotePathMappings
|
||||||
SharedValidator.RuleFor(c => c.RemotePath)
|
SharedValidator.RuleFor(c => c.RemotePath)
|
||||||
.NotEmpty();
|
.NotEmpty();
|
||||||
|
|
||||||
|
SharedValidator.RuleFor(c => c.RemotePath)
|
||||||
|
.Must(remotePath => remotePath.IsNotNullOrWhiteSpace() && !remotePath.StartsWith(" "))
|
||||||
|
.WithMessage("Remote Path '{PropertyValue}' must not start with a space");
|
||||||
|
|
||||||
|
SharedValidator.RuleFor(c => c.RemotePath)
|
||||||
|
.Must(remotePath => remotePath.IsNotNullOrWhiteSpace() && !remotePath.EndsWith(" "))
|
||||||
|
.WithMessage("Remote Path '{PropertyValue}' must not end with a space");
|
||||||
|
|
||||||
SharedValidator.RuleFor(c => c.LocalPath)
|
SharedValidator.RuleFor(c => c.LocalPath)
|
||||||
.Cascade(CascadeMode.Stop)
|
.Cascade(CascadeMode.Stop)
|
||||||
.IsValidPath()
|
.IsValidPath()
|
||||||
.SetValidator(mappedNetworkDriveValidator)
|
.SetValidator(mappedNetworkDriveValidator)
|
||||||
.SetValidator(pathExistsValidator);
|
.SetValidator(pathExistsValidator)
|
||||||
|
.SetValidator(new SystemFolderValidator())
|
||||||
|
.NotEqual("/")
|
||||||
|
.WithMessage("Cannot be set to '/'");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override RemotePathMappingResource GetResourceById(int id)
|
public override RemotePathMappingResource GetResourceById(int id)
|
||||||
|
@ -41,7 +53,7 @@ namespace Lidarr.Api.V1.RemotePathMappings
|
||||||
|
|
||||||
[RestPostById]
|
[RestPostById]
|
||||||
[Consumes("application/json")]
|
[Consumes("application/json")]
|
||||||
public ActionResult<RemotePathMappingResource> CreateMapping(RemotePathMappingResource resource)
|
public ActionResult<RemotePathMappingResource> CreateMapping([FromBody] RemotePathMappingResource resource)
|
||||||
{
|
{
|
||||||
var model = resource.ToModel();
|
var model = resource.ToModel();
|
||||||
|
|
||||||
|
@ -62,7 +74,7 @@ namespace Lidarr.Api.V1.RemotePathMappings
|
||||||
}
|
}
|
||||||
|
|
||||||
[RestPutById]
|
[RestPutById]
|
||||||
public ActionResult<RemotePathMappingResource> UpdateMapping(RemotePathMappingResource resource)
|
public ActionResult<RemotePathMappingResource> UpdateMapping([FromBody] RemotePathMappingResource resource)
|
||||||
{
|
{
|
||||||
var mapping = resource.ToModel();
|
var mapping = resource.ToModel();
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ namespace Lidarr.Api.V1.System.Backup
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost("restore/upload")]
|
[HttpPost("restore/upload")]
|
||||||
[RequestFormLimits(MultipartBodyLengthLimit = 1000000000)]
|
[RequestFormLimits(MultipartBodyLengthLimit = 5000000000)]
|
||||||
public object UploadAndRestore()
|
public object UploadAndRestore()
|
||||||
{
|
{
|
||||||
var files = Request.Form.Files;
|
var files = Request.Form.Files;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using FluentValidation;
|
||||||
using Lidarr.Http;
|
using Lidarr.Http;
|
||||||
using Lidarr.Http.REST;
|
using Lidarr.Http.REST;
|
||||||
using Lidarr.Http.REST.Attributes;
|
using Lidarr.Http.REST.Attributes;
|
||||||
|
@ -23,6 +24,8 @@ namespace Lidarr.Api.V1.Tags
|
||||||
: base(signalRBroadcaster)
|
: base(signalRBroadcaster)
|
||||||
{
|
{
|
||||||
_tagService = tagService;
|
_tagService = tagService;
|
||||||
|
|
||||||
|
SharedValidator.RuleFor(c => c.Label).NotEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override TagResource GetResourceById(int id)
|
public override TagResource GetResourceById(int id)
|
||||||
|
|
|
@ -9808,7 +9808,8 @@
|
||||||
"nullable": true
|
"nullable": true
|
||||||
},
|
},
|
||||||
"wikiUrl": {
|
"wikiUrl": {
|
||||||
"$ref": "#/components/schemas/HttpUri"
|
"type": "string",
|
||||||
|
"nullable": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
|
@ -10062,48 +10063,6 @@
|
||||||
},
|
},
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
},
|
},
|
||||||
"HttpUri": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"fullUri": {
|
|
||||||
"type": "string",
|
|
||||||
"nullable": true,
|
|
||||||
"readOnly": true
|
|
||||||
},
|
|
||||||
"scheme": {
|
|
||||||
"type": "string",
|
|
||||||
"nullable": true,
|
|
||||||
"readOnly": true
|
|
||||||
},
|
|
||||||
"host": {
|
|
||||||
"type": "string",
|
|
||||||
"nullable": true,
|
|
||||||
"readOnly": true
|
|
||||||
},
|
|
||||||
"port": {
|
|
||||||
"type": "integer",
|
|
||||||
"format": "int32",
|
|
||||||
"nullable": true,
|
|
||||||
"readOnly": true
|
|
||||||
},
|
|
||||||
"path": {
|
|
||||||
"type": "string",
|
|
||||||
"nullable": true,
|
|
||||||
"readOnly": true
|
|
||||||
},
|
|
||||||
"query": {
|
|
||||||
"type": "string",
|
|
||||||
"nullable": true,
|
|
||||||
"readOnly": true
|
|
||||||
},
|
|
||||||
"fragment": {
|
|
||||||
"type": "string",
|
|
||||||
"nullable": true,
|
|
||||||
"readOnly": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"additionalProperties": false
|
|
||||||
},
|
|
||||||
"ImportListBulkResource": {
|
"ImportListBulkResource": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -12922,6 +12881,7 @@
|
||||||
"downloading",
|
"downloading",
|
||||||
"downloadFailed",
|
"downloadFailed",
|
||||||
"downloadFailedPending",
|
"downloadFailedPending",
|
||||||
|
"importBlocked",
|
||||||
"importPending",
|
"importPending",
|
||||||
"importing",
|
"importing",
|
||||||
"importFailed",
|
"importFailed",
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
|
using System.Security.Cryptography;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Xml;
|
||||||
using Microsoft.AspNetCore.Authentication;
|
using Microsoft.AspNetCore.Authentication;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using NLog;
|
||||||
|
using NzbDrone.Common.EnvironmentInfo;
|
||||||
using NzbDrone.Common.Extensions;
|
using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Core.Authentication;
|
using NzbDrone.Core.Authentication;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
|
@ -16,11 +21,15 @@ namespace Lidarr.Http.Authentication
|
||||||
{
|
{
|
||||||
private readonly IAuthenticationService _authService;
|
private readonly IAuthenticationService _authService;
|
||||||
private readonly IConfigFileProvider _configFileProvider;
|
private readonly IConfigFileProvider _configFileProvider;
|
||||||
|
private readonly IAppFolderInfo _appFolderInfo;
|
||||||
|
private readonly Logger _logger;
|
||||||
|
|
||||||
public AuthenticationController(IAuthenticationService authService, IConfigFileProvider configFileProvider)
|
public AuthenticationController(IAuthenticationService authService, IConfigFileProvider configFileProvider, IAppFolderInfo appFolderInfo, Logger logger)
|
||||||
{
|
{
|
||||||
_authService = authService;
|
_authService = authService;
|
||||||
_configFileProvider = configFileProvider;
|
_configFileProvider = configFileProvider;
|
||||||
|
_appFolderInfo = appFolderInfo;
|
||||||
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost("login")]
|
[HttpPost("login")]
|
||||||
|
@ -45,7 +54,23 @@ namespace Lidarr.Http.Authentication
|
||||||
IsPersistent = resource.RememberMe == "on"
|
IsPersistent = resource.RememberMe == "on"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
await HttpContext.SignInAsync(AuthenticationType.Forms.ToString(), new ClaimsPrincipal(new ClaimsIdentity(claims, "Cookies", "user", "identifier")), authProperties);
|
await HttpContext.SignInAsync(AuthenticationType.Forms.ToString(), new ClaimsPrincipal(new ClaimsIdentity(claims, "Cookies", "user", "identifier")), authProperties);
|
||||||
|
}
|
||||||
|
catch (CryptographicException e)
|
||||||
|
{
|
||||||
|
if (e.InnerException is XmlException)
|
||||||
|
{
|
||||||
|
_logger.Error(e, "Failed to authenticate user due to corrupt XML. Please remove all XML files from {0} and restart Lidarr", Path.Combine(_appFolderInfo.AppDataFolder, "asp"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_logger.Error(e, "Failed to authenticate user. {0}", e.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Unauthorized();
|
||||||
|
}
|
||||||
|
|
||||||
if (returnUrl.IsNullOrWhiteSpace() || !Url.IsLocalUrl(returnUrl))
|
if (returnUrl.IsNullOrWhiteSpace() || !Url.IsLocalUrl(returnUrl))
|
||||||
{
|
{
|
||||||
|
|
|
@ -77,7 +77,7 @@ namespace Lidarr.Http.Authentication
|
||||||
|
|
||||||
private void LogSuccess(HttpRequest context, string username)
|
private void LogSuccess(HttpRequest context, string username)
|
||||||
{
|
{
|
||||||
_authLogger.Info("Auth-Success ip {0} username '{1}'", context.GetRemoteIP(), username);
|
_authLogger.Debug("Auth-Success ip {0} username '{1}'", context.GetRemoteIP(), username);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LogLogout(HttpRequest context, string username)
|
private void LogLogout(HttpRequest context, string username)
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="FluentValidation" Version="9.5.4" />
|
<PackageReference Include="FluentValidation" Version="9.5.4" />
|
||||||
<PackageReference Include="ImpromptuInterface" Version="7.0.1" />
|
<PackageReference Include="ImpromptuInterface" Version="7.0.1" />
|
||||||
<PackageReference Include="NLog" Version="5.3.4" />
|
<PackageReference Include="NLog" Version="5.4.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\NzbDrone.Core\Lidarr.Core.csproj" />
|
<ProjectReference Include="..\NzbDrone.Core\Lidarr.Core.csproj" />
|
||||||
|
|
|
@ -40,15 +40,16 @@ namespace NzbDrone.Automation.Test
|
||||||
var service = ChromeDriverService.CreateDefaultService();
|
var service = ChromeDriverService.CreateDefaultService();
|
||||||
|
|
||||||
// Timeout as windows automation tests seem to take alot longer to get going
|
// Timeout as windows automation tests seem to take alot longer to get going
|
||||||
driver = new ChromeDriver(service, options, new TimeSpan(0, 3, 0));
|
driver = new ChromeDriver(service, options, TimeSpan.FromMinutes(3));
|
||||||
|
|
||||||
driver.Manage().Window.Size = new System.Drawing.Size(1920, 1080);
|
driver.Manage().Window.Size = new System.Drawing.Size(1920, 1080);
|
||||||
|
driver.Manage().Window.FullScreen();
|
||||||
|
|
||||||
_runner = new NzbDroneRunner(LogManager.GetCurrentClassLogger(), null);
|
_runner = new NzbDroneRunner(LogManager.GetCurrentClassLogger(), null);
|
||||||
_runner.KillAll();
|
_runner.KillAll();
|
||||||
_runner.Start(true);
|
_runner.Start(true);
|
||||||
|
|
||||||
driver.Url = "http://localhost:8686";
|
driver.Navigate().GoToUrl("http://localhost:8686");
|
||||||
|
|
||||||
var page = new PageBase(driver);
|
var page = new PageBase(driver);
|
||||||
page.WaitForNoSpinner();
|
page.WaitForNoSpinner();
|
||||||
|
@ -68,7 +69,7 @@ namespace NzbDrone.Automation.Test
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var image = ((ITakesScreenshot)driver).GetScreenshot();
|
var image = (driver as ITakesScreenshot).GetScreenshot();
|
||||||
image.SaveAsFile($"./{name}_test_screenshot.png", ScreenshotImageFormat.Png);
|
image.SaveAsFile($"./{name}_test_screenshot.png", ScreenshotImageFormat.Png);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Selenium.Support" Version="3.141.0" />
|
<PackageReference Include="Selenium.Support" Version="3.141.0" />
|
||||||
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="111.0.5563.6400" />
|
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="134.0.6998.16500" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\NzbDrone.Test.Common\Lidarr.Test.Common.csproj" />
|
<ProjectReference Include="..\NzbDrone.Test.Common\Lidarr.Test.Common.csproj" />
|
||||||
|
|
|
@ -1,19 +1,17 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using OpenQA.Selenium;
|
using OpenQA.Selenium;
|
||||||
using OpenQA.Selenium.Remote;
|
|
||||||
using OpenQA.Selenium.Support.UI;
|
using OpenQA.Selenium.Support.UI;
|
||||||
|
|
||||||
namespace NzbDrone.Automation.Test.PageModel
|
namespace NzbDrone.Automation.Test.PageModel
|
||||||
{
|
{
|
||||||
public class PageBase
|
public class PageBase
|
||||||
{
|
{
|
||||||
private readonly RemoteWebDriver _driver;
|
private readonly IWebDriver _driver;
|
||||||
|
|
||||||
public PageBase(RemoteWebDriver driver)
|
public PageBase(IWebDriver driver)
|
||||||
{
|
{
|
||||||
_driver = driver;
|
_driver = driver;
|
||||||
driver.Manage().Window.Maximize();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public IWebElement FindByClass(string className, int timeout = 5)
|
public IWebElement FindByClass(string className, int timeout = 5)
|
||||||
|
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.IO.Abstractions;
|
using System.IO.Abstractions;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Threading;
|
||||||
using NLog;
|
using NLog;
|
||||||
using NzbDrone.Common.EnsureThat;
|
using NzbDrone.Common.EnsureThat;
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
using NzbDrone.Common.EnvironmentInfo;
|
||||||
|
@ -306,9 +307,26 @@ namespace NzbDrone.Common.Disk
|
||||||
{
|
{
|
||||||
Ensure.That(path, () => path).IsValidPath(PathValidationType.CurrentOs);
|
Ensure.That(path, () => path).IsValidPath(PathValidationType.CurrentOs);
|
||||||
|
|
||||||
var files = GetFiles(path, recursive);
|
var files = GetFiles(path, recursive).ToList();
|
||||||
|
|
||||||
files.ToList().ForEach(RemoveReadOnly);
|
files.ForEach(RemoveReadOnly);
|
||||||
|
|
||||||
|
var attempts = 0;
|
||||||
|
|
||||||
|
while (attempts < 3 && files.Any())
|
||||||
|
{
|
||||||
|
EmptyFolder(path);
|
||||||
|
|
||||||
|
if (GetFiles(path, recursive).Any())
|
||||||
|
{
|
||||||
|
// Wait for IO operations to complete after emptying the folder since they aren't always
|
||||||
|
// instantly removed and it can lead to false positives that files are still present.
|
||||||
|
Thread.Sleep(3000);
|
||||||
|
}
|
||||||
|
|
||||||
|
attempts++;
|
||||||
|
files = GetFiles(path, recursive).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
_fileSystem.Directory.Delete(path, recursive);
|
_fileSystem.Directory.Delete(path, recursive);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace NzbDrone.Common.Disk
|
||||||
private readonly IDiskProvider _diskProvider;
|
private readonly IDiskProvider _diskProvider;
|
||||||
private readonly Logger _logger;
|
private readonly Logger _logger;
|
||||||
|
|
||||||
private static readonly string[] _reflinkFilesystems = { "btrfs", "xfs" };
|
private static readonly string[] ReflinkFilesystems = { "btrfs", "xfs", "zfs" };
|
||||||
|
|
||||||
public DiskTransferService(IDiskProvider diskProvider, Logger logger)
|
public DiskTransferService(IDiskProvider diskProvider, Logger logger)
|
||||||
{
|
{
|
||||||
|
@ -343,7 +343,7 @@ namespace NzbDrone.Common.Disk
|
||||||
var targetDriveFormat = targetMount?.DriveFormat ?? string.Empty;
|
var targetDriveFormat = targetMount?.DriveFormat ?? string.Empty;
|
||||||
|
|
||||||
var isCifs = targetDriveFormat == "cifs";
|
var isCifs = targetDriveFormat == "cifs";
|
||||||
var tryReflink = sourceDriveFormat == targetDriveFormat && _reflinkFilesystems.Contains(sourceDriveFormat);
|
var tryReflink = sourceDriveFormat == targetDriveFormat && ReflinkFilesystems.Contains(sourceDriveFormat);
|
||||||
|
|
||||||
if (mode.HasFlag(TransferMode.Copy))
|
if (mode.HasFlag(TransferMode.Copy))
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,37 +17,6 @@ namespace NzbDrone.Common.Disk
|
||||||
private readonly IDiskProvider _diskProvider;
|
private readonly IDiskProvider _diskProvider;
|
||||||
private readonly IRuntimeInfo _runtimeInfo;
|
private readonly IRuntimeInfo _runtimeInfo;
|
||||||
|
|
||||||
private readonly HashSet<string> _setToRemove = new HashSet<string>
|
|
||||||
{
|
|
||||||
// Windows
|
|
||||||
"boot",
|
|
||||||
"bootmgr",
|
|
||||||
"cache",
|
|
||||||
"msocache",
|
|
||||||
"recovery",
|
|
||||||
"$recycle.bin",
|
|
||||||
"recycler",
|
|
||||||
"system volume information",
|
|
||||||
"temporary internet files",
|
|
||||||
"windows",
|
|
||||||
|
|
||||||
// OS X
|
|
||||||
".fseventd",
|
|
||||||
".spotlight",
|
|
||||||
".trashes",
|
|
||||||
".vol",
|
|
||||||
"cachedmessages",
|
|
||||||
"caches",
|
|
||||||
"trash",
|
|
||||||
|
|
||||||
// QNAP
|
|
||||||
".@__thumb",
|
|
||||||
|
|
||||||
// Synology
|
|
||||||
"@eadir",
|
|
||||||
"#recycle"
|
|
||||||
};
|
|
||||||
|
|
||||||
public FileSystemLookupService(IDiskProvider diskProvider, IRuntimeInfo runtimeInfo)
|
public FileSystemLookupService(IDiskProvider diskProvider, IRuntimeInfo runtimeInfo)
|
||||||
{
|
{
|
||||||
_diskProvider = diskProvider;
|
_diskProvider = diskProvider;
|
||||||
|
@ -158,7 +127,7 @@ namespace NzbDrone.Common.Disk
|
||||||
})
|
})
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
directories.RemoveAll(d => _setToRemove.Contains(d.Name.ToLowerInvariant()));
|
directories.RemoveAll(d => SpecialFolders.IsSpecialFolder(d.Name));
|
||||||
|
|
||||||
return directories;
|
return directories;
|
||||||
}
|
}
|
||||||
|
|
47
src/NzbDrone.Common/Disk/SpecialFolders.cs
Normal file
47
src/NzbDrone.Common/Disk/SpecialFolders.cs
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace NzbDrone.Common.Disk;
|
||||||
|
|
||||||
|
public static class SpecialFolders
|
||||||
|
{
|
||||||
|
private static readonly HashSet<string> _specialFolders = new HashSet<string>
|
||||||
|
{
|
||||||
|
// Windows
|
||||||
|
"boot",
|
||||||
|
"bootmgr",
|
||||||
|
"cache",
|
||||||
|
"msocache",
|
||||||
|
"recovery",
|
||||||
|
"$recycle.bin",
|
||||||
|
"recycler",
|
||||||
|
"system volume information",
|
||||||
|
"temporary internet files",
|
||||||
|
"windows",
|
||||||
|
|
||||||
|
// OS X
|
||||||
|
".fseventd",
|
||||||
|
".spotlight",
|
||||||
|
".trashes",
|
||||||
|
".vol",
|
||||||
|
"cachedmessages",
|
||||||
|
"caches",
|
||||||
|
"trash",
|
||||||
|
|
||||||
|
// QNAP
|
||||||
|
".@__thumb",
|
||||||
|
|
||||||
|
// Synology
|
||||||
|
"@eadir",
|
||||||
|
"#recycle"
|
||||||
|
};
|
||||||
|
|
||||||
|
public static bool IsSpecialFolder(string folder)
|
||||||
|
{
|
||||||
|
if (folder == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return _specialFolders.Contains(folder.ToLowerInvariant());
|
||||||
|
}
|
||||||
|
}
|
|
@ -141,7 +141,7 @@ namespace NzbDrone.Common.Http.Dispatchers
|
||||||
}
|
}
|
||||||
catch (OperationCanceledException ex) when (cts.IsCancellationRequested)
|
catch (OperationCanceledException ex) when (cts.IsCancellationRequested)
|
||||||
{
|
{
|
||||||
throw new WebException("Http request timed out", ex.InnerException, WebExceptionStatus.Timeout, null);
|
throw new WebException("Http request timed out", ex, WebExceptionStatus.Timeout, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
using System.Text;
|
||||||
|
using NLog;
|
||||||
|
using NLog.Layouts.ClefJsonLayout;
|
||||||
|
using NzbDrone.Common.EnvironmentInfo;
|
||||||
|
|
||||||
|
namespace NzbDrone.Common.Instrumentation;
|
||||||
|
|
||||||
|
public class CleansingClefLogLayout : CompactJsonLayout
|
||||||
|
{
|
||||||
|
protected override void RenderFormattedMessage(LogEventInfo logEvent, StringBuilder target)
|
||||||
|
{
|
||||||
|
base.RenderFormattedMessage(logEvent, target);
|
||||||
|
|
||||||
|
if (RuntimeInfo.IsProduction)
|
||||||
|
{
|
||||||
|
var result = CleanseLogMessage.Cleanse(target.ToString());
|
||||||
|
target.Clear();
|
||||||
|
target.Append(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
using System.Text;
|
||||||
|
using NLog;
|
||||||
|
using NLog.Layouts;
|
||||||
|
using NzbDrone.Common.EnvironmentInfo;
|
||||||
|
|
||||||
|
namespace NzbDrone.Common.Instrumentation;
|
||||||
|
|
||||||
|
public class CleansingConsoleLogLayout : SimpleLayout
|
||||||
|
{
|
||||||
|
public CleansingConsoleLogLayout(string format)
|
||||||
|
: base(format)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void RenderFormattedMessage(LogEventInfo logEvent, StringBuilder target)
|
||||||
|
{
|
||||||
|
base.RenderFormattedMessage(logEvent, target);
|
||||||
|
|
||||||
|
if (RuntimeInfo.IsProduction)
|
||||||
|
{
|
||||||
|
var result = CleanseLogMessage.Cleanse(target.ToString());
|
||||||
|
target.Clear();
|
||||||
|
target.Append(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,7 +4,7 @@ using NLog.Targets;
|
||||||
|
|
||||||
namespace NzbDrone.Common.Instrumentation
|
namespace NzbDrone.Common.Instrumentation
|
||||||
{
|
{
|
||||||
public class NzbDroneFileTarget : FileTarget
|
public class CleansingFileTarget : FileTarget
|
||||||
{
|
{
|
||||||
protected override void RenderFormattedMessage(LogEventInfo logEvent, StringBuilder target)
|
protected override void RenderFormattedMessage(LogEventInfo logEvent, StringBuilder target)
|
||||||
{
|
{
|
|
@ -3,7 +3,6 @@ using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using NLog;
|
using NLog;
|
||||||
using NLog.Config;
|
using NLog.Config;
|
||||||
using NLog.Layouts.ClefJsonLayout;
|
|
||||||
using NLog.Targets;
|
using NLog.Targets;
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
using NzbDrone.Common.EnvironmentInfo;
|
||||||
using NzbDrone.Common.Extensions;
|
using NzbDrone.Common.Extensions;
|
||||||
|
@ -13,9 +12,11 @@ namespace NzbDrone.Common.Instrumentation
|
||||||
{
|
{
|
||||||
public static class NzbDroneLogger
|
public static class NzbDroneLogger
|
||||||
{
|
{
|
||||||
private const string FILE_LOG_LAYOUT = @"${date:format=yyyy-MM-dd HH\:mm\:ss.f}|${level}|${logger}|${message}${onexception:inner=${newline}${newline}[v${assembly-version}] ${exception:format=ToString}${newline}${exception:format=Data}${newline}}";
|
private const string FileLogLayout = @"${date:format=yyyy-MM-dd HH\:mm\:ss.f}|${level}|${logger}|${message}${onexception:inner=${newline}${newline}[v${assembly-version}] ${exception:format=ToString}${newline}${exception:format=Data}${newline}}";
|
||||||
public const string ConsoleLogLayout = "[${level}] ${logger}: ${message} ${onexception:inner=${newline}${newline}[v${assembly-version}] ${exception:format=ToString}${newline}${exception:format=Data}${newline}}";
|
private const string ConsoleFormat = "[${level}] ${logger}: ${message} ${onexception:inner=${newline}${newline}[v${assembly-version}] ${exception:format=ToString}${newline}${exception:format=Data}${newline}}";
|
||||||
public static CompactJsonLayout ClefLogLayout = new CompactJsonLayout();
|
|
||||||
|
private static readonly CleansingConsoleLogLayout CleansingConsoleLayout = new (ConsoleFormat);
|
||||||
|
private static readonly CleansingClefLogLayout ClefLogLayout = new ();
|
||||||
|
|
||||||
private static bool _isConfigured;
|
private static bool _isConfigured;
|
||||||
|
|
||||||
|
@ -118,11 +119,7 @@ namespace NzbDrone.Common.Instrumentation
|
||||||
? formatEnumValue
|
? formatEnumValue
|
||||||
: ConsoleLogFormat.Standard;
|
: ConsoleLogFormat.Standard;
|
||||||
|
|
||||||
coloredConsoleTarget.Layout = logFormat switch
|
ConfigureConsoleLayout(coloredConsoleTarget, logFormat);
|
||||||
{
|
|
||||||
ConsoleLogFormat.Clef => ClefLogLayout,
|
|
||||||
_ => ConsoleLogLayout
|
|
||||||
};
|
|
||||||
|
|
||||||
var loggingRule = new LoggingRule("*", level, coloredConsoleTarget);
|
var loggingRule = new LoggingRule("*", level, coloredConsoleTarget);
|
||||||
|
|
||||||
|
@ -139,7 +136,7 @@ namespace NzbDrone.Common.Instrumentation
|
||||||
|
|
||||||
private static void RegisterAppFile(IAppFolderInfo appFolderInfo, string name, string fileName, int maxArchiveFiles, LogLevel minLogLevel)
|
private static void RegisterAppFile(IAppFolderInfo appFolderInfo, string name, string fileName, int maxArchiveFiles, LogLevel minLogLevel)
|
||||||
{
|
{
|
||||||
var fileTarget = new NzbDroneFileTarget();
|
var fileTarget = new CleansingFileTarget();
|
||||||
|
|
||||||
fileTarget.Name = name;
|
fileTarget.Name = name;
|
||||||
fileTarget.FileName = Path.Combine(appFolderInfo.GetLogFolder(), fileName);
|
fileTarget.FileName = Path.Combine(appFolderInfo.GetLogFolder(), fileName);
|
||||||
|
@ -152,7 +149,7 @@ namespace NzbDrone.Common.Instrumentation
|
||||||
fileTarget.MaxArchiveFiles = maxArchiveFiles;
|
fileTarget.MaxArchiveFiles = maxArchiveFiles;
|
||||||
fileTarget.EnableFileDelete = true;
|
fileTarget.EnableFileDelete = true;
|
||||||
fileTarget.ArchiveNumbering = ArchiveNumberingMode.Rolling;
|
fileTarget.ArchiveNumbering = ArchiveNumberingMode.Rolling;
|
||||||
fileTarget.Layout = FILE_LOG_LAYOUT;
|
fileTarget.Layout = FileLogLayout;
|
||||||
|
|
||||||
var loggingRule = new LoggingRule("*", minLogLevel, fileTarget);
|
var loggingRule = new LoggingRule("*", minLogLevel, fileTarget);
|
||||||
|
|
||||||
|
@ -171,7 +168,7 @@ namespace NzbDrone.Common.Instrumentation
|
||||||
fileTarget.ConcurrentWrites = false;
|
fileTarget.ConcurrentWrites = false;
|
||||||
fileTarget.ConcurrentWriteAttemptDelay = 50;
|
fileTarget.ConcurrentWriteAttemptDelay = 50;
|
||||||
fileTarget.ConcurrentWriteAttempts = 100;
|
fileTarget.ConcurrentWriteAttempts = 100;
|
||||||
fileTarget.Layout = FILE_LOG_LAYOUT;
|
fileTarget.Layout = FileLogLayout;
|
||||||
|
|
||||||
var loggingRule = new LoggingRule("*", LogLevel.Trace, fileTarget);
|
var loggingRule = new LoggingRule("*", LogLevel.Trace, fileTarget);
|
||||||
|
|
||||||
|
@ -216,6 +213,15 @@ namespace NzbDrone.Common.Instrumentation
|
||||||
{
|
{
|
||||||
return GetLogger(obj.GetType());
|
return GetLogger(obj.GetType());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void ConfigureConsoleLayout(ColoredConsoleTarget target, ConsoleLogFormat format)
|
||||||
|
{
|
||||||
|
target.Layout = format switch
|
||||||
|
{
|
||||||
|
ConsoleLogFormat.Clef => NzbDroneLogger.ClefLogLayout,
|
||||||
|
_ => NzbDroneLogger.CleansingConsoleLayout
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum ConsoleLogFormat
|
public enum ConsoleLogFormat
|
||||||
|
|
|
@ -6,17 +6,17 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DryIoc.dll" Version="5.4.3" />
|
<PackageReference Include="DryIoc.dll" Version="5.4.3" />
|
||||||
<PackageReference Include="IPAddressRange" Version="6.1.0" />
|
<PackageReference Include="IPAddressRange" Version="6.2.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
<PackageReference Include="NLog" Version="5.3.4" />
|
<PackageReference Include="NLog" Version="5.4.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="6.0.2" />
|
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="6.0.2" />
|
||||||
<PackageReference Include="NLog.Layouts.ClefJsonLayout" Version="1.0.2" />
|
<PackageReference Include="NLog.Layouts.ClefJsonLayout" Version="1.0.3" />
|
||||||
<PackageReference Include="Sentry" Version="4.0.2" />
|
<PackageReference Include="Sentry" Version="4.0.2" />
|
||||||
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
||||||
<PackageReference Include="System.IO.Abstractions" Version="17.0.24" />
|
<PackageReference Include="System.IO.Abstractions" Version="17.0.24" />
|
||||||
<PackageReference Include="System.Text.Json" Version="6.0.10" />
|
<PackageReference Include="System.Text.Json" Version="6.0.10" />
|
||||||
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
|
<PackageReference Include="System.ValueTuple" Version="4.6.1" />
|
||||||
<PackageReference Include="System.Data.SQLite.Core.Servarr" Version="1.0.115.5-18" />
|
<PackageReference Include="System.Data.SQLite.Core.Servarr" Version="1.0.115.5-18" />
|
||||||
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
|
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
|
||||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.1" />
|
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.1" />
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
using NzbDrone.Common.EnvironmentInfo;
|
||||||
using NzbDrone.Common.Extensions;
|
using NzbDrone.Common.Extensions;
|
||||||
|
@ -6,7 +7,7 @@ namespace NzbDrone.Common
|
||||||
{
|
{
|
||||||
public class PathEqualityComparer : IEqualityComparer<string>
|
public class PathEqualityComparer : IEqualityComparer<string>
|
||||||
{
|
{
|
||||||
public static readonly PathEqualityComparer Instance = new PathEqualityComparer();
|
public static readonly PathEqualityComparer Instance = new ();
|
||||||
|
|
||||||
private PathEqualityComparer()
|
private PathEqualityComparer()
|
||||||
{
|
{
|
||||||
|
@ -18,6 +19,8 @@ namespace NzbDrone.Common
|
||||||
}
|
}
|
||||||
|
|
||||||
public int GetHashCode(string obj)
|
public int GetHashCode(string obj)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if (OsInfo.IsWindows)
|
if (OsInfo.IsWindows)
|
||||||
{
|
{
|
||||||
|
@ -26,5 +29,10 @@ namespace NzbDrone.Common
|
||||||
|
|
||||||
return obj.CleanFilePath().Normalize().GetHashCode();
|
return obj.CleanFilePath().Normalize().GetHashCode();
|
||||||
}
|
}
|
||||||
|
catch (ArgumentException ex)
|
||||||
|
{
|
||||||
|
throw new ArgumentException($"Invalid path: {obj}", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ using System.ComponentModel;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
using NLog;
|
using NLog;
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
using NzbDrone.Common.EnvironmentInfo;
|
||||||
using NzbDrone.Common.Model;
|
using NzbDrone.Common.Model;
|
||||||
|
@ -117,7 +118,9 @@ namespace NzbDrone.Common.Processes
|
||||||
UseShellExecute = false,
|
UseShellExecute = false,
|
||||||
RedirectStandardError = true,
|
RedirectStandardError = true,
|
||||||
RedirectStandardOutput = true,
|
RedirectStandardOutput = true,
|
||||||
RedirectStandardInput = true
|
RedirectStandardInput = true,
|
||||||
|
StandardOutputEncoding = Encoding.UTF8,
|
||||||
|
StandardErrorEncoding = Encoding.UTF8
|
||||||
};
|
};
|
||||||
|
|
||||||
if (environmentVariables != null)
|
if (environmentVariables != null)
|
||||||
|
|
|
@ -103,6 +103,7 @@ namespace NzbDrone.Core.Test.DiskSpace
|
||||||
[TestCase("/var/lib/docker")]
|
[TestCase("/var/lib/docker")]
|
||||||
[TestCase("/some/place/docker/aufs")]
|
[TestCase("/some/place/docker/aufs")]
|
||||||
[TestCase("/etc/network")]
|
[TestCase("/etc/network")]
|
||||||
|
[TestCase("/Volumes/.timemachine/ABC123456-A1BC-12A3B45678C9/2025-05-13-181401.backup")]
|
||||||
public void should_not_check_diskspace_for_irrelevant_mounts(string path)
|
public void should_not_check_diskspace_for_irrelevant_mounts(string path)
|
||||||
{
|
{
|
||||||
var mount = new Mock<IMount>();
|
var mount = new Mock<IMount>();
|
||||||
|
|
|
@ -183,6 +183,8 @@ namespace NzbDrone.Core.Test.Download.CompletedDownloadServiceTests
|
||||||
{
|
{
|
||||||
GivenArtistMatch();
|
GivenArtistMatch();
|
||||||
|
|
||||||
|
var tracks = Builder<Track>.CreateListOfSize(3).BuildList();
|
||||||
|
|
||||||
_trackedDownload.RemoteAlbum.Albums = new List<Album>
|
_trackedDownload.RemoteAlbum.Albums = new List<Album>
|
||||||
{
|
{
|
||||||
CreateAlbum(1, 3)
|
CreateAlbum(1, 3)
|
||||||
|
@ -192,9 +194,9 @@ namespace NzbDrone.Core.Test.Download.CompletedDownloadServiceTests
|
||||||
.Setup(v => v.ProcessPath(It.IsAny<string>(), It.IsAny<ImportMode>(), It.IsAny<Artist>(), It.IsAny<DownloadClientItem>()))
|
.Setup(v => v.ProcessPath(It.IsAny<string>(), It.IsAny<ImportMode>(), It.IsAny<Artist>(), It.IsAny<DownloadClientItem>()))
|
||||||
.Returns(new List<ImportResult>
|
.Returns(new List<ImportResult>
|
||||||
{
|
{
|
||||||
new ImportResult(new ImportDecision<LocalTrack>(new LocalTrack { Path = @"C:\TestPath\Droned.S01E01.mkv".AsOsAgnostic() })),
|
new ImportResult(new ImportDecision<LocalTrack>(new LocalTrack { Path = @"C:\TestPath\Droned.S01E01.mkv".AsOsAgnostic(), Tracks = new List<Track> { tracks[0] } })),
|
||||||
new ImportResult(new ImportDecision<LocalTrack>(new LocalTrack { Path = @"C:\TestPath\Droned.S01E01.mkv".AsOsAgnostic() })),
|
new ImportResult(new ImportDecision<LocalTrack>(new LocalTrack { Path = @"C:\TestPath\Droned.S01E01.mkv".AsOsAgnostic(), Tracks = new List<Track> { tracks[1] } })),
|
||||||
new ImportResult(new ImportDecision<LocalTrack>(new LocalTrack { Path = @"C:\TestPath\Droned.S01E01.mkv".AsOsAgnostic() })),
|
new ImportResult(new ImportDecision<LocalTrack>(new LocalTrack { Path = @"C:\TestPath\Droned.S01E01.mkv".AsOsAgnostic(), Tracks = new List<Track> { tracks[2] } })),
|
||||||
new ImportResult(new ImportDecision<LocalTrack>(new LocalTrack { Path = @"C:\TestPath\Droned.S01E01.mkv".AsOsAgnostic() }), "Test Failure")
|
new ImportResult(new ImportDecision<LocalTrack>(new LocalTrack { Path = @"C:\TestPath\Droned.S01E01.mkv".AsOsAgnostic() }), "Test Failure")
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -290,6 +292,9 @@ namespace NzbDrone.Core.Test.Download.CompletedDownloadServiceTests
|
||||||
[Test]
|
[Test]
|
||||||
public void should_mark_as_imported_if_all_tracks_were_imported()
|
public void should_mark_as_imported_if_all_tracks_were_imported()
|
||||||
{
|
{
|
||||||
|
var track1 = new Track { Id = 1 };
|
||||||
|
var track2 = new Track { Id = 2 };
|
||||||
|
|
||||||
_trackedDownload.RemoteAlbum.Albums = new List<Album>
|
_trackedDownload.RemoteAlbum.Albums = new List<Album>
|
||||||
{
|
{
|
||||||
CreateAlbum(1, 2)
|
CreateAlbum(1, 2)
|
||||||
|
@ -301,11 +306,11 @@ namespace NzbDrone.Core.Test.Download.CompletedDownloadServiceTests
|
||||||
{
|
{
|
||||||
new ImportResult(
|
new ImportResult(
|
||||||
new ImportDecision<LocalTrack>(
|
new ImportDecision<LocalTrack>(
|
||||||
new LocalTrack { Path = @"C:\TestPath\Droned.S01E01.mkv".AsOsAgnostic() })),
|
new LocalTrack { Path = @"C:\TestPath\Droned.S01E01.mkv".AsOsAgnostic(), Tracks = new List<Track> { track1 } })),
|
||||||
|
|
||||||
new ImportResult(
|
new ImportResult(
|
||||||
new ImportDecision<LocalTrack>(
|
new ImportDecision<LocalTrack>(
|
||||||
new LocalTrack { Path = @"C:\TestPath\Droned.S01E02.mkv".AsOsAgnostic() }))
|
new LocalTrack { Path = @"C:\TestPath\Droned.S01E02.mkv".AsOsAgnostic(), Tracks = new List<Track> { track2 } }))
|
||||||
});
|
});
|
||||||
|
|
||||||
Subject.Import(_trackedDownload);
|
Subject.Import(_trackedDownload);
|
||||||
|
@ -367,11 +372,13 @@ namespace NzbDrone.Core.Test.Download.CompletedDownloadServiceTests
|
||||||
{
|
{
|
||||||
GivenABadlyNamedDownload();
|
GivenABadlyNamedDownload();
|
||||||
|
|
||||||
|
var track1 = new Track { Id = 1 };
|
||||||
|
|
||||||
Mocker.GetMock<IDownloadedTracksImportService>()
|
Mocker.GetMock<IDownloadedTracksImportService>()
|
||||||
.Setup(v => v.ProcessPath(It.IsAny<string>(), It.IsAny<ImportMode>(), It.IsAny<Artist>(), It.IsAny<DownloadClientItem>()))
|
.Setup(v => v.ProcessPath(It.IsAny<string>(), It.IsAny<ImportMode>(), It.IsAny<Artist>(), It.IsAny<DownloadClientItem>()))
|
||||||
.Returns(new List<ImportResult>
|
.Returns(new List<ImportResult>
|
||||||
{
|
{
|
||||||
new ImportResult(new ImportDecision<LocalTrack>(new LocalTrack { Path = @"C:\TestPath\Droned.S01E01.mkv".AsOsAgnostic() }))
|
new ImportResult(new ImportDecision<LocalTrack>(new LocalTrack { Path = @"C:\TestPath\Droned.S01E01.mkv".AsOsAgnostic(), Tracks = new List<Track> { track1 } }))
|
||||||
});
|
});
|
||||||
|
|
||||||
Mocker.GetMock<IArtistService>()
|
Mocker.GetMock<IArtistService>()
|
||||||
|
|
|
@ -99,5 +99,22 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.Blackhole
|
||||||
|
|
||||||
VerifySingleItem(DownloadItemStatus.Completed);
|
VerifySingleItem(DownloadItemStatus.Completed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestCase("@eaDir")]
|
||||||
|
[TestCase(".@__thumb")]
|
||||||
|
public void GetItems_should_not_include_special_subfolders(string folderName)
|
||||||
|
{
|
||||||
|
GivenCompletedItem();
|
||||||
|
|
||||||
|
var targetDir = Path.Combine(_completedDownloadFolder, folderName);
|
||||||
|
|
||||||
|
Mocker.GetMock<IDiskProvider>()
|
||||||
|
.Setup(c => c.GetDirectories(_completedDownloadFolder))
|
||||||
|
.Returns(new[] { targetDir });
|
||||||
|
|
||||||
|
var items = Subject.GetItems(_completedDownloadFolder, TimeSpan.FromMilliseconds(50)).ToList();
|
||||||
|
|
||||||
|
items.Count.Should().Be(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,6 +76,19 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
|
||||||
Subject.Check().ShouldBeWarning(wikiFragment: "downloads-in-root-folder");
|
Subject.Check().ShouldBeWarning(wikiFragment: "downloads-in-root-folder");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void should_return_warning_if_downloading_inside_root_folder()
|
||||||
|
{
|
||||||
|
var rootFolderPath = "c:\\Test".AsOsAgnostic();
|
||||||
|
var downloadRootPath = "c:\\Test\\Downloads".AsOsAgnostic();
|
||||||
|
|
||||||
|
GivenRootFolder(rootFolderPath);
|
||||||
|
|
||||||
|
_clientStatus.OutputRootFolders = new List<OsPath> { new (downloadRootPath) };
|
||||||
|
|
||||||
|
Subject.Check().ShouldBeWarning();
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void should_return_ok_if_not_downloading_to_root_folder()
|
public void should_return_ok_if_not_downloading_to_root_folder()
|
||||||
{
|
{
|
||||||
|
@ -87,7 +100,7 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[TestCaseSource("DownloadClientExceptions")]
|
[TestCaseSource(nameof(DownloadClientExceptions))]
|
||||||
public void should_return_ok_if_client_throws_downloadclientexception(Exception ex)
|
public void should_return_ok_if_client_throws_downloadclientexception(Exception ex)
|
||||||
{
|
{
|
||||||
_downloadClient.Setup(s => s.GetStatus())
|
_downloadClient.Setup(s => s.GetStatus())
|
||||||
|
|
|
@ -80,7 +80,7 @@ namespace NzbDrone.Core.Test.ImportListTests
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[Ignore("Pending mapping fixes", Until = "2025-04-20 00:00:00Z")]
|
[Ignore("Pending mapping fixes", Until = "2025-10-20 00:00:00Z")]
|
||||||
public void map_artist_should_work()
|
public void map_artist_should_work()
|
||||||
{
|
{
|
||||||
UseRealHttp();
|
UseRealHttp();
|
||||||
|
@ -159,7 +159,7 @@ namespace NzbDrone.Core.Test.ImportListTests
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[Ignore("Pending mapping fixes", Until = "2025-04-20 00:00:00Z")]
|
[Ignore("Pending mapping fixes", Until = "2025-10-20 00:00:00Z")]
|
||||||
public void map_album_should_work()
|
public void map_album_should_work()
|
||||||
{
|
{
|
||||||
UseRealHttp();
|
UseRealHttp();
|
||||||
|
|
|
@ -14,6 +14,7 @@ using NzbDrone.Core.Test.Framework;
|
||||||
namespace NzbDrone.Core.Test.MetadataSource.SkyHook
|
namespace NzbDrone.Core.Test.MetadataSource.SkyHook
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
|
[Ignore("Waiting for metadata to be back again", Until = "2025-09-01 00:00:00Z")]
|
||||||
public class SkyHookProxyFixture : CoreTest<SkyHookProxy>
|
public class SkyHookProxyFixture : CoreTest<SkyHookProxy>
|
||||||
{
|
{
|
||||||
private MetadataProfile _metadataProfile;
|
private MetadataProfile _metadataProfile;
|
||||||
|
|
|
@ -12,6 +12,7 @@ using NzbDrone.Test.Common;
|
||||||
namespace NzbDrone.Core.Test.MetadataSource.SkyHook
|
namespace NzbDrone.Core.Test.MetadataSource.SkyHook
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
|
[Ignore("Waiting for metadata to be back again", Until = "2025-09-01 00:00:00Z")]
|
||||||
public class SkyHookProxySearchFixture : CoreTest<SkyHookProxy>
|
public class SkyHookProxySearchFixture : CoreTest<SkyHookProxy>
|
||||||
{
|
{
|
||||||
[SetUp]
|
[SetUp]
|
||||||
|
|
|
@ -64,7 +64,7 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestCase("Florence + the Machine", "Florence + the Machine")]
|
[TestCase("Florence + the Machine", "Florence + the Machine")]
|
||||||
[TestCase("Beyoncé X10", "Beyoncé X10")]
|
[TestCase("Beyoncé X10", "Beyonce X10")]
|
||||||
[TestCase("Girlfriends' Guide to Divorce", "Girlfriends Guide to Divorce")]
|
[TestCase("Girlfriends' Guide to Divorce", "Girlfriends Guide to Divorce")]
|
||||||
[TestCase("Rule #23: Never Lie to the Kids", "Rule #23 Never Lie to the Kids")]
|
[TestCase("Rule #23: Never Lie to the Kids", "Rule #23 Never Lie to the Kids")]
|
||||||
[TestCase("Anne Hathaway/Florence + The Machine", "Anne Hathaway Florence + The Machine")]
|
[TestCase("Anne Hathaway/Florence + The Machine", "Anne Hathaway Florence + The Machine")]
|
||||||
|
@ -81,6 +81,7 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
|
||||||
[TestCase("[a] title", "a title")]
|
[TestCase("[a] title", "a title")]
|
||||||
[TestCase("backslash \\ backlash", "backslash backlash")]
|
[TestCase("backslash \\ backlash", "backslash backlash")]
|
||||||
[TestCase("I'm the Boss", "Im the Boss")]
|
[TestCase("I'm the Boss", "Im the Boss")]
|
||||||
|
[TestCase("Joker: Folie à deux", "Joker Folie a deux")]
|
||||||
public void should_get_expected_title_back(string name, string expected)
|
public void should_get_expected_title_back(string name, string expected)
|
||||||
{
|
{
|
||||||
_artist.Name = name;
|
_artist.Name = name;
|
||||||
|
|
|
@ -129,6 +129,9 @@ namespace NzbDrone.Core.Test.ParserTests
|
||||||
[TestCase("Green Day - Father Of All [FLAC (M4A) 24-bit Lossless]", null, 0, 0)]
|
[TestCase("Green Day - Father Of All [FLAC (M4A) 24-bit Lossless]", null, 0, 0)]
|
||||||
[TestCase("Green_Day-Father_Of_All_FLAC_M4A_24_bit_Lossless", null, 0, 0)]
|
[TestCase("Green_Day-Father_Of_All_FLAC_M4A_24_bit_Lossless", null, 0, 0)]
|
||||||
[TestCase("Green.Day-Father.Of.All.FLAC.M4A.24.bit.Lossless", null, 0, 0)]
|
[TestCase("Green.Day-Father.Of.All.FLAC.M4A.24.bit.Lossless", null, 0, 0)]
|
||||||
|
[TestCase("Linkin Park - Studio Collection 2000-2012 (2013) [WEB FLAC24-44.1]", null, 0, 0)]
|
||||||
|
[TestCase("Linkin Park - Studio Collection 2000-2012 (2013) [WEB FLAC24bit]", null, 0, 0)]
|
||||||
|
[TestCase("Linkin Park - Studio Collection 2000-2012 (2013) [WEB FLAC24-bit]", null, 0, 0)]
|
||||||
public void should_parse_flac_24bit_quality(string title, string desc, int bitrate, int sampleSize)
|
public void should_parse_flac_24bit_quality(string title, string desc, int bitrate, int sampleSize)
|
||||||
{
|
{
|
||||||
ParseAndVerifyQuality(title, desc, bitrate, Quality.FLAC_24, sampleSize);
|
ParseAndVerifyQuality(title, desc, bitrate, Quality.FLAC_24, sampleSize);
|
||||||
|
|
|
@ -185,7 +185,9 @@ namespace NzbDrone.Core.Blocklisting
|
||||||
Indexer = message.Data.GetValueOrDefault("indexer"),
|
Indexer = message.Data.GetValueOrDefault("indexer"),
|
||||||
Protocol = (DownloadProtocol)Convert.ToInt32(message.Data.GetValueOrDefault("protocol")),
|
Protocol = (DownloadProtocol)Convert.ToInt32(message.Data.GetValueOrDefault("protocol")),
|
||||||
Message = message.Message,
|
Message = message.Message,
|
||||||
TorrentInfoHash = message.Data.GetValueOrDefault("torrentInfoHash")
|
TorrentInfoHash = message.TrackedDownload?.Protocol == DownloadProtocol.Torrent
|
||||||
|
? message.TrackedDownload.DownloadItem.DownloadId
|
||||||
|
: message.Data.GetValueOrDefault("torrentInfoHash", null)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Enum.TryParse(message.Data.GetValueOrDefault("indexerFlags"), true, out IndexerFlags flags))
|
if (Enum.TryParse(message.Data.GetValueOrDefault("indexerFlags"), true, out IndexerFlags flags))
|
||||||
|
|
|
@ -263,7 +263,21 @@ namespace NzbDrone.Core.Configuration
|
||||||
}
|
}
|
||||||
|
|
||||||
public string UiFolder => BuildInfo.IsDebug ? Path.Combine("..", "UI") : "UI";
|
public string UiFolder => BuildInfo.IsDebug ? Path.Combine("..", "UI") : "UI";
|
||||||
public string InstanceName => _appOptions.InstanceName ?? GetValue("InstanceName", BuildInfo.AppName);
|
|
||||||
|
public string InstanceName
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var instanceName = _appOptions.InstanceName ?? GetValue("InstanceName", BuildInfo.AppName);
|
||||||
|
|
||||||
|
if (instanceName.Contains(BuildInfo.AppName, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return instanceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
return BuildInfo.AppName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public bool UpdateAutomatically => _updateOptions.Automatically ?? GetValueBoolean("UpdateAutomatically", OsInfo.IsWindows, false);
|
public bool UpdateAutomatically => _updateOptions.Automatically ?? GetValueBoolean("UpdateAutomatically", OsInfo.IsWindows, false);
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ namespace NzbDrone.Core.CustomFormats
|
||||||
{
|
{
|
||||||
RuleFor(c => c.Min).GreaterThanOrEqualTo(0);
|
RuleFor(c => c.Min).GreaterThanOrEqualTo(0);
|
||||||
RuleFor(c => c.Max).GreaterThan(c => c.Min);
|
RuleFor(c => c.Max).GreaterThan(c => c.Min);
|
||||||
|
RuleFor(c => c.Max).LessThanOrEqualTo(double.MaxValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -252,7 +252,7 @@ namespace NzbDrone.Core.Datastore
|
||||||
|
|
||||||
protected void Delete(SqlBuilder builder)
|
protected void Delete(SqlBuilder builder)
|
||||||
{
|
{
|
||||||
var sql = builder.AddDeleteTemplate(typeof(TModel)).LogQuery();
|
var sql = builder.AddDeleteTemplate(typeof(TModel));
|
||||||
|
|
||||||
using (var conn = _database.OpenConnection())
|
using (var conn = _database.OpenConnection())
|
||||||
{
|
{
|
||||||
|
|
|
@ -163,7 +163,7 @@ namespace NzbDrone.Core.DecisionEngine
|
||||||
return 10;
|
return 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return Math.Round(Math.Log10(age)) * -1;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SpecificationPriority Priority => SpecificationPriority.Default;
|
public SpecificationPriority Priority => SpecificationPriority.Disk;
|
||||||
public RejectionType Type => RejectionType.Permanent;
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
|
|
||||||
public Decision IsSatisfiedBy(RemoteAlbum subject, SearchCriteriaBase searchCriteria)
|
public Decision IsSatisfiedBy(RemoteAlbum subject, SearchCriteriaBase searchCriteria)
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace NzbDrone.Core.DiskSpace
|
||||||
private readonly IRootFolderService _rootFolderService;
|
private readonly IRootFolderService _rootFolderService;
|
||||||
private readonly Logger _logger;
|
private readonly Logger _logger;
|
||||||
|
|
||||||
private static readonly Regex _regexSpecialDrive = new Regex("^/var/lib/(docker|rancher|kubelet)(/|$)|^/(boot|etc)(/|$)|/docker(/var)?/aufs(/|$)", RegexOptions.Compiled);
|
private static readonly Regex _regexSpecialDrive = new Regex(@"^/var/lib/(docker|rancher|kubelet)(/|$)|^/(boot|etc)(/|$)|/docker(/var)?/aufs(/|$)|/\.timemachine", RegexOptions.Compiled);
|
||||||
|
|
||||||
public DiskSpaceService(IDiskProvider diskProvider,
|
public DiskSpaceService(IDiskProvider diskProvider,
|
||||||
IRootFolderService rootFolderService,
|
IRootFolderService rootFolderService,
|
||||||
|
@ -38,7 +38,10 @@ namespace NzbDrone.Core.DiskSpace
|
||||||
|
|
||||||
var optionalRootFolders = GetFixedDisksRootPaths().Except(importantRootFolders).Distinct().ToList();
|
var optionalRootFolders = GetFixedDisksRootPaths().Except(importantRootFolders).Distinct().ToList();
|
||||||
|
|
||||||
var diskSpace = GetDiskSpace(importantRootFolders).Concat(GetDiskSpace(optionalRootFolders, true)).ToList();
|
var diskSpace = GetDiskSpace(importantRootFolders)
|
||||||
|
.Concat(GetDiskSpace(optionalRootFolders, true))
|
||||||
|
.OrderBy(d => d.Path, StringComparer.OrdinalIgnoreCase)
|
||||||
|
.ToList();
|
||||||
|
|
||||||
return diskSpace;
|
return diskSpace;
|
||||||
}
|
}
|
||||||
|
@ -54,7 +57,7 @@ namespace NzbDrone.Core.DiskSpace
|
||||||
private IEnumerable<string> GetFixedDisksRootPaths()
|
private IEnumerable<string> GetFixedDisksRootPaths()
|
||||||
{
|
{
|
||||||
return _diskProvider.GetMounts()
|
return _diskProvider.GetMounts()
|
||||||
.Where(d => d.DriveType == DriveType.Fixed)
|
.Where(d => d.DriveType is DriveType.Fixed or DriveType.Network)
|
||||||
.Where(d => !_regexSpecialDrive.IsMatch(d.RootDirectory))
|
.Where(d => !_regexSpecialDrive.IsMatch(d.RootDirectory))
|
||||||
.Select(d => d.RootDirectory);
|
.Select(d => d.RootDirectory);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,11 @@ namespace NzbDrone.Core.Download.Aggregation
|
||||||
|
|
||||||
public RemoteAlbum Augment(RemoteAlbum remoteAlbum)
|
public RemoteAlbum Augment(RemoteAlbum remoteAlbum)
|
||||||
{
|
{
|
||||||
|
if (remoteAlbum == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var augmenter in _augmenters)
|
foreach (var augmenter in _augmenters)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
|
@ -9,6 +9,7 @@ using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Common.Http;
|
using NzbDrone.Common.Http;
|
||||||
using NzbDrone.Core.Blocklisting;
|
using NzbDrone.Core.Blocklisting;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
|
using NzbDrone.Core.Localization;
|
||||||
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
||||||
using NzbDrone.Core.Parser.Model;
|
using NzbDrone.Core.Parser.Model;
|
||||||
using NzbDrone.Core.RemotePathMappings;
|
using NzbDrone.Core.RemotePathMappings;
|
||||||
|
@ -28,9 +29,10 @@ namespace NzbDrone.Core.Download.Clients.Aria2
|
||||||
IConfigService configService,
|
IConfigService configService,
|
||||||
IDiskProvider diskProvider,
|
IDiskProvider diskProvider,
|
||||||
IRemotePathMappingService remotePathMappingService,
|
IRemotePathMappingService remotePathMappingService,
|
||||||
|
ILocalizationService localizationService,
|
||||||
IBlocklistService blocklistService,
|
IBlocklistService blocklistService,
|
||||||
Logger logger)
|
Logger logger)
|
||||||
: base(torrentFileInfoReader, httpClient, configService, diskProvider, remotePathMappingService, blocklistService, logger)
|
: base(torrentFileInfoReader, httpClient, configService, diskProvider, remotePathMappingService, localizationService, blocklistService, logger)
|
||||||
{
|
{
|
||||||
_proxy = proxy;
|
_proxy = proxy;
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,13 @@ namespace NzbDrone.Core.Download.Clients.Blackhole
|
||||||
{
|
{
|
||||||
foreach (var folder in _diskScanService.FilterPaths(watchFolder, _diskProvider.GetDirectories(watchFolder)))
|
foreach (var folder in _diskScanService.FilterPaths(watchFolder, _diskProvider.GetDirectories(watchFolder)))
|
||||||
{
|
{
|
||||||
var title = FileNameBuilder.CleanFileName(Path.GetFileName(folder));
|
var folderName = Path.GetFileName(folder);
|
||||||
|
var title = FileNameBuilder.CleanFileName(folderName);
|
||||||
|
|
||||||
|
if (SpecialFolders.IsSpecialFolder(folderName))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
var newWatchItem = new WatchFolderItem
|
var newWatchItem = new WatchFolderItem
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,6 +9,7 @@ using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Common.Http;
|
using NzbDrone.Common.Http;
|
||||||
using NzbDrone.Core.Blocklisting;
|
using NzbDrone.Core.Blocklisting;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
|
using NzbDrone.Core.Localization;
|
||||||
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
||||||
using NzbDrone.Core.Organizer;
|
using NzbDrone.Core.Organizer;
|
||||||
using NzbDrone.Core.Parser.Model;
|
using NzbDrone.Core.Parser.Model;
|
||||||
|
@ -30,9 +31,10 @@ namespace NzbDrone.Core.Download.Clients.Blackhole
|
||||||
IConfigService configService,
|
IConfigService configService,
|
||||||
IDiskProvider diskProvider,
|
IDiskProvider diskProvider,
|
||||||
IRemotePathMappingService remotePathMappingService,
|
IRemotePathMappingService remotePathMappingService,
|
||||||
|
ILocalizationService localizationService,
|
||||||
IBlocklistService blocklistService,
|
IBlocklistService blocklistService,
|
||||||
Logger logger)
|
Logger logger)
|
||||||
: base(torrentFileInfoReader, httpClient, configService, diskProvider, remotePathMappingService, blocklistService, logger)
|
: base(torrentFileInfoReader, httpClient, configService, diskProvider, remotePathMappingService, localizationService, blocklistService, logger)
|
||||||
{
|
{
|
||||||
_scanWatchFolder = scanWatchFolder;
|
_scanWatchFolder = scanWatchFolder;
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ using NzbDrone.Common.Disk;
|
||||||
using NzbDrone.Common.Extensions;
|
using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Common.Http;
|
using NzbDrone.Common.Http;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
|
using NzbDrone.Core.Localization;
|
||||||
using NzbDrone.Core.Organizer;
|
using NzbDrone.Core.Organizer;
|
||||||
using NzbDrone.Core.Parser.Model;
|
using NzbDrone.Core.Parser.Model;
|
||||||
using NzbDrone.Core.RemotePathMappings;
|
using NzbDrone.Core.RemotePathMappings;
|
||||||
|
@ -25,8 +26,9 @@ namespace NzbDrone.Core.Download.Clients.Blackhole
|
||||||
IDiskProvider diskProvider,
|
IDiskProvider diskProvider,
|
||||||
IRemotePathMappingService remotePathMappingService,
|
IRemotePathMappingService remotePathMappingService,
|
||||||
IValidateNzbs nzbValidationService,
|
IValidateNzbs nzbValidationService,
|
||||||
|
ILocalizationService localizationService,
|
||||||
Logger logger)
|
Logger logger)
|
||||||
: base(httpClient, configService, diskProvider, remotePathMappingService, nzbValidationService, logger)
|
: base(httpClient, configService, diskProvider, remotePathMappingService, nzbValidationService, localizationService, logger)
|
||||||
{
|
{
|
||||||
_scanWatchFolder = scanWatchFolder;
|
_scanWatchFolder = scanWatchFolder;
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Common.Http;
|
using NzbDrone.Common.Http;
|
||||||
using NzbDrone.Core.Blocklisting;
|
using NzbDrone.Core.Blocklisting;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
|
using NzbDrone.Core.Localization;
|
||||||
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
||||||
using NzbDrone.Core.Parser.Model;
|
using NzbDrone.Core.Parser.Model;
|
||||||
using NzbDrone.Core.RemotePathMappings;
|
using NzbDrone.Core.RemotePathMappings;
|
||||||
|
@ -27,9 +28,10 @@ namespace NzbDrone.Core.Download.Clients.Deluge
|
||||||
IConfigService configService,
|
IConfigService configService,
|
||||||
IDiskProvider diskProvider,
|
IDiskProvider diskProvider,
|
||||||
IRemotePathMappingService remotePathMappingService,
|
IRemotePathMappingService remotePathMappingService,
|
||||||
|
ILocalizationService localizationService,
|
||||||
IBlocklistService blocklistService,
|
IBlocklistService blocklistService,
|
||||||
Logger logger)
|
Logger logger)
|
||||||
: base(torrentFileInfoReader, httpClient, configService, diskProvider, remotePathMappingService, blocklistService, logger)
|
: base(torrentFileInfoReader, httpClient, configService, diskProvider, remotePathMappingService, localizationService, blocklistService, logger)
|
||||||
{
|
{
|
||||||
_proxy = proxy;
|
_proxy = proxy;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ using NzbDrone.Common.Http;
|
||||||
using NzbDrone.Core.Blocklisting;
|
using NzbDrone.Core.Blocklisting;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
using NzbDrone.Core.Download.Clients.DownloadStation.Proxies;
|
using NzbDrone.Core.Download.Clients.DownloadStation.Proxies;
|
||||||
|
using NzbDrone.Core.Localization;
|
||||||
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
||||||
using NzbDrone.Core.Parser.Model;
|
using NzbDrone.Core.Parser.Model;
|
||||||
using NzbDrone.Core.RemotePathMappings;
|
using NzbDrone.Core.RemotePathMappings;
|
||||||
|
@ -37,9 +38,10 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation
|
||||||
IConfigService configService,
|
IConfigService configService,
|
||||||
IDiskProvider diskProvider,
|
IDiskProvider diskProvider,
|
||||||
IRemotePathMappingService remotePathMappingService,
|
IRemotePathMappingService remotePathMappingService,
|
||||||
|
ILocalizationService localizationService,
|
||||||
IBlocklistService blocklistService,
|
IBlocklistService blocklistService,
|
||||||
Logger logger)
|
Logger logger)
|
||||||
: base(torrentFileInfoReader, httpClient, configService, diskProvider, remotePathMappingService, blocklistService, logger)
|
: base(torrentFileInfoReader, httpClient, configService, diskProvider, remotePathMappingService, localizationService, blocklistService, logger)
|
||||||
{
|
{
|
||||||
_dsInfoProxy = dsInfoProxy;
|
_dsInfoProxy = dsInfoProxy;
|
||||||
_dsTaskProxySelector = dsTaskProxySelector;
|
_dsTaskProxySelector = dsTaskProxySelector;
|
||||||
|
|
|
@ -9,6 +9,7 @@ using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Common.Http;
|
using NzbDrone.Common.Http;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
using NzbDrone.Core.Download.Clients.DownloadStation.Proxies;
|
using NzbDrone.Core.Download.Clients.DownloadStation.Proxies;
|
||||||
|
using NzbDrone.Core.Localization;
|
||||||
using NzbDrone.Core.Parser.Model;
|
using NzbDrone.Core.Parser.Model;
|
||||||
using NzbDrone.Core.RemotePathMappings;
|
using NzbDrone.Core.RemotePathMappings;
|
||||||
using NzbDrone.Core.ThingiProvider;
|
using NzbDrone.Core.ThingiProvider;
|
||||||
|
@ -34,8 +35,9 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation
|
||||||
IDiskProvider diskProvider,
|
IDiskProvider diskProvider,
|
||||||
IRemotePathMappingService remotePathMappingService,
|
IRemotePathMappingService remotePathMappingService,
|
||||||
IValidateNzbs nzbValidationService,
|
IValidateNzbs nzbValidationService,
|
||||||
|
ILocalizationService localizationService,
|
||||||
Logger logger)
|
Logger logger)
|
||||||
: base(httpClient, configService, diskProvider, remotePathMappingService, nzbValidationService, logger)
|
: base(httpClient, configService, diskProvider, remotePathMappingService, nzbValidationService, localizationService, logger)
|
||||||
{
|
{
|
||||||
_dsInfoProxy = dsInfoProxy;
|
_dsInfoProxy = dsInfoProxy;
|
||||||
_dsTaskProxySelector = dsTaskProxySelector;
|
_dsTaskProxySelector = dsTaskProxySelector;
|
||||||
|
|
|
@ -9,6 +9,7 @@ using NzbDrone.Common.Http;
|
||||||
using NzbDrone.Core.Blocklisting;
|
using NzbDrone.Core.Blocklisting;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
using NzbDrone.Core.Download.Clients.Flood.Models;
|
using NzbDrone.Core.Download.Clients.Flood.Models;
|
||||||
|
using NzbDrone.Core.Localization;
|
||||||
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
||||||
using NzbDrone.Core.Parser.Model;
|
using NzbDrone.Core.Parser.Model;
|
||||||
using NzbDrone.Core.RemotePathMappings;
|
using NzbDrone.Core.RemotePathMappings;
|
||||||
|
@ -28,9 +29,10 @@ namespace NzbDrone.Core.Download.Clients.Flood
|
||||||
IConfigService configService,
|
IConfigService configService,
|
||||||
IDiskProvider diskProvider,
|
IDiskProvider diskProvider,
|
||||||
IRemotePathMappingService remotePathMappingService,
|
IRemotePathMappingService remotePathMappingService,
|
||||||
|
ILocalizationService localizationService,
|
||||||
IBlocklistService blocklistService,
|
IBlocklistService blocklistService,
|
||||||
Logger logger)
|
Logger logger)
|
||||||
: base(torrentFileInfoReader, httpClient, configService, diskProvider, remotePathMappingService, blocklistService, logger)
|
: base(torrentFileInfoReader, httpClient, configService, diskProvider, remotePathMappingService, localizationService, blocklistService, logger)
|
||||||
{
|
{
|
||||||
_proxy = proxy;
|
_proxy = proxy;
|
||||||
_downloadSeedConfigProvider = downloadSeedConfigProvider;
|
_downloadSeedConfigProvider = downloadSeedConfigProvider;
|
||||||
|
|
|
@ -9,6 +9,7 @@ using NzbDrone.Common.Http;
|
||||||
using NzbDrone.Core.Blocklisting;
|
using NzbDrone.Core.Blocklisting;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
using NzbDrone.Core.Download.Clients.FreeboxDownload.Responses;
|
using NzbDrone.Core.Download.Clients.FreeboxDownload.Responses;
|
||||||
|
using NzbDrone.Core.Localization;
|
||||||
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
||||||
using NzbDrone.Core.Parser.Model;
|
using NzbDrone.Core.Parser.Model;
|
||||||
using NzbDrone.Core.RemotePathMappings;
|
using NzbDrone.Core.RemotePathMappings;
|
||||||
|
@ -25,9 +26,10 @@ namespace NzbDrone.Core.Download.Clients.FreeboxDownload
|
||||||
IConfigService configService,
|
IConfigService configService,
|
||||||
IDiskProvider diskProvider,
|
IDiskProvider diskProvider,
|
||||||
IRemotePathMappingService remotePathMappingService,
|
IRemotePathMappingService remotePathMappingService,
|
||||||
|
ILocalizationService localizationService,
|
||||||
IBlocklistService blocklistService,
|
IBlocklistService blocklistService,
|
||||||
Logger logger)
|
Logger logger)
|
||||||
: base(torrentFileInfoReader, httpClient, configService, diskProvider, remotePathMappingService, blocklistService, logger)
|
: base(torrentFileInfoReader, httpClient, configService, diskProvider, remotePathMappingService, localizationService, blocklistService, logger)
|
||||||
{
|
{
|
||||||
_proxy = proxy;
|
_proxy = proxy;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ using NzbDrone.Common.Http;
|
||||||
using NzbDrone.Core.Blocklisting;
|
using NzbDrone.Core.Blocklisting;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
using NzbDrone.Core.Download.Clients.Hadouken.Models;
|
using NzbDrone.Core.Download.Clients.Hadouken.Models;
|
||||||
|
using NzbDrone.Core.Localization;
|
||||||
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
||||||
using NzbDrone.Core.Parser.Model;
|
using NzbDrone.Core.Parser.Model;
|
||||||
using NzbDrone.Core.RemotePathMappings;
|
using NzbDrone.Core.RemotePathMappings;
|
||||||
|
@ -25,9 +26,10 @@ namespace NzbDrone.Core.Download.Clients.Hadouken
|
||||||
IConfigService configService,
|
IConfigService configService,
|
||||||
IDiskProvider diskProvider,
|
IDiskProvider diskProvider,
|
||||||
IRemotePathMappingService remotePathMappingService,
|
IRemotePathMappingService remotePathMappingService,
|
||||||
|
ILocalizationService localizationService,
|
||||||
IBlocklistService blocklistService,
|
IBlocklistService blocklistService,
|
||||||
Logger logger)
|
Logger logger)
|
||||||
: base(torrentFileInfoReader, httpClient, configService, diskProvider, remotePathMappingService, blocklistService, logger)
|
: base(torrentFileInfoReader, httpClient, configService, diskProvider, remotePathMappingService, localizationService, blocklistService, logger)
|
||||||
{
|
{
|
||||||
_proxy = proxy;
|
_proxy = proxy;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ using NzbDrone.Common.Disk;
|
||||||
using NzbDrone.Common.Extensions;
|
using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Common.Http;
|
using NzbDrone.Common.Http;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
|
using NzbDrone.Core.Localization;
|
||||||
using NzbDrone.Core.Parser.Model;
|
using NzbDrone.Core.Parser.Model;
|
||||||
using NzbDrone.Core.RemotePathMappings;
|
using NzbDrone.Core.RemotePathMappings;
|
||||||
using NzbDrone.Core.Validation;
|
using NzbDrone.Core.Validation;
|
||||||
|
@ -24,8 +25,9 @@ namespace NzbDrone.Core.Download.Clients.NzbVortex
|
||||||
IDiskProvider diskProvider,
|
IDiskProvider diskProvider,
|
||||||
IRemotePathMappingService remotePathMappingService,
|
IRemotePathMappingService remotePathMappingService,
|
||||||
IValidateNzbs nzbValidationService,
|
IValidateNzbs nzbValidationService,
|
||||||
|
ILocalizationService localizationService,
|
||||||
Logger logger)
|
Logger logger)
|
||||||
: base(httpClient, configService, diskProvider, remotePathMappingService, nzbValidationService, logger)
|
: base(httpClient, configService, diskProvider, remotePathMappingService, nzbValidationService, localizationService, logger)
|
||||||
{
|
{
|
||||||
_proxy = proxy;
|
_proxy = proxy;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Common.Http;
|
using NzbDrone.Common.Http;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
using NzbDrone.Core.Exceptions;
|
using NzbDrone.Core.Exceptions;
|
||||||
|
using NzbDrone.Core.Localization;
|
||||||
using NzbDrone.Core.Parser.Model;
|
using NzbDrone.Core.Parser.Model;
|
||||||
using NzbDrone.Core.RemotePathMappings;
|
using NzbDrone.Core.RemotePathMappings;
|
||||||
using NzbDrone.Core.Validation;
|
using NzbDrone.Core.Validation;
|
||||||
|
@ -28,8 +29,9 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
|
||||||
IDiskProvider diskProvider,
|
IDiskProvider diskProvider,
|
||||||
IRemotePathMappingService remotePathMappingService,
|
IRemotePathMappingService remotePathMappingService,
|
||||||
IValidateNzbs nzbValidationService,
|
IValidateNzbs nzbValidationService,
|
||||||
|
ILocalizationService localizationService,
|
||||||
Logger logger)
|
Logger logger)
|
||||||
: base(httpClient, configService, diskProvider, remotePathMappingService, nzbValidationService, logger)
|
: base(httpClient, configService, diskProvider, remotePathMappingService, nzbValidationService, localizationService, logger)
|
||||||
{
|
{
|
||||||
_proxy = proxy;
|
_proxy = proxy;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Common.Http;
|
using NzbDrone.Common.Http;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
using NzbDrone.Core.Indexers;
|
using NzbDrone.Core.Indexers;
|
||||||
|
using NzbDrone.Core.Localization;
|
||||||
using NzbDrone.Core.Organizer;
|
using NzbDrone.Core.Organizer;
|
||||||
using NzbDrone.Core.Parser.Model;
|
using NzbDrone.Core.Parser.Model;
|
||||||
using NzbDrone.Core.RemotePathMappings;
|
using NzbDrone.Core.RemotePathMappings;
|
||||||
|
@ -23,8 +24,9 @@ namespace NzbDrone.Core.Download.Clients.Pneumatic
|
||||||
IConfigService configService,
|
IConfigService configService,
|
||||||
IDiskProvider diskProvider,
|
IDiskProvider diskProvider,
|
||||||
IRemotePathMappingService remotePathMappingService,
|
IRemotePathMappingService remotePathMappingService,
|
||||||
|
ILocalizationService localizationService,
|
||||||
Logger logger)
|
Logger logger)
|
||||||
: base(configService, diskProvider, remotePathMappingService, logger)
|
: base(configService, diskProvider, remotePathMappingService, localizationService, logger)
|
||||||
{
|
{
|
||||||
_httpClient = httpClient;
|
_httpClient = httpClient;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Common.Http;
|
using NzbDrone.Common.Http;
|
||||||
using NzbDrone.Core.Blocklisting;
|
using NzbDrone.Core.Blocklisting;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
|
using NzbDrone.Core.Localization;
|
||||||
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
||||||
using NzbDrone.Core.Parser.Model;
|
using NzbDrone.Core.Parser.Model;
|
||||||
using NzbDrone.Core.RemotePathMappings;
|
using NzbDrone.Core.RemotePathMappings;
|
||||||
|
@ -35,9 +36,10 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
|
||||||
IDiskProvider diskProvider,
|
IDiskProvider diskProvider,
|
||||||
IRemotePathMappingService remotePathMappingService,
|
IRemotePathMappingService remotePathMappingService,
|
||||||
ICacheManager cacheManager,
|
ICacheManager cacheManager,
|
||||||
|
ILocalizationService localizationService,
|
||||||
IBlocklistService blocklistService,
|
IBlocklistService blocklistService,
|
||||||
Logger logger)
|
Logger logger)
|
||||||
: base(torrentFileInfoReader, httpClient, configService, diskProvider, remotePathMappingService, blocklistService, logger)
|
: base(torrentFileInfoReader, httpClient, configService, diskProvider, remotePathMappingService, localizationService, blocklistService, logger)
|
||||||
{
|
{
|
||||||
_proxySelector = proxySelector;
|
_proxySelector = proxySelector;
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Common.Http;
|
using NzbDrone.Common.Http;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
using NzbDrone.Core.Exceptions;
|
using NzbDrone.Core.Exceptions;
|
||||||
|
using NzbDrone.Core.Localization;
|
||||||
using NzbDrone.Core.Parser.Model;
|
using NzbDrone.Core.Parser.Model;
|
||||||
using NzbDrone.Core.RemotePathMappings;
|
using NzbDrone.Core.RemotePathMappings;
|
||||||
using NzbDrone.Core.Validation;
|
using NzbDrone.Core.Validation;
|
||||||
|
@ -26,8 +27,9 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
|
||||||
IDiskProvider diskProvider,
|
IDiskProvider diskProvider,
|
||||||
IRemotePathMappingService remotePathMappingService,
|
IRemotePathMappingService remotePathMappingService,
|
||||||
IValidateNzbs nzbValidationService,
|
IValidateNzbs nzbValidationService,
|
||||||
|
ILocalizationService localizationService,
|
||||||
Logger logger)
|
Logger logger)
|
||||||
: base(httpClient, configService, diskProvider, remotePathMappingService, nzbValidationService, logger)
|
: base(httpClient, configService, diskProvider, remotePathMappingService, nzbValidationService, localizationService, logger)
|
||||||
{
|
{
|
||||||
_proxy = proxy;
|
_proxy = proxy;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Common.Http;
|
using NzbDrone.Common.Http;
|
||||||
using NzbDrone.Core.Blocklisting;
|
using NzbDrone.Core.Blocklisting;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
|
using NzbDrone.Core.Localization;
|
||||||
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
||||||
using NzbDrone.Core.RemotePathMappings;
|
using NzbDrone.Core.RemotePathMappings;
|
||||||
|
|
||||||
|
@ -24,9 +25,10 @@ namespace NzbDrone.Core.Download.Clients.Transmission
|
||||||
IConfigService configService,
|
IConfigService configService,
|
||||||
IDiskProvider diskProvider,
|
IDiskProvider diskProvider,
|
||||||
IRemotePathMappingService remotePathMappingService,
|
IRemotePathMappingService remotePathMappingService,
|
||||||
|
ILocalizationService localizationService,
|
||||||
IBlocklistService blocklistService,
|
IBlocklistService blocklistService,
|
||||||
Logger logger)
|
Logger logger)
|
||||||
: base(proxy, torrentFileInfoReader, httpClient, configService, diskProvider, remotePathMappingService, blocklistService, logger)
|
: base(proxy, torrentFileInfoReader, httpClient, configService, diskProvider, remotePathMappingService, localizationService, blocklistService, logger)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Common.Http;
|
using NzbDrone.Common.Http;
|
||||||
using NzbDrone.Core.Blocklisting;
|
using NzbDrone.Core.Blocklisting;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
|
using NzbDrone.Core.Localization;
|
||||||
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
||||||
using NzbDrone.Core.Parser.Model;
|
using NzbDrone.Core.Parser.Model;
|
||||||
using NzbDrone.Core.RemotePathMappings;
|
using NzbDrone.Core.RemotePathMappings;
|
||||||
|
@ -28,9 +29,10 @@ namespace NzbDrone.Core.Download.Clients.Transmission
|
||||||
IConfigService configService,
|
IConfigService configService,
|
||||||
IDiskProvider diskProvider,
|
IDiskProvider diskProvider,
|
||||||
IRemotePathMappingService remotePathMappingService,
|
IRemotePathMappingService remotePathMappingService,
|
||||||
|
ILocalizationService localizationService,
|
||||||
IBlocklistService blocklistService,
|
IBlocklistService blocklistService,
|
||||||
Logger logger)
|
Logger logger)
|
||||||
: base(torrentFileInfoReader, httpClient, configService, diskProvider, remotePathMappingService, blocklistService, logger)
|
: base(torrentFileInfoReader, httpClient, configService, diskProvider, remotePathMappingService, localizationService, blocklistService, logger)
|
||||||
{
|
{
|
||||||
_proxy = proxy;
|
_proxy = proxy;
|
||||||
}
|
}
|
||||||
|
@ -101,7 +103,11 @@ namespace NzbDrone.Core.Download.Clients.Transmission
|
||||||
if (!torrent.ErrorString.IsNullOrWhiteSpace())
|
if (!torrent.ErrorString.IsNullOrWhiteSpace())
|
||||||
{
|
{
|
||||||
item.Status = DownloadItemStatus.Warning;
|
item.Status = DownloadItemStatus.Warning;
|
||||||
item.Message = torrent.ErrorString;
|
item.Message = _localizationService.GetLocalizedString("DownloadClientItemErrorMessage", new Dictionary<string, object>
|
||||||
|
{
|
||||||
|
{ "clientName", Name },
|
||||||
|
{ "message", torrent.ErrorString }
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else if (torrent.TotalSize == 0)
|
else if (torrent.TotalSize == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,6 +5,7 @@ using NzbDrone.Common.Http;
|
||||||
using NzbDrone.Core.Blocklisting;
|
using NzbDrone.Core.Blocklisting;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
using NzbDrone.Core.Download.Clients.Transmission;
|
using NzbDrone.Core.Download.Clients.Transmission;
|
||||||
|
using NzbDrone.Core.Localization;
|
||||||
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
||||||
using NzbDrone.Core.RemotePathMappings;
|
using NzbDrone.Core.RemotePathMappings;
|
||||||
|
|
||||||
|
@ -23,9 +24,10 @@ namespace NzbDrone.Core.Download.Clients.Vuze
|
||||||
IConfigService configService,
|
IConfigService configService,
|
||||||
IDiskProvider diskProvider,
|
IDiskProvider diskProvider,
|
||||||
IRemotePathMappingService remotePathMappingService,
|
IRemotePathMappingService remotePathMappingService,
|
||||||
|
ILocalizationService localizationService,
|
||||||
IBlocklistService blocklistService,
|
IBlocklistService blocklistService,
|
||||||
Logger logger)
|
Logger logger)
|
||||||
: base(proxy, torrentFileInfoReader, httpClient, configService, diskProvider, remotePathMappingService, blocklistService, logger)
|
: base(proxy, torrentFileInfoReader, httpClient, configService, diskProvider, remotePathMappingService, localizationService, blocklistService, logger)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue