mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-17 21:26:22 -04:00
Compare commits
236 Commits
slack-refa
...
remove-mon
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6683c88bb9 | ||
|
|
5824ba963b | ||
|
|
7f2d5d8d10 | ||
|
|
81bffe243a | ||
|
|
2d6fde282a | ||
|
|
3125b038d5 | ||
|
|
89e25a6241 | ||
|
|
4db6688fe0 | ||
|
|
4ac1aeaf06 | ||
|
|
e2ae743ee1 | ||
|
|
9ad316a6f5 | ||
|
|
b643d2e23d | ||
|
|
6a03eddda9 | ||
|
|
1576bf1f17 | ||
|
|
6325b70e27 | ||
|
|
24206ad0a3 | ||
|
|
2fc7cbff89 | ||
|
|
55ef505d74 | ||
|
|
cabdad6306 | ||
|
|
8d4b2dd21b | ||
|
|
ad04031c99 | ||
|
|
e9a5f87e45 | ||
|
|
bc6ac0cd4b | ||
|
|
c2328e4b79 | ||
|
|
36119facf0 | ||
|
|
a1fa1ddf5d | ||
|
|
ba770dce73 | ||
|
|
d58f0806f6 | ||
|
|
a95f8fa873 | ||
|
|
d1a9cf98cc | ||
|
|
be29fc6adb | ||
|
|
c1085e965b | ||
|
|
dc5c997e9b | ||
|
|
040acbf65a | ||
|
|
d089d036e6 | ||
|
|
46732c7d73 | ||
|
|
8fd3254745 | ||
|
|
9b21408a03 | ||
|
|
bd53092f0c | ||
|
|
80b1aa9a2c | ||
|
|
df863a08a1 | ||
|
|
8a0c318540 | ||
|
|
4f9d067361 | ||
|
|
6739310ba8 | ||
|
|
a45b91abe8 | ||
|
|
1ad2dc54b3 | ||
|
|
7f0b708cb9 | ||
|
|
c8cdf03077 | ||
|
|
c8afe578f3 | ||
|
|
9bb394f420 | ||
|
|
4f512c5cdf | ||
|
|
8ae84222d1 | ||
|
|
7ec0fd1cea | ||
|
|
ad8629fac9 | ||
|
|
32393eabb7 | ||
|
|
6f42dd671f | ||
|
|
966963b53d | ||
|
|
43a74ab32a | ||
|
|
897e4b4d0a | ||
|
|
0dd639ff76 | ||
|
|
64da17a9ab | ||
|
|
dbaabf90a5 | ||
|
|
1aabc4bc5c | ||
|
|
cce4334310 | ||
|
|
8d54b4268b | ||
|
|
2be9b306a3 | ||
|
|
7f5cd9a765 | ||
|
|
d26ca9a7a5 | ||
|
|
933796e214 | ||
|
|
121a347fc9 | ||
|
|
ed060d552f | ||
|
|
51485259ae | ||
|
|
76a3ca37ed | ||
|
|
e5e7292f11 | ||
|
|
397ee20160 | ||
|
|
2914c3c88f | ||
|
|
750cb94692 | ||
|
|
1ffbae9d16 | ||
|
|
a515c5c7a5 | ||
|
|
c58f31d690 | ||
|
|
2041797587 | ||
|
|
b1d8763593 | ||
|
|
ff7f95a0ab | ||
|
|
ccd561eb24 | ||
|
|
3e353a6710 | ||
|
|
544e942fe4 | ||
|
|
8bb3764708 | ||
|
|
356013a84e | ||
|
|
75b2414e29 | ||
|
|
4084ce5c2f | ||
|
|
ca2f12338e | ||
|
|
347fdc1572 | ||
|
|
6c04d0701c | ||
|
|
3f4e5e55a3 | ||
|
|
7310481e6a | ||
|
|
e59a1a64f9 | ||
|
|
5c1ebc72b3 | ||
|
|
a96971beff | ||
|
|
b34f4fde1b | ||
|
|
a9b2635cb0 | ||
|
|
1ed8bd7350 | ||
|
|
f0891e9df7 | ||
|
|
5834afe30b | ||
|
|
c015a3ebf0 | ||
|
|
8fd1f121f4 | ||
|
|
b18cc49a83 | ||
|
|
69b969cfc8 | ||
|
|
bc3e3714b9 | ||
|
|
85dd5f5754 | ||
|
|
7de270b212 | ||
|
|
b1afd7aaaa | ||
|
|
894fafcad7 | ||
|
|
2cf62915b0 | ||
|
|
d3743446da | ||
|
|
b332fa55de | ||
|
|
36da57f87b | ||
|
|
07bb5e416b | ||
|
|
69207ba77b | ||
|
|
ff409d3661 | ||
|
|
dfb8d2ea0f | ||
|
|
603db7c76b | ||
|
|
6fa0cdc9a8 | ||
|
|
c0cbbc7ed4 | ||
|
|
daa9ee30a2 | ||
|
|
86102349c5 | ||
|
|
c4d035f0ad | ||
|
|
95d44f968f | ||
|
|
e7a8f6332c | ||
|
|
b8c92d23f4 | ||
|
|
093e076db0 | ||
|
|
f6f949415c | ||
|
|
ea2576a56c | ||
|
|
595acb696d | ||
|
|
38c9534eac | ||
|
|
9377ef7942 | ||
|
|
c2e5686bcf | ||
|
|
f08807daf6 | ||
|
|
72b3caa72d | ||
|
|
589368781b | ||
|
|
8fd6101121 | ||
|
|
ac9d6cbf0a | ||
|
|
6e0ed36e9f | ||
|
|
fcb65055ef | ||
|
|
90456bbfed | ||
|
|
2a74b7b2e1 | ||
|
|
fc08c39fb8 | ||
|
|
76d65bf990 | ||
|
|
de243991dd | ||
|
|
4d1f251c1f | ||
|
|
ebb1e3131a | ||
|
|
6e502d63c2 | ||
|
|
57e05b70da | ||
|
|
59186adbfc | ||
|
|
bc20e159ba | ||
|
|
39b99341cd | ||
|
|
b626c5bbf0 | ||
|
|
a33b861cec | ||
|
|
3a48f07702 | ||
|
|
1aec0b7ee5 | ||
|
|
3e32161791 | ||
|
|
fda1ad237b | ||
|
|
52b6f39026 | ||
|
|
100fd95dd9 | ||
|
|
d571c7b75a | ||
|
|
8d7f48739b | ||
|
|
c061d7cec8 | ||
|
|
91691205db | ||
|
|
c1e07b30d7 | ||
|
|
78a7770858 | ||
|
|
599f4907f4 | ||
|
|
ec9a7f5c8e | ||
|
|
54c914d48f | ||
|
|
75270d8151 | ||
|
|
7a859f340b | ||
|
|
13e44ce19a | ||
|
|
9e4c94592d | ||
|
|
9d2a59b7fd | ||
|
|
194e0f3d7f | ||
|
|
d1fa92bc6c | ||
|
|
974e44ce48 | ||
|
|
de05be62d7 | ||
|
|
cae5badee0 | ||
|
|
45d8227654 | ||
|
|
7bbd2246c4 | ||
|
|
59fed13442 | ||
|
|
50b273acae | ||
|
|
4278415fd7 | ||
|
|
124b50288d | ||
|
|
3fcc395964 | ||
|
|
0ee9981cba | ||
|
|
2848899206 | ||
|
|
f1a00764cd | ||
|
|
346236764c | ||
|
|
eecd4e4b7d | ||
|
|
2838d8ca29 | ||
|
|
4ebcbc28aa | ||
|
|
2c24f7ca04 | ||
|
|
ec86de78d2 | ||
|
|
4f5f9ff77e | ||
|
|
465bb403a9 | ||
|
|
9e175e28ef | ||
|
|
4d2a311e40 | ||
|
|
b2195148a2 | ||
|
|
2ae7371d73 | ||
|
|
7b03a856c9 | ||
|
|
48d1d47b67 | ||
|
|
906b9bb92a | ||
|
|
6fc14278e6 | ||
|
|
34b269086d | ||
|
|
6c40a27f2e | ||
|
|
be158a09b4 | ||
|
|
eecd746f51 | ||
|
|
5ed034320e | ||
|
|
41dd678dfd | ||
|
|
716eadc551 | ||
|
|
1cb31aa95c | ||
|
|
568dd2fbb2 | ||
|
|
5d091e519e | ||
|
|
faab78c00a | ||
|
|
f1461056ce | ||
|
|
2042ffce62 | ||
|
|
c6ae6f7b1c | ||
|
|
8d7affae68 | ||
|
|
a418111245 | ||
|
|
6359ed5757 | ||
|
|
9a8c1d7d1b | ||
|
|
e89c2ee9f7 | ||
|
|
3d36f88939 | ||
|
|
8e4320a93b | ||
|
|
b095676010 | ||
|
|
41d69d8484 | ||
|
|
073e59e3db | ||
|
|
588a0843a4 | ||
|
|
26cedfd47d | ||
|
|
16789e5b6b | ||
|
|
159edcde94 |
@@ -19,10 +19,10 @@ indent_size = 4
|
|||||||
dotnet_sort_system_directives_first = true
|
dotnet_sort_system_directives_first = true
|
||||||
|
|
||||||
# Avoid "this." and "Me." if not necessary
|
# Avoid "this." and "Me." if not necessary
|
||||||
dotnet_style_qualification_for_field = false:refactoring
|
dotnet_style_qualification_for_field = false:warning
|
||||||
dotnet_style_qualification_for_property = false:refactoring
|
dotnet_style_qualification_for_property = false:warning
|
||||||
dotnet_style_qualification_for_method = false:refactoring
|
dotnet_style_qualification_for_method = false:warning
|
||||||
dotnet_style_qualification_for_event = false:refactoring
|
dotnet_style_qualification_for_event = false:warning
|
||||||
|
|
||||||
# Indentation preferences
|
# Indentation preferences
|
||||||
csharp_indent_block_contents = true
|
csharp_indent_block_contents = true
|
||||||
@@ -32,10 +32,6 @@ csharp_indent_case_contents_when_block = true
|
|||||||
csharp_indent_switch_labels = true
|
csharp_indent_switch_labels = true
|
||||||
csharp_indent_labels = flush_left
|
csharp_indent_labels = flush_left
|
||||||
|
|
||||||
dotnet_style_qualification_for_field = false:suggestion
|
|
||||||
dotnet_style_qualification_for_property = false:suggestion
|
|
||||||
dotnet_style_qualification_for_method = false:suggestion
|
|
||||||
dotnet_style_qualification_for_event = false:suggestion
|
|
||||||
dotnet_naming_style.instance_field_style.capitalization = camel_case
|
dotnet_naming_style.instance_field_style.capitalization = camel_case
|
||||||
dotnet_naming_style.instance_field_style.required_prefix = _
|
dotnet_naming_style.instance_field_style.required_prefix = _
|
||||||
|
|
||||||
|
|||||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -187,6 +187,10 @@ packages.config.md5sum
|
|||||||
**/.idea/**/*.iml
|
**/.idea/**/*.iml
|
||||||
**/.idea/**/contentModel.xml
|
**/.idea/**/contentModel.xml
|
||||||
**/.idea/**/modules.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
|
||||||
|
.config/
|
||||||
|
|||||||
@@ -7,14 +7,20 @@ variables:
|
|||||||
outputFolder: './_output'
|
outputFolder: './_output'
|
||||||
artifactsFolder: './_artifacts'
|
artifactsFolder: './_artifacts'
|
||||||
testsFolder: './_tests'
|
testsFolder: './_tests'
|
||||||
majorVersion: '4.0.0'
|
yarnCacheFolder: $(Pipeline.Workspace)/.yarn
|
||||||
|
nugetCacheFolder: $(Pipeline.Workspace)/.nuget/packages
|
||||||
|
majorVersion: '4.2.0'
|
||||||
minorVersion: $[counter('minorVersion', 2000)]
|
minorVersion: $[counter('minorVersion', 2000)]
|
||||||
radarrVersion: '$(majorVersion).$(minorVersion)'
|
radarrVersion: '$(majorVersion).$(minorVersion)'
|
||||||
buildName: '$(Build.SourceBranchName).$(radarrVersion)'
|
buildName: '$(Build.SourceBranchName).$(radarrVersion)'
|
||||||
sentryOrg: 'servarr'
|
sentryOrg: 'servarr'
|
||||||
sentryUrl: 'https://sentry.servarr.com'
|
sentryUrl: 'https://sentry.servarr.com'
|
||||||
dotnetVersion: '6.0.100'
|
dotnetVersion: '6.0.202'
|
||||||
yarnCacheFolder: $(Pipeline.Workspace)/.yarn
|
nodeVersion: '16.X'
|
||||||
|
innoVersion: '6.2.0'
|
||||||
|
windowsImage: 'windows-2022'
|
||||||
|
linuxImage: 'ubuntu-20.04'
|
||||||
|
macImage: 'macOS-11'
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branches:
|
branches:
|
||||||
@@ -29,6 +35,7 @@ pr:
|
|||||||
paths:
|
paths:
|
||||||
exclude:
|
exclude:
|
||||||
- src/NzbDrone.Core/Localization/Core
|
- src/NzbDrone.Core/Localization/Core
|
||||||
|
- src/Radarr.Api.*/openapi.json
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- stage: Setup
|
- stage: Setup
|
||||||
@@ -37,7 +44,7 @@ stages:
|
|||||||
- job:
|
- job:
|
||||||
displayName: Build Variables
|
displayName: Build Variables
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-18.04'
|
vmImage: ${{ variables.linuxImage }}
|
||||||
steps:
|
steps:
|
||||||
# Set the build name properly. The 'name' property won't recursively expand so hack here:
|
# Set the build name properly. The 'name' property won't recursively expand so hack here:
|
||||||
- bash: echo "##vso[build.updatebuildnumber]$RADARRVERSION"
|
- bash: echo "##vso[build.updatebuildnumber]$RADARRVERSION"
|
||||||
@@ -63,15 +70,15 @@ stages:
|
|||||||
matrix:
|
matrix:
|
||||||
Linux:
|
Linux:
|
||||||
osName: 'Linux'
|
osName: 'Linux'
|
||||||
imageName: 'ubuntu-18.04'
|
imageName: ${{ variables.linuxImage }}
|
||||||
enableAnalysis: 'true'
|
enableAnalysis: 'true'
|
||||||
Mac:
|
Mac:
|
||||||
osName: 'Mac'
|
osName: 'Mac'
|
||||||
imageName: 'macos-10.15'
|
imageName: ${{ variables.macImage }}
|
||||||
enableAnalysis: 'false'
|
enableAnalysis: 'false'
|
||||||
Windows:
|
Windows:
|
||||||
osName: 'Windows'
|
osName: 'Windows'
|
||||||
imageName: 'windows-2019'
|
imageName: ${{ variables.windowsImage }}
|
||||||
enableAnalysis: 'false'
|
enableAnalysis: 'false'
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
@@ -90,15 +97,14 @@ stages:
|
|||||||
- bash: |
|
- bash: |
|
||||||
BUNDLEDVERSIONS=${AGENT_TOOLSDIRECTORY}/dotnet/sdk/${DOTNETVERSION}/Microsoft.NETCoreSdk.BundledVersions.props
|
BUNDLEDVERSIONS=${AGENT_TOOLSDIRECTORY}/dotnet/sdk/${DOTNETVERSION}/Microsoft.NETCoreSdk.BundledVersions.props
|
||||||
echo $BUNDLEDVERSIONS
|
echo $BUNDLEDVERSIONS
|
||||||
grep osx-x64 $BUNDLEDVERSIONS
|
|
||||||
if grep -q freebsd-x64 $BUNDLEDVERSIONS; then
|
if grep -q freebsd-x64 $BUNDLEDVERSIONS; then
|
||||||
echo "BSD already enabled"
|
echo "Extra platforms already enabled"
|
||||||
else
|
else
|
||||||
echo "Enabling BSD support"
|
echo "Enabling extra platform support"
|
||||||
sed -i.ORI 's/osx-x64/osx-x64;freebsd-x64/' $BUNDLEDVERSIONS
|
sed -i.ORI 's/osx-x64/osx-x64;freebsd-x64;linux-x86/' $BUNDLEDVERSIONS
|
||||||
fi
|
fi
|
||||||
displayName: Enable FreeBSD Support
|
displayName: Enable Extra Platform Support
|
||||||
- bash: ./build.sh --backend --enable-bsd
|
- bash: ./build.sh --backend --enable-extra-platforms
|
||||||
displayName: Build Radarr Backend
|
displayName: Build Radarr Backend
|
||||||
- bash: |
|
- bash: |
|
||||||
find ${OUTPUTFOLDER} -type f ! -path "*/publish/*" -exec rm -rf {} \;
|
find ${OUTPUTFOLDER} -type f ! -path "*/publish/*" -exec rm -rf {} \;
|
||||||
@@ -112,24 +118,28 @@ stages:
|
|||||||
displayName: Publish Backend
|
displayName: Publish Backend
|
||||||
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||||
- publish: '$(testsFolder)/net6.0/win-x64/publish'
|
- publish: '$(testsFolder)/net6.0/win-x64/publish'
|
||||||
artifact: WindowsCoreTests
|
artifact: win-x64-tests
|
||||||
displayName: Publish Windows Test Package
|
displayName: Publish win-x64 Test Package
|
||||||
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||||
- publish: '$(testsFolder)/net6.0/linux-x64/publish'
|
- publish: '$(testsFolder)/net6.0/linux-x64/publish'
|
||||||
artifact: LinuxCoreTests
|
artifact: linux-x64-tests
|
||||||
displayName: Publish Linux Test Package
|
displayName: Publish linux-x64 Test Package
|
||||||
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||||
|
- publish: '$(testsFolder)/net6.0/linux-x86/publish'
|
||||||
|
artifact: linux-x86-tests
|
||||||
|
displayName: Publish linux-x86 Test Package
|
||||||
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||||
- publish: '$(testsFolder)/net6.0/linux-musl-x64/publish'
|
- publish: '$(testsFolder)/net6.0/linux-musl-x64/publish'
|
||||||
artifact: LinuxMuslCoreTests
|
artifact: linux-musl-x64-tests
|
||||||
displayName: Publish Linux Musl Test Package
|
displayName: Publish linux-musl-x64 Test Package
|
||||||
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||||
- publish: '$(testsFolder)/net6.0/freebsd-x64/publish'
|
- publish: '$(testsFolder)/net6.0/freebsd-x64/publish'
|
||||||
artifact: FreebsdCoreTests
|
artifact: freebsd-x64-tests
|
||||||
displayName: Publish FreeBSD Test Package
|
displayName: Publish freebsd-x64 Test Package
|
||||||
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||||
- publish: '$(testsFolder)/net6.0/osx-x64/publish'
|
- publish: '$(testsFolder)/net6.0/osx-x64/publish'
|
||||||
artifact: MacCoreTests
|
artifact: osx-x64-tests
|
||||||
displayName: Publish MacOS Test Package
|
displayName: Publish osx-x64 Test Package
|
||||||
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||||
|
|
||||||
- stage: Build_Frontend
|
- stage: Build_Frontend
|
||||||
@@ -141,20 +151,20 @@ stages:
|
|||||||
matrix:
|
matrix:
|
||||||
Linux:
|
Linux:
|
||||||
osName: 'Linux'
|
osName: 'Linux'
|
||||||
imageName: 'ubuntu-18.04'
|
imageName: ${{ variables.linuxImage }}
|
||||||
Mac:
|
Mac:
|
||||||
osName: 'Mac'
|
osName: 'Mac'
|
||||||
imageName: 'macos-10.15'
|
imageName: ${{ variables.macImage }}
|
||||||
Windows:
|
Windows:
|
||||||
osName: 'Windows'
|
osName: 'Windows'
|
||||||
imageName: 'windows-2019'
|
imageName: ${{ variables.windowsImage }}
|
||||||
pool:
|
pool:
|
||||||
vmImage: $(imageName)
|
vmImage: $(imageName)
|
||||||
steps:
|
steps:
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
displayName: Set Node.js version
|
displayName: Set Node.js version
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: '12.x'
|
versionSpec: $(nodeVersion)
|
||||||
- checkout: self
|
- checkout: self
|
||||||
submodules: true
|
submodules: true
|
||||||
fetchDepth: 1
|
fetchDepth: 1
|
||||||
@@ -184,7 +194,7 @@ stages:
|
|||||||
- job: Windows_Installer
|
- job: Windows_Installer
|
||||||
displayName: Create Installer
|
displayName: Create Installer
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'windows-2019'
|
vmImage: ${{ variables.windowsImage }}
|
||||||
steps:
|
steps:
|
||||||
- checkout: self
|
- checkout: self
|
||||||
fetchDepth: 1
|
fetchDepth: 1
|
||||||
@@ -200,16 +210,11 @@ stages:
|
|||||||
artifactName: WindowsFrontend
|
artifactName: WindowsFrontend
|
||||||
targetPath: _output
|
targetPath: _output
|
||||||
displayName: Fetch Frontend
|
displayName: Fetch Frontend
|
||||||
- bash: ./build.sh --packages
|
|
||||||
displayName: Create Packages
|
|
||||||
- bash: |
|
- bash: |
|
||||||
setup/inno/ISCC.exe setup/radarr.iss //DFramework=net6.0 //DRuntime=win-x86
|
./build.sh --packages --installer
|
||||||
cp setup/output/Radarr.*windows.net6.0.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Radarr.${BUILDNAME}.windows-core-x86-installer.exe
|
cp setup/output/Radarr.*win-x64.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Radarr.${BUILDNAME}.windows-core-x64-installer.exe
|
||||||
displayName: Create .NET Core Windows installer
|
cp setup/output/Radarr.*win-x86.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Radarr.${BUILDNAME}.windows-core-x86-installer.exe
|
||||||
- bash: |
|
displayName: Create Installers
|
||||||
setup/inno/ISCC.exe setup/radarr.iss //DFramework=net6.0 //DRuntime=win-x64
|
|
||||||
cp setup/output/Radarr.*windows.net6.0.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Radarr.${BUILDNAME}.windows-core-x64-installer.exe
|
|
||||||
displayName: Create .NET Core Windows installer
|
|
||||||
- publish: $(Build.ArtifactStagingDirectory)
|
- publish: $(Build.ArtifactStagingDirectory)
|
||||||
artifact: 'WindowsInstaller'
|
artifact: 'WindowsInstaller'
|
||||||
displayName: Publish Installer
|
displayName: Publish Installer
|
||||||
@@ -222,7 +227,7 @@ stages:
|
|||||||
- job: Other_Packages
|
- job: Other_Packages
|
||||||
displayName: Create Standard Packages
|
displayName: Create Standard Packages
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-18.04'
|
vmImage: ${{ variables.linuxImage }}
|
||||||
steps:
|
steps:
|
||||||
- checkout: self
|
- checkout: self
|
||||||
fetchDepth: 1
|
fetchDepth: 1
|
||||||
@@ -238,7 +243,7 @@ stages:
|
|||||||
artifactName: WindowsFrontend
|
artifactName: WindowsFrontend
|
||||||
targetPath: _output
|
targetPath: _output
|
||||||
displayName: Fetch Frontend
|
displayName: Fetch Frontend
|
||||||
- bash: ./build.sh --packages --enable-bsd
|
- bash: ./build.sh --packages --enable-extra-platforms
|
||||||
displayName: Create Packages
|
displayName: Create Packages
|
||||||
- bash: |
|
- bash: |
|
||||||
find . -name "ffprobe" -exec chmod a+x {} \;
|
find . -name "ffprobe" -exec chmod a+x {} \;
|
||||||
@@ -246,28 +251,28 @@ stages:
|
|||||||
find . -name "Radarr.Update" -exec chmod a+x {} \;
|
find . -name "Radarr.Update" -exec chmod a+x {} \;
|
||||||
displayName: Set executable bits
|
displayName: Set executable bits
|
||||||
- task: ArchiveFiles@2
|
- task: ArchiveFiles@2
|
||||||
displayName: Create Windows Core zip
|
displayName: Create win-x64 zip
|
||||||
inputs:
|
inputs:
|
||||||
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).windows-core-x64.zip'
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).windows-core-x64.zip'
|
||||||
archiveType: 'zip'
|
archiveType: 'zip'
|
||||||
includeRootFolder: false
|
includeRootFolder: false
|
||||||
rootFolderOrFile: $(artifactsFolder)/win-x64/net6.0
|
rootFolderOrFile: $(artifactsFolder)/win-x64/net6.0
|
||||||
- task: ArchiveFiles@2
|
- task: ArchiveFiles@2
|
||||||
displayName: Create Windows x86 Core zip
|
displayName: Create win-x86 zip
|
||||||
inputs:
|
inputs:
|
||||||
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).windows-core-x86.zip'
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).windows-core-x86.zip'
|
||||||
archiveType: 'zip'
|
archiveType: 'zip'
|
||||||
includeRootFolder: false
|
includeRootFolder: false
|
||||||
rootFolderOrFile: $(artifactsFolder)/win-x86/net6.0
|
rootFolderOrFile: $(artifactsFolder)/win-x86/net6.0
|
||||||
- task: ArchiveFiles@2
|
- task: ArchiveFiles@2
|
||||||
displayName: Create MacOS x64 Core app
|
displayName: Create osx-x64 app
|
||||||
inputs:
|
inputs:
|
||||||
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).osx-app-core-x64.zip'
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).osx-app-core-x64.zip'
|
||||||
archiveType: 'zip'
|
archiveType: 'zip'
|
||||||
includeRootFolder: false
|
includeRootFolder: false
|
||||||
rootFolderOrFile: $(artifactsFolder)/osx-x64-app/net6.0
|
rootFolderOrFile: $(artifactsFolder)/osx-x64-app/net6.0
|
||||||
- task: ArchiveFiles@2
|
- task: ArchiveFiles@2
|
||||||
displayName: Create MacOS x64 Core tar
|
displayName: Create osx-x64 tar
|
||||||
inputs:
|
inputs:
|
||||||
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).osx-core-x64.tar.gz'
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).osx-core-x64.tar.gz'
|
||||||
archiveType: 'tar'
|
archiveType: 'tar'
|
||||||
@@ -275,14 +280,14 @@ stages:
|
|||||||
includeRootFolder: false
|
includeRootFolder: false
|
||||||
rootFolderOrFile: $(artifactsFolder)/osx-x64/net6.0
|
rootFolderOrFile: $(artifactsFolder)/osx-x64/net6.0
|
||||||
- task: ArchiveFiles@2
|
- task: ArchiveFiles@2
|
||||||
displayName: Create MacOS arm64 Core app
|
displayName: Create osx-arm64 app
|
||||||
inputs:
|
inputs:
|
||||||
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).osx-app-core-arm64.zip'
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).osx-app-core-arm64.zip'
|
||||||
archiveType: 'zip'
|
archiveType: 'zip'
|
||||||
includeRootFolder: false
|
includeRootFolder: false
|
||||||
rootFolderOrFile: $(artifactsFolder)/osx-arm64-app/net6.0
|
rootFolderOrFile: $(artifactsFolder)/osx-arm64-app/net6.0
|
||||||
- task: ArchiveFiles@2
|
- task: ArchiveFiles@2
|
||||||
displayName: Create MacOS arm64 Core tar
|
displayName: Create osx-arm64 tar
|
||||||
inputs:
|
inputs:
|
||||||
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).osx-core-arm64.tar.gz'
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).osx-core-arm64.tar.gz'
|
||||||
archiveType: 'tar'
|
archiveType: 'tar'
|
||||||
@@ -290,7 +295,7 @@ stages:
|
|||||||
includeRootFolder: false
|
includeRootFolder: false
|
||||||
rootFolderOrFile: $(artifactsFolder)/osx-arm64/net6.0
|
rootFolderOrFile: $(artifactsFolder)/osx-arm64/net6.0
|
||||||
- task: ArchiveFiles@2
|
- task: ArchiveFiles@2
|
||||||
displayName: Create Linux Core tar
|
displayName: Create linux-x64 tar
|
||||||
inputs:
|
inputs:
|
||||||
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).linux-core-x64.tar.gz'
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).linux-core-x64.tar.gz'
|
||||||
archiveType: 'tar'
|
archiveType: 'tar'
|
||||||
@@ -298,7 +303,7 @@ stages:
|
|||||||
includeRootFolder: false
|
includeRootFolder: false
|
||||||
rootFolderOrFile: $(artifactsFolder)/linux-x64/net6.0
|
rootFolderOrFile: $(artifactsFolder)/linux-x64/net6.0
|
||||||
- task: ArchiveFiles@2
|
- task: ArchiveFiles@2
|
||||||
displayName: Create Linux Musl Core tar
|
displayName: Create linux-musl-x64 tar
|
||||||
inputs:
|
inputs:
|
||||||
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).linux-musl-core-x64.tar.gz'
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).linux-musl-core-x64.tar.gz'
|
||||||
archiveType: 'tar'
|
archiveType: 'tar'
|
||||||
@@ -306,7 +311,15 @@ stages:
|
|||||||
includeRootFolder: false
|
includeRootFolder: false
|
||||||
rootFolderOrFile: $(artifactsFolder)/linux-musl-x64/net6.0
|
rootFolderOrFile: $(artifactsFolder)/linux-musl-x64/net6.0
|
||||||
- task: ArchiveFiles@2
|
- task: ArchiveFiles@2
|
||||||
displayName: Create ARM32 Linux Core tar
|
displayName: Create linux-x86 tar
|
||||||
|
inputs:
|
||||||
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).linux-core-x86.tar.gz'
|
||||||
|
archiveType: 'tar'
|
||||||
|
tarCompression: 'gz'
|
||||||
|
includeRootFolder: false
|
||||||
|
rootFolderOrFile: $(artifactsFolder)/linux-x86/net6.0
|
||||||
|
- task: ArchiveFiles@2
|
||||||
|
displayName: Create linux-arm tar
|
||||||
inputs:
|
inputs:
|
||||||
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).linux-core-arm.tar.gz'
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).linux-core-arm.tar.gz'
|
||||||
archiveType: 'tar'
|
archiveType: 'tar'
|
||||||
@@ -314,7 +327,7 @@ stages:
|
|||||||
includeRootFolder: false
|
includeRootFolder: false
|
||||||
rootFolderOrFile: $(artifactsFolder)/linux-arm/net6.0
|
rootFolderOrFile: $(artifactsFolder)/linux-arm/net6.0
|
||||||
- task: ArchiveFiles@2
|
- task: ArchiveFiles@2
|
||||||
displayName: Create ARM32 Linux Musl Core tar
|
displayName: Create linux-musl-arm tar
|
||||||
inputs:
|
inputs:
|
||||||
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).linux-musl-core-arm.tar.gz'
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).linux-musl-core-arm.tar.gz'
|
||||||
archiveType: 'tar'
|
archiveType: 'tar'
|
||||||
@@ -322,7 +335,7 @@ stages:
|
|||||||
includeRootFolder: false
|
includeRootFolder: false
|
||||||
rootFolderOrFile: $(artifactsFolder)/linux-musl-arm/net6.0
|
rootFolderOrFile: $(artifactsFolder)/linux-musl-arm/net6.0
|
||||||
- task: ArchiveFiles@2
|
- task: ArchiveFiles@2
|
||||||
displayName: Create ARM64 Linux Core tar
|
displayName: Create linux-arm64 tar
|
||||||
inputs:
|
inputs:
|
||||||
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).linux-core-arm64.tar.gz'
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).linux-core-arm64.tar.gz'
|
||||||
archiveType: 'tar'
|
archiveType: 'tar'
|
||||||
@@ -330,7 +343,7 @@ stages:
|
|||||||
includeRootFolder: false
|
includeRootFolder: false
|
||||||
rootFolderOrFile: $(artifactsFolder)/linux-arm64/net6.0
|
rootFolderOrFile: $(artifactsFolder)/linux-arm64/net6.0
|
||||||
- task: ArchiveFiles@2
|
- task: ArchiveFiles@2
|
||||||
displayName: Create ARM64 Linux Musl Core tar
|
displayName: Create linux-musl-arm64 tar
|
||||||
inputs:
|
inputs:
|
||||||
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).linux-musl-core-arm64.tar.gz'
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).linux-musl-core-arm64.tar.gz'
|
||||||
archiveType: 'tar'
|
archiveType: 'tar'
|
||||||
@@ -338,7 +351,7 @@ stages:
|
|||||||
includeRootFolder: false
|
includeRootFolder: false
|
||||||
rootFolderOrFile: $(artifactsFolder)/linux-musl-arm64/net6.0
|
rootFolderOrFile: $(artifactsFolder)/linux-musl-arm64/net6.0
|
||||||
- task: ArchiveFiles@2
|
- task: ArchiveFiles@2
|
||||||
displayName: Create FreeBSD Core Core tar
|
displayName: Create freebsd-x64 tar
|
||||||
inputs:
|
inputs:
|
||||||
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).freebsd-core-x64.tar.gz'
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).freebsd-core-x64.tar.gz'
|
||||||
archiveType: 'tar'
|
archiveType: 'tar'
|
||||||
@@ -383,7 +396,7 @@ stages:
|
|||||||
jobs:
|
jobs:
|
||||||
- job: Prepare
|
- job: Prepare
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-18.04'
|
vmImage: ${{ variables.linuxImage }}
|
||||||
steps:
|
steps:
|
||||||
- checkout: none
|
- checkout: none
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
@@ -405,22 +418,22 @@ stages:
|
|||||||
matrix:
|
matrix:
|
||||||
MacCore:
|
MacCore:
|
||||||
osName: 'Mac'
|
osName: 'Mac'
|
||||||
testName: 'MacCore'
|
testName: 'osx-x64'
|
||||||
poolName: 'Azure Pipelines'
|
poolName: 'Azure Pipelines'
|
||||||
imageName: 'macos-10.15'
|
imageName: ${{ variables.macImage }}
|
||||||
WindowsCore:
|
WindowsCore:
|
||||||
osName: 'Windows'
|
osName: 'Windows'
|
||||||
testName: 'WindowsCore'
|
testName: 'win-x64'
|
||||||
poolName: 'Azure Pipelines'
|
poolName: 'Azure Pipelines'
|
||||||
imageName: 'windows-2019'
|
imageName: ${{ variables.windowsImage }}
|
||||||
LinuxCore:
|
LinuxCore:
|
||||||
osName: 'Linux'
|
osName: 'Linux'
|
||||||
testName: 'LinuxCore'
|
testName: 'linux-x64'
|
||||||
poolName: 'Azure Pipelines'
|
poolName: 'Azure Pipelines'
|
||||||
imageName: 'ubuntu-18.04'
|
imageName: ${{ variables.linuxImage }}
|
||||||
FreebsdCore:
|
FreebsdCore:
|
||||||
osName: 'Linux'
|
osName: 'Linux'
|
||||||
testName: 'FreebsdCore'
|
testName: 'freebsd-x64'
|
||||||
poolName: 'FreeBSD'
|
poolName: 'FreeBSD'
|
||||||
imageName:
|
imageName:
|
||||||
|
|
||||||
@@ -439,7 +452,7 @@ stages:
|
|||||||
displayName: Download Test Artifact
|
displayName: Download Test Artifact
|
||||||
inputs:
|
inputs:
|
||||||
buildType: 'current'
|
buildType: 'current'
|
||||||
artifactName: '$(testName)Tests'
|
artifactName: '$(testName)-tests'
|
||||||
targetPath: $(testsFolder)
|
targetPath: $(testsFolder)
|
||||||
- powershell: Set-Service SCardSvr -StartupType Manual
|
- powershell: Set-Service SCardSvr -StartupType Manual
|
||||||
displayName: Enable Windows Test Service
|
displayName: Enable Windows Test Service
|
||||||
@@ -473,11 +486,15 @@ stages:
|
|||||||
matrix:
|
matrix:
|
||||||
alpine:
|
alpine:
|
||||||
testName: 'Musl Net Core'
|
testName: 'Musl Net Core'
|
||||||
artifactName: LinuxMuslCoreTests
|
artifactName: linux-musl-x64-tests
|
||||||
containerImage: ghcr.io/servarr/testimages:alpine
|
containerImage: ghcr.io/servarr/testimages:alpine
|
||||||
|
linux-x86:
|
||||||
|
testName: 'linux-x86'
|
||||||
|
artifactName: linux-x86-tests
|
||||||
|
containerImage: ghcr.io/servarr/testimages:linux-x86
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-18.04'
|
vmImage: ${{ variables.linuxImage }}
|
||||||
|
|
||||||
container: $[ variables['containerImage'] ]
|
container: $[ variables['containerImage'] ]
|
||||||
|
|
||||||
@@ -485,9 +502,15 @@ stages:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- task: UseDotNet@2
|
- task: UseDotNet@2
|
||||||
displayName: 'Install .net core'
|
displayName: 'Install .NET'
|
||||||
inputs:
|
inputs:
|
||||||
version: $(dotnetVersion)
|
version: $(dotnetVersion)
|
||||||
|
condition: and(succeeded(), ne(variables['testName'], 'linux-x86'))
|
||||||
|
- bash: |
|
||||||
|
SDKURL=$(curl -s https://api.github.com/repos/Servarr/dotnet-linux-x86/releases | jq -rc '.[].assets[].browser_download_url' | grep sdk-${DOTNETVERSION}.*gz$)
|
||||||
|
curl -fsSL $SDKURL | tar xzf - -C /opt/dotnet
|
||||||
|
displayName: 'Install .NET'
|
||||||
|
condition: and(succeeded(), eq(variables['testName'], 'linux-x86'))
|
||||||
- checkout: none
|
- checkout: none
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
displayName: Download Test Artifact
|
displayName: Download Test Artifact
|
||||||
@@ -513,6 +536,61 @@ stages:
|
|||||||
testResultsFiles: '**/TestResult.xml'
|
testResultsFiles: '**/TestResult.xml'
|
||||||
testRunTitle: '$(testName) Unit Tests'
|
testRunTitle: '$(testName) Unit Tests'
|
||||||
failTaskOnFailedTests: true
|
failTaskOnFailedTests: true
|
||||||
|
|
||||||
|
- job: Unit_LinuxCore_Postgres
|
||||||
|
displayName: Unit Native LinuxCore with Postgres Database
|
||||||
|
dependsOn: Prepare
|
||||||
|
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
||||||
|
variables:
|
||||||
|
pattern: 'Radarr.*.linux-core-x64.tar.gz'
|
||||||
|
artifactName: linux-x64-tests
|
||||||
|
Radarr__Postgres__Host: 'localhost'
|
||||||
|
Radarr__Postgres__Port: '5432'
|
||||||
|
Radarr__Postgres__User: 'radarr'
|
||||||
|
Radarr__Postgres__Password: 'radarr'
|
||||||
|
|
||||||
|
pool:
|
||||||
|
vmImage: 'ubuntu-18.04'
|
||||||
|
|
||||||
|
timeoutInMinutes: 10
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- task: UseDotNet@2
|
||||||
|
displayName: 'Install .net core'
|
||||||
|
inputs:
|
||||||
|
version: $(dotnetVersion)
|
||||||
|
- checkout: none
|
||||||
|
- task: DownloadPipelineArtifact@2
|
||||||
|
displayName: Download Test Artifact
|
||||||
|
inputs:
|
||||||
|
buildType: 'current'
|
||||||
|
artifactName: $(artifactName)
|
||||||
|
targetPath: $(testsFolder)
|
||||||
|
- bash: |
|
||||||
|
chmod a+x _tests/ffprobe
|
||||||
|
displayName: Make ffprobe Executable
|
||||||
|
- bash: find ${TESTSFOLDER} -name "Radarr.Test.Dummy" -exec chmod a+x {} \;
|
||||||
|
displayName: Make Test Dummy Executable
|
||||||
|
condition: and(succeeded(), ne(variables['osName'], 'Windows'))
|
||||||
|
- bash: |
|
||||||
|
docker run -d --name=postgres14 \
|
||||||
|
-e POSTGRES_PASSWORD=radarr \
|
||||||
|
-e POSTGRES_USER=radarr \
|
||||||
|
-p 5432:5432/tcp \
|
||||||
|
postgres:14
|
||||||
|
displayName: Start postgres
|
||||||
|
- bash: |
|
||||||
|
chmod a+x ${TESTSFOLDER}/test.sh
|
||||||
|
ls -lR ${TESTSFOLDER}
|
||||||
|
${TESTSFOLDER}/test.sh Linux Unit Test
|
||||||
|
displayName: Run Tests
|
||||||
|
- task: PublishTestResults@2
|
||||||
|
displayName: Publish Test Results
|
||||||
|
inputs:
|
||||||
|
testResultsFormat: 'NUnit'
|
||||||
|
testResultsFiles: '**/TestResult.xml'
|
||||||
|
testRunTitle: 'LinuxCore Postgres Unit Tests'
|
||||||
|
failTaskOnFailedTests: true
|
||||||
|
|
||||||
- stage: Integration
|
- stage: Integration
|
||||||
displayName: Integration
|
displayName: Integration
|
||||||
@@ -521,7 +599,7 @@ stages:
|
|||||||
jobs:
|
jobs:
|
||||||
- job: Prepare
|
- job: Prepare
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-18.04'
|
vmImage: ${{ variables.linuxImage }}
|
||||||
steps:
|
steps:
|
||||||
- checkout: none
|
- checkout: none
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
@@ -540,18 +618,18 @@ stages:
|
|||||||
matrix:
|
matrix:
|
||||||
MacCore:
|
MacCore:
|
||||||
osName: 'Mac'
|
osName: 'Mac'
|
||||||
testName: 'MacCore'
|
testName: 'osx-x64'
|
||||||
imageName: 'macos-10.15'
|
imageName: ${{ variables.macImage }}
|
||||||
pattern: 'Radarr.*.osx-core-x64.tar.gz'
|
pattern: 'Radarr.*.osx-core-x64.tar.gz'
|
||||||
WindowsCore:
|
WindowsCore:
|
||||||
osName: 'Windows'
|
osName: 'Windows'
|
||||||
testName: 'WindowsCore'
|
testName: 'win-x64'
|
||||||
imageName: 'windows-2019'
|
imageName: ${{ variables.windowsImage }}
|
||||||
pattern: 'Radarr.*.windows-core-x64.zip'
|
pattern: 'Radarr.*.windows-core-x64.zip'
|
||||||
LinuxCore:
|
LinuxCore:
|
||||||
osName: 'Linux'
|
osName: 'Linux'
|
||||||
testName: 'LinuxCore'
|
testName: 'linux-x64'
|
||||||
imageName: 'ubuntu-18.04'
|
imageName: ${{ variables.linuxImage }}
|
||||||
pattern: 'Radarr.*.linux-core-x64.tar.gz'
|
pattern: 'Radarr.*.linux-core-x64.tar.gz'
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
@@ -567,7 +645,7 @@ stages:
|
|||||||
displayName: Download Test Artifact
|
displayName: Download Test Artifact
|
||||||
inputs:
|
inputs:
|
||||||
buildType: 'current'
|
buildType: 'current'
|
||||||
artifactName: '$(testName)Tests'
|
artifactName: '$(testName)-tests'
|
||||||
targetPath: $(testsFolder)
|
targetPath: $(testsFolder)
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
displayName: Download Build Artifact
|
displayName: Download Build Artifact
|
||||||
@@ -597,6 +675,67 @@ stages:
|
|||||||
failTaskOnFailedTests: true
|
failTaskOnFailedTests: true
|
||||||
displayName: Publish Test Results
|
displayName: Publish Test Results
|
||||||
|
|
||||||
|
- job: Integration_LinuxCore_Postgres
|
||||||
|
displayName: Integration Native LinuxCore with Postgres Database
|
||||||
|
dependsOn: Prepare
|
||||||
|
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
||||||
|
variables:
|
||||||
|
pattern: 'Radarr.*.linux-core-x64.tar.gz'
|
||||||
|
Radarr__Postgres__Host: 'localhost'
|
||||||
|
Radarr__Postgres__Port: '5432'
|
||||||
|
Radarr__Postgres__User: 'radarr'
|
||||||
|
Radarr__Postgres__Password: 'radarr'
|
||||||
|
|
||||||
|
pool:
|
||||||
|
vmImage: 'ubuntu-18.04'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- task: UseDotNet@2
|
||||||
|
displayName: 'Install .net core'
|
||||||
|
inputs:
|
||||||
|
version: $(dotnetVersion)
|
||||||
|
- checkout: none
|
||||||
|
- task: DownloadPipelineArtifact@2
|
||||||
|
displayName: Download Test Artifact
|
||||||
|
inputs:
|
||||||
|
buildType: 'current'
|
||||||
|
artifactName: 'linux-x64-tests'
|
||||||
|
targetPath: $(testsFolder)
|
||||||
|
- task: DownloadPipelineArtifact@2
|
||||||
|
displayName: Download Build Artifact
|
||||||
|
inputs:
|
||||||
|
buildType: 'current'
|
||||||
|
artifactName: Packages
|
||||||
|
itemPattern: '**/$(pattern)'
|
||||||
|
targetPath: $(Build.ArtifactStagingDirectory)
|
||||||
|
- task: ExtractFiles@1
|
||||||
|
inputs:
|
||||||
|
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
||||||
|
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
||||||
|
displayName: Extract Package
|
||||||
|
- bash: |
|
||||||
|
mkdir -p ./bin/
|
||||||
|
cp -r -v ${BUILD_ARTIFACTSTAGINGDIRECTORY}/bin/Radarr/. ./bin/
|
||||||
|
displayName: Move Package Contents
|
||||||
|
- bash: |
|
||||||
|
docker run -d --name=postgres14 \
|
||||||
|
-e POSTGRES_PASSWORD=radarr \
|
||||||
|
-e POSTGRES_USER=radarr \
|
||||||
|
-p 5432:5432/tcp \
|
||||||
|
postgres:14
|
||||||
|
displayName: Start postgres
|
||||||
|
- bash: |
|
||||||
|
chmod a+x ${TESTSFOLDER}/test.sh
|
||||||
|
${TESTSFOLDER}/test.sh Linux Integration Test
|
||||||
|
displayName: Run Integration Tests
|
||||||
|
- task: PublishTestResults@2
|
||||||
|
inputs:
|
||||||
|
testResultsFormat: 'NUnit'
|
||||||
|
testResultsFiles: '**/TestResult.xml'
|
||||||
|
testRunTitle: 'Integration LinuxCore Postgres Database Integration Tests'
|
||||||
|
failTaskOnFailedTests: true
|
||||||
|
displayName: Publish Test Results
|
||||||
|
|
||||||
- job: Integration_FreeBSD
|
- job: Integration_FreeBSD
|
||||||
displayName: Integration Native FreeBSD
|
displayName: Integration Native FreeBSD
|
||||||
dependsOn: Prepare
|
dependsOn: Prepare
|
||||||
@@ -614,7 +753,7 @@ stages:
|
|||||||
displayName: Download Test Artifact
|
displayName: Download Test Artifact
|
||||||
inputs:
|
inputs:
|
||||||
buildType: 'current'
|
buildType: 'current'
|
||||||
artifactName: 'FreebsdCoreTests'
|
artifactName: 'freebsd-x64-tests'
|
||||||
targetPath: $(testsFolder)
|
targetPath: $(testsFolder)
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
displayName: Download Build Artifact
|
displayName: Download Build Artifact
|
||||||
@@ -650,12 +789,17 @@ stages:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
alpine:
|
alpine:
|
||||||
testName: 'Musl Net Core'
|
testName: 'linux-musl-x64'
|
||||||
artifactName: LinuxMuslCoreTests
|
artifactName: linux-musl-x64-tests
|
||||||
containerImage: ghcr.io/servarr/testimages:alpine
|
containerImage: ghcr.io/servarr/testimages:alpine
|
||||||
pattern: 'Radarr.*.linux-musl-core-x64.tar.gz'
|
pattern: 'Radarr.*.linux-musl-core-x64.tar.gz'
|
||||||
|
linux-x86:
|
||||||
|
testName: 'linux-x86'
|
||||||
|
artifactName: linux-x86-tests
|
||||||
|
containerImage: ghcr.io/servarr/testimages:linux-x86
|
||||||
|
pattern: 'Radarr.*.linux-core-x86.tar.gz'
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-18.04'
|
vmImage: ${{ variables.linuxImage }}
|
||||||
|
|
||||||
container: $[ variables['containerImage'] ]
|
container: $[ variables['containerImage'] ]
|
||||||
|
|
||||||
@@ -663,9 +807,15 @@ stages:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- task: UseDotNet@2
|
- task: UseDotNet@2
|
||||||
displayName: 'Install .net core'
|
displayName: 'Install .NET'
|
||||||
inputs:
|
inputs:
|
||||||
version: $(dotnetVersion)
|
version: $(dotnetVersion)
|
||||||
|
condition: and(succeeded(), ne(variables['testName'], 'linux-x86'))
|
||||||
|
- bash: |
|
||||||
|
SDKURL=$(curl -s https://api.github.com/repos/Servarr/dotnet-linux-x86/releases | jq -rc '.[].assets[].browser_download_url' | grep sdk-${DOTNETVERSION}.*gz$)
|
||||||
|
curl -fsSL $SDKURL | tar xzf - -C /opt/dotnet
|
||||||
|
displayName: 'Install .NET'
|
||||||
|
condition: and(succeeded(), eq(variables['testName'], 'linux-x86'))
|
||||||
- checkout: none
|
- checkout: none
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
displayName: Download Test Artifact
|
displayName: Download Test Artifact
|
||||||
@@ -711,17 +861,20 @@ stages:
|
|||||||
matrix:
|
matrix:
|
||||||
Linux:
|
Linux:
|
||||||
osName: 'Linux'
|
osName: 'Linux'
|
||||||
imageName: 'ubuntu-18.04'
|
artifactName: 'linux-x64'
|
||||||
|
imageName: ${{ variables.linuxImage }}
|
||||||
pattern: 'Radarr.*.linux-core-x64.tar.gz'
|
pattern: 'Radarr.*.linux-core-x64.tar.gz'
|
||||||
failBuild: true
|
failBuild: true
|
||||||
Mac:
|
Mac:
|
||||||
osName: 'Mac'
|
osName: 'Mac'
|
||||||
imageName: 'macos-10.15'
|
artifactName: 'osx-x64'
|
||||||
|
imageName: ${{ variables.macImage }}
|
||||||
pattern: 'Radarr.*.osx-core-x64.tar.gz'
|
pattern: 'Radarr.*.osx-core-x64.tar.gz'
|
||||||
failBuild: true
|
failBuild: true
|
||||||
Windows:
|
Windows:
|
||||||
osName: 'Windows'
|
osName: 'Windows'
|
||||||
imageName: 'windows-2019'
|
artifactName: 'win-x64'
|
||||||
|
imageName: ${{ variables.windowsImage }}
|
||||||
pattern: 'Radarr.*.windows-core-x64.zip'
|
pattern: 'Radarr.*.windows-core-x64.zip'
|
||||||
failBuild: true
|
failBuild: true
|
||||||
|
|
||||||
@@ -738,7 +891,7 @@ stages:
|
|||||||
displayName: Download Test Artifact
|
displayName: Download Test Artifact
|
||||||
inputs:
|
inputs:
|
||||||
buildType: 'current'
|
buildType: 'current'
|
||||||
artifactName: '$(osName)CoreTests'
|
artifactName: '$(artifactName)-tests'
|
||||||
targetPath: $(testsFolder)
|
targetPath: $(testsFolder)
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
displayName: Download Build Artifact
|
displayName: Download Build Artifact
|
||||||
@@ -787,7 +940,7 @@ stages:
|
|||||||
jobs:
|
jobs:
|
||||||
- job: Prepare
|
- job: Prepare
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-18.04'
|
vmImage: ${{ variables.linuxImage }}
|
||||||
steps:
|
steps:
|
||||||
- checkout: none
|
- checkout: none
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
@@ -804,17 +957,17 @@ stages:
|
|||||||
matrix:
|
matrix:
|
||||||
Linux:
|
Linux:
|
||||||
osName: 'Linux'
|
osName: 'Linux'
|
||||||
imageName: 'ubuntu-18.04'
|
imageName: ${{ variables.linuxImage }}
|
||||||
Windows:
|
Windows:
|
||||||
osName: 'Windows'
|
osName: 'Windows'
|
||||||
imageName: 'windows-2019'
|
imageName: ${{ variables.windowsImage }}
|
||||||
pool:
|
pool:
|
||||||
vmImage: $(imageName)
|
vmImage: $(imageName)
|
||||||
steps:
|
steps:
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
displayName: Set Node.js version
|
displayName: Set Node.js version
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: '12.x'
|
versionSpec: $(nodeVersion)
|
||||||
- checkout: self
|
- checkout: self
|
||||||
submodules: true
|
submodules: true
|
||||||
fetchDepth: 1
|
fetchDepth: 1
|
||||||
@@ -836,7 +989,7 @@ stages:
|
|||||||
displayName: Frontend
|
displayName: Frontend
|
||||||
condition: eq(variables['System.PullRequest.IsFork'], 'False')
|
condition: eq(variables['System.PullRequest.IsFork'], 'False')
|
||||||
pool:
|
pool:
|
||||||
vmImage: windows-2019
|
vmImage: ${{ variables.windowsImage }}
|
||||||
steps:
|
steps:
|
||||||
- checkout: self # Need history for Sonar analysis
|
- checkout: self # Need history for Sonar analysis
|
||||||
- task: SonarCloudPrepare@1
|
- task: SonarCloudPrepare@1
|
||||||
@@ -852,6 +1005,60 @@ stages:
|
|||||||
cliProjectVersion: '$(radarrVersion)'
|
cliProjectVersion: '$(radarrVersion)'
|
||||||
cliSources: './frontend'
|
cliSources: './frontend'
|
||||||
- task: SonarCloudAnalyze@1
|
- task: SonarCloudAnalyze@1
|
||||||
|
|
||||||
|
- job: Api_Docs
|
||||||
|
displayName: API Docs
|
||||||
|
dependsOn: Prepare
|
||||||
|
condition: |
|
||||||
|
and
|
||||||
|
(
|
||||||
|
and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/develop')),
|
||||||
|
and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
||||||
|
)
|
||||||
|
|
||||||
|
pool:
|
||||||
|
vmImage: ${{ variables.windowsImage }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- task: UseDotNet@2
|
||||||
|
displayName: 'Install .net core'
|
||||||
|
inputs:
|
||||||
|
version: $(dotnetVersion)
|
||||||
|
- checkout: self
|
||||||
|
submodules: true
|
||||||
|
persistCredentials: true
|
||||||
|
fetchDepth: 1
|
||||||
|
- bash: ./docs.sh Windows
|
||||||
|
displayName: Create openapi.json
|
||||||
|
- bash: |
|
||||||
|
git config --global user.email "development@lidarr.audio"
|
||||||
|
git config --global user.name "Servarr"
|
||||||
|
git checkout -b api-docs
|
||||||
|
git add .
|
||||||
|
git status
|
||||||
|
if git status | grep modified
|
||||||
|
then
|
||||||
|
git commit -am 'Automated API Docs update'
|
||||||
|
git push -f --set-upstream origin api-docs
|
||||||
|
curl -X POST -H "Authorization: token ${GITHUBTOKEN}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/radarr/radarr/pulls -d '{"head":"api-docs","base":"develop","title":"Update API docs"}'
|
||||||
|
else
|
||||||
|
echo "No changes since last run"
|
||||||
|
fi
|
||||||
|
displayName: Commit API Doc Change
|
||||||
|
continueOnError: true
|
||||||
|
env:
|
||||||
|
GITHUBTOKEN: $(githubToken)
|
||||||
|
- task: CopyFiles@2
|
||||||
|
displayName: 'Copy openapi.json to: $(Build.ArtifactStagingDirectory)'
|
||||||
|
inputs:
|
||||||
|
SourceFolder: '$(Build.SourcesDirectory)'
|
||||||
|
Contents: |
|
||||||
|
**/*openapi.json
|
||||||
|
TargetFolder: '$(Build.ArtifactStagingDirectory)/api_docs'
|
||||||
|
- publish: $(Build.ArtifactStagingDirectory)/api_docs
|
||||||
|
artifact: 'APIDocs'
|
||||||
|
displayName: Publish API Docs Bundle
|
||||||
|
condition: and(succeeded(), eq(variables['System.JobAttempt'], '1'))
|
||||||
|
|
||||||
- job: Analyze_Backend
|
- job: Analyze_Backend
|
||||||
displayName: Backend
|
displayName: Backend
|
||||||
@@ -863,7 +1070,7 @@ stages:
|
|||||||
EnableAnalyzers: 'false'
|
EnableAnalyzers: 'false'
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: windows-2019
|
vmImage: ${{ variables.windowsImage }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- task: UseDotNet@2
|
- task: UseDotNet@2
|
||||||
@@ -920,7 +1127,7 @@ stages:
|
|||||||
- job:
|
- job:
|
||||||
displayName: Discord Notification
|
displayName: Discord Notification
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-18.04'
|
vmImage: ${{ variables.linuxImage }}
|
||||||
steps:
|
steps:
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
continueOnError: true
|
continueOnError: true
|
||||||
|
|||||||
83
build.sh
83
build.sh
@@ -25,14 +25,22 @@ UpdateVersionNumber()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
EnableBsdSupport()
|
EnableExtraPlatformsInSDK()
|
||||||
{
|
{
|
||||||
#todo enable sdk with
|
SDK_PATH=$(dotnet --list-sdks | grep -P '6\.\d\.\d+' | head -1 | sed 's/\(6\.[0-9]*\.[0-9]*\).*\[\(.*\)\]/\2\/\1/g')
|
||||||
#SDK_PATH=$(dotnet --list-sdks | grep -P '5\.\d\.\d+' | head -1 | sed 's/\(5\.[0-9]*\.[0-9]*\).*\[\(.*\)\]/\2\/\1/g')
|
BUNDLEDVERSIONS="${SDK_PATH}/Microsoft.NETCoreSdk.BundledVersions.props"
|
||||||
# BUNDLED_VERSIONS="${SDK_PATH}/Microsoft.NETCoreSdk.BundledVersions.props"
|
if grep -q freebsd-x64 $BUNDLEDVERSIONS; then
|
||||||
|
echo "Extra platforms already enabled"
|
||||||
|
else
|
||||||
|
echo "Enabling extra platform support"
|
||||||
|
sed -i.ORI 's/osx-x64/osx-x64;freebsd-x64;linux-x86/' $BUNDLEDVERSIONS
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
EnableExtraPlatforms()
|
||||||
|
{
|
||||||
if grep -qv freebsd-x64 src/Directory.Build.props; then
|
if grep -qv freebsd-x64 src/Directory.Build.props; then
|
||||||
sed -i'' -e "s^<RuntimeIdentifiers>\(.*\)</RuntimeIdentifiers>^<RuntimeIdentifiers>\1;freebsd-x64</RuntimeIdentifiers>^g" src/Directory.Build.props
|
sed -i'' -e "s^<RuntimeIdentifiers>\(.*\)</RuntimeIdentifiers>^<RuntimeIdentifiers>\1;freebsd-x64;linux-x86</RuntimeIdentifiers>^g" src/Directory.Build.props
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -233,6 +241,32 @@ Package()
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BuildInstaller()
|
||||||
|
{
|
||||||
|
local framework="$1"
|
||||||
|
local runtime="$2"
|
||||||
|
|
||||||
|
./_inno/ISCC.exe setup/radarr.iss "//DFramework=$framework" "//DRuntime=$runtime"
|
||||||
|
}
|
||||||
|
|
||||||
|
InstallInno()
|
||||||
|
{
|
||||||
|
ProgressStart "Installing portable Inno Setup"
|
||||||
|
|
||||||
|
rm -rf _inno
|
||||||
|
curl -s --output innosetup.exe "https://files.jrsoftware.org/is/6/innosetup-${INNOVERSION:-6.2.0}.exe"
|
||||||
|
mkdir _inno
|
||||||
|
./innosetup.exe //portable=1 //silent //currentuser //dir=.\\_inno
|
||||||
|
rm innosetup.exe
|
||||||
|
|
||||||
|
ProgressEnd "Installed portable Inno Setup"
|
||||||
|
}
|
||||||
|
|
||||||
|
RemoveInno()
|
||||||
|
{
|
||||||
|
rm -rf _inno
|
||||||
|
}
|
||||||
|
|
||||||
PackageTests()
|
PackageTests()
|
||||||
{
|
{
|
||||||
local framework="$1"
|
local framework="$1"
|
||||||
@@ -264,8 +298,10 @@ if [ $# -eq 0 ]; then
|
|||||||
BACKEND=YES
|
BACKEND=YES
|
||||||
FRONTEND=YES
|
FRONTEND=YES
|
||||||
PACKAGES=YES
|
PACKAGES=YES
|
||||||
|
INSTALLER=NO
|
||||||
LINT=YES
|
LINT=YES
|
||||||
ENABLE_BSD=NO
|
ENABLE_EXTRA_PLATFORMS=NO
|
||||||
|
ENABLE_EXTRA_PLATFORMS_IN_SDK=NO
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]
|
while [[ $# -gt 0 ]]
|
||||||
@@ -277,8 +313,12 @@ case $key in
|
|||||||
BACKEND=YES
|
BACKEND=YES
|
||||||
shift # past argument
|
shift # past argument
|
||||||
;;
|
;;
|
||||||
--enable-bsd)
|
--enable-bsd|--enable-extra-platforms)
|
||||||
ENABLE_BSD=YES
|
ENABLE_EXTRA_PLATFORMS=YES
|
||||||
|
shift # past argument
|
||||||
|
;;
|
||||||
|
--enable-extra-platforms-in-sdk)
|
||||||
|
ENABLE_EXTRA_PLATFORMS_IN_SDK=YES
|
||||||
shift # past argument
|
shift # past argument
|
||||||
;;
|
;;
|
||||||
-r|--runtime)
|
-r|--runtime)
|
||||||
@@ -299,6 +339,10 @@ case $key in
|
|||||||
PACKAGES=YES
|
PACKAGES=YES
|
||||||
shift # past argument
|
shift # past argument
|
||||||
;;
|
;;
|
||||||
|
--installer)
|
||||||
|
INSTALLER=YES
|
||||||
|
shift # past argument
|
||||||
|
;;
|
||||||
--lint)
|
--lint)
|
||||||
LINT=YES
|
LINT=YES
|
||||||
shift # past argument
|
shift # past argument
|
||||||
@@ -318,12 +362,17 @@ esac
|
|||||||
done
|
done
|
||||||
set -- "${POSITIONAL[@]}" # restore positional parameters
|
set -- "${POSITIONAL[@]}" # restore positional parameters
|
||||||
|
|
||||||
|
if [ "$ENABLE_EXTRA_PLATFORMS_IN_SDK" = "YES" ];
|
||||||
|
then
|
||||||
|
EnableExtraPlatformsInSDK
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$BACKEND" = "YES" ];
|
if [ "$BACKEND" = "YES" ];
|
||||||
then
|
then
|
||||||
UpdateVersionNumber
|
UpdateVersionNumber
|
||||||
if [ "$ENABLE_BSD" = "YES" ];
|
if [ "$ENABLE_EXTRA_PLATFORMS" = "YES" ];
|
||||||
then
|
then
|
||||||
EnableBsdSupport
|
EnableExtraPlatforms
|
||||||
fi
|
fi
|
||||||
Build
|
Build
|
||||||
if [[ -z "$RID" || -z "$FRAMEWORK" ]];
|
if [[ -z "$RID" || -z "$FRAMEWORK" ]];
|
||||||
@@ -333,9 +382,10 @@ then
|
|||||||
PackageTests "net6.0" "linux-x64"
|
PackageTests "net6.0" "linux-x64"
|
||||||
PackageTests "net6.0" "linux-musl-x64"
|
PackageTests "net6.0" "linux-musl-x64"
|
||||||
PackageTests "net6.0" "osx-x64"
|
PackageTests "net6.0" "osx-x64"
|
||||||
if [ "$ENABLE_BSD" = "YES" ];
|
if [ "$ENABLE_EXTRA_PLATFORMS" = "YES" ];
|
||||||
then
|
then
|
||||||
PackageTests "net6.0" "freebsd-x64"
|
PackageTests "net6.0" "freebsd-x64"
|
||||||
|
PackageTests "net6.0" "linux-x86"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
PackageTests "$FRAMEWORK" "$RID"
|
PackageTests "$FRAMEWORK" "$RID"
|
||||||
@@ -374,11 +424,20 @@ then
|
|||||||
Package "net6.0" "linux-musl-arm"
|
Package "net6.0" "linux-musl-arm"
|
||||||
Package "net6.0" "osx-x64"
|
Package "net6.0" "osx-x64"
|
||||||
Package "net6.0" "osx-arm64"
|
Package "net6.0" "osx-arm64"
|
||||||
if [ "$ENABLE_BSD" = "YES" ];
|
if [ "$ENABLE_EXTRA_PLATFORMS" = "YES" ];
|
||||||
then
|
then
|
||||||
Package "net6.0" "freebsd-x64"
|
Package "net6.0" "freebsd-x64"
|
||||||
|
Package "net6.0" "linux-x86"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
Package "$FRAMEWORK" "$RID"
|
Package "$FRAMEWORK" "$RID"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$INSTALLER" = "YES" ];
|
||||||
|
then
|
||||||
|
InstallInno
|
||||||
|
BuildInstaller "net6.0" "win-x64"
|
||||||
|
BuildInstaller "net6.0" "win-x86"
|
||||||
|
RemoveInno
|
||||||
|
fi
|
||||||
|
|||||||
38
docs.sh
Normal file
38
docs.sh
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
PLATFORM=$1
|
||||||
|
|
||||||
|
if [ "$PLATFORM" = "Windows" ]; then
|
||||||
|
RUNTIME="win-x64"
|
||||||
|
elif [ "$PLATFORM" = "Linux" ]; then
|
||||||
|
WHERE="linux-x64"
|
||||||
|
elif [ "$PLATFORM" = "Mac" ]; then
|
||||||
|
WHERE="osx-x64"
|
||||||
|
else
|
||||||
|
echo "Platform must be provided as first arguement: Windows, Linux or Mac"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
outputFolder='_output'
|
||||||
|
testPackageFolder='_tests'
|
||||||
|
|
||||||
|
rm -rf $outputFolder
|
||||||
|
rm -rf $testPackageFolder
|
||||||
|
|
||||||
|
slnFile=src/Radarr.sln
|
||||||
|
|
||||||
|
platform=Posix
|
||||||
|
|
||||||
|
dotnet clean $slnFile -c Debug
|
||||||
|
dotnet clean $slnFile -c Release
|
||||||
|
|
||||||
|
dotnet msbuild -restore $slnFile -p:Configuration=Debug -p:Platform=$platform -p:RuntimeIdentifiers=$RUNTIME -t:PublishAllRids
|
||||||
|
|
||||||
|
dotnet new tool-manifest
|
||||||
|
dotnet tool install --version 6.3.0 Swashbuckle.AspNetCore.Cli
|
||||||
|
|
||||||
|
dotnet tool run swagger tofile --output ./src/Radarr.Api.V3/openapi.json "$outputFolder/net6.0/$RUNTIME/radarr.console.dll" v3 &
|
||||||
|
|
||||||
|
sleep 45
|
||||||
|
|
||||||
|
kill %1
|
||||||
|
|
||||||
|
exit 0
|
||||||
@@ -61,33 +61,33 @@ class Blocklist extends Component {
|
|||||||
|
|
||||||
getSelectedIds = () => {
|
getSelectedIds = () => {
|
||||||
return getSelectedIds(this.state.selectedState);
|
return getSelectedIds(this.state.selectedState);
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Listeners
|
// Listeners
|
||||||
|
|
||||||
onSelectAllChange = ({ value }) => {
|
onSelectAllChange = ({ value }) => {
|
||||||
this.setState(selectAll(this.state.selectedState, value));
|
this.setState(selectAll(this.state.selectedState, value));
|
||||||
}
|
};
|
||||||
|
|
||||||
onSelectedChange = ({ id, value, shiftKey = false }) => {
|
onSelectedChange = ({ id, value, shiftKey = false }) => {
|
||||||
this.setState((state) => {
|
this.setState((state) => {
|
||||||
return toggleSelected(state, this.props.items, id, value, shiftKey);
|
return toggleSelected(state, this.props.items, id, value, shiftKey);
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onRemoveSelectedPress = () => {
|
onRemoveSelectedPress = () => {
|
||||||
this.setState({ isConfirmRemoveModalOpen: true });
|
this.setState({ isConfirmRemoveModalOpen: true });
|
||||||
}
|
};
|
||||||
|
|
||||||
onRemoveSelectedConfirmed = () => {
|
onRemoveSelectedConfirmed = () => {
|
||||||
this.props.onRemoveSelected(this.getSelectedIds());
|
this.props.onRemoveSelected(this.getSelectedIds());
|
||||||
this.setState({ isConfirmRemoveModalOpen: false });
|
this.setState({ isConfirmRemoveModalOpen: false });
|
||||||
}
|
};
|
||||||
|
|
||||||
onConfirmRemoveModalClose = () => {
|
onConfirmRemoveModalClose = () => {
|
||||||
this.setState({ isConfirmRemoveModalOpen: false });
|
this.setState({ isConfirmRemoveModalOpen: false });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
@@ -120,7 +120,7 @@ class Blocklist extends Component {
|
|||||||
<PageToolbar>
|
<PageToolbar>
|
||||||
<PageToolbarSection>
|
<PageToolbarSection>
|
||||||
<PageToolbarButton
|
<PageToolbarButton
|
||||||
label="Remove Selected"
|
label={translate('RemoveSelected')}
|
||||||
iconName={icons.REMOVE}
|
iconName={icons.REMOVE}
|
||||||
isDisabled={!selectedIds.length}
|
isDisabled={!selectedIds.length}
|
||||||
isSpinning={isRemoving}
|
isSpinning={isRemoving}
|
||||||
|
|||||||
@@ -65,37 +65,37 @@ class BlocklistConnector extends Component {
|
|||||||
|
|
||||||
repopulate = () => {
|
repopulate = () => {
|
||||||
this.props.fetchBlocklist();
|
this.props.fetchBlocklist();
|
||||||
}
|
};
|
||||||
//
|
//
|
||||||
// Listeners
|
// Listeners
|
||||||
|
|
||||||
onFirstPagePress = () => {
|
onFirstPagePress = () => {
|
||||||
this.props.gotoBlocklistFirstPage();
|
this.props.gotoBlocklistFirstPage();
|
||||||
}
|
};
|
||||||
|
|
||||||
onPreviousPagePress = () => {
|
onPreviousPagePress = () => {
|
||||||
this.props.gotoBlocklistPreviousPage();
|
this.props.gotoBlocklistPreviousPage();
|
||||||
}
|
};
|
||||||
|
|
||||||
onNextPagePress = () => {
|
onNextPagePress = () => {
|
||||||
this.props.gotoBlocklistNextPage();
|
this.props.gotoBlocklistNextPage();
|
||||||
}
|
};
|
||||||
|
|
||||||
onLastPagePress = () => {
|
onLastPagePress = () => {
|
||||||
this.props.gotoBlocklistLastPage();
|
this.props.gotoBlocklistLastPage();
|
||||||
}
|
};
|
||||||
|
|
||||||
onPageSelect = (page) => {
|
onPageSelect = (page) => {
|
||||||
this.props.gotoBlocklistPage({ page });
|
this.props.gotoBlocklistPage({ page });
|
||||||
}
|
};
|
||||||
|
|
||||||
onRemoveSelected = (ids) => {
|
onRemoveSelected = (ids) => {
|
||||||
this.props.removeBlocklistItems({ ids });
|
this.props.removeBlocklistItems({ ids });
|
||||||
}
|
};
|
||||||
|
|
||||||
onSortPress = (sortKey) => {
|
onSortPress = (sortKey) => {
|
||||||
this.props.setBlocklistSort({ sortKey });
|
this.props.setBlocklistSort({ sortKey });
|
||||||
}
|
};
|
||||||
|
|
||||||
onTableOptionChange = (payload) => {
|
onTableOptionChange = (payload) => {
|
||||||
this.props.setBlocklistTableOption(payload);
|
this.props.setBlocklistTableOption(payload);
|
||||||
@@ -103,11 +103,11 @@ class BlocklistConnector extends Component {
|
|||||||
if (payload.pageSize) {
|
if (payload.pageSize) {
|
||||||
this.props.gotoBlocklistFirstPage();
|
this.props.gotoBlocklistFirstPage();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
onClearBlocklistPress = () => {
|
onClearBlocklistPress = () => {
|
||||||
this.props.executeCommand({ name: commandNames.CLEAR_BLOCKLIST });
|
this.props.executeCommand({ name: commandNames.CLEAR_BLOCKLIST });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -32,11 +32,11 @@ class BlocklistRow extends Component {
|
|||||||
|
|
||||||
onDetailsPress = () => {
|
onDetailsPress = () => {
|
||||||
this.setState({ isDetailsModalOpen: true });
|
this.setState({ isDetailsModalOpen: true });
|
||||||
}
|
};
|
||||||
|
|
||||||
onDetailsModalClose = () => {
|
onDetailsModalClose = () => {
|
||||||
this.setState({ isDetailsModalOpen: false });
|
this.setState({ isDetailsModalOpen: false });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ function HistoryDetails(props) {
|
|||||||
releaseGroup,
|
releaseGroup,
|
||||||
nzbInfoUrl,
|
nzbInfoUrl,
|
||||||
downloadClient,
|
downloadClient,
|
||||||
|
downloadClientName,
|
||||||
downloadId,
|
downloadId,
|
||||||
age,
|
age,
|
||||||
ageHours,
|
ageHours,
|
||||||
@@ -32,6 +33,8 @@ function HistoryDetails(props) {
|
|||||||
publishedDate
|
publishedDate
|
||||||
} = data;
|
} = data;
|
||||||
|
|
||||||
|
const downloadClientNameInfo = downloadClientName ?? downloadClient;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DescriptionList>
|
<DescriptionList>
|
||||||
<DescriptionListItem
|
<DescriptionListItem
|
||||||
@@ -71,11 +74,12 @@ function HistoryDetails(props) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
!!downloadClient &&
|
downloadClientNameInfo ?
|
||||||
<DescriptionListItem
|
<DescriptionListItem
|
||||||
title={translate('DownloadClient')}
|
title={translate('DownloadClient')}
|
||||||
data={downloadClient}
|
data={downloadClientNameInfo}
|
||||||
/>
|
/> :
|
||||||
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -57,38 +57,38 @@ class HistoryConnector extends Component {
|
|||||||
|
|
||||||
repopulate = () => {
|
repopulate = () => {
|
||||||
this.props.fetchHistory();
|
this.props.fetchHistory();
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Listeners
|
// Listeners
|
||||||
|
|
||||||
onFirstPagePress = () => {
|
onFirstPagePress = () => {
|
||||||
this.props.gotoHistoryFirstPage();
|
this.props.gotoHistoryFirstPage();
|
||||||
}
|
};
|
||||||
|
|
||||||
onPreviousPagePress = () => {
|
onPreviousPagePress = () => {
|
||||||
this.props.gotoHistoryPreviousPage();
|
this.props.gotoHistoryPreviousPage();
|
||||||
}
|
};
|
||||||
|
|
||||||
onNextPagePress = () => {
|
onNextPagePress = () => {
|
||||||
this.props.gotoHistoryNextPage();
|
this.props.gotoHistoryNextPage();
|
||||||
}
|
};
|
||||||
|
|
||||||
onLastPagePress = () => {
|
onLastPagePress = () => {
|
||||||
this.props.gotoHistoryLastPage();
|
this.props.gotoHistoryLastPage();
|
||||||
}
|
};
|
||||||
|
|
||||||
onPageSelect = (page) => {
|
onPageSelect = (page) => {
|
||||||
this.props.gotoHistoryPage({ page });
|
this.props.gotoHistoryPage({ page });
|
||||||
}
|
};
|
||||||
|
|
||||||
onSortPress = (sortKey) => {
|
onSortPress = (sortKey) => {
|
||||||
this.props.setHistorySort({ sortKey });
|
this.props.setHistorySort({ sortKey });
|
||||||
}
|
};
|
||||||
|
|
||||||
onFilterSelect = (selectedFilterKey) => {
|
onFilterSelect = (selectedFilterKey) => {
|
||||||
this.props.setHistoryFilter({ selectedFilterKey });
|
this.props.setHistoryFilter({ selectedFilterKey });
|
||||||
}
|
};
|
||||||
|
|
||||||
onTableOptionChange = (payload) => {
|
onTableOptionChange = (payload) => {
|
||||||
this.props.setHistoryTableOption(payload);
|
this.props.setHistoryTableOption(payload);
|
||||||
@@ -96,7 +96,7 @@ class HistoryConnector extends Component {
|
|||||||
if (payload.pageSize) {
|
if (payload.pageSize) {
|
||||||
this.props.gotoHistoryFirstPage();
|
this.props.gotoHistoryFirstPage();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -41,11 +41,11 @@ class HistoryRow extends Component {
|
|||||||
|
|
||||||
onDetailsPress = () => {
|
onDetailsPress = () => {
|
||||||
this.setState({ isDetailsModalOpen: true });
|
this.setState({ isDetailsModalOpen: true });
|
||||||
}
|
};
|
||||||
|
|
||||||
onDetailsModalClose = () => {
|
onDetailsModalClose = () => {
|
||||||
this.setState({ isDetailsModalOpen: false });
|
this.setState({ isDetailsModalOpen: false });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class HistoryRowConnector extends Component {
|
|||||||
|
|
||||||
onMarkAsFailedPress = () => {
|
onMarkAsFailedPress = () => {
|
||||||
this.props.markAsFailed({ id: this.props.id });
|
this.props.markAsFailed({ id: this.props.id });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -90,45 +90,45 @@ class Queue extends Component {
|
|||||||
|
|
||||||
getSelectedIds = () => {
|
getSelectedIds = () => {
|
||||||
return getSelectedIds(this.state.selectedState);
|
return getSelectedIds(this.state.selectedState);
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Listeners
|
// Listeners
|
||||||
|
|
||||||
onQueueRowModalOpenOrClose = (isOpen) => {
|
onQueueRowModalOpenOrClose = (isOpen) => {
|
||||||
this._shouldBlockRefresh = isOpen;
|
this._shouldBlockRefresh = isOpen;
|
||||||
}
|
};
|
||||||
|
|
||||||
onSelectAllChange = ({ value }) => {
|
onSelectAllChange = ({ value }) => {
|
||||||
this.setState(selectAll(this.state.selectedState, value));
|
this.setState(selectAll(this.state.selectedState, value));
|
||||||
}
|
};
|
||||||
|
|
||||||
onSelectedChange = ({ id, value, shiftKey = false }) => {
|
onSelectedChange = ({ id, value, shiftKey = false }) => {
|
||||||
this.setState((state) => {
|
this.setState((state) => {
|
||||||
return toggleSelected(state, this.props.items, id, value, shiftKey);
|
return toggleSelected(state, this.props.items, id, value, shiftKey);
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onGrabSelectedPress = () => {
|
onGrabSelectedPress = () => {
|
||||||
this.props.onGrabSelectedPress(this.getSelectedIds());
|
this.props.onGrabSelectedPress(this.getSelectedIds());
|
||||||
}
|
};
|
||||||
|
|
||||||
onRemoveSelectedPress = () => {
|
onRemoveSelectedPress = () => {
|
||||||
this.setState({ isConfirmRemoveModalOpen: true }, () => {
|
this.setState({ isConfirmRemoveModalOpen: true }, () => {
|
||||||
this._shouldBlockRefresh = true;
|
this._shouldBlockRefresh = true;
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onRemoveSelectedConfirmed = (payload) => {
|
onRemoveSelectedConfirmed = (payload) => {
|
||||||
this._shouldBlockRefresh = false;
|
this._shouldBlockRefresh = false;
|
||||||
this.props.onRemoveSelectedPress({ ids: this.getSelectedIds(), ...payload });
|
this.props.onRemoveSelectedPress({ ids: this.getSelectedIds(), ...payload });
|
||||||
this.setState({ isConfirmRemoveModalOpen: false });
|
this.setState({ isConfirmRemoveModalOpen: false });
|
||||||
}
|
};
|
||||||
|
|
||||||
onConfirmRemoveModalClose = () => {
|
onConfirmRemoveModalClose = () => {
|
||||||
this._shouldBlockRefresh = false;
|
this._shouldBlockRefresh = false;
|
||||||
this.setState({ isConfirmRemoveModalOpen: false });
|
this.setState({ isConfirmRemoveModalOpen: false });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -77,34 +77,34 @@ class QueueConnector extends Component {
|
|||||||
|
|
||||||
repopulate = () => {
|
repopulate = () => {
|
||||||
this.props.fetchQueue();
|
this.props.fetchQueue();
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Listeners
|
// Listeners
|
||||||
|
|
||||||
onFirstPagePress = () => {
|
onFirstPagePress = () => {
|
||||||
this.props.gotoQueueFirstPage();
|
this.props.gotoQueueFirstPage();
|
||||||
}
|
};
|
||||||
|
|
||||||
onPreviousPagePress = () => {
|
onPreviousPagePress = () => {
|
||||||
this.props.gotoQueuePreviousPage();
|
this.props.gotoQueuePreviousPage();
|
||||||
}
|
};
|
||||||
|
|
||||||
onNextPagePress = () => {
|
onNextPagePress = () => {
|
||||||
this.props.gotoQueueNextPage();
|
this.props.gotoQueueNextPage();
|
||||||
}
|
};
|
||||||
|
|
||||||
onLastPagePress = () => {
|
onLastPagePress = () => {
|
||||||
this.props.gotoQueueLastPage();
|
this.props.gotoQueueLastPage();
|
||||||
}
|
};
|
||||||
|
|
||||||
onPageSelect = (page) => {
|
onPageSelect = (page) => {
|
||||||
this.props.gotoQueuePage({ page });
|
this.props.gotoQueuePage({ page });
|
||||||
}
|
};
|
||||||
|
|
||||||
onSortPress = (sortKey) => {
|
onSortPress = (sortKey) => {
|
||||||
this.props.setQueueSort({ sortKey });
|
this.props.setQueueSort({ sortKey });
|
||||||
}
|
};
|
||||||
|
|
||||||
onTableOptionChange = (payload) => {
|
onTableOptionChange = (payload) => {
|
||||||
this.props.setQueueTableOption(payload);
|
this.props.setQueueTableOption(payload);
|
||||||
@@ -112,21 +112,21 @@ class QueueConnector extends Component {
|
|||||||
if (payload.pageSize) {
|
if (payload.pageSize) {
|
||||||
this.props.gotoQueueFirstPage();
|
this.props.gotoQueueFirstPage();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
onRefreshPress = () => {
|
onRefreshPress = () => {
|
||||||
this.props.executeCommand({
|
this.props.executeCommand({
|
||||||
name: commandNames.REFRESH_MONITORED_DOWNLOADS
|
name: commandNames.REFRESH_MONITORED_DOWNLOADS
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onGrabSelectedPress = (ids) => {
|
onGrabSelectedPress = (ids) => {
|
||||||
this.props.grabQueueItems({ ids });
|
this.props.grabQueueItems({ ids });
|
||||||
}
|
};
|
||||||
|
|
||||||
onRemoveSelectedPress = (payload) => {
|
onRemoveSelectedPress = (payload) => {
|
||||||
this.props.removeQueueItems(payload);
|
this.props.removeQueueItems(payload);
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class QueueOptions extends Component {
|
|||||||
[name]: value
|
[name]: value
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class QueueRow extends Component {
|
|||||||
|
|
||||||
onRemoveQueueItemPress = () => {
|
onRemoveQueueItemPress = () => {
|
||||||
this.setState({ isRemoveQueueItemModalOpen: true });
|
this.setState({ isRemoveQueueItemModalOpen: true });
|
||||||
}
|
};
|
||||||
|
|
||||||
onRemoveQueueItemModalConfirmed = (blocklist) => {
|
onRemoveQueueItemModalConfirmed = (blocklist) => {
|
||||||
const {
|
const {
|
||||||
@@ -52,25 +52,25 @@ class QueueRow extends Component {
|
|||||||
onRemoveQueueItemPress(blocklist);
|
onRemoveQueueItemPress(blocklist);
|
||||||
|
|
||||||
this.setState({ isRemoveQueueItemModalOpen: false });
|
this.setState({ isRemoveQueueItemModalOpen: false });
|
||||||
}
|
};
|
||||||
|
|
||||||
onRemoveQueueItemModalClose = () => {
|
onRemoveQueueItemModalClose = () => {
|
||||||
this.props.onQueueRowModalOpenOrClose(false);
|
this.props.onQueueRowModalOpenOrClose(false);
|
||||||
|
|
||||||
this.setState({ isRemoveQueueItemModalOpen: false });
|
this.setState({ isRemoveQueueItemModalOpen: false });
|
||||||
}
|
};
|
||||||
|
|
||||||
onInteractiveImportPress = () => {
|
onInteractiveImportPress = () => {
|
||||||
this.props.onQueueRowModalOpenOrClose(true);
|
this.props.onQueueRowModalOpenOrClose(true);
|
||||||
|
|
||||||
this.setState({ isInteractiveImportModalOpen: true });
|
this.setState({ isInteractiveImportModalOpen: true });
|
||||||
}
|
};
|
||||||
|
|
||||||
onInteractiveImportModalClose = () => {
|
onInteractiveImportModalClose = () => {
|
||||||
this.props.onQueueRowModalOpenOrClose(false);
|
this.props.onQueueRowModalOpenOrClose(false);
|
||||||
|
|
||||||
this.setState({ isInteractiveImportModalOpen: false });
|
this.setState({ isInteractiveImportModalOpen: false });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -37,11 +37,11 @@ class QueueRowConnector extends Component {
|
|||||||
|
|
||||||
onGrabPress = () => {
|
onGrabPress = () => {
|
||||||
this.props.grabQueueItem({ id: this.props.id });
|
this.props.grabQueueItem({ id: this.props.id });
|
||||||
}
|
};
|
||||||
|
|
||||||
onRemoveQueueItemPress = (payload) => {
|
onRemoveQueueItemPress = (payload) => {
|
||||||
this.props.removeQueueItem({ id: this.props.id, ...payload });
|
this.props.removeQueueItem({ id: this.props.id, ...payload });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -34,30 +34,30 @@ class RemoveQueueItemModal extends Component {
|
|||||||
remove: true,
|
remove: true,
|
||||||
blocklist: false
|
blocklist: false
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Listeners
|
// Listeners
|
||||||
|
|
||||||
onRemoveChange = ({ value }) => {
|
onRemoveChange = ({ value }) => {
|
||||||
this.setState({ remove: value });
|
this.setState({ remove: value });
|
||||||
}
|
};
|
||||||
|
|
||||||
onBlocklistChange = ({ value }) => {
|
onBlocklistChange = ({ value }) => {
|
||||||
this.setState({ blocklist: value });
|
this.setState({ blocklist: value });
|
||||||
}
|
};
|
||||||
|
|
||||||
onRemoveConfirmed = () => {
|
onRemoveConfirmed = () => {
|
||||||
const state = this.state;
|
const state = this.state;
|
||||||
|
|
||||||
this.resetState();
|
this.resetState();
|
||||||
this.props.onRemovePress(state);
|
this.props.onRemovePress(state);
|
||||||
}
|
};
|
||||||
|
|
||||||
onModalClose = () => {
|
onModalClose = () => {
|
||||||
this.resetState();
|
this.resetState();
|
||||||
this.props.onModalClose();
|
this.props.onModalClose();
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -30,35 +30,35 @@ class RemoveQueueItemsModal extends Component {
|
|||||||
//
|
//
|
||||||
// Control
|
// Control
|
||||||
|
|
||||||
resetState = function() {
|
resetState = function() {
|
||||||
this.setState({
|
this.setState({
|
||||||
remove: true,
|
remove: true,
|
||||||
blocklist: false
|
blocklist: false
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Listeners
|
// Listeners
|
||||||
|
|
||||||
onRemoveChange = ({ value }) => {
|
onRemoveChange = ({ value }) => {
|
||||||
this.setState({ remove: value });
|
this.setState({ remove: value });
|
||||||
}
|
};
|
||||||
|
|
||||||
onBlocklistChange = ({ value }) => {
|
onBlocklistChange = ({ value }) => {
|
||||||
this.setState({ blocklist: value });
|
this.setState({ blocklist: value });
|
||||||
}
|
};
|
||||||
|
|
||||||
onRemoveConfirmed = () => {
|
onRemoveConfirmed = () => {
|
||||||
const state = this.state;
|
const state = this.state;
|
||||||
|
|
||||||
this.resetState();
|
this.resetState();
|
||||||
this.props.onRemovePress(state);
|
this.props.onRemovePress(state);
|
||||||
}
|
};
|
||||||
|
|
||||||
onModalClose = () => {
|
onModalClose = () => {
|
||||||
this.resetState();
|
this.resetState();
|
||||||
this.props.onModalClose();
|
this.props.onModalClose();
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -67,12 +67,12 @@ class AddNewMovie extends Component {
|
|||||||
this.props.onClearMovieLookup();
|
this.props.onClearMovieLookup();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onClearMovieLookupPress = () => {
|
onClearMovieLookupPress = () => {
|
||||||
this.setState({ term: '' });
|
this.setState({ term: '' });
|
||||||
this.props.onClearMovieLookup();
|
this.props.onClearMovieLookup();
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
@@ -161,7 +161,7 @@ class AddNewMovie extends Component {
|
|||||||
{translate('YouCanAlsoSearch')}
|
{translate('YouCanAlsoSearch')}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Link to="https://wiki.servarr.com/radarr/faq#why-cant-i-add-a-new-movie-to-radarr">
|
<Link to="https://wiki.servarr.com/radarr/faq#why-can-i-not-add-a-new-movie-to-radarr">
|
||||||
{translate('CantFindMovie')}
|
{translate('CantFindMovie')}
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -79,11 +79,11 @@ class AddNewMovieConnector extends Component {
|
|||||||
this.props.lookupMovie({ term });
|
this.props.lookupMovie({ term });
|
||||||
}, 300);
|
}, 300);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
onClearMovieLookup = () => {
|
onClearMovieLookup = () => {
|
||||||
this.props.clearAddMovie();
|
this.props.clearAddMovie();
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -22,11 +22,11 @@ class AddNewMovieModalContent extends Component {
|
|||||||
|
|
||||||
onQualityProfileIdChange = ({ value }) => {
|
onQualityProfileIdChange = ({ value }) => {
|
||||||
this.props.onInputChange({ name: 'qualityProfileId', value: parseInt(value) });
|
this.props.onInputChange({ name: 'qualityProfileId', value: parseInt(value) });
|
||||||
}
|
};
|
||||||
|
|
||||||
onAddMoviePress = () => {
|
onAddMoviePress = () => {
|
||||||
this.props.onAddMoviePress();
|
this.props.onAddMoviePress();
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class AddNewMovieModalContentConnector extends Component {
|
|||||||
|
|
||||||
onInputChange = ({ name, value }) => {
|
onInputChange = ({ name, value }) => {
|
||||||
this.props.setAddMovieDefault({ [name]: value });
|
this.props.setAddMovieDefault({ [name]: value });
|
||||||
}
|
};
|
||||||
|
|
||||||
onAddMoviePress = () => {
|
onAddMoviePress = () => {
|
||||||
const {
|
const {
|
||||||
@@ -73,7 +73,7 @@ class AddNewMovieModalContentConnector extends Component {
|
|||||||
searchForMovie: searchForMovie.value,
|
searchForMovie: searchForMovie.value,
|
||||||
tags: tags.value
|
tags: tags.value
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -39,15 +39,15 @@ class AddNewMovieSearchResult extends Component {
|
|||||||
|
|
||||||
onPress = () => {
|
onPress = () => {
|
||||||
this.setState({ isNewAddMovieModalOpen: true });
|
this.setState({ isNewAddMovieModalOpen: true });
|
||||||
}
|
};
|
||||||
|
|
||||||
onAddMovieModalClose = () => {
|
onAddMovieModalClose = () => {
|
||||||
this.setState({ isNewAddMovieModalOpen: false });
|
this.setState({ isNewAddMovieModalOpen: false });
|
||||||
}
|
};
|
||||||
|
|
||||||
onExternalLinkPress = (event) => {
|
onExternalLinkPress = (event) => {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
@@ -86,6 +86,13 @@ class AddNewMovieSearchResult extends Component {
|
|||||||
} = this.state;
|
} = this.state;
|
||||||
|
|
||||||
const linkProps = isExistingMovie ? { to: `/movie/${titleSlug}` } : { onPress: this.onPress };
|
const linkProps = isExistingMovie ? { to: `/movie/${titleSlug}` } : { onPress: this.onPress };
|
||||||
|
const posterWidth = 167;
|
||||||
|
const posterHeight = 250;
|
||||||
|
|
||||||
|
const elementStyle = {
|
||||||
|
width: `${posterWidth}px`,
|
||||||
|
height: `${posterHeight}px`
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.searchResult}>
|
<div className={styles.searchResult}>
|
||||||
@@ -102,6 +109,7 @@ class AddNewMovieSearchResult extends Component {
|
|||||||
<div className={styles.posterContainer}>
|
<div className={styles.posterContainer}>
|
||||||
<MoviePoster
|
<MoviePoster
|
||||||
className={styles.poster}
|
className={styles.poster}
|
||||||
|
style={elementStyle}
|
||||||
images={images}
|
images={images}
|
||||||
size={250}
|
size={250}
|
||||||
overflow={true}
|
overflow={true}
|
||||||
@@ -114,7 +122,7 @@ class AddNewMovieSearchResult extends Component {
|
|||||||
monitored={monitored}
|
monitored={monitored}
|
||||||
hasFile={hasFile}
|
hasFile={hasFile}
|
||||||
status={status}
|
status={status}
|
||||||
posterWidth={167}
|
posterWidth={posterWidth}
|
||||||
detailedProgressBar={true}
|
detailedProgressBar={true}
|
||||||
queueStatus={queueStatus}
|
queueStatus={queueStatus}
|
||||||
queueState={queueState}
|
queueState={queueState}
|
||||||
@@ -183,7 +191,7 @@ class AddNewMovieSearchResult extends Component {
|
|||||||
<div>
|
<div>
|
||||||
<Label size={sizes.LARGE}>
|
<Label size={sizes.LARGE}>
|
||||||
<HeartRating
|
<HeartRating
|
||||||
rating={ratings.value}
|
ratings={ratings}
|
||||||
iconSize={13}
|
iconSize={13}
|
||||||
/>
|
/>
|
||||||
</Label>
|
</Label>
|
||||||
|
|||||||
@@ -32,25 +32,25 @@ class ImportMovie extends Component {
|
|||||||
|
|
||||||
setScrollerRef = (ref) => {
|
setScrollerRef = (ref) => {
|
||||||
this.setState({ scroller: ref });
|
this.setState({ scroller: ref });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Listeners
|
// Listeners
|
||||||
|
|
||||||
getSelectedIds = () => {
|
getSelectedIds = () => {
|
||||||
return getSelectedIds(this.state.selectedState, { parseIds: false });
|
return getSelectedIds(this.state.selectedState, { parseIds: false });
|
||||||
}
|
};
|
||||||
|
|
||||||
onSelectAllChange = ({ value }) => {
|
onSelectAllChange = ({ value }) => {
|
||||||
// Only select non-dupes
|
// Only select non-dupes
|
||||||
this.setState(selectAll(this.state.selectedState, value));
|
this.setState(selectAll(this.state.selectedState, value));
|
||||||
}
|
};
|
||||||
|
|
||||||
onSelectedChange = ({ id, value, shiftKey = false }) => {
|
onSelectedChange = ({ id, value, shiftKey = false }) => {
|
||||||
this.setState((state) => {
|
this.setState((state) => {
|
||||||
return toggleSelected(state, this.props.items, id, value, shiftKey);
|
return toggleSelected(state, this.props.items, id, value, shiftKey);
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onRemoveSelectedStateItem = (id) => {
|
onRemoveSelectedStateItem = (id) => {
|
||||||
this.setState((state) => {
|
this.setState((state) => {
|
||||||
@@ -62,15 +62,15 @@ class ImportMovie extends Component {
|
|||||||
selectedState
|
selectedState
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onInputChange = ({ name, value }) => {
|
onInputChange = ({ name, value }) => {
|
||||||
this.props.onInputChange(this.getSelectedIds(), name, value);
|
this.props.onInputChange(this.getSelectedIds(), name, value);
|
||||||
}
|
};
|
||||||
|
|
||||||
onImportPress = () => {
|
onImportPress = () => {
|
||||||
this.props.onImportPress(this.getSelectedIds());
|
this.props.onImportPress(this.getSelectedIds());
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -112,11 +112,11 @@ class ImportMovieConnector extends Component {
|
|||||||
[name]: value
|
[name]: value
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onImportPress = (ids) => {
|
onImportPress = (ids) => {
|
||||||
this.props.dispatchImportMovie({ ids });
|
this.props.dispatchImportMovie({ ids });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ class ImportMovieFooter extends Component {
|
|||||||
onInputChange = ({ name, value }) => {
|
onInputChange = ({ name, value }) => {
|
||||||
this.setState({ [name]: value });
|
this.setState({ [name]: value });
|
||||||
this.props.onInputChange({ name, value });
|
this.props.onInputChange({ name, value });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class ImportMovieRowConnector extends Component {
|
|||||||
id: this.props.id,
|
id: this.props.id,
|
||||||
[name]: value
|
[name]: value
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ class ImportMovieTable extends Component {
|
|||||||
/>
|
/>
|
||||||
</VirtualTableRow>
|
</VirtualTableRow>
|
||||||
);
|
);
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class ImportMovieSearchResult extends Component {
|
|||||||
|
|
||||||
onPress = () => {
|
onPress = () => {
|
||||||
this.props.onPress(this.props.tmdbId);
|
this.props.onPress(this.props.tmdbId);
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class ImportMovieSelectMovie extends Component {
|
|||||||
this.setState({ isOpen: false });
|
this.setState({ isOpen: false });
|
||||||
this._removeListener();
|
this._removeListener();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
onPress = () => {
|
onPress = () => {
|
||||||
if (this.state.isOpen) {
|
if (this.state.isOpen) {
|
||||||
@@ -79,7 +79,7 @@ class ImportMovieSelectMovie extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.setState({ isOpen: !this.state.isOpen });
|
this.setState({ isOpen: !this.state.isOpen });
|
||||||
}
|
};
|
||||||
|
|
||||||
onSearchInputChange = ({ value }) => {
|
onSearchInputChange = ({ value }) => {
|
||||||
if (this._movieLookupTimeout) {
|
if (this._movieLookupTimeout) {
|
||||||
@@ -91,17 +91,17 @@ class ImportMovieSelectMovie extends Component {
|
|||||||
this.props.onSearchInputChange(value);
|
this.props.onSearchInputChange(value);
|
||||||
}, 200);
|
}, 200);
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onRefreshPress = () => {
|
onRefreshPress = () => {
|
||||||
this.props.onSearchInputChange(this.state.term);
|
this.props.onSearchInputChange(this.state.term);
|
||||||
}
|
};
|
||||||
|
|
||||||
onMovieSelect = (tmdbId) => {
|
onMovieSelect = (tmdbId) => {
|
||||||
this.setState({ isOpen: false });
|
this.setState({ isOpen: false });
|
||||||
|
|
||||||
this.props.onMovieSelect(tmdbId);
|
this.props.onMovieSelect(tmdbId);
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class ImportMovieSelectMovieConnector extends Component {
|
|||||||
term,
|
term,
|
||||||
topOfQueue: true
|
topOfQueue: true
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onMovieSelect = (tmdbId) => {
|
onMovieSelect = (tmdbId) => {
|
||||||
const {
|
const {
|
||||||
@@ -48,7 +48,7 @@ class ImportMovieSelectMovieConnector extends Component {
|
|||||||
id,
|
id,
|
||||||
selectedMovie: _.find(items, { tmdbId })
|
selectedMovie: _.find(items, { tmdbId })
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class ImportMovieRootFolderRowConnector extends Component {
|
|||||||
|
|
||||||
onDeletePress = () => {
|
onDeletePress = () => {
|
||||||
this.props.deleteRootFolder({ id: this.props.id });
|
this.props.deleteRootFolder({ id: this.props.id });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -55,15 +55,15 @@ class ImportMovieSelectFolder extends Component {
|
|||||||
|
|
||||||
onAddNewRootFolderPress = () => {
|
onAddNewRootFolderPress = () => {
|
||||||
this.setState({ isAddNewRootFolderModalOpen: true });
|
this.setState({ isAddNewRootFolderModalOpen: true });
|
||||||
}
|
};
|
||||||
|
|
||||||
onNewRootFolderSelect = ({ value }) => {
|
onNewRootFolderSelect = ({ value }) => {
|
||||||
this.props.onNewRootFolderSelect(value);
|
this.props.onNewRootFolderSelect(value);
|
||||||
}
|
};
|
||||||
|
|
||||||
onAddRootFolderModalClose = () => {
|
onAddRootFolderModalClose = () => {
|
||||||
this.setState({ isAddNewRootFolderModalOpen: false });
|
this.setState({ isAddNewRootFolderModalOpen: false });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -58,11 +58,11 @@ class ImportMovieSelectFolderConnector extends Component {
|
|||||||
|
|
||||||
onNewRootFolderSelect = (path) => {
|
onNewRootFolderSelect = (path) => {
|
||||||
this.props.addRootFolder({ path });
|
this.props.addRootFolder({ path });
|
||||||
}
|
};
|
||||||
|
|
||||||
onDeleteRootFolderPress = (id) => {
|
onDeleteRootFolderPress = (id) => {
|
||||||
this.props.deleteRootFolder({ id });
|
this.props.deleteRootFolder({ id });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -27,11 +27,11 @@ class AgendaEvent extends Component {
|
|||||||
|
|
||||||
onPress = () => {
|
onPress = () => {
|
||||||
this.setState({ isDetailsModalOpen: true });
|
this.setState({ isDetailsModalOpen: true });
|
||||||
}
|
};
|
||||||
|
|
||||||
onDetailsModalClose = () => {
|
onDetailsModalClose = () => {
|
||||||
this.setState({ isDetailsModalOpen: false });
|
this.setState({ isDetailsModalOpen: false });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -119,43 +119,43 @@ class CalendarConnector extends Component {
|
|||||||
|
|
||||||
this.props.fetchQueueDetails({ time, view });
|
this.props.fetchQueueDetails({ time, view });
|
||||||
this.props.fetchCalendar({ time, view });
|
this.props.fetchCalendar({ time, view });
|
||||||
}
|
};
|
||||||
|
|
||||||
scheduleUpdate = () => {
|
scheduleUpdate = () => {
|
||||||
this.clearUpdateTimeout();
|
this.clearUpdateTimeout();
|
||||||
|
|
||||||
this.updateTimeoutId = setTimeout(this.updateCalendar, UPDATE_DELAY);
|
this.updateTimeoutId = setTimeout(this.updateCalendar, UPDATE_DELAY);
|
||||||
}
|
};
|
||||||
|
|
||||||
clearUpdateTimeout = () => {
|
clearUpdateTimeout = () => {
|
||||||
if (this.updateTimeoutId) {
|
if (this.updateTimeoutId) {
|
||||||
clearTimeout(this.updateTimeoutId);
|
clearTimeout(this.updateTimeoutId);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
updateCalendar = () => {
|
updateCalendar = () => {
|
||||||
this.props.gotoCalendarToday();
|
this.props.gotoCalendarToday();
|
||||||
this.scheduleUpdate();
|
this.scheduleUpdate();
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Listeners
|
// Listeners
|
||||||
|
|
||||||
onCalendarViewChange = (view) => {
|
onCalendarViewChange = (view) => {
|
||||||
this.props.setCalendarView({ view });
|
this.props.setCalendarView({ view });
|
||||||
}
|
};
|
||||||
|
|
||||||
onTodayPress = () => {
|
onTodayPress = () => {
|
||||||
this.props.gotoCalendarToday();
|
this.props.gotoCalendarToday();
|
||||||
}
|
};
|
||||||
|
|
||||||
onPreviousPress = () => {
|
onPreviousPress = () => {
|
||||||
this.props.gotoCalendarPreviousRange();
|
this.props.gotoCalendarPreviousRange();
|
||||||
}
|
};
|
||||||
|
|
||||||
onNextPress = () => {
|
onNextPress = () => {
|
||||||
this.props.gotoCalendarNextRange();
|
this.props.gotoCalendarNextRange();
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -44,23 +44,23 @@ class CalendarPage extends Component {
|
|||||||
const days = Math.max(3, Math.min(7, Math.floor(width / MINIMUM_DAY_WIDTH)));
|
const days = Math.max(3, Math.min(7, Math.floor(width / MINIMUM_DAY_WIDTH)));
|
||||||
|
|
||||||
this.props.onDaysCountChange(days);
|
this.props.onDaysCountChange(days);
|
||||||
}
|
};
|
||||||
|
|
||||||
onGetCalendarLinkPress = () => {
|
onGetCalendarLinkPress = () => {
|
||||||
this.setState({ isCalendarLinkModalOpen: true });
|
this.setState({ isCalendarLinkModalOpen: true });
|
||||||
}
|
};
|
||||||
|
|
||||||
onGetCalendarLinkModalClose = () => {
|
onGetCalendarLinkModalClose = () => {
|
||||||
this.setState({ isCalendarLinkModalOpen: false });
|
this.setState({ isCalendarLinkModalOpen: false });
|
||||||
}
|
};
|
||||||
|
|
||||||
onOptionsPress = () => {
|
onOptionsPress = () => {
|
||||||
this.setState({ isOptionsModalOpen: true });
|
this.setState({ isOptionsModalOpen: true });
|
||||||
}
|
};
|
||||||
|
|
||||||
onOptionsModalClose = () => {
|
onOptionsModalClose = () => {
|
||||||
this.setState({ isOptionsModalOpen: false });
|
this.setState({ isOptionsModalOpen: false });
|
||||||
}
|
};
|
||||||
|
|
||||||
onSearchMissingPress = () => {
|
onSearchMissingPress = () => {
|
||||||
const {
|
const {
|
||||||
@@ -69,7 +69,7 @@ class CalendarPage extends Component {
|
|||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
onSearchMissingPress(missingMovieIds);
|
onSearchMissingPress(missingMovieIds);
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -60,20 +60,20 @@ class CalendarDays extends Component {
|
|||||||
this.setState({ todaysDate: todaysDate.toISOString() });
|
this.setState({ todaysDate: todaysDate.toISOString() });
|
||||||
|
|
||||||
this.updateTimeoutId = setTimeout(this.scheduleUpdate, diff);
|
this.updateTimeoutId = setTimeout(this.scheduleUpdate, diff);
|
||||||
}
|
};
|
||||||
|
|
||||||
clearUpdateTimeout = () => {
|
clearUpdateTimeout = () => {
|
||||||
if (this.updateTimeoutId) {
|
if (this.updateTimeoutId) {
|
||||||
clearTimeout(this.updateTimeoutId);
|
clearTimeout(this.updateTimeoutId);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Listeners
|
// Listeners
|
||||||
|
|
||||||
onEventModalOpenToggle = (isEventModalOpen) => {
|
onEventModalOpenToggle = (isEventModalOpen) => {
|
||||||
this.setState({ isEventModalOpen });
|
this.setState({ isEventModalOpen });
|
||||||
}
|
};
|
||||||
|
|
||||||
onTouchStart = (event) => {
|
onTouchStart = (event) => {
|
||||||
const touches = event.touches;
|
const touches = event.touches;
|
||||||
@@ -92,7 +92,7 @@ class CalendarDays extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._touchStart = touchStart;
|
this._touchStart = touchStart;
|
||||||
}
|
};
|
||||||
|
|
||||||
onTouchEnd = (event) => {
|
onTouchEnd = (event) => {
|
||||||
const touches = event.changedTouches;
|
const touches = event.changedTouches;
|
||||||
@@ -109,17 +109,17 @@ class CalendarDays extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._touchStart = null;
|
this._touchStart = null;
|
||||||
}
|
};
|
||||||
|
|
||||||
onTouchCancel = (event) => {
|
onTouchCancel = (event) => {
|
||||||
this._touchStart = null;
|
this._touchStart = null;
|
||||||
}
|
};
|
||||||
|
|
||||||
onTouchMove = (event) => {
|
onTouchMove = (event) => {
|
||||||
if (!this._touchStart) {
|
if (!this._touchStart) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -47,13 +47,13 @@ class DaysOfWeek extends Component {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.updateTimeoutId = setTimeout(this.scheduleUpdate, diff);
|
this.updateTimeoutId = setTimeout(this.scheduleUpdate, diff);
|
||||||
}
|
};
|
||||||
|
|
||||||
clearUpdateTimeout = () => {
|
clearUpdateTimeout = () => {
|
||||||
if (this.updateTimeoutId) {
|
if (this.updateTimeoutId) {
|
||||||
clearTimeout(this.updateTimeoutId);
|
clearTimeout(this.updateTimeoutId);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -43,15 +43,15 @@ class CalendarEvent extends Component {
|
|||||||
const link = `/movie/${titleSlug}`;
|
const link = `/movie/${titleSlug}`;
|
||||||
const eventType = [];
|
const eventType = [];
|
||||||
|
|
||||||
if (moment(date).isSame(moment(inCinemas), 'day')) {
|
if (inCinemas && moment(date).isSame(moment(inCinemas), 'day')) {
|
||||||
eventType.push('Cinemas');
|
eventType.push('Cinemas');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (moment(date).isSame(moment(physicalRelease), 'day')) {
|
if (physicalRelease && moment(date).isSame(moment(physicalRelease), 'day')) {
|
||||||
eventType.push('Physical');
|
eventType.push('Physical');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (moment(date).isSame(moment(digitalRelease), 'day')) {
|
if (digitalRelease && moment(date).isSame(moment(digitalRelease), 'day')) {
|
||||||
eventType.push('Digital');
|
eventType.push('Digital');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class CalendarHeader extends Component {
|
|||||||
this.setState({ view }, () => {
|
this.setState({ view }, () => {
|
||||||
this.props.onViewChange(view);
|
this.props.onViewChange(view);
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -41,19 +41,19 @@ class CalendarHeaderConnector extends Component {
|
|||||||
|
|
||||||
onViewChange = (view) => {
|
onViewChange = (view) => {
|
||||||
this.props.setCalendarView({ view });
|
this.props.setCalendarView({ view });
|
||||||
}
|
};
|
||||||
|
|
||||||
onTodayPress = () => {
|
onTodayPress = () => {
|
||||||
this.props.gotoCalendarToday();
|
this.props.gotoCalendarToday();
|
||||||
}
|
};
|
||||||
|
|
||||||
onPreviousPress = () => {
|
onPreviousPress = () => {
|
||||||
this.props.gotoCalendarPreviousRange();
|
this.props.gotoCalendarPreviousRange();
|
||||||
}
|
};
|
||||||
|
|
||||||
onNextPress = () => {
|
onNextPress = () => {
|
||||||
this.props.gotoCalendarNextRange();
|
this.props.gotoCalendarNextRange();
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class CalendarHeaderViewButton extends Component {
|
|||||||
|
|
||||||
onPress = () => {
|
onPress = () => {
|
||||||
this.props.onPress(this.props.view);
|
this.props.onPress(this.props.view);
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class CalendarOptionsModalContent extends Component {
|
|||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
dispatchSetCalendarOption({ [name]: value });
|
dispatchSetCalendarOption({ [name]: value });
|
||||||
}
|
};
|
||||||
|
|
||||||
onGlobalInputChange = ({ name, value }) => {
|
onGlobalInputChange = ({ name, value }) => {
|
||||||
const {
|
const {
|
||||||
@@ -81,11 +81,11 @@ class CalendarOptionsModalContent extends Component {
|
|||||||
this.setState(setting, () => {
|
this.setState(setting, () => {
|
||||||
dispatchSaveUISettings(setting);
|
dispatchSaveUISettings(setting);
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onLinkFocus = (event) => {
|
onLinkFocus = (event) => {
|
||||||
event.target.select();
|
event.target.select();
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -84,11 +84,11 @@ class CalendarLinkModalContent extends Component {
|
|||||||
[name]: value,
|
[name]: value,
|
||||||
...urls
|
...urls
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onLinkFocus = (event) => {
|
onLinkFocus = (event) => {
|
||||||
event.target.select();
|
event.target.select();
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -70,18 +70,18 @@ class FileBrowserModalContent extends Component {
|
|||||||
} else {
|
} else {
|
||||||
this._scrollerNode = null;
|
this._scrollerNode = null;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Listeners
|
// Listeners
|
||||||
|
|
||||||
onPathInputChange = ({ value }) => {
|
onPathInputChange = ({ value }) => {
|
||||||
this.setState({ currentPath: value });
|
this.setState({ currentPath: value });
|
||||||
}
|
};
|
||||||
|
|
||||||
onRowPress = (path) => {
|
onRowPress = (path) => {
|
||||||
this.props.onFetchPaths(path);
|
this.props.onFetchPaths(path);
|
||||||
}
|
};
|
||||||
|
|
||||||
onOkPress = () => {
|
onOkPress = () => {
|
||||||
this.props.onChange({
|
this.props.onChange({
|
||||||
@@ -91,7 +91,7 @@ class FileBrowserModalContent extends Component {
|
|||||||
|
|
||||||
this.props.onClearPaths();
|
this.props.onClearPaths();
|
||||||
this.props.onModalClose();
|
this.props.onModalClose();
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -78,16 +78,16 @@ class FileBrowserModalContentConnector extends Component {
|
|||||||
allowFoldersWithoutTrailingSlashes: true,
|
allowFoldersWithoutTrailingSlashes: true,
|
||||||
includeFiles
|
includeFiles
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onClearPaths = () => {
|
onClearPaths = () => {
|
||||||
// this.props.dispatchClearPaths();
|
// this.props.dispatchClearPaths();
|
||||||
}
|
};
|
||||||
|
|
||||||
onModalClose = () => {
|
onModalClose = () => {
|
||||||
this.props.dispatchClearPaths();
|
this.props.dispatchClearPaths();
|
||||||
this.props.onModalClose();
|
this.props.onModalClose();
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class FileBrowserRow extends Component {
|
|||||||
|
|
||||||
onPress = () => {
|
onPress = () => {
|
||||||
this.props.onPress(this.props.path);
|
this.props.onPress(this.props.path);
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ class DateFilterBuilderRowValue extends Component {
|
|||||||
name: NAME,
|
name: NAME,
|
||||||
value: newValue
|
value: newValue
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onTimeChange = ({ value }) => {
|
onTimeChange = ({ value }) => {
|
||||||
const {
|
const {
|
||||||
@@ -118,7 +118,7 @@ class DateFilterBuilderRowValue extends Component {
|
|||||||
value: filterValue.value
|
value: filterValue.value
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
@@ -161,6 +161,7 @@ class DateFilterBuilderRowValue extends Component {
|
|||||||
<TextInput
|
<TextInput
|
||||||
name={NAME}
|
name={NAME}
|
||||||
value={filterValue}
|
value={filterValue}
|
||||||
|
type="date"
|
||||||
placeholder="yyyy-mm-dd"
|
placeholder="yyyy-mm-dd"
|
||||||
onChange={this.onValueChange}
|
onChange={this.onValueChange}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class FilterBuilderModalContent extends Component {
|
|||||||
|
|
||||||
onLabelChange = ({ value }) => {
|
onLabelChange = ({ value }) => {
|
||||||
this.setState({ label: value });
|
this.setState({ label: value });
|
||||||
}
|
};
|
||||||
|
|
||||||
onFilterChange = (index, filter) => {
|
onFilterChange = (index, filter) => {
|
||||||
const filters = [...this.state.filters];
|
const filters = [...this.state.filters];
|
||||||
@@ -72,7 +72,7 @@ class FilterBuilderModalContent extends Component {
|
|||||||
this.setState({
|
this.setState({
|
||||||
filters
|
filters
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onAddFilterPress = () => {
|
onAddFilterPress = () => {
|
||||||
const filters = [...this.state.filters];
|
const filters = [...this.state.filters];
|
||||||
@@ -81,7 +81,7 @@ class FilterBuilderModalContent extends Component {
|
|||||||
this.setState({
|
this.setState({
|
||||||
filters
|
filters
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onRemoveFilterPress = (index) => {
|
onRemoveFilterPress = (index) => {
|
||||||
const filters = [...this.state.filters];
|
const filters = [...this.state.filters];
|
||||||
@@ -90,7 +90,7 @@ class FilterBuilderModalContent extends Component {
|
|||||||
this.setState({
|
this.setState({
|
||||||
filters
|
filters
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onSaveFilterPress = () => {
|
onSaveFilterPress = () => {
|
||||||
const {
|
const {
|
||||||
@@ -122,7 +122,7 @@ class FilterBuilderModalContent extends Component {
|
|||||||
label,
|
label,
|
||||||
filters
|
filters
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
@@ -166,7 +166,9 @@ class FilterBuilderModalContent extends Component {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={styles.label}>Filters</div>
|
<div className={styles.label}>
|
||||||
|
{translate('Filters')}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className={styles.rows}>
|
<div className={styles.rows}>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ class FilterBuilderRow extends Component {
|
|||||||
|
|
||||||
this.selectedFilterBuilderProp = selectedFilterBuilderProp;
|
this.selectedFilterBuilderProp = selectedFilterBuilderProp;
|
||||||
onFilterChange(index, filter);
|
onFilterChange(index, filter);
|
||||||
}
|
};
|
||||||
|
|
||||||
onFilterChange = ({ name, value }) => {
|
onFilterChange = ({ name, value }) => {
|
||||||
const {
|
const {
|
||||||
@@ -174,7 +174,7 @@ class FilterBuilderRow extends Component {
|
|||||||
filter[name] = value;
|
filter[name] = value;
|
||||||
|
|
||||||
onFilterChange(index, filter);
|
onFilterChange(index, filter);
|
||||||
}
|
};
|
||||||
|
|
||||||
onAddPress = () => {
|
onAddPress = () => {
|
||||||
const {
|
const {
|
||||||
@@ -183,7 +183,7 @@ class FilterBuilderRow extends Component {
|
|||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
onAddPress(index);
|
onAddPress(index);
|
||||||
}
|
};
|
||||||
|
|
||||||
onRemovePress = () => {
|
onRemovePress = () => {
|
||||||
const {
|
const {
|
||||||
@@ -192,7 +192,7 @@ class FilterBuilderRow extends Component {
|
|||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
onRemovePress(index);
|
onRemovePress(index);
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ class FilterBuilderRowValue extends Component {
|
|||||||
name: NAME,
|
name: NAME,
|
||||||
value: [...filterValue, value]
|
value: [...filterValue, value]
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onTagDelete = ({ index }) => {
|
onTagDelete = ({ index }) => {
|
||||||
const {
|
const {
|
||||||
@@ -98,7 +98,7 @@ class FilterBuilderRowValue extends Component {
|
|||||||
name: NAME,
|
name: NAME,
|
||||||
value
|
value
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class IndexerFilterBuilderRowValueConnector extends Component {
|
|||||||
if (!this.props.isPopulated) {
|
if (!this.props.isPopulated) {
|
||||||
this.props.dispatchFetchIndexers();
|
this.props.dispatchFetchIndexers();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class QualityFilterBuilderRowValueConnector extends Component {
|
|||||||
if (!this.props.isPopulated) {
|
if (!this.props.isPopulated) {
|
||||||
this.props.dispatchFetchQualityProfileSchema();
|
this.props.dispatchFetchQualityProfileSchema();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class CustomFilter extends Component {
|
|||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
onEditPress(id);
|
onEditPress(id);
|
||||||
}
|
};
|
||||||
|
|
||||||
onRemovePress = () => {
|
onRemovePress = () => {
|
||||||
const {
|
const {
|
||||||
@@ -67,7 +67,7 @@ class CustomFilter extends Component {
|
|||||||
dispatchDeleteCustomFilter({ id });
|
dispatchDeleteCustomFilter({ id });
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -25,14 +25,14 @@ class FilterModal extends Component {
|
|||||||
this.setState({
|
this.setState({
|
||||||
filterBuilder: true
|
filterBuilder: true
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onEditCustomFilter = (id) => {
|
onEditCustomFilter = (id) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
filterBuilder: true,
|
filterBuilder: true,
|
||||||
id
|
id
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onCancelPress = () => {
|
onCancelPress = () => {
|
||||||
if (this.state.filterBuilder) {
|
if (this.state.filterBuilder) {
|
||||||
@@ -43,7 +43,7 @@ class FilterModal extends Component {
|
|||||||
} else {
|
} else {
|
||||||
this.onModalClose();
|
this.onModalClose();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
onModalClose = () => {
|
onModalClose = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
@@ -52,7 +52,7 @@ class FilterModal extends Component {
|
|||||||
}, () => {
|
}, () => {
|
||||||
this.props.onModalClose();
|
this.props.onModalClose();
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -35,11 +35,11 @@ class AutoCompleteInput extends Component {
|
|||||||
name: this.props.name,
|
name: this.props.name,
|
||||||
value: newValue
|
value: newValue
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onInputBlur = () => {
|
onInputBlur = () => {
|
||||||
this.setState({ suggestions: [] });
|
this.setState({ suggestions: [] });
|
||||||
}
|
};
|
||||||
|
|
||||||
onSuggestionsFetchRequested = ({ value }) => {
|
onSuggestionsFetchRequested = ({ value }) => {
|
||||||
const { values } = this.props;
|
const { values } = this.props;
|
||||||
@@ -50,11 +50,11 @@ class AutoCompleteInput extends Component {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.setState({ suggestions: filteredValues });
|
this.setState({ suggestions: filteredValues });
|
||||||
}
|
};
|
||||||
|
|
||||||
onSuggestionsClearRequested = () => {
|
onSuggestionsClearRequested = () => {
|
||||||
this.setState({ suggestions: [] });
|
this.setState({ suggestions: [] });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class AutoSuggestInput extends Component {
|
|||||||
}}
|
}}
|
||||||
</Reference>
|
</Reference>
|
||||||
);
|
);
|
||||||
}
|
};
|
||||||
|
|
||||||
renderSuggestionsContainer = ({ containerProps, children }) => {
|
renderSuggestionsContainer = ({ containerProps, children }) => {
|
||||||
return (
|
return (
|
||||||
@@ -90,7 +90,7 @@ class AutoSuggestInput extends Component {
|
|||||||
</Popper>
|
</Popper>
|
||||||
</Portal>
|
</Portal>
|
||||||
);
|
);
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Listeners
|
// Listeners
|
||||||
@@ -113,14 +113,14 @@ class AutoSuggestInput extends Component {
|
|||||||
data.styles.width = width;
|
data.styles.width = width;
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
};
|
||||||
|
|
||||||
onInputChange = (event, { newValue }) => {
|
onInputChange = (event, { newValue }) => {
|
||||||
this.props.onChange({
|
this.props.onChange({
|
||||||
name: this.props.name,
|
name: this.props.name,
|
||||||
value: newValue
|
value: newValue
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onInputKeyDown = (event) => {
|
onInputKeyDown = (event) => {
|
||||||
const {
|
const {
|
||||||
@@ -144,7 +144,7 @@ class AutoSuggestInput extends Component {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -6,8 +6,7 @@ import SelectInput from './SelectInput';
|
|||||||
const availabilityOptions = [
|
const availabilityOptions = [
|
||||||
{ key: 'announced', value: translate('Announced') },
|
{ key: 'announced', value: translate('Announced') },
|
||||||
{ key: 'inCinemas', value: translate('InCinemas') },
|
{ key: 'inCinemas', value: translate('InCinemas') },
|
||||||
{ key: 'released', value: translate('Released') },
|
{ key: 'released', value: translate('Released') }
|
||||||
{ key: 'preDB', value: translate('PreDB') }
|
|
||||||
];
|
];
|
||||||
|
|
||||||
function AvailabilitySelectInput(props) {
|
function AvailabilitySelectInput(props) {
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class CaptchaInputConnector extends Component {
|
|||||||
|
|
||||||
componentWillUnmount = () => {
|
componentWillUnmount = () => {
|
||||||
this.props.resetCaptcha();
|
this.props.resetCaptcha();
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Listeners
|
// Listeners
|
||||||
@@ -51,7 +51,7 @@ class CaptchaInputConnector extends Component {
|
|||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
this.props.refreshCaptcha({ provider, providerData });
|
this.props.refreshCaptcha({ provider, providerData });
|
||||||
}
|
};
|
||||||
|
|
||||||
onCaptchaChange = (captchaResponse) => {
|
onCaptchaChange = (captchaResponse) => {
|
||||||
// If the captcha has expired `captchaResponse` will be null.
|
// If the captcha has expired `captchaResponse` will be null.
|
||||||
@@ -68,7 +68,7 @@ class CaptchaInputConnector extends Component {
|
|||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
this.props.getCaptchaCookie({ provider, providerData, captchaResponse });
|
this.props.getCaptchaCookie({ provider, providerData, captchaResponse });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -59,14 +59,14 @@ class CheckInput extends Component {
|
|||||||
shiftKey
|
shiftKey
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Listeners
|
// Listeners
|
||||||
|
|
||||||
setRef = (ref) => {
|
setRef = (ref) => {
|
||||||
this._checkbox = ref;
|
this._checkbox = ref;
|
||||||
}
|
};
|
||||||
|
|
||||||
onClick = (event) => {
|
onClick = (event) => {
|
||||||
if (this.props.isDisabled) {
|
if (this.props.isDisabled) {
|
||||||
@@ -78,14 +78,14 @@ class CheckInput extends Component {
|
|||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.toggleChecked(checked, shiftKey);
|
this.toggleChecked(checked, shiftKey);
|
||||||
}
|
};
|
||||||
|
|
||||||
onChange = (event) => {
|
onChange = (event) => {
|
||||||
const checked = event.target.checked;
|
const checked = event.target.checked;
|
||||||
const shiftKey = event.nativeEvent.shiftKey;
|
const shiftKey = event.nativeEvent.shiftKey;
|
||||||
|
|
||||||
this.toggleChecked(checked, shiftKey);
|
this.toggleChecked(checked, shiftKey);
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class DeviceInput extends Component {
|
|||||||
name,
|
name,
|
||||||
value: [...value, deviceId]
|
value: [...value, deviceId]
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onTagDelete = ({ index }) => {
|
onTagDelete = ({ index }) => {
|
||||||
const {
|
const {
|
||||||
@@ -39,7 +39,7 @@ class DeviceInput extends Component {
|
|||||||
name,
|
name,
|
||||||
value: newValue
|
value: newValue
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -48,11 +48,11 @@ class DeviceInputConnector extends Component {
|
|||||||
|
|
||||||
componentDidMount = () => {
|
componentDidMount = () => {
|
||||||
this._populate();
|
this._populate();
|
||||||
}
|
};
|
||||||
|
|
||||||
componentWillUnmount = () => {
|
componentWillUnmount = () => {
|
||||||
this.props.dispatchClearOptions({ section: 'devices' });
|
this.props.dispatchClearOptions({ section: 'devices' });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Control
|
// Control
|
||||||
@@ -77,7 +77,7 @@ class DeviceInputConnector extends Component {
|
|||||||
|
|
||||||
onRefreshPress = () => {
|
onRefreshPress = () => {
|
||||||
this._populate();
|
this._populate();
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -0,0 +1,100 @@
|
|||||||
|
import _ from 'lodash';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import React, { Component } from 'react';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
import { createSelector } from 'reselect';
|
||||||
|
import { fetchDownloadClients } from 'Store/Actions/settingsActions';
|
||||||
|
import sortByName from 'Utilities/Array/sortByName';
|
||||||
|
import EnhancedSelectInput from './EnhancedSelectInput';
|
||||||
|
|
||||||
|
function createMapStateToProps() {
|
||||||
|
return createSelector(
|
||||||
|
(state) => state.settings.downloadClients,
|
||||||
|
(state, { includeAny }) => includeAny,
|
||||||
|
(state, { protocol }) => protocol,
|
||||||
|
(downloadClients, includeAny, protocolFilter) => {
|
||||||
|
const {
|
||||||
|
isFetching,
|
||||||
|
isPopulated,
|
||||||
|
error,
|
||||||
|
items
|
||||||
|
} = downloadClients;
|
||||||
|
|
||||||
|
const filteredItems = items.filter((item) => item.protocol === protocolFilter);
|
||||||
|
|
||||||
|
const values = _.map(filteredItems.sort(sortByName), (downloadClient) => {
|
||||||
|
return {
|
||||||
|
key: downloadClient.id,
|
||||||
|
value: downloadClient.name
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
if (includeAny) {
|
||||||
|
values.unshift({
|
||||||
|
key: 0,
|
||||||
|
value: '(Any)'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
isFetching,
|
||||||
|
isPopulated,
|
||||||
|
error,
|
||||||
|
values
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const mapDispatchToProps = {
|
||||||
|
dispatchFetchDownloadClients: fetchDownloadClients
|
||||||
|
};
|
||||||
|
|
||||||
|
class DownloadClientSelectInputConnector extends Component {
|
||||||
|
|
||||||
|
//
|
||||||
|
// Lifecycle
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
if (!this.props.isPopulated) {
|
||||||
|
this.props.dispatchFetchDownloadClients();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Listeners
|
||||||
|
|
||||||
|
onChange = ({ name, value }) => {
|
||||||
|
this.props.onChange({ name, value: parseInt(value) });
|
||||||
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
// Render
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<EnhancedSelectInput
|
||||||
|
{...this.props}
|
||||||
|
onChange={this.onChange}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DownloadClientSelectInputConnector.propTypes = {
|
||||||
|
isFetching: PropTypes.bool.isRequired,
|
||||||
|
isPopulated: PropTypes.bool.isRequired,
|
||||||
|
name: PropTypes.string.isRequired,
|
||||||
|
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
||||||
|
values: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
|
includeAny: PropTypes.bool.isRequired,
|
||||||
|
onChange: PropTypes.func.isRequired,
|
||||||
|
dispatchFetchDownloadClients: PropTypes.func.isRequired
|
||||||
|
};
|
||||||
|
|
||||||
|
DownloadClientSelectInputConnector.defaultProps = {
|
||||||
|
includeAny: false,
|
||||||
|
protocol: 'torrent'
|
||||||
|
};
|
||||||
|
|
||||||
|
export default connect(createMapStateToProps, mapDispatchToProps)(DownloadClientSelectInputConnector);
|
||||||
@@ -12,9 +12,9 @@ import ModalBody from 'Components/Modal/ModalBody';
|
|||||||
import Portal from 'Components/Portal';
|
import Portal from 'Components/Portal';
|
||||||
import Scroller from 'Components/Scroller/Scroller';
|
import Scroller from 'Components/Scroller/Scroller';
|
||||||
import { icons, scrollDirections, sizes } from 'Helpers/Props';
|
import { icons, scrollDirections, sizes } from 'Helpers/Props';
|
||||||
|
import { isMobile as isMobileUtil } from 'Utilities/browser';
|
||||||
import * as keyCodes from 'Utilities/Constants/keyCodes';
|
import * as keyCodes from 'Utilities/Constants/keyCodes';
|
||||||
import getUniqueElememtId from 'Utilities/getUniqueElementId';
|
import getUniqueElememtId from 'Utilities/getUniqueElementId';
|
||||||
import { isMobile as isMobileUtil } from 'Utilities/mobile';
|
|
||||||
import HintedSelectInputOption from './HintedSelectInputOption';
|
import HintedSelectInputOption from './HintedSelectInputOption';
|
||||||
import HintedSelectInputSelectedValue from './HintedSelectInputSelectedValue';
|
import HintedSelectInputSelectedValue from './HintedSelectInputSelectedValue';
|
||||||
import TextInput from './TextInput';
|
import TextInput from './TextInput';
|
||||||
@@ -149,7 +149,7 @@ class EnhancedSelectInput extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
};
|
||||||
|
|
||||||
onWindowClick = (event) => {
|
onWindowClick = (event) => {
|
||||||
const button = document.getElementById(this._buttonId);
|
const button = document.getElementById(this._buttonId);
|
||||||
@@ -168,14 +168,14 @@ class EnhancedSelectInput extends Component {
|
|||||||
this.setState({ isOpen: false });
|
this.setState({ isOpen: false });
|
||||||
this._removeListener();
|
this._removeListener();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
onFocus = () => {
|
onFocus = () => {
|
||||||
if (this.state.isOpen) {
|
if (this.state.isOpen) {
|
||||||
this._removeListener();
|
this._removeListener();
|
||||||
this.setState({ isOpen: false });
|
this.setState({ isOpen: false });
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
onBlur = () => {
|
onBlur = () => {
|
||||||
if (!this.props.isEditable) {
|
if (!this.props.isEditable) {
|
||||||
@@ -186,7 +186,7 @@ class EnhancedSelectInput extends Component {
|
|||||||
this.setState({ selectedIndex: origIndex });
|
this.setState({ selectedIndex: origIndex });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
onKeyDown = (event) => {
|
onKeyDown = (event) => {
|
||||||
const {
|
const {
|
||||||
@@ -253,7 +253,7 @@ class EnhancedSelectInput extends Component {
|
|||||||
if (!_.isEmpty(newState)) {
|
if (!_.isEmpty(newState)) {
|
||||||
this.setState(newState);
|
this.setState(newState);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
onPress = () => {
|
onPress = () => {
|
||||||
if (this.state.isOpen) {
|
if (this.state.isOpen) {
|
||||||
@@ -267,7 +267,7 @@ class EnhancedSelectInput extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.setState({ isOpen: !this.state.isOpen });
|
this.setState({ isOpen: !this.state.isOpen });
|
||||||
}
|
};
|
||||||
|
|
||||||
onSelect = (value) => {
|
onSelect = (value) => {
|
||||||
if (Array.isArray(this.props.value)) {
|
if (Array.isArray(this.props.value)) {
|
||||||
@@ -291,15 +291,15 @@ class EnhancedSelectInput extends Component {
|
|||||||
value
|
value
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
onMeasure = ({ width }) => {
|
onMeasure = ({ width }) => {
|
||||||
this.setState({ width });
|
this.setState({ width });
|
||||||
}
|
};
|
||||||
|
|
||||||
onOptionsModalClose = () => {
|
onOptionsModalClose = () => {
|
||||||
this.setState({ isOpen: false });
|
this.setState({ isOpen: false });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ class EnhancedSelectInputConnector extends Component {
|
|||||||
|
|
||||||
componentDidMount = () => {
|
componentDidMount = () => {
|
||||||
this._populate();
|
this._populate();
|
||||||
}
|
};
|
||||||
|
|
||||||
componentDidUpdate = (prevProps) => {
|
componentDidUpdate = (prevProps) => {
|
||||||
const prevKey = getProviderDataKey(prevProps.providerData);
|
const prevKey = getProviderDataKey(prevProps.providerData);
|
||||||
@@ -82,11 +82,11 @@ class EnhancedSelectInputConnector extends Component {
|
|||||||
if (!_.isEqual(prevKey, nextKey)) {
|
if (!_.isEqual(prevKey, nextKey)) {
|
||||||
this.setState({ refetchRequired: true });
|
this.setState({ refetchRequired: true });
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
componentWillUnmount = () => {
|
componentWillUnmount = () => {
|
||||||
this._cleanup();
|
this._cleanup();
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Listeners
|
// Listeners
|
||||||
@@ -95,7 +95,7 @@ class EnhancedSelectInputConnector extends Component {
|
|||||||
if (this.state.refetchRequired) {
|
if (this.state.refetchRequired) {
|
||||||
this._populate();
|
this._populate();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Control
|
// Control
|
||||||
|
|||||||
@@ -21,11 +21,11 @@ class EnhancedSelectInputOption extends Component {
|
|||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
onSelect(id);
|
onSelect(id);
|
||||||
}
|
};
|
||||||
|
|
||||||
onCheckPress = () => {
|
onCheckPress = () => {
|
||||||
// CheckInput requires a handler. Swallow the change event because onPress will already handle it via event propagation.
|
// CheckInput requires a handler. Swallow the change event because onPress will already handle it via event propagation.
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import AvailabilitySelectInput from './AvailabilitySelectInput';
|
|||||||
import CaptchaInputConnector from './CaptchaInputConnector';
|
import CaptchaInputConnector from './CaptchaInputConnector';
|
||||||
import CheckInput from './CheckInput';
|
import CheckInput from './CheckInput';
|
||||||
import DeviceInputConnector from './DeviceInputConnector';
|
import DeviceInputConnector from './DeviceInputConnector';
|
||||||
|
import DownloadClientSelectInputConnector from './DownloadClientSelectInputConnector';
|
||||||
import EnhancedSelectInput from './EnhancedSelectInput';
|
import EnhancedSelectInput from './EnhancedSelectInput';
|
||||||
import EnhancedSelectInputConnector from './EnhancedSelectInputConnector';
|
import EnhancedSelectInputConnector from './EnhancedSelectInputConnector';
|
||||||
import FormInputHelpText from './FormInputHelpText';
|
import FormInputHelpText from './FormInputHelpText';
|
||||||
@@ -73,6 +74,9 @@ function getComponent(type) {
|
|||||||
case inputTypes.INDEXER_FLAGS_SELECT:
|
case inputTypes.INDEXER_FLAGS_SELECT:
|
||||||
return IndexerFlagsSelectInputConnector;
|
return IndexerFlagsSelectInputConnector;
|
||||||
|
|
||||||
|
case inputTypes.DOWNLOAD_CLIENT_SELECT:
|
||||||
|
return DownloadClientSelectInputConnector;
|
||||||
|
|
||||||
case inputTypes.LANGUAGE_SELECT:
|
case inputTypes.LANGUAGE_SELECT:
|
||||||
return LanguageSelectInputConnector;
|
return LanguageSelectInputConnector;
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class IndexerFlagsSelectInputConnector extends Component {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.props.onChange({ name, value: indexerFlags });
|
this.props.onChange({ name, value: indexerFlags });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class KeyValueListInput extends Component {
|
|||||||
name,
|
name,
|
||||||
value: newValue
|
value: newValue
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onRemoveItem = (index) => {
|
onRemoveItem = (index) => {
|
||||||
const {
|
const {
|
||||||
@@ -55,13 +55,13 @@ class KeyValueListInput extends Component {
|
|||||||
name,
|
name,
|
||||||
value: newValue
|
value: newValue
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onFocus = () => {
|
onFocus = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
isFocused: true
|
isFocused: true
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onBlur = () => {
|
onBlur = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
@@ -88,7 +88,7 @@ class KeyValueListInput extends Component {
|
|||||||
value: newValue
|
value: newValue
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class KeyValueListInputItem extends Component {
|
|||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
onChange(index, { key: keyValue, value });
|
onChange(index, { key: keyValue, value });
|
||||||
}
|
};
|
||||||
|
|
||||||
onValueChange = ({ value }) => {
|
onValueChange = ({ value }) => {
|
||||||
// TODO: Validate here or validate at a lower level component
|
// TODO: Validate here or validate at a lower level component
|
||||||
@@ -30,7 +30,7 @@ class KeyValueListInputItem extends Component {
|
|||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
onChange(index, { key: keyValue, value });
|
onChange(index, { key: keyValue, value });
|
||||||
}
|
};
|
||||||
|
|
||||||
onRemovePress = () => {
|
onRemovePress = () => {
|
||||||
const {
|
const {
|
||||||
@@ -39,15 +39,15 @@ class KeyValueListInputItem extends Component {
|
|||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
onRemove(index);
|
onRemove(index);
|
||||||
}
|
};
|
||||||
|
|
||||||
onFocus = () => {
|
onFocus = () => {
|
||||||
this.props.onFocus();
|
this.props.onFocus();
|
||||||
}
|
};
|
||||||
|
|
||||||
onBlur = () => {
|
onBlur = () => {
|
||||||
this.props.onBlur();
|
this.props.onBlur();
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -59,11 +59,11 @@ class NumberInput extends Component {
|
|||||||
value: parseValue(this.props, value)
|
value: parseValue(this.props, value)
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
};
|
||||||
|
|
||||||
onFocus = () => {
|
onFocus = () => {
|
||||||
this.setState({ isFocused: true });
|
this.setState({ isFocused: true });
|
||||||
}
|
};
|
||||||
|
|
||||||
onBlur = () => {
|
onBlur = () => {
|
||||||
const {
|
const {
|
||||||
@@ -88,7 +88,7 @@ class NumberInput extends Component {
|
|||||||
name,
|
name,
|
||||||
value: parsedValue
|
value: parsedValue
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class OAuthInputConnector extends Component {
|
|||||||
|
|
||||||
componentWillUnmount = () => {
|
componentWillUnmount = () => {
|
||||||
this.props.resetOAuth();
|
this.props.resetOAuth();
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Listeners
|
// Listeners
|
||||||
@@ -60,7 +60,7 @@ class OAuthInputConnector extends Component {
|
|||||||
providerData,
|
providerData,
|
||||||
section
|
section
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ class PathInput extends Component {
|
|||||||
|
|
||||||
onInputChange = ({ value }) => {
|
onInputChange = ({ value }) => {
|
||||||
this.setState({ value });
|
this.setState({ value });
|
||||||
}
|
};
|
||||||
|
|
||||||
onInputKeyDown = (event) => {
|
onInputKeyDown = (event) => {
|
||||||
if (event.key === 'Tab') {
|
if (event.key === 'Tab') {
|
||||||
@@ -80,7 +80,7 @@ class PathInput extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
onInputBlur = () => {
|
onInputBlur = () => {
|
||||||
this.props.onChange({
|
this.props.onChange({
|
||||||
@@ -89,28 +89,28 @@ class PathInput extends Component {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.props.onClearPaths();
|
this.props.onClearPaths();
|
||||||
}
|
};
|
||||||
|
|
||||||
onSuggestionsFetchRequested = ({ value }) => {
|
onSuggestionsFetchRequested = ({ value }) => {
|
||||||
this.props.onFetchPaths(value);
|
this.props.onFetchPaths(value);
|
||||||
}
|
};
|
||||||
|
|
||||||
onSuggestionsClearRequested = () => {
|
onSuggestionsClearRequested = () => {
|
||||||
// Required because props aren't always rendered, but no-op
|
// Required because props aren't always rendered, but no-op
|
||||||
// because we don't want to reset the paths after a path is selected.
|
// because we don't want to reset the paths after a path is selected.
|
||||||
}
|
};
|
||||||
|
|
||||||
onSuggestionSelected = (event, { suggestionValue }) => {
|
onSuggestionSelected = (event, { suggestionValue }) => {
|
||||||
this.props.onFetchPaths(suggestionValue);
|
this.props.onFetchPaths(suggestionValue);
|
||||||
}
|
};
|
||||||
|
|
||||||
onFileBrowserOpenPress = () => {
|
onFileBrowserOpenPress = () => {
|
||||||
this.setState({ isFileBrowserModalOpen: true });
|
this.setState({ isFileBrowserModalOpen: true });
|
||||||
}
|
};
|
||||||
|
|
||||||
onFileBrowserModalClose = () => {
|
onFileBrowserModalClose = () => {
|
||||||
this.setState({ isFileBrowserModalOpen: false });
|
this.setState({ isFileBrowserModalOpen: false });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -47,11 +47,11 @@ class PathInputConnector extends Component {
|
|||||||
path,
|
path,
|
||||||
includeFiles
|
includeFiles
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onClearPaths = () => {
|
onClearPaths = () => {
|
||||||
this.props.dispatchClearPaths();
|
this.props.dispatchClearPaths();
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class QualityProfileSelectInputConnector extends Component {
|
|||||||
|
|
||||||
onChange = ({ name, value }) => {
|
onChange = ({ name, value }) => {
|
||||||
this.props.onChange({ name, value: parseInt(value) });
|
this.props.onChange({ name, value: parseInt(value) });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -49,17 +49,17 @@ class RootFolderSelectInput extends Component {
|
|||||||
} else {
|
} else {
|
||||||
this.props.onChange({ name, value });
|
this.props.onChange({ name, value });
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
onNewRootFolderSelect = ({ value }) => {
|
onNewRootFolderSelect = ({ value }) => {
|
||||||
this.setState({ newRootFolderPath: value }, () => {
|
this.setState({ newRootFolderPath: value }, () => {
|
||||||
this.props.onNewRootFolderSelect(value);
|
this.props.onNewRootFolderSelect(value);
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onAddRootFolderModalClose = () => {
|
onAddRootFolderModalClose = () => {
|
||||||
this.setState({ isAddNewRootFolderModalOpen: false });
|
this.setState({ isAddNewRootFolderModalOpen: false });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ class RootFolderSelectInputConnector extends Component {
|
|||||||
|
|
||||||
onNewRootFolderSelect = (path) => {
|
onNewRootFolderSelect = (path) => {
|
||||||
this.props.dispatchAddRootFolder(path);
|
this.props.dispatchAddRootFolder(path);
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class SelectInput extends Component {
|
|||||||
name: this.props.name,
|
name: this.props.name,
|
||||||
value: event.target.value
|
value: event.target.value
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class TagInput extends Component {
|
|||||||
|
|
||||||
_setAutosuggestRef = (ref) => {
|
_setAutosuggestRef = (ref) => {
|
||||||
this._autosuggestRef = ref;
|
this._autosuggestRef = ref;
|
||||||
}
|
};
|
||||||
|
|
||||||
getSuggestionValue({ name }) {
|
getSuggestionValue({ name }) {
|
||||||
return name;
|
return name;
|
||||||
@@ -57,7 +57,7 @@ class TagInput extends Component {
|
|||||||
|
|
||||||
shouldRenderSuggestions = (value) => {
|
shouldRenderSuggestions = (value) => {
|
||||||
return value.length >= this.props.minQueryLength;
|
return value.length >= this.props.minQueryLength;
|
||||||
}
|
};
|
||||||
|
|
||||||
renderSuggestion({ name }) {
|
renderSuggestion({ name }) {
|
||||||
return name;
|
return name;
|
||||||
@@ -70,14 +70,14 @@ class TagInput extends Component {
|
|||||||
value: '',
|
value: '',
|
||||||
suggestions: []
|
suggestions: []
|
||||||
});
|
});
|
||||||
}, 250, { leading: true, trailing: false })
|
}, 250, { leading: true, trailing: false });
|
||||||
|
|
||||||
//
|
//
|
||||||
// Listeners
|
// Listeners
|
||||||
|
|
||||||
onInputContainerPress = () => {
|
onInputContainerPress = () => {
|
||||||
this._autosuggestRef.input.focus();
|
this._autosuggestRef.input.focus();
|
||||||
}
|
};
|
||||||
|
|
||||||
onInputChange = (event, { newValue, method }) => {
|
onInputChange = (event, { newValue, method }) => {
|
||||||
const value = _.isObject(newValue) ? newValue.name : newValue;
|
const value = _.isObject(newValue) ? newValue.name : newValue;
|
||||||
@@ -85,7 +85,7 @@ class TagInput extends Component {
|
|||||||
if (method === 'type') {
|
if (method === 'type') {
|
||||||
this.setState({ value });
|
this.setState({ value });
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
onInputKeyDown = (event) => {
|
onInputKeyDown = (event) => {
|
||||||
const {
|
const {
|
||||||
@@ -125,11 +125,11 @@ class TagInput extends Component {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
onInputFocus = () => {
|
onInputFocus = () => {
|
||||||
this.setState({ isFocused: true });
|
this.setState({ isFocused: true });
|
||||||
}
|
};
|
||||||
|
|
||||||
onInputBlur = () => {
|
onInputBlur = () => {
|
||||||
this.setState({ isFocused: false });
|
this.setState({ isFocused: false });
|
||||||
@@ -153,7 +153,7 @@ class TagInput extends Component {
|
|||||||
if (tag) {
|
if (tag) {
|
||||||
this.addTag(tag);
|
this.addTag(tag);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
onSuggestionsFetchRequested = ({ value }) => {
|
onSuggestionsFetchRequested = ({ value }) => {
|
||||||
const lowerCaseValue = value.toLowerCase();
|
const lowerCaseValue = value.toLowerCase();
|
||||||
@@ -170,16 +170,16 @@ class TagInput extends Component {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.setState({ suggestions });
|
this.setState({ suggestions });
|
||||||
}
|
};
|
||||||
|
|
||||||
onSuggestionsClearRequested = () => {
|
onSuggestionsClearRequested = () => {
|
||||||
// Required because props aren't always rendered, but no-op
|
// Required because props aren't always rendered, but no-op
|
||||||
// because we don't want to reset the paths after a path is selected.
|
// because we don't want to reset the paths after a path is selected.
|
||||||
}
|
};
|
||||||
|
|
||||||
onSuggestionSelected = (event, { suggestion }) => {
|
onSuggestionSelected = (event, { suggestion }) => {
|
||||||
this.addTag(suggestion);
|
this.addTag(suggestion);
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
@@ -204,7 +204,7 @@ class TagInput extends Component {
|
|||||||
onInputContainerPress={this.onInputContainerPress}
|
onInputContainerPress={this.onInputContainerPress}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ class TagInputConnector extends Component {
|
|||||||
newValue.push(tag.id);
|
newValue.push(tag.id);
|
||||||
|
|
||||||
this.props.onChange({ name, value: newValue });
|
this.props.onChange({ name, value: newValue });
|
||||||
}
|
};
|
||||||
|
|
||||||
onTagDelete = ({ index }) => {
|
onTagDelete = ({ index }) => {
|
||||||
const {
|
const {
|
||||||
@@ -116,7 +116,7 @@ class TagInputConnector extends Component {
|
|||||||
name,
|
name,
|
||||||
value: newValue
|
value: newValue
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onTagCreated = (tag) => {
|
onTagCreated = (tag) => {
|
||||||
const {
|
const {
|
||||||
@@ -128,7 +128,7 @@ class TagInputConnector extends Component {
|
|||||||
newValue.push(tag.id);
|
newValue.push(tag.id);
|
||||||
|
|
||||||
this.props.onChange({ name, value: newValue });
|
this.props.onChange({ name, value: newValue });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class TagInputInput extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onInputContainerPress();
|
onInputContainerPress();
|
||||||
}
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class TagInputTag extends Component {
|
|||||||
index,
|
index,
|
||||||
id: tag.id
|
id: tag.id
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class TagSelectInputConnector extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.props.onChange({ name, value: newValue });
|
this.props.onChange({ name, value: newValue });
|
||||||
}
|
};
|
||||||
|
|
||||||
onTagDelete = ({ index }) => {
|
onTagDelete = ({ index }) => {
|
||||||
const {
|
const {
|
||||||
@@ -75,7 +75,7 @@ class TagSelectInputConnector extends Component {
|
|||||||
name,
|
name,
|
||||||
value: newValue
|
value: newValue
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class TextArea extends Component {
|
|||||||
|
|
||||||
setInputRef = (ref) => {
|
setInputRef = (ref) => {
|
||||||
this._input = ref;
|
this._input = ref;
|
||||||
}
|
};
|
||||||
|
|
||||||
selectionChange() {
|
selectionChange() {
|
||||||
if (this._selectionTimeout) {
|
if (this._selectionTimeout) {
|
||||||
@@ -75,7 +75,7 @@ class TextArea extends Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
onChange(payload);
|
onChange(payload);
|
||||||
}
|
};
|
||||||
|
|
||||||
onFocus = (event) => {
|
onFocus = (event) => {
|
||||||
if (this.props.onFocus) {
|
if (this.props.onFocus) {
|
||||||
@@ -83,19 +83,19 @@ class TextArea extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.selectionChange();
|
this.selectionChange();
|
||||||
}
|
};
|
||||||
|
|
||||||
onKeyUp = () => {
|
onKeyUp = () => {
|
||||||
this.selectionChange();
|
this.selectionChange();
|
||||||
}
|
};
|
||||||
|
|
||||||
onMouseDown = () => {
|
onMouseDown = () => {
|
||||||
this._isMouseTarget = true;
|
this._isMouseTarget = true;
|
||||||
}
|
};
|
||||||
|
|
||||||
onMouseUp = () => {
|
onMouseUp = () => {
|
||||||
this.selectionChange();
|
this.selectionChange();
|
||||||
}
|
};
|
||||||
|
|
||||||
onDocumentMouseUp = () => {
|
onDocumentMouseUp = () => {
|
||||||
if (this._isMouseTarget) {
|
if (this._isMouseTarget) {
|
||||||
@@ -103,7 +103,7 @@ class TextArea extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._isMouseTarget = false;
|
this._isMouseTarget = false;
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class TextInput extends Component {
|
|||||||
|
|
||||||
setInputRef = (ref) => {
|
setInputRef = (ref) => {
|
||||||
this._input = ref;
|
this._input = ref;
|
||||||
}
|
};
|
||||||
|
|
||||||
selectionChange() {
|
selectionChange() {
|
||||||
if (this._selectionTimeout) {
|
if (this._selectionTimeout) {
|
||||||
@@ -82,7 +82,7 @@ class TextInput extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onChange(payload);
|
onChange(payload);
|
||||||
}
|
};
|
||||||
|
|
||||||
onFocus = (event) => {
|
onFocus = (event) => {
|
||||||
if (this.props.onFocus) {
|
if (this.props.onFocus) {
|
||||||
@@ -90,19 +90,19 @@ class TextInput extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.selectionChange();
|
this.selectionChange();
|
||||||
}
|
};
|
||||||
|
|
||||||
onKeyUp = () => {
|
onKeyUp = () => {
|
||||||
this.selectionChange();
|
this.selectionChange();
|
||||||
}
|
};
|
||||||
|
|
||||||
onMouseDown = () => {
|
onMouseDown = () => {
|
||||||
this._isMouseTarget = true;
|
this._isMouseTarget = true;
|
||||||
}
|
};
|
||||||
|
|
||||||
onMouseUp = () => {
|
onMouseUp = () => {
|
||||||
this.selectionChange();
|
this.selectionChange();
|
||||||
}
|
};
|
||||||
|
|
||||||
onDocumentMouseUp = () => {
|
onDocumentMouseUp = () => {
|
||||||
if (this._isMouseTarget) {
|
if (this._isMouseTarget) {
|
||||||
@@ -110,7 +110,7 @@ class TextInput extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._isMouseTarget = false;
|
this._isMouseTarget = false;
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class TextTagInputConnector extends Component {
|
|||||||
});
|
});
|
||||||
|
|
||||||
onChange({ name, value: newValue.join(',') });
|
onChange({ name, value: newValue.join(',') });
|
||||||
}
|
};
|
||||||
|
|
||||||
onTagDelete = ({ index }) => {
|
onTagDelete = ({ index }) => {
|
||||||
const {
|
const {
|
||||||
@@ -69,7 +69,7 @@ class TextTagInputConnector extends Component {
|
|||||||
name,
|
name,
|
||||||
value: newValue.join(',')
|
value: newValue.join(',')
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
.heart {
|
.image {
|
||||||
|
align-content: center;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
color: $themeRed;
|
vertical-align: -0.125em;
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
5
frontend/src/Components/ImdbRating.css
Normal file
5
frontend/src/Components/ImdbRating.css
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
.image {
|
||||||
|
align-content: center;
|
||||||
|
margin-right: 5px;
|
||||||
|
vertical-align: -0.125em;
|
||||||
|
}
|
||||||
57
frontend/src/Components/ImdbRating.js
Normal file
57
frontend/src/Components/ImdbRating.js
Normal file
File diff suppressed because one or more lines are too long
@@ -63,7 +63,7 @@ class ClipboardButton extends Component {
|
|||||||
showSuccess: false,
|
showSuccess: false,
|
||||||
showError: false
|
showError: false
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Listeners
|
// Listeners
|
||||||
@@ -72,13 +72,13 @@ class ClipboardButton extends Component {
|
|||||||
this.setState({
|
this.setState({
|
||||||
showSuccess: true
|
showSuccess: true
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onError = () => {
|
onError = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showError: true
|
showError: true
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class Link extends Component {
|
|||||||
if (!isDisabled && onPress) {
|
if (!isDisabled && onPress) {
|
||||||
onPress(event);
|
onPress(event);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ class SpinnerErrorButton extends Component {
|
|||||||
hasWarning: false,
|
hasWarning: false,
|
||||||
hasError: false
|
hasError: false
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class Marquee extends Component {
|
|||||||
} else if (this.state.overflowWidth > 0) {
|
} else if (this.state.overflowWidth > 0) {
|
||||||
this.startAnimation();
|
this.startAnimation();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
onHandleMouseLeave = () => {
|
onHandleMouseLeave = () => {
|
||||||
if (this.props.hoverToStop && this.state.overflowWidth > 0) {
|
if (this.props.hoverToStop && this.state.overflowWidth > 0) {
|
||||||
@@ -70,7 +70,7 @@ class Marquee extends Component {
|
|||||||
clearTimeout(this.marqueeTimer);
|
clearTimeout(this.marqueeTimer);
|
||||||
this.setState({ animatedWidth: 0 });
|
this.setState({ animatedWidth: 0 });
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
startAnimation = () => {
|
startAnimation = () => {
|
||||||
clearTimeout(this.marqueeTimer);
|
clearTimeout(this.marqueeTimer);
|
||||||
@@ -108,7 +108,7 @@ class Marquee extends Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.marqueeTimer = setTimeout(animate, timeout);
|
this.marqueeTimer = setTimeout(animate, timeout);
|
||||||
}
|
};
|
||||||
|
|
||||||
measureText = () => {
|
measureText = () => {
|
||||||
const container = this.container;
|
const container = this.container;
|
||||||
@@ -123,7 +123,7 @@ class Marquee extends Component {
|
|||||||
this.setState({ overflowWidth });
|
this.setState({ overflowWidth });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const style = {
|
const style = {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class Measure extends Component {
|
|||||||
|
|
||||||
onMeasure = _.debounce((payload) => {
|
onMeasure = _.debounce((payload) => {
|
||||||
this.props.onMeasure(payload);
|
this.props.onMeasure(payload);
|
||||||
}, 250, { leading: true, trailing: false })
|
}, 250, { leading: true, trailing: false });
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -25,11 +25,11 @@ class FilterMenu extends Component {
|
|||||||
|
|
||||||
onCustomFiltersPress = () => {
|
onCustomFiltersPress = () => {
|
||||||
this.setState({ isFilterModalOpen: true });
|
this.setState({ isFilterModalOpen: true });
|
||||||
}
|
};
|
||||||
|
|
||||||
onFiltersModalClose = () => {
|
onFiltersModalClose = () => {
|
||||||
this.setState({ isFilterModalOpen: false });
|
this.setState({ isFilterModalOpen: false });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class FilterMenuItem extends Component {
|
|||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
onPress(filterKey);
|
onPress(filterKey);
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ class Menu extends Component {
|
|||||||
this.setState({ isMenuOpen: false });
|
this.setState({ isMenuOpen: false });
|
||||||
this._removeListener();
|
this._removeListener();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
onTouchStart = (event) => {
|
onTouchStart = (event) => {
|
||||||
const menuButton = document.getElementById(this._menuButtonId);
|
const menuButton = document.getElementById(this._menuButtonId);
|
||||||
@@ -148,17 +148,17 @@ class Menu extends Component {
|
|||||||
this.setState({ isMenuOpen: false });
|
this.setState({ isMenuOpen: false });
|
||||||
this._removeListener();
|
this._removeListener();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
onWindowResize = () => {
|
onWindowResize = () => {
|
||||||
this.setMaxHeight();
|
this.setMaxHeight();
|
||||||
}
|
};
|
||||||
|
|
||||||
onWindowScroll = (event) => {
|
onWindowScroll = (event) => {
|
||||||
if (this.state.isMenuOpen) {
|
if (this.state.isMenuOpen) {
|
||||||
this.setMaxHeight();
|
this.setMaxHeight();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
onMenuButtonPress = () => {
|
onMenuButtonPress = () => {
|
||||||
const state = {
|
const state = {
|
||||||
@@ -173,7 +173,7 @@ class Menu extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.setState(state);
|
this.setState(state);
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user