mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-18 21:35:51 -04:00
Compare commits
125 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5d0effa591 | |||
| e62b6d1ddb | |||
| 34c838fdd5 | |||
| 4283de1e9e | |||
| 821653b941 | |||
| 2da1d9f105 | |||
| 97f111bec8 | |||
| 4009852c35 | |||
| a50b74c177 | |||
| 9ea739f6cb | |||
| ad3c01e986 | |||
| 173b6847e5 | |||
| 07cb844ce6 | |||
| 0783402470 | |||
| 46e728caf1 | |||
| 3b896e9011 | |||
| 623da76d16 | |||
| 95fdf38662 | |||
| 6c45c7db1b | |||
| e01900628f | |||
| 4f4e6c494d | |||
| 0c542eeb13 | |||
| 27032a8db3 | |||
| 31c357fdde | |||
| ab0bf64273 | |||
| 75b486c6c8 | |||
| c566c6e18a | |||
| 3767bbec18 | |||
| e4ba48eb61 | |||
| 057086a630 | |||
| 2b373f2006 | |||
| df6f32f6c3 | |||
| 617c7bae83 | |||
| 64e8fde0e1 | |||
| 0903269b7c | |||
| b2d6ef589f | |||
| 354105cf08 | |||
| bf7689688d | |||
| b4f456d5f0 | |||
| 1059e145c3 | |||
| 5751c3f5f5 | |||
| a458cdc0a5 | |||
| ed631142c4 | |||
| 091bcc2333 | |||
| e15225f4fc | |||
| 79e570e571 | |||
| d99e520baa | |||
| 3d1cbd1613 | |||
| 2cfc77abc3 | |||
| b7012192b3 | |||
| a24ea4feee | |||
| 43d9aa8627 | |||
| ad94a4a603 | |||
| efb4127c35 | |||
| 253546ded0 | |||
| 587b49aaba | |||
| b865103871 | |||
| b7e35fada8 | |||
| 409be45a19 | |||
| b553d8aef6 | |||
| c4ca2f12bb | |||
| 77f146b262 | |||
| d046a73f78 | |||
| 728a50c68f | |||
| 5470378af4 | |||
| 304b3ef560 | |||
| 5e35b43e48 | |||
| 52ce836d5c | |||
| fe7bf8ec9e | |||
| 0db74fa583 | |||
| 806ba7e59d | |||
| 111ed93853 | |||
| 9dd0a1d7ea | |||
| b60ddf62e8 | |||
| d05fb8ee33 | |||
| 009abaf9be | |||
| 0d5c71d205 | |||
| cbdfc14755 | |||
| 396373068e | |||
| c736df8116 | |||
| f246fa87dd | |||
| f058b8f364 | |||
| c1d2ea44b3 | |||
| 2dc848ca31 | |||
| 93ee849118 | |||
| 8dcde96f3f | |||
| 17bdc54586 | |||
| d1c2569aa6 | |||
| d6425a868b | |||
| 9306249204 | |||
| 58044e0104 | |||
| 40d6089a56 | |||
| 30796388b0 | |||
| b593c9272e | |||
| 2782d19191 | |||
| c592fbf6c8 | |||
| 210902ecb6 | |||
| 38932d82db | |||
| 17c100a7e7 | |||
| ed4add85b8 | |||
| 39346b6127 | |||
| 0f6c5533f1 | |||
| 6eb678cd92 | |||
| a2fa8c4594 | |||
| 00877ad361 | |||
| 802768bd24 | |||
| 8ee71fd0fa | |||
| 80b698a749 | |||
| 9db7bd09e1 | |||
| c13ab1388e | |||
| 0ff1908b06 | |||
| 9b2ae8dd1f | |||
| 37c1db9c49 | |||
| b91906b530 | |||
| 2088f5e92d | |||
| 25e10e26e3 | |||
| 8a6d67a6d7 | |||
| b4823ea228 | |||
| 6196679732 | |||
| 862eb66843 | |||
| 2e94951506 | |||
| d2b6b603a8 | |||
| fa40005222 | |||
| eeb5e94f06 | |||
| 56acf751c5 |
+12
-4
@@ -1,5 +1,13 @@
|
|||||||
FROM mono:4.8
|
FROM mono:5.8
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y git ssh tar gzip ca-certificates
|
RUN dpkg --add-architecture i386 && apt-get update && apt-get install -y git ssh tar gzip ca-certificates wget zip wine wine32 wine64 libwine libwine:i386
|
||||||
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -E -
|
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -E -
|
||||||
RUN apt-get install -y nodejs npm
|
RUN apt-get install -y nodejs
|
||||||
|
RUN wget https://mediaarea.net/repo/deb/repo-mediaarea_1.0-5_all.deb && dpkg -i repo-mediaarea_1.0-5_all.deb && apt-get update
|
||||||
|
RUN apt-get install -y libmediainfo-dev libmediainfo0 mediainfo
|
||||||
|
RUN npm i -g npm
|
||||||
|
RUN apt-get install -y python3-pip && pip3 install gitchangelog pystache
|
||||||
|
RUN curl -O https://dl.google.com/go/go1.10.2.linux-amd64.tar.gz && tar xvf go*.tar.gz && chown -R root:root ./go && mv go /usr/local
|
||||||
|
ENV GOPATH=$HOME/work
|
||||||
|
ENV PATH="${PATH}:/usr/local/go/bin:$GOPATH/bin"
|
||||||
|
RUN go get github.com/aktau/github-release
|
||||||
|
|||||||
+137
-12
@@ -1,12 +1,29 @@
|
|||||||
version: 2
|
version: 2
|
||||||
|
|
||||||
|
defaults: &defaults
|
||||||
|
docker:
|
||||||
|
- image: gallileo/radarr-cci-primary:5.8.7
|
||||||
|
environment:
|
||||||
|
BUILD_VERSION: 0.2.0
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
docker:
|
<<: *defaults
|
||||||
- image: gallileo/radarr-cci-primary:4.8
|
|
||||||
steps:
|
steps:
|
||||||
|
- restore_cache:
|
||||||
|
keys:
|
||||||
|
- source-v1-{{ .Branch }}-{{ .Revision }}
|
||||||
|
- source-v1-{{ .Branch }}-
|
||||||
|
- source-v1-
|
||||||
- checkout
|
- checkout
|
||||||
- run: git submodule update --init --recursive
|
- run: git submodule update --init --recursive
|
||||||
|
- save_cache:
|
||||||
|
key: source-v1-{{ .Branch }}-{{ .Revision }}
|
||||||
|
paths:
|
||||||
|
- ".git"
|
||||||
|
- run:
|
||||||
|
name: Patching Assembly Info
|
||||||
|
command: sed -i "s/AssemblyVersion(\".*\")/AssemblyVersion(\"$BUILD_VERSION.$CIRCLE_BUILD_NUM\")/gi" src/NzbDrone.Common/Properties/SharedAssemblyInfo.cs && cat src/NzbDrone.Common/Properties/SharedAssemblyInfo.cs
|
||||||
- run:
|
- run:
|
||||||
name: Clean Build
|
name: Clean Build
|
||||||
command: ./build.sh Clean
|
command: ./build.sh Clean
|
||||||
@@ -16,25 +33,133 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: Build
|
name: Build
|
||||||
command: ./build.sh Build
|
command: ./build.sh Build
|
||||||
|
- restore_cache:
|
||||||
|
keys:
|
||||||
|
- v1-npm-deps-{{ checksum "package.json" }}
|
||||||
|
# Find the most recent cache used from any branch
|
||||||
|
- v1-npm-deps-
|
||||||
- run:
|
- run:
|
||||||
name: Gulp
|
name: Gulp
|
||||||
command: ./build.sh Gulp
|
command: ./build.sh Gulp
|
||||||
|
- save_cache:
|
||||||
|
key: v1-npm-deps-{{ checksum "package.json" }}
|
||||||
|
paths:
|
||||||
|
- "node_modules"
|
||||||
- run:
|
- run:
|
||||||
name: Package
|
name: Package
|
||||||
command: ./build.sh Package
|
command: ./build.sh Package
|
||||||
- run:
|
- run:
|
||||||
name: Preparing Tests
|
name: Preparing Tests
|
||||||
command: mkdir _tests/reports
|
command: mkdir -p _tests/reports/junit && mkdir -p ../.config/Radarr && chmod -R 777 ../.config
|
||||||
|
- persist_to_workspace:
|
||||||
|
root: .
|
||||||
|
# Must be relative path from root
|
||||||
|
paths:
|
||||||
|
- _output
|
||||||
|
- _output_mono
|
||||||
|
- _output_osx
|
||||||
|
- _output_osx_app
|
||||||
|
- _tests
|
||||||
|
- setup
|
||||||
|
- .circleci
|
||||||
|
unit_tests:
|
||||||
|
<<: *defaults
|
||||||
|
steps:
|
||||||
|
- attach_workspace:
|
||||||
|
at: .
|
||||||
- run:
|
- run:
|
||||||
name: Testing
|
name: Preparing Tests
|
||||||
command: ./test.sh Linux Unit
|
command: mkdir -p ../.config/Radarr && chmod -R 777 ../.config
|
||||||
|
- run:
|
||||||
|
name: Unit Tests
|
||||||
|
command: ./_tests/test.sh Linux Unit
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: _tests/reports/
|
path: _tests/reports/
|
||||||
|
|
||||||
|
integration_tests:
|
||||||
|
<<: *defaults
|
||||||
|
steps:
|
||||||
|
- attach_workspace:
|
||||||
|
at: .
|
||||||
|
- run:
|
||||||
|
name: Copy Binaries for Integration Tests
|
||||||
|
command: cp -R _output_mono/ _tests/bin
|
||||||
|
- run:
|
||||||
|
name: Preparing Tests
|
||||||
|
command: mkdir -p ../.config/Radarr && chmod -R 777 ../.config
|
||||||
|
- run:
|
||||||
|
name: Integration Tests
|
||||||
|
command: ./_tests/test.sh Linux Integration
|
||||||
|
- store_test_results:
|
||||||
|
path: _tests/reports/
|
||||||
|
publish_artifacts:
|
||||||
|
<<: *defaults
|
||||||
|
steps:
|
||||||
|
- attach_workspace:
|
||||||
|
at: .
|
||||||
|
- run:
|
||||||
|
name: "Creating packages"
|
||||||
|
command: |
|
||||||
|
mkdir -p _packages/
|
||||||
|
cp -r _output/ _packages/Radarr
|
||||||
|
zip -r _packages/Radarr.${CIRCLE_BRANCH//\//-}.$BUILD_VERSION.$CIRCLE_BUILD_NUM.windows.zip _packages/Radarr
|
||||||
|
rm -rf _packages/Radarr
|
||||||
|
cp -r _output_mono/ _packages/Radarr
|
||||||
|
tar -zcvf _packages/Radarr.${CIRCLE_BRANCH//\//-}.$BUILD_VERSION.$CIRCLE_BUILD_NUM.linux.tar.gz _packages/Radarr
|
||||||
|
rm -rf _packages/Radarr
|
||||||
|
cp -r _output_osx/ _packages/Radarr
|
||||||
|
tar -zcvf _packages/Radarr.${CIRCLE_BRANCH//\//-}.$BUILD_VERSION.$CIRCLE_BUILD_NUM.osx.tar.gz _packages/Radarr
|
||||||
|
rm -rf _packages/Radarr
|
||||||
|
cd _output_osx_app/
|
||||||
|
zip -r ../_packages/Radarr.${CIRCLE_BRANCH//\//-}.$BUILD_VERSION.$CIRCLE_BUILD_NUM.osx-app.zip *
|
||||||
|
- run:
|
||||||
|
name: "Creating Installer"
|
||||||
|
command: wine setup/inno/ISCC.exe setup/nzbdrone.iss && cp -r setup/Output/Radarr* _packages/
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: _output
|
path: _packages
|
||||||
- store_artifacts:
|
destination: artifacts
|
||||||
path: _output_mono
|
- persist_to_workspace:
|
||||||
- store_artifacts:
|
root: .
|
||||||
path: _output_osx
|
# Must be relative path from root
|
||||||
- store_artifacts:
|
paths:
|
||||||
path: _output_osx_app
|
- _packages
|
||||||
|
deploy:
|
||||||
|
<<: *defaults
|
||||||
|
steps:
|
||||||
|
- attach_workspace:
|
||||||
|
at: .
|
||||||
|
- restore_cache:
|
||||||
|
keys:
|
||||||
|
- source-v1-{{ .Branch }}-{{ .Revision }}
|
||||||
|
- source-v1-{{ .Branch }}-
|
||||||
|
- source-v1-
|
||||||
|
- checkout
|
||||||
|
- run:
|
||||||
|
name: Creating Release
|
||||||
|
command: export LC_ALL=C.UTF-8 && export changelog=$(GITCHANGELOG_CONFIG_FILENAME=.gitchangelog.rc.release gitchangelog) && echo "Deploying v$BUILD_VERSION.$CIRCLE_BUILD_NUM to Github, with changelog:\n\n$changelog" && github-release release -u Radarr -r Radarr -t "v$BUILD_VERSION" -p --draft -d "$changelog" -n "Pre-Release v$BUILD_VERSION"
|
||||||
|
- run:
|
||||||
|
name: Uploading Assets
|
||||||
|
command: cd _packages && ls Radarr.*.* | xargs -n1 -P0 -I{} -- github-release upload -u Radarr -r Radarr -t "v$BUILD_VERSION.$CIRCLE_BUILD_NUM" --name {} --file {}
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
version: 2
|
||||||
|
|
||||||
|
build_and_test:
|
||||||
|
jobs:
|
||||||
|
- build
|
||||||
|
- unit_tests:
|
||||||
|
requires:
|
||||||
|
- build
|
||||||
|
#- integration_tests:
|
||||||
|
# requires:
|
||||||
|
# - build
|
||||||
|
- publish_artifacts:
|
||||||
|
requires:
|
||||||
|
- build
|
||||||
|
#- request_deploy:
|
||||||
|
# type: approval
|
||||||
|
# requires:
|
||||||
|
# - publish_artifacts
|
||||||
|
#- deploy:
|
||||||
|
# requires:
|
||||||
|
# - request_deploy
|
||||||
|
|||||||
+5
-5
@@ -3,11 +3,11 @@
|
|||||||
|
|
||||||
# Custom for Visual Studio
|
# Custom for Visual Studio
|
||||||
*.cs diff=csharp
|
*.cs diff=csharp
|
||||||
*.sln merge=union
|
#*.sln merge=union
|
||||||
*.csproj merge=union
|
#*.csproj merge=union
|
||||||
*.vbproj merge=union
|
#*.vbproj merge=union
|
||||||
*.fsproj merge=union
|
#*.fsproj merge=union
|
||||||
*.dbproj merge=union
|
#*.dbproj merge=union
|
||||||
|
|
||||||
# Standard to msysgit
|
# Standard to msysgit
|
||||||
*.doc diff=astextplain
|
*.doc diff=astextplain
|
||||||
|
|||||||
+17
-5
@@ -83,9 +83,10 @@ ignore_regexps = [
|
|||||||
##
|
##
|
||||||
section_regexps = [
|
section_regexps = [
|
||||||
('**New features**', [
|
('**New features**', [
|
||||||
r'^[aA]dded?\s*:?\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
|
r'^[aA]dded?\s*:?\s*((dev|use?r|pkg|test|doc)\s*:\s*)?(.*)$',
|
||||||
r'^[uU]pdated?\s*:?\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
|
r'^[uU]pdated?\s*:?\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
|
||||||
r'^[cC]hanged?\s*:?\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
|
r'^[cC]hanged?\s*:?\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
|
||||||
|
r'^[nN]ew?\s*:?\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
|
||||||
]),
|
]),
|
||||||
('**Fixes**', [
|
('**Fixes**', [
|
||||||
r'^(?![mM]erge\s*)'
|
r'^(?![mM]erge\s*)'
|
||||||
@@ -136,10 +137,21 @@ body_process = ReSub(r'((^|\n)[A-Z]\w+(-\w+)*: .*(\n\s+.*)*)+$', r'') | strip
|
|||||||
##
|
##
|
||||||
## This callable will be given the original subject and result will
|
## This callable will be given the original subject and result will
|
||||||
## be used in the changelog.
|
## be used in the changelog.
|
||||||
##
|
## subject_process = (strip |
|
||||||
|
## ReSub(r'^([aA]dd(ed?)?|[nN]ew)(\s?:?\s)(.*)$', r' \4') |
|
||||||
|
## ReSub(r'^([cC]hang(ed?)?)(\s?:?\s)(.*)$', r' \4') |
|
||||||
|
## ReSub(r'^([fF]ix(ed?)?)(\s?:?\s)(.*)$', r' \4') |
|
||||||
|
## ReSub(r'^([uU]pdat(ed?)?)(\s?:?\s)(.*)$', r' \4') |
|
||||||
|
## ReSub(r'#(\d{3,4})', r'[#\1](https://github.com/Radarr/Radarr/issues/\1)') |
|
||||||
|
## SetIfEmpty("No commit message.") | ucfirst | final_dot)
|
||||||
|
|
||||||
## Available constructs are those listed in ``body_process`` doc.
|
## Available constructs are those listed in ``body_process`` doc.
|
||||||
subject_process = (strip |
|
subject_process = (strip |
|
||||||
ReSub(r'^([cC]hanged|[fF]ixed|[aA]dded|[uU]pdated)\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n@]*)(@[a-z]+\s+)*$', r'\4') |
|
ReSub(r'^([aA]dd(ed?)?|[nN]ew)(\s?:?\s)(.*)$', r' \4') |
|
||||||
|
ReSub(r'^([cC]hang(ed?)?)(\s?:?\s)(.*)$', r' \4') |
|
||||||
|
ReSub(r'^([fF]ix(ed?)?)(\s?:?\s)(.*)$', r' \4') |
|
||||||
|
ReSub(r'^([uU]pdat(ed?)?)(\s?:?\s)(.*)$', r' \4') |
|
||||||
|
ReSub(r'#(\d{3,4})', r'[#\1](https://github.com/Radarr/Radarr/issues/\1)') |
|
||||||
SetIfEmpty("No commit message.") | ucfirst | final_dot)
|
SetIfEmpty("No commit message.") | ucfirst | final_dot)
|
||||||
|
|
||||||
|
|
||||||
@@ -147,7 +159,7 @@ subject_process = (strip |
|
|||||||
##
|
##
|
||||||
## Tags that will be used for the changelog must match this regexp.
|
## Tags that will be used for the changelog must match this regexp.
|
||||||
##
|
##
|
||||||
tag_filter_regexp = r'^v[0]+\.[2-9]+\.[0-9]+\.[0-9]+$'
|
tag_filter_regexp = r'^v[0]+\.[2-9]+\.[0-9]+\.[0-9]{3,4}$'
|
||||||
|
|
||||||
|
|
||||||
## ``unreleased_version_label`` is a string or a callable that outputs a string
|
## ``unreleased_version_label`` is a string or a callable that outputs a string
|
||||||
@@ -290,4 +302,4 @@ publish = write_to_file
|
|||||||
# r"(?P<rev>[0-9]+\.[0-9]+(\.[0-9]+)?)\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)\n--+\n")),
|
# r"(?P<rev>[0-9]+\.[0-9]+(\.[0-9]+)?)\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)\n--+\n")),
|
||||||
# "HEAD"
|
# "HEAD"
|
||||||
#]
|
#]
|
||||||
revs = []
|
revs = ["v0.2.0.134..."]
|
||||||
|
|||||||
@@ -0,0 +1,311 @@
|
|||||||
|
# -*- coding: utf-8; mode: python -*-
|
||||||
|
##
|
||||||
|
## Format
|
||||||
|
##
|
||||||
|
## ACTION: [AUDIENCE:] COMMIT_MSG [!TAG ...]
|
||||||
|
##
|
||||||
|
## Description
|
||||||
|
##
|
||||||
|
## ACTION is one of 'chg', 'fix', 'new'
|
||||||
|
##
|
||||||
|
## Is WHAT the change is about.
|
||||||
|
##
|
||||||
|
## 'chg' is for refactor, small improvement, cosmetic changes...
|
||||||
|
## 'fix' is for bug fixes
|
||||||
|
## 'new' is for new features, big improvement
|
||||||
|
##
|
||||||
|
## AUDIENCE is optional and one of 'dev', 'usr', 'pkg', 'test', 'doc'
|
||||||
|
##
|
||||||
|
## Is WHO is concerned by the change.
|
||||||
|
##
|
||||||
|
## 'dev' is for developpers (API changes, refactors...)
|
||||||
|
## 'usr' is for final users (UI changes)
|
||||||
|
## 'pkg' is for packagers (packaging changes)
|
||||||
|
## 'test' is for testers (test only related changes)
|
||||||
|
## 'doc' is for doc guys (doc only changes)
|
||||||
|
##
|
||||||
|
## COMMIT_MSG is ... well ... the commit message itself.
|
||||||
|
##
|
||||||
|
## TAGs are additionnal adjective as 'refactor' 'minor' 'cosmetic'
|
||||||
|
##
|
||||||
|
## They are preceded with a '!' or a '@' (prefer the former, as the
|
||||||
|
## latter is wrongly interpreted in github.) Commonly used tags are:
|
||||||
|
##
|
||||||
|
## 'refactor' is obviously for refactoring code only
|
||||||
|
## 'minor' is for a very meaningless change (a typo, adding a comment)
|
||||||
|
## 'cosmetic' is for cosmetic driven change (re-indentation, 80-col...)
|
||||||
|
## 'wip' is for partial functionality but complete subfunctionality.
|
||||||
|
##
|
||||||
|
## Example:
|
||||||
|
##
|
||||||
|
## new: usr: support of bazaar implemented
|
||||||
|
## chg: re-indentend some lines !cosmetic
|
||||||
|
## new: dev: updated code to be compatible with last version of killer lib.
|
||||||
|
## fix: pkg: updated year of licence coverage.
|
||||||
|
## new: test: added a bunch of test around user usability of feature X.
|
||||||
|
## fix: typo in spelling my name in comment. !minor
|
||||||
|
##
|
||||||
|
## Please note that multi-line commit message are supported, and only the
|
||||||
|
## first line will be considered as the "summary" of the commit message. So
|
||||||
|
## tags, and other rules only applies to the summary. The body of the commit
|
||||||
|
## message will be displayed in the changelog without reformatting.
|
||||||
|
|
||||||
|
|
||||||
|
##
|
||||||
|
## ``ignore_regexps`` is a line of regexps
|
||||||
|
##
|
||||||
|
## Any commit having its full commit message matching any regexp listed here
|
||||||
|
## will be ignored and won't be reported in the changelog.
|
||||||
|
##
|
||||||
|
ignore_regexps = [
|
||||||
|
r'@minor', r'!minor',
|
||||||
|
r'@cosmetic', r'!cosmetic',
|
||||||
|
r'@refactor', r'!refactor',
|
||||||
|
r'@wip', r'!wip',
|
||||||
|
r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[p|P]kg:',
|
||||||
|
r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[d|D]ev:',
|
||||||
|
r'^(.{3,3}\s*:)?\s*[fF]irst commit.?\s*$',
|
||||||
|
r'^$', ## ignore commits with empty messages
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
## ``section_regexps`` is a list of 2-tuples associating a string label and a
|
||||||
|
## list of regexp
|
||||||
|
##
|
||||||
|
## Commit messages will be classified in sections thanks to this. Section
|
||||||
|
## titles are the label, and a commit is classified under this section if any
|
||||||
|
## of the regexps associated is matching.
|
||||||
|
##
|
||||||
|
## Please note that ``section_regexps`` will only classify commits and won't
|
||||||
|
## make any changes to the contents. So you'll probably want to go check
|
||||||
|
## ``subject_process`` (or ``body_process``) to do some changes to the subject,
|
||||||
|
## whenever you are tweaking this variable.
|
||||||
|
##
|
||||||
|
section_regexps = [
|
||||||
|
('**New features**', [
|
||||||
|
r'^[aA]dded?\s*:?\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
|
||||||
|
r'^[uU]pdated?\s*:?\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
|
||||||
|
r'^[cC]hanged?\s*:?\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
|
||||||
|
r'^[nN]ew?\s*:?\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
|
||||||
|
]),
|
||||||
|
('**Fixes**', [
|
||||||
|
r'^(?![mM]erge\s*)'
|
||||||
|
]
|
||||||
|
),
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
## ``body_process`` is a callable
|
||||||
|
##
|
||||||
|
## This callable will be given the original body and result will
|
||||||
|
## be used in the changelog.
|
||||||
|
##
|
||||||
|
## Available constructs are:
|
||||||
|
##
|
||||||
|
## - any python callable that take one txt argument and return txt argument.
|
||||||
|
##
|
||||||
|
## - ReSub(pattern, replacement): will apply regexp substitution.
|
||||||
|
##
|
||||||
|
## - Indent(chars=" "): will indent the text with the prefix
|
||||||
|
## Please remember that template engines gets also to modify the text and
|
||||||
|
## will usually indent themselves the text if needed.
|
||||||
|
##
|
||||||
|
## - Wrap(regexp=r"\n\n"): re-wrap text in separate paragraph to fill 80-Columns
|
||||||
|
##
|
||||||
|
## - noop: do nothing
|
||||||
|
##
|
||||||
|
## - ucfirst: ensure the first letter is uppercase.
|
||||||
|
## (usually used in the ``subject_process`` pipeline)
|
||||||
|
##
|
||||||
|
## - final_dot: ensure text finishes with a dot
|
||||||
|
## (usually used in the ``subject_process`` pipeline)
|
||||||
|
##
|
||||||
|
## - strip: remove any spaces before or after the content of the string
|
||||||
|
##
|
||||||
|
## - SetIfEmpty(msg="No commit message."): will set the text to
|
||||||
|
## whatever given ``msg`` if the current text is empty.
|
||||||
|
##
|
||||||
|
## Additionally, you can `pipe` the provided filters, for instance:
|
||||||
|
#body_process = Wrap(regexp=r'\n(?=\w+\s*:)') | Indent(chars=" ")
|
||||||
|
#body_process = Wrap(regexp=r'\n(?=\w+\s*:)')
|
||||||
|
#body_process = noop
|
||||||
|
body_process = ReSub(r'((^|\n)[A-Z]\w+(-\w+)*: .*(\n\s+.*)*)+$', r'') | strip
|
||||||
|
|
||||||
|
|
||||||
|
## ``subject_process`` is a callable
|
||||||
|
##
|
||||||
|
## This callable will be given the original subject and result will
|
||||||
|
## be used in the changelog.
|
||||||
|
## subject_process = (strip |
|
||||||
|
## ReSub(r'^([aA]dd(ed?)?|[nN]ew)(\s?:?\s)(.*)$', r' \4') |
|
||||||
|
## ReSub(r'^([cC]hang(ed?)?)(\s?:?\s)(.*)$', r' \4') |
|
||||||
|
## ReSub(r'^([fF]ix(ed?)?)(\s?:?\s)(.*)$', r' \4') |
|
||||||
|
## ReSub(r'^([uU]pdat(ed?)?)(\s?:?\s)(.*)$', r' \4') |
|
||||||
|
## ReSub(r'#(\d{3,4})', r'[#\1](https://github.com/Radarr/Radarr/issues/\1)') |
|
||||||
|
## SetIfEmpty("No commit message.") | ucfirst | final_dot)
|
||||||
|
|
||||||
|
## Available constructs are those listed in ``body_process`` doc.
|
||||||
|
subject_process = (strip |
|
||||||
|
ReSub(r'^([aA]dd(ed?)?|[nN]ew)(\s?:?\s)(.*)$', r'\4') |
|
||||||
|
ReSub(r'^([cC]hang(ed?)?)(\s?:?\s)(.*)$', r'\4') |
|
||||||
|
ReSub(r'^([fF]ix(ed?)?)(\s?:?\s)(.*)$', r'\4') |
|
||||||
|
ReSub(r'^([uU]pdat(ed?)?)(\s?:?\s)(.*)$', r'\4') |
|
||||||
|
ReSub(r'#(\d{3,4})', r'<a href="https://github.com/Radarr/Radarr/issues/\1">\1</a>') |
|
||||||
|
SetIfEmpty("No commit message.") | ucfirst | final_dot)
|
||||||
|
|
||||||
|
|
||||||
|
## ``tag_filter_regexp`` is a regexp
|
||||||
|
##
|
||||||
|
## Tags that will be used for the changelog must match this regexp.
|
||||||
|
##
|
||||||
|
tag_filter_regexp = r'^v[0]+\.[2-9]+\.[0-9]+\.[0-9]+$'
|
||||||
|
|
||||||
|
|
||||||
|
## ``unreleased_version_label`` is a string or a callable that outputs a string
|
||||||
|
##
|
||||||
|
## This label will be used as the changelog Title of the last set of changes
|
||||||
|
## between last valid tag and HEAD if any.
|
||||||
|
unreleased_version_label = "(unreleased)"
|
||||||
|
|
||||||
|
|
||||||
|
## ``output_engine`` is a callable
|
||||||
|
##
|
||||||
|
## This will change the output format of the generated changelog file
|
||||||
|
##
|
||||||
|
## Available choices are:
|
||||||
|
##
|
||||||
|
## - rest_py
|
||||||
|
##
|
||||||
|
## Legacy pure python engine, outputs ReSTructured text.
|
||||||
|
## This is the default.
|
||||||
|
##
|
||||||
|
## - mustache(<template_name>)
|
||||||
|
##
|
||||||
|
## Template name could be any of the available templates in
|
||||||
|
## ``templates/mustache/*.tpl``.
|
||||||
|
## Requires python package ``pystache``.
|
||||||
|
## Examples:
|
||||||
|
## - mustache("markdown")
|
||||||
|
## - mustache("restructuredtext")
|
||||||
|
##
|
||||||
|
## - makotemplate(<template_name>)
|
||||||
|
##
|
||||||
|
## Template name could be any of the available templates in
|
||||||
|
## ``templates/mako/*.tpl``.
|
||||||
|
## Requires python package ``mako``.
|
||||||
|
## Examples:
|
||||||
|
## - makotemplate("restructuredtext")
|
||||||
|
##
|
||||||
|
#output_engine = rest_py
|
||||||
|
#output_engine = mustache("restructuredtext")
|
||||||
|
output_engine = mustache("changelog_release.tpl")
|
||||||
|
#output_engine = makotemplate("restructuredtext")
|
||||||
|
|
||||||
|
|
||||||
|
## ``include_merge`` is a boolean
|
||||||
|
##
|
||||||
|
## This option tells git-log whether to include merge commits in the log.
|
||||||
|
## The default is to include them.
|
||||||
|
include_merge = False
|
||||||
|
|
||||||
|
|
||||||
|
## ``log_encoding`` is a string identifier
|
||||||
|
##
|
||||||
|
## This option tells gitchangelog what encoding is outputed by ``git log``.
|
||||||
|
## The default is to be clever about it: it checks ``git config`` for
|
||||||
|
## ``i18n.logOutputEncoding``, and if not found will default to git's own
|
||||||
|
## default: ``utf-8``.
|
||||||
|
#log_encoding = 'utf-8'
|
||||||
|
|
||||||
|
|
||||||
|
## ``publish`` is a callable
|
||||||
|
##
|
||||||
|
## Sets what ``gitchangelog`` should do with the output generated by
|
||||||
|
## the output engine. ``publish`` is a callable taking one argument
|
||||||
|
## that is an interator on lines from the output engine.
|
||||||
|
##
|
||||||
|
## Some helper callable are provided:
|
||||||
|
##
|
||||||
|
## Available choices are:
|
||||||
|
##
|
||||||
|
## - stdout
|
||||||
|
##
|
||||||
|
## Outputs directly to standard output
|
||||||
|
## (This is the default)
|
||||||
|
##
|
||||||
|
## - FileInsertAtFirstRegexMatch(file, pattern, idx=lamda m: m.start())
|
||||||
|
##
|
||||||
|
## Creates a callable that will parse given file for the given
|
||||||
|
## regex pattern and will insert the output in the file.
|
||||||
|
## ``idx`` is a callable that receive the matching object and
|
||||||
|
## must return a integer index point where to insert the
|
||||||
|
## the output in the file. Default is to return the position of
|
||||||
|
## the start of the matched string.
|
||||||
|
##
|
||||||
|
## - FileRegexSubst(file, pattern, replace, flags)
|
||||||
|
##
|
||||||
|
## Apply a replace inplace in the given file. Your regex pattern must
|
||||||
|
## take care of everything and might be more complex. Check the README
|
||||||
|
## for a complete copy-pastable example.
|
||||||
|
##
|
||||||
|
# publish = FileInsertIntoFirstRegexMatch(
|
||||||
|
# "CHANGELOG.rst",
|
||||||
|
# r'/(?P<rev>[0-9]+\.[0-9]+(\.[0-9]+)?)\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)\n--+\n/',
|
||||||
|
# idx=lambda m: m.start(1)
|
||||||
|
# )
|
||||||
|
publish = stdout
|
||||||
|
|
||||||
|
#def write_to_file(content):
|
||||||
|
# with open("CHANGELOG.md", "w+") as f:
|
||||||
|
# for chunk in content:
|
||||||
|
# f.write(chunk)
|
||||||
|
|
||||||
|
#publish = write_to_file
|
||||||
|
|
||||||
|
|
||||||
|
## ``revs`` is a list of callable or a list of string
|
||||||
|
##
|
||||||
|
## callable will be called to resolve as strings and allow dynamical
|
||||||
|
## computation of these. The result will be used as revisions for
|
||||||
|
## gitchangelog (as if directly stated on the command line). This allows
|
||||||
|
## to filter exaclty which commits will be read by gitchangelog.
|
||||||
|
##
|
||||||
|
## To get a full documentation on the format of these strings, please
|
||||||
|
## refer to the ``git rev-list`` arguments. There are many examples.
|
||||||
|
##
|
||||||
|
## Using callables is especially useful, for instance, if you
|
||||||
|
## are using gitchangelog to generate incrementally your changelog.
|
||||||
|
##
|
||||||
|
## Some helpers are provided, you can use them::
|
||||||
|
##
|
||||||
|
## - FileFirstRegexMatch(file, pattern): will return a callable that will
|
||||||
|
## return the first string match for the given pattern in the given file.
|
||||||
|
## If you use named sub-patterns in your regex pattern, it'll output only
|
||||||
|
## the string matching the regex pattern named "rev".
|
||||||
|
##
|
||||||
|
## - Caret(rev): will return the rev prefixed by a "^", which is a
|
||||||
|
## way to remove the given revision and all its ancestor.
|
||||||
|
##
|
||||||
|
## Please note that if you provide a rev-list on the command line, it'll
|
||||||
|
## replace this value (which will then be ignored).
|
||||||
|
##
|
||||||
|
## If empty, then ``gitchangelog`` will act as it had to generate a full
|
||||||
|
## changelog.
|
||||||
|
##
|
||||||
|
## The default is to use all commits to make the changelog.
|
||||||
|
#revs = ["^1.0.3", ]
|
||||||
|
#revs = [
|
||||||
|
# Caret(
|
||||||
|
# FileFirstRegexMatch(
|
||||||
|
# "CHANGELOG.rst",
|
||||||
|
# r"(?P<rev>[0-9]+\.[0-9]+(\.[0-9]+)?)\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)\n--+\n")),
|
||||||
|
# "HEAD"
|
||||||
|
#]
|
||||||
|
# Gets the latest annoted tag and uses that as a base for new changes.
|
||||||
|
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
proc = subprocess.Popen(["git", "describe", "--abbrev=0", "--tags"], stdout=subprocess.PIPE)
|
||||||
|
out = str(proc.communicate()[0].strip(), "utf-8")
|
||||||
|
revs = [out+"..."]
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
**Description:**
|
**Description:**
|
||||||
|
|
||||||
Check first that your problem is not listed in our wiki section:
|
<!-- Check first that your problem is not listed in our wiki section:
|
||||||
* https://github.com/Radarr/Radarr/wiki/Common-Problems
|
* https://github.com/Radarr/Radarr/wiki/Common-Problems
|
||||||
* https://github.com/Radarr/Radarr/wiki/FAQ
|
* https://github.com/Radarr/Radarr/wiki/FAQ
|
||||||
|
|
||||||
@@ -9,7 +9,7 @@ Check first that your problem is not listed in our wiki section:
|
|||||||
Visit our [Discord server](https://discord.gg/NWYch8M) or [Subreddit](https://reddit.com/r/radarr) for support or longer discussions. Support questions posed on here will be closed immediately.
|
Visit our [Discord server](https://discord.gg/NWYch8M) or [Subreddit](https://reddit.com/r/radarr) for support or longer discussions. Support questions posed on here will be closed immediately.
|
||||||
|
|
||||||
Provide a description of the feature request or bug here, the more details the better.
|
Provide a description of the feature request or bug here, the more details the better.
|
||||||
Please also include the following if you are reporting a bug. If you do not include it, the issue will probably be closed as we cannot help you.
|
Please also include the following if you are reporting a bug. If you do not include it, the issue will probably be closed as we cannot help you. -->
|
||||||
|
|
||||||
**Radarr Version:**
|
**Radarr Version:**
|
||||||
|
|
||||||
@@ -17,4 +17,6 @@ Please also include the following if you are reporting a bug. If you do not incl
|
|||||||
|
|
||||||
**Debug Logs:**
|
**Debug Logs:**
|
||||||
|
|
||||||
Please use the search bar and make sure you are not submitting an already submitted issue.
|
# Do not remove anything from your logs and post the full logs! If not everything fits in here use a service like https://pastebin.com to upload them.
|
||||||
|
|
||||||
|
<!-- Please use the search bar (make sure to include closed issues as well) and make sure you are not submitting an already submitted issue. -->
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Support requests will be closed immediately, if you are unsure go to our Discord
|
||||||
|
or Subreddit first. Exceptions do not mean you found a bug!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
Steps to reproduce the behavior:
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. See error
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
**Desktop (please complete the following information):**
|
||||||
|
- OS: [e.g. Windows]
|
||||||
|
- Mono Version: [e.g. Mono 5.8] (Only needed under Linux and Mac, found under System -> Status)
|
||||||
|
- Browser and Version [e.g. chrome, safari] (Only needed for UI issues)
|
||||||
|
- Version [e.g. 22]
|
||||||
|
|
||||||
|
**Debug Logs**
|
||||||
|
Turn on debug logs under Settings -> General and wait for the bug to occur again. **Upload the full log file here (or another site and link it). Issues will be closed, if they do not include this!**
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Is your feature request related to a problem? Please describe.**
|
||||||
|
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
|
**Describe alternatives you've considered**
|
||||||
|
A clear and concise description of any alternative solutions or features you've considered.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context or screenshots about the feature request here.
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
todo:
|
||||||
|
keyword: "TODO"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# Number of days of inactivity before an issue becomes stale
|
||||||
|
daysUntilStale: 60
|
||||||
|
# Number of days of inactivity before a stale issue is closed
|
||||||
|
daysUntilClose: 7
|
||||||
|
# Issues with these labels will never be considered stale
|
||||||
|
exemptLabels:
|
||||||
|
- feature request
|
||||||
|
- parser
|
||||||
|
- confirmed
|
||||||
|
# Label to use when marking an issue as stale
|
||||||
|
staleLabel: stale
|
||||||
|
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||||
|
markComment: >
|
||||||
|
This issue has been automatically marked as stale because it has not had recent activity. Please verify that this is still an issue with the latest version of Radarr and report back. Otherwise this issue will be closed.
|
||||||
|
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||||
|
closeComment: false
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Configuration for support-requests - https://github.com/dessant/support-requests
|
||||||
|
|
||||||
|
# Label used to mark issues as support requests
|
||||||
|
supportLabel: support
|
||||||
|
# Comment to post on issues marked as support requests. Add a link
|
||||||
|
# to a support page, or set to `false` to disable
|
||||||
|
supportComment: >
|
||||||
|
We use the issue tracker exclusively for bug reports and feature requests.
|
||||||
|
However, this issue appears to be a support request. Please hop over onto our [Discord](https://discord.gg/ZDmT7qb) or [Subreddit](https://reddit.com/r/radarr)
|
||||||
|
# Whether to close issues marked as support requests
|
||||||
|
close: true
|
||||||
|
# Whether to lock issues marked as support requests
|
||||||
|
lock: false
|
||||||
+24
-1
@@ -153,4 +153,27 @@ Thumbs.db
|
|||||||
|
|
||||||
# Cake
|
# Cake
|
||||||
/tools/Addins/*
|
/tools/Addins/*
|
||||||
packages.config.md5sum
|
packages.config.md5sum
|
||||||
|
|
||||||
|
|
||||||
|
# Common IntelliJ Platform excludes
|
||||||
|
|
||||||
|
# User specific
|
||||||
|
**/.idea/**/workspace.xml
|
||||||
|
**/.idea/**/tasks.xml
|
||||||
|
**/.idea/shelf/*
|
||||||
|
**/.idea/dictionaries
|
||||||
|
|
||||||
|
# Sensitive or high-churn files
|
||||||
|
**/.idea/**/dataSources/
|
||||||
|
**/.idea/**/dataSources.ids
|
||||||
|
**/.idea/**/dataSources.xml
|
||||||
|
**/.idea/**/dataSources.local.xml
|
||||||
|
**/.idea/**/sqlDataSources.xml
|
||||||
|
**/.idea/**/dynamic.xml
|
||||||
|
|
||||||
|
# Rider
|
||||||
|
# Rider auto-generates .iml files, and contentModel.xml
|
||||||
|
**/.idea/**/*.iml
|
||||||
|
**/.idea/**/contentModel.xml
|
||||||
|
**/.idea/**/modules.xml
|
||||||
|
|||||||
Generated
-1
@@ -1 +0,0 @@
|
|||||||
Sonarr
|
|
||||||
Generated
-24
@@ -1,24 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module type="WEB_MODULE" version="4">
|
|
||||||
<component name="NewModuleRootManager">
|
|
||||||
<content url="file://$MODULE_DIR$">
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/.idea" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/Logo" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/_output" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/_output_mono" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/_output_osx" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/_output_osx_app" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/_start" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/_tests" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/debian" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/node_modules" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/osx" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/schemas" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/setup" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/src" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/tools" />
|
|
||||||
</content>
|
|
||||||
<orderEntry type="inheritedJdk" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
||||||
Generated
-59
@@ -1,59 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectCodeStyleSettingsManager">
|
|
||||||
<option name="PER_PROJECT_SETTINGS">
|
|
||||||
<value>
|
|
||||||
<option name="LINE_SEPARATOR" value=" " />
|
|
||||||
<option name="RIGHT_MARGIN" value="190" />
|
|
||||||
<option name="HTML_ATTRIBUTE_WRAP" value="0" />
|
|
||||||
<option name="HTML_KEEP_LINE_BREAKS" value="false" />
|
|
||||||
<option name="HTML_KEEP_BLANK_LINES" value="1" />
|
|
||||||
<option name="HTML_ALIGN_ATTRIBUTES" value="false" />
|
|
||||||
<option name="HTML_INLINE_ELEMENTS" value="" />
|
|
||||||
<option name="HTML_DONT_ADD_BREAKS_IF_INLINE_CONTENT" value="" />
|
|
||||||
<CssCodeStyleSettings>
|
|
||||||
<option name="HEX_COLOR_LOWER_CASE" value="true" />
|
|
||||||
<option name="HEX_COLOR_LONG_FORMAT" value="true" />
|
|
||||||
<option name="VALUE_ALIGNMENT" value="1" />
|
|
||||||
</CssCodeStyleSettings>
|
|
||||||
<JSCodeStyleSettings>
|
|
||||||
<option name="SPACE_BEFORE_PROPERTY_COLON" value="true" />
|
|
||||||
<option name="ALIGN_OBJECT_PROPERTIES" value="2" />
|
|
||||||
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
||||||
<option name="OBJECT_LITERAL_WRAP" value="2" />
|
|
||||||
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
||||||
</JSCodeStyleSettings>
|
|
||||||
<XML>
|
|
||||||
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
|
|
||||||
</XML>
|
|
||||||
<codeStyleSettings language="CSS">
|
|
||||||
<indentOptions>
|
|
||||||
<option name="SMART_TABS" value="true" />
|
|
||||||
</indentOptions>
|
|
||||||
</codeStyleSettings>
|
|
||||||
<codeStyleSettings language="JavaScript">
|
|
||||||
<option name="LINE_COMMENT_AT_FIRST_COLUMN" value="true" />
|
|
||||||
<option name="KEEP_LINE_BREAKS" value="false" />
|
|
||||||
<option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
|
|
||||||
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
|
|
||||||
<option name="CATCH_ON_NEW_LINE" value="true" />
|
|
||||||
<option name="FINALLY_ON_NEW_LINE" value="true" />
|
|
||||||
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
|
|
||||||
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
|
|
||||||
<option name="SPACE_BEFORE_METHOD_PARENTHESES" value="true" />
|
|
||||||
<option name="CALL_PARAMETERS_WRAP" value="1" />
|
|
||||||
<option name="BINARY_OPERATION_WRAP" value="1" />
|
|
||||||
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
|
|
||||||
<option name="ARRAY_INITIALIZER_WRAP" value="2" />
|
|
||||||
<option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
|
|
||||||
<option name="ARRAY_INITIALIZER_RBRACE_ON_NEXT_LINE" value="true" />
|
|
||||||
<option name="IF_BRACE_FORCE" value="3" />
|
|
||||||
<option name="DOWHILE_BRACE_FORCE" value="3" />
|
|
||||||
<option name="WHILE_BRACE_FORCE" value="3" />
|
|
||||||
<option name="FOR_BRACE_FORCE" value="3" />
|
|
||||||
</codeStyleSettings>
|
|
||||||
</value>
|
|
||||||
</option>
|
|
||||||
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
Generated
-6
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="Encoding">
|
|
||||||
<file url="PROJECT" charset="UTF-8" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
Generated
-6
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="JavaScriptLibraryMappings">
|
|
||||||
<excludedPredefinedLibrary name="Radarr/node_modules" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
Generated
-14
@@ -1,14 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
|
||||||
<OptionsSetting value="true" id="Add" />
|
|
||||||
<OptionsSetting value="true" id="Remove" />
|
|
||||||
<OptionsSetting value="true" id="Checkout" />
|
|
||||||
<OptionsSetting value="true" id="Update" />
|
|
||||||
<OptionsSetting value="true" id="Status" />
|
|
||||||
<OptionsSetting value="true" id="Edit" />
|
|
||||||
<ConfirmationsSetting value="0" id="Add" />
|
|
||||||
<ConfirmationsSetting value="0" id="Remove" />
|
|
||||||
</component>
|
|
||||||
<component name="ProjectRootManager" version="2" />
|
|
||||||
</project>
|
|
||||||
Generated
-8
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectModuleManager">
|
|
||||||
<modules>
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/Sonarr.iml" filepath="$PROJECT_DIR$/.idea/Sonarr.iml" />
|
|
||||||
</modules>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
Generated
-6
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="VcsDirectoryMappings">
|
|
||||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
+890
-7682
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
width="70px" height="70px" viewBox="0 0 70 70" style="enable-background:new 0 0 70 70;" xml:space="preserve">
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-1.3318" y1="43.7371" x2="67.0419" y2="26.0967">
|
||||||
|
<stop offset="0.1237" style="stop-color:#7866FF"/>
|
||||||
|
<stop offset="0.5376" style="stop-color:#FE2EB6"/>
|
||||||
|
<stop offset="0.8548" style="stop-color:#FD0486"/>
|
||||||
|
</linearGradient>
|
||||||
|
<polygon style="fill:url(#SVGID_1_);" points="67.3,16 43.7,0 0,31.1 11.1,70 58.9,60.3 "/>
|
||||||
|
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="45.9148" y1="38.9098" x2="67.6577" y2="9.0989">
|
||||||
|
<stop offset="0.1237" style="stop-color:#FF0080"/>
|
||||||
|
<stop offset="0.2587" style="stop-color:#FE0385"/>
|
||||||
|
<stop offset="0.4109" style="stop-color:#FA0C92"/>
|
||||||
|
<stop offset="0.5713" style="stop-color:#F41BA9"/>
|
||||||
|
<stop offset="0.7363" style="stop-color:#EB2FC8"/>
|
||||||
|
<stop offset="0.8656" style="stop-color:#E343E6"/>
|
||||||
|
</linearGradient>
|
||||||
|
<polygon style="fill:url(#SVGID_2_);" points="67.3,16 43.7,0 38,15.7 38,47.8 70,47.8 "/>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<rect x="13.4" y="13.4" style="fill:#000000;" width="43.2" height="43.2"/>
|
||||||
|
<rect x="17.4" y="48.5" style="fill:#FFFFFF;" width="16.2" height="2.7"/>
|
||||||
|
<g>
|
||||||
|
<path style="fill:#FFFFFF;" d="M17.4,19.1h6.9c5.6,0,9.5,3.8,9.5,8.9V28c0,5-3.9,8.9-9.5,8.9h-6.9V19.1z M21.4,22.7v10.7h3
|
||||||
|
c3.2,0,5.4-2.2,5.4-5.3V28c0-3.2-2.2-5.4-5.4-5.4H21.4z"/>
|
||||||
|
<polygon style="fill:#FFFFFF;" points="40.3,22.7 34.9,22.7 34.9,19.1 49.6,19.1 49.6,22.7 44.2,22.7 44.2,37 40.3,37 "/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,66 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
width="120.1px" height="130.2px" viewBox="0 0 120.1 130.2" style="enable-background:new 0 0 120.1 130.2;" xml:space="preserve"
|
||||||
|
>
|
||||||
|
<g>
|
||||||
|
<linearGradient id="XMLID_2_" gradientUnits="userSpaceOnUse" x1="31.8412" y1="120.5578" x2="110.2402" y2="73.24">
|
||||||
|
<stop offset="0" style="stop-color:#FCEE39"/>
|
||||||
|
<stop offset="1" style="stop-color:#F37B3D"/>
|
||||||
|
</linearGradient>
|
||||||
|
<path id="XMLID_3041_" style="fill:url(#XMLID_2_);" d="M118.6,71.8c0.9-0.8,1.4-1.9,1.5-3.2c0.1-2.6-1.8-4.7-4.4-4.9
|
||||||
|
c-1.2-0.1-2.4,0.4-3.3,1.1l0,0l-83.8,45.9c-1.9,0.8-3.6,2.2-4.7,4.1c-2.9,4.8-1.3,11,3.6,13.9c3.4,2,7.5,1.8,10.7-0.2l0,0l0,0
|
||||||
|
c0.2-0.2,0.5-0.3,0.7-0.5l78-54.8C117.3,72.9,118.4,72.1,118.6,71.8L118.6,71.8L118.6,71.8z"/>
|
||||||
|
<linearGradient id="XMLID_3_" gradientUnits="userSpaceOnUse" x1="48.3607" y1="6.9083" x2="119.9179" y2="69.5546">
|
||||||
|
<stop offset="0" style="stop-color:#EF5A6B"/>
|
||||||
|
<stop offset="0.57" style="stop-color:#F26F4E"/>
|
||||||
|
<stop offset="1" style="stop-color:#F37B3D"/>
|
||||||
|
</linearGradient>
|
||||||
|
<path id="XMLID_3049_" style="fill:url(#XMLID_3_);" d="M118.8,65.1L118.8,65.1L55,2.5C53.6,1,51.6,0,49.3,0
|
||||||
|
c-4.3,0-7.7,3.5-7.7,7.7v0c0,2.1,0.8,3.9,2.1,5.3l0,0l0,0c0.4,0.4,0.8,0.7,1.2,1l67.4,57.7l0,0c0.8,0.7,1.8,1.2,3,1.3
|
||||||
|
c2.6,0.1,4.7-1.8,4.9-4.4C120.2,67.3,119.7,66,118.8,65.1z"/>
|
||||||
|
<linearGradient id="XMLID_4_" gradientUnits="userSpaceOnUse" x1="52.9467" y1="63.6407" x2="10.5379" y2="37.1562">
|
||||||
|
<stop offset="0" style="stop-color:#7C59A4"/>
|
||||||
|
<stop offset="0.3852" style="stop-color:#AF4C92"/>
|
||||||
|
<stop offset="0.7654" style="stop-color:#DC4183"/>
|
||||||
|
<stop offset="0.957" style="stop-color:#ED3D7D"/>
|
||||||
|
</linearGradient>
|
||||||
|
<path id="XMLID_3042_" style="fill:url(#XMLID_4_);" d="M57.1,59.5C57,59.5,17.7,28.5,16.9,28l0,0l0,0c-0.6-0.3-1.2-0.6-1.8-0.9
|
||||||
|
c-5.8-2.2-12.2,0.8-14.4,6.6c-1.9,5.1,0.2,10.7,4.6,13.4l0,0l0,0C6,47.5,6.6,47.8,7.3,48c0.4,0.2,45.4,18.8,45.4,18.8l0,0
|
||||||
|
c1.8,0.8,3.9,0.3,5.1-1.2C59.3,63.7,59,61,57.1,59.5z"/>
|
||||||
|
<linearGradient id="XMLID_5_" gradientUnits="userSpaceOnUse" x1="52.1736" y1="3.7019" x2="10.7706" y2="37.8971">
|
||||||
|
<stop offset="0" style="stop-color:#EF5A6B"/>
|
||||||
|
<stop offset="0.364" style="stop-color:#EE4E72"/>
|
||||||
|
<stop offset="1" style="stop-color:#ED3D7D"/>
|
||||||
|
</linearGradient>
|
||||||
|
<path id="XMLID_3057_" style="fill:url(#XMLID_5_);" d="M49.3,0c-1.7,0-3.3,0.6-4.6,1.5L4.9,28.3c-0.1,0.1-0.2,0.1-0.2,0.2l-0.1,0
|
||||||
|
l0,0c-1.7,1.2-3.1,3-3.9,5.1C-1.5,39.4,1.5,45.9,7.3,48c3.6,1.4,7.5,0.7,10.4-1.4l0,0l0,0c0.7-0.5,1.3-1,1.8-1.6l34.6-31.2l0,0
|
||||||
|
c1.8-1.4,3-3.6,3-6.1v0C57.1,3.5,53.6,0,49.3,0z"/>
|
||||||
|
<g id="XMLID_3008_">
|
||||||
|
<rect id="XMLID_3033_" x="34.6" y="37.4" style="fill:#000000;" width="51" height="51"/>
|
||||||
|
<rect id="XMLID_3032_" x="39" y="78.8" style="fill:#FFFFFF;" width="19.1" height="3.2"/>
|
||||||
|
<g id="XMLID_3009_">
|
||||||
|
<path id="XMLID_3030_" style="fill:#FFFFFF;" d="M38.8,50.8l1.5-1.4c0.4,0.5,0.8,0.8,1.3,0.8c0.6,0,0.9-0.4,0.9-1.2l0-5.3l2.3,0
|
||||||
|
l0,5.3c0,1-0.3,1.8-0.8,2.3c-0.5,0.5-1.3,0.8-2.3,0.8C40.2,52.2,39.4,51.6,38.8,50.8z"/>
|
||||||
|
<path id="XMLID_3028_" style="fill:#FFFFFF;" d="M45.3,43.8l6.7,0v1.9l-4.4,0V47l4,0l0,1.8l-4,0l0,1.3l4.5,0l0,2l-6.7,0
|
||||||
|
L45.3,43.8z"/>
|
||||||
|
<path id="XMLID_3026_" style="fill:#FFFFFF;" d="M55,45.8l-2.5,0l0-2l7.3,0l0,2l-2.5,0l0,6.3l-2.3,0L55,45.8z"/>
|
||||||
|
<path id="XMLID_3022_" style="fill:#FFFFFF;" d="M39,54l4.3,0c1,0,1.8,0.3,2.3,0.7c0.3,0.3,0.5,0.8,0.5,1.4v0
|
||||||
|
c0,1-0.5,1.5-1.3,1.9c1,0.3,1.6,0.9,1.6,2v0c0,1.4-1.2,2.3-3.1,2.3l-4.3,0L39,54z M43.8,56.6c0-0.5-0.4-0.7-1-0.7l-1.5,0l0,1.5
|
||||||
|
l1.4,0C43.4,57.3,43.8,57.1,43.8,56.6L43.8,56.6z M43,59l-1.8,0l0,1.5H43c0.7,0,1.1-0.3,1.1-0.8v0C44.1,59.2,43.7,59,43,59z"/>
|
||||||
|
<path id="XMLID_3019_" style="fill:#FFFFFF;" d="M46.8,54l3.9,0c1.3,0,2.1,0.3,2.7,0.9c0.5,0.5,0.7,1.1,0.7,1.9v0
|
||||||
|
c0,1.3-0.7,2.1-1.7,2.6l2,2.9l-2.6,0l-1.7-2.5h-1l0,2.5l-2.3,0L46.8,54z M50.6,58c0.8,0,1.2-0.4,1.2-1v0c0-0.7-0.5-1-1.2-1
|
||||||
|
l-1.5,0v2H50.6z"/>
|
||||||
|
<path id="XMLID_3016_" style="fill:#FFFFFF;" d="M56.8,54l2.2,0l3.5,8.4l-2.5,0l-0.6-1.5l-3.2,0l-0.6,1.5l-2.4,0L56.8,54z
|
||||||
|
M58.8,59l-0.9-2.3L57,59L58.8,59z"/>
|
||||||
|
<path id="XMLID_3014_" style="fill:#FFFFFF;" d="M62.8,54l2.3,0l0,8.3l-2.3,0L62.8,54z"/>
|
||||||
|
<path id="XMLID_3012_" style="fill:#FFFFFF;" d="M65.7,54l2.1,0l3.4,4.4l0-4.4l2.3,0l0,8.3l-2,0L68,57.8l0,4.6l-2.3,0L65.7,54z"
|
||||||
|
/>
|
||||||
|
<path id="XMLID_3010_" style="fill:#FFFFFF;" d="M73.7,61.1l1.3-1.5c0.8,0.7,1.7,1,2.7,1c0.6,0,1-0.2,1-0.6v0
|
||||||
|
c0-0.4-0.3-0.5-1.4-0.8c-1.8-0.4-3.1-0.9-3.1-2.6v0c0-1.5,1.2-2.7,3.2-2.7c1.4,0,2.5,0.4,3.4,1.1l-1.2,1.6
|
||||||
|
c-0.8-0.5-1.6-0.8-2.3-0.8c-0.6,0-0.8,0.2-0.8,0.5v0c0,0.4,0.3,0.5,1.4,0.8c1.9,0.4,3.1,1,3.1,2.6v0c0,1.7-1.3,2.7-3.4,2.7
|
||||||
|
C76.1,62.5,74.7,62,73.7,61.1z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 4.8 KiB |
@@ -0,0 +1,50 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
width="70px" height="70px" viewBox="0 0 70 70" style="enable-background:new 0 0 70 70;" xml:space="preserve">
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="22.9451" y1="75.7869" x2="74.7868" y2="20.6415">
|
||||||
|
<stop offset="1.612903e-002" style="stop-color:#B35BA3"/>
|
||||||
|
<stop offset="0.4044" style="stop-color:#C41E57"/>
|
||||||
|
<stop offset="0.4677" style="stop-color:#C41E57"/>
|
||||||
|
<stop offset="0.6505" style="stop-color:#EB8523"/>
|
||||||
|
<stop offset="0.9516" style="stop-color:#FEBD11"/>
|
||||||
|
</linearGradient>
|
||||||
|
<polygon style="fill:url(#SVGID_1_);" points="49.8,15.2 36,36.7 58.4,70 70,23.1 "/>
|
||||||
|
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="17.7187" y1="73.2922" x2="69.5556" y2="18.1519">
|
||||||
|
<stop offset="1.612903e-002" style="stop-color:#B35BA3"/>
|
||||||
|
<stop offset="0.4044" style="stop-color:#C41E57"/>
|
||||||
|
<stop offset="0.4677" style="stop-color:#C41E57"/>
|
||||||
|
<stop offset="0.7043" style="stop-color:#EB8523"/>
|
||||||
|
</linearGradient>
|
||||||
|
<polygon style="fill:url(#SVGID_2_);" points="51.1,15.7 49,0 18.8,33.6 27.6,42.3 20.8,70 58.4,70 "/>
|
||||||
|
</g>
|
||||||
|
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="1.8281" y1="53.4275" x2="48.8245" y2="9.2255">
|
||||||
|
<stop offset="1.612903e-002" style="stop-color:#B35BA3"/>
|
||||||
|
<stop offset="0.6613" style="stop-color:#C41E57"/>
|
||||||
|
</linearGradient>
|
||||||
|
<polygon style="fill:url(#SVGID_3_);" points="49,0 11.6,0 0,47.1 55.6,47.1 "/>
|
||||||
|
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="49.8935" y1="-11.5569" x2="48.8588" y2="24.0352">
|
||||||
|
<stop offset="0.5" style="stop-color:#C41E57"/>
|
||||||
|
<stop offset="0.6668" style="stop-color:#D13F48"/>
|
||||||
|
<stop offset="0.7952" style="stop-color:#D94F39"/>
|
||||||
|
<stop offset="0.8656" style="stop-color:#DD5433"/>
|
||||||
|
</linearGradient>
|
||||||
|
<polygon style="fill:url(#SVGID_4_);" points="55.3,47.1 51.1,15.7 49,0 41.7,23 "/>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
|
||||||
|
<rect x="13.4" y="13.5" transform="matrix(-1 2.577289e-003 -2.577289e-003 -1 70.0288 70.081)" style="fill:#000000;" width="43.2" height="43.2"/>
|
||||||
|
|
||||||
|
<rect x="17.6" y="48.6" transform="matrix(1 -2.577289e-003 2.577289e-003 1 -0.1287 6.634109e-002)" style="fill:#FFFFFF;" width="16.2" height="2.7"/>
|
||||||
|
<path style="fill:#FFFFFF;" d="M17.4,19.1l8.2,0c2.3,0,4,0.6,5.2,1.8c1,1,1.5,2.4,1.5,4.1l0,0.1c0,1.5-0.3,2.6-1.1,3.5
|
||||||
|
c-0.7,0.9-1.6,1.6-2.8,2l4.4,6.4l-4.6,0l-3.7-5.5l-3.3,0l0,5.5l-3.9,0L17.4,19.1z M25.3,27.8c1,0,1.7-0.2,2.2-0.7
|
||||||
|
c0.5-0.5,0.8-1.1,0.8-1.8l0-0.1c0-0.9-0.3-1.5-0.8-1.9c-0.5-0.4-1.3-0.6-2.3-0.6l-3.9,0l0,5.1L25.3,27.8z"/>
|
||||||
|
<path style="fill:#FFFFFF;" d="M36,33.2l-1.9,0l0-3.3l2.5,0l0.6-3.8l-2.3,0l0-3.3l2.8,0l0.6-3.7l3.4,0l-0.6,3.7l3.7,0l0.6-3.7
|
||||||
|
l3.4,0l-0.6,3.7l1.9,0l0,3.3l-2.5,0L47,29.9l2.3,0l0,3.3l-2.8,0L45.8,37l-3.4,0l0.7-3.8l-3.7,0L38.7,37l-3.4,0L36,33.2z
|
||||||
|
M43.7,29.9l0.6-3.8l-3.7,0L40,29.9L43.7,29.9z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.1 KiB |
@@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
width="70px" height="70px" viewBox="0 0 70 70" style="enable-background:new 0 0 70 70;" xml:space="preserve">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="linear-gradient" x1="70.22612" y1="27.79912" x2="-5.13024" y2="63.12242" gradientTransform="matrix(1, 0, 0, -1, 0, 71.27997)" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#c90f5e"/>
|
||||||
|
<stop offset="0.22111" stop-color="#c90f5e"/>
|
||||||
|
<stop offset="0.2356" stop-color="#c90f5e"/>
|
||||||
|
<stop offset="0.35559" stop-color="#ca135c"/>
|
||||||
|
<stop offset="0.46633" stop-color="#ce1e57"/>
|
||||||
|
<stop offset="0.5735" stop-color="#d4314e"/>
|
||||||
|
<stop offset="0.67844" stop-color="#dc4b41"/>
|
||||||
|
<stop offset="0.78179" stop-color="#e66d31"/>
|
||||||
|
<stop offset="0.88253" stop-color="#f3961d"/>
|
||||||
|
<stop offset="0.94241" stop-color="#fcb20f"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="linear-gradient-2" x1="24.65904" y1="61.99608" x2="46.04762" y2="2.93445" gradientTransform="matrix(1, 0, 0, -1, 0, 71.27997)" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0.04188" stop-color="#077cfb"/>
|
||||||
|
<stop offset="0.44503" stop-color="#c90f5e"/>
|
||||||
|
<stop offset="0.95812" stop-color="#077cfb"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="linear-gradient-3" x1="17.39552" y1="63.34592" x2="33.19389" y2="7.20092" gradientTransform="matrix(1, 0, 0, -1, 0, 71.27997)" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0.27749" stop-color="#c90f5e"/>
|
||||||
|
<stop offset="0.97382" stop-color="#fcb20f"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<title>rider</title>
|
||||||
|
<g>
|
||||||
|
<polygon points="70 27.237 63.391 23.75 20.926 0 3.827 17.921 21.619 41.068 60.537 44.397 70 27.237" fill="url(#linear-gradient)"/>
|
||||||
|
<polygon points="50.423 16.132 44.271 1.107 27.643 17.471 11.768 50.194 49.411 70 70 57.98 50.423 16.132" fill="url(#linear-gradient-2)"/>
|
||||||
|
<polygon points="20.926 0 0 14.095 7.779 62.172 27.848 69.889 53.78 48.823 20.926 0" fill="url(#linear-gradient-3)"/>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<rect x="13.30219" y="13.19311" width="43.61371" height="43.61371"/>
|
||||||
|
<g>
|
||||||
|
<path d="M17.22741,18.86293h8.39564a7.38416,7.38416,0,0,1,5.34268,1.85358,5.86989,5.86989,0,0,1,1.52648,4.1433h0A5.74339,5.74339,0,0,1,28.567,30.5296l4.47041,6.54206H28.34891L24.42368,31.1838h-3.162v5.88785H17.22741V18.86293h0ZM25.296,27.69471c1.96262,0,3.053-1.09034,3.053-2.61682h0c0-1.74455-1.19938-2.61682-3.162-2.61682H21.15265v5.23365H25.296Z" fill="#fff"/>
|
||||||
|
<path d="M36.09034,18.86293H43.2866c5.77882,0,9.70405,3.92523,9.70405,9.15888h0c0,5.12461-3.92523,9.15888-9.70405,9.15888H36.09034V18.86293Zm4.03427,3.59813V33.47352h3.162a5.23727,5.23727,0,0,0,5.56075-5.45171h0a5.26493,5.26493,0,0,0-5.56075-5.56075h-3.162Z" fill="#fff"/>
|
||||||
|
</g>
|
||||||
|
<rect x="17.22741" y="48.62925" width="16.35514" height="2.72586" fill="#fff"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.0 KiB |
@@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
width="70px" height="70px" viewBox="0 0 70 70" style="enable-background:new 0 0 70 70;" xml:space="preserve">
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="25.0676" y1="1.4599" x2="43.1829" y2="66.675">
|
||||||
|
<stop offset="0.2849" style="stop-color:#00CDD7"/>
|
||||||
|
<stop offset="0.9409" style="stop-color:#2086D7"/>
|
||||||
|
</linearGradient>
|
||||||
|
<polygon style="fill:url(#SVGID_1_);" points="9.4,63.3 0,7.3 17.5,0.1 28.6,6.7 38.8,1.2 60.1,9.4 48.1,70 "/>
|
||||||
|
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="30.7199" y1="9.7343" x2="61.365" y2="54.6713">
|
||||||
|
<stop offset="0.1398" style="stop-color:#FFF045"/>
|
||||||
|
<stop offset="0.3656" style="stop-color:#00CDD7"/>
|
||||||
|
</linearGradient>
|
||||||
|
<polygon style="fill:url(#SVGID_2_);" points="70,23.7 61,1.4 44.6,0 19.3,24.3 26.1,55.6 38.8,64.6 70,46 62.3,31.7 "/>
|
||||||
|
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="61.0819" y1="15.2899" x2="65.1065" y2="29.5436">
|
||||||
|
<stop offset="0.2849" style="stop-color:#00CDD7"/>
|
||||||
|
<stop offset="0.9409" style="stop-color:#2086D7"/>
|
||||||
|
</linearGradient>
|
||||||
|
<polygon style="fill:url(#SVGID_3_);" points="56,20.4 62.3,31.7 70,23.7 64.4,9.8 "/>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
<rect x="13.4" y="13.4" style="fill:#000000;" width="43.2" height="43.2"/>
|
||||||
|
<rect x="17.5" y="48.5" style="fill:#FFFFFF;" width="16.2" height="2.7"/>
|
||||||
|
<path style="fill:#FFFFFF;" d="M38.7,34.3l2.3-2.8c1.6,1.3,3.3,2.2,5.3,2.2c1.6,0,2.5-0.6,2.5-1.7v-0.1c0-1-0.6-1.5-3.6-2.3
|
||||||
|
c-3.6-0.9-5.8-1.9-5.8-5.5v-0.1c0-3.3,2.6-5.4,6.2-5.4c2.6,0,4.8,0.8,6.6,2.3l-2,3c-1.6-1.1-3.1-1.8-4.6-1.8
|
||||||
|
c-1.5,0-2.3,0.7-2.3,1.6v0.1c0,1.2,0.8,1.6,3.8,2.4c3.6,1,5.6,2.3,5.6,5.4v0.1c0,3.6-2.7,5.6-6.5,5.6
|
||||||
|
C43.5,37.2,40.8,36.2,38.7,34.3"/>
|
||||||
|
</g>
|
||||||
|
<polygon style="fill:#FFFFFF;" points="35.2,19 32.5,29.4 29.5,19 26.5,19 23.4,29.4 20.7,19 16.6,19 21.7,36.9 25,36.9 28,26.5
|
||||||
|
30.9,36.9 34.3,36.9 39.4,19 "/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.1 KiB |
@@ -30,6 +30,10 @@ The project was inspired by other Usenet/BitTorrent movie downloaders such as Co
|
|||||||
|
|
||||||
## Support
|
## Support
|
||||||
|
|
||||||
|
[](#backers)
|
||||||
|
[](#flexible-sponsors)
|
||||||
|
[](#sponsors)
|
||||||
|
|
||||||
[](https://discord.gg/AD3UP37)
|
[](https://discord.gg/AD3UP37)
|
||||||
[](https://www.reddit.com/r/radarr)
|
[](https://www.reddit.com/r/radarr)
|
||||||
[](http://feathub.com/Radarr/Radarr)
|
[](http://feathub.com/Radarr/Radarr)
|
||||||
@@ -42,8 +46,9 @@ The project was inspired by other Usenet/BitTorrent movie downloaders such as Co
|
|||||||
[](https://github.com/Radarr/Radarr/pulls)
|
[](https://github.com/Radarr/Radarr/pulls)
|
||||||
[](http://www.gnu.org/licenses/gpl.html)
|
[](http://www.gnu.org/licenses/gpl.html)
|
||||||
[](https://github.com/Radarr/Radarr)
|
[](https://github.com/Radarr/Radarr)
|
||||||
[](https://github.com/Radar/Radarr/releases/latest)
|
[](https://github.com/Radarr/Radarr/releases/)
|
||||||
[](https://hub.docker.com/r/linuxserver/radarr/)
|
[](https://hub.docker.com/r/linuxserver/radarr/)
|
||||||
|
[](/CHANGELOG.md#unreleased)
|
||||||
|
|
||||||
| Service | Master | Develop |
|
| Service | Master | Develop |
|
||||||
|----------|:---------------------------:|:----------------------------:|
|
|----------|:---------------------------:|:----------------------------:|
|
||||||
@@ -54,8 +59,8 @@ The project was inspired by other Usenet/BitTorrent movie downloaders such as Co
|
|||||||
|
|
||||||
| API | Updates | Sites |
|
| API | Updates | Sites |
|
||||||
|-------|:----:|:----:|
|
|-------|:----:|:----:|
|
||||||
| [](https://api.radarr.video/v2/) | [](https://radarr.aeonlucid.com) | [](https://mappings.radarr.video/)
|
| [](https://api.radarr.video/v2/) | [](https://radarr.aeonlucid.com) | [](https://mappings.radarr.video/)
|
||||||
| [](https://staging.api.radarr.video/) | [](https://api.github.com/v3/) | [](https://radarr.video/)
|
| [](https://staging.api.radarr.video/) | [](https://api.github.com/v3/) | [](https://radarr.video/)
|
||||||
|
|
||||||
Radarr is currently undergoing rapid development and pull requests are actively added into the repository.
|
Radarr is currently undergoing rapid development and pull requests are actively added into the repository.
|
||||||
|
|
||||||
@@ -82,15 +87,16 @@ Radarr is currently undergoing rapid development and pull requests are actively
|
|||||||
* Importing movies from various online sources, such as IMDb Watchlists (A complete list can be found [here](https://github.com/Radarr/Radarr/issues/114))
|
* Importing movies from various online sources, such as IMDb Watchlists (A complete list can be found [here](https://github.com/Radarr/Radarr/issues/114))
|
||||||
* Full integration with Kodi, Plex (notification, library update)
|
* Full integration with Kodi, Plex (notification, library update)
|
||||||
* And a beautiful UI
|
* And a beautiful UI
|
||||||
|
* Importing Metadata such as trailers or subtitles
|
||||||
|
* Adding metadata such as posters and information for Kodi and others to use
|
||||||
|
* Advanced customization for profiles, such that Radarr will always download the copy you want
|
||||||
|
|
||||||
### Planned Features
|
### Planned Features
|
||||||
|
|
||||||
* Importing Metadata such as trailers or subtitles (\*)
|
* Dynamically renaming folders with quality info, etc. (Currently working partially.) (\*)
|
||||||
* Adding metadata such as posters and information for Kodi and others to use (\*)
|
|
||||||
* Dynamically renaming folders with quality info, etc. (\*)
|
|
||||||
* Supporting custom folder structures, such as all movie files in one folder (\*)
|
* Supporting custom folder structures, such as all movie files in one folder (\*)
|
||||||
* Supporting multiple editions per movies (waiting on The Movie Database to finish their implementation)
|
* Supporting multiple editions per movies (\*)
|
||||||
* Supporting collections of movies, such as James Bond
|
* Supporting collections of movies, such as James Bond (\*)
|
||||||
|
|
||||||
**Note:** All features marked with (\*) are set to be in the first release of Radarr.
|
**Note:** All features marked with (\*) are set to be in the first release of Radarr.
|
||||||
|
|
||||||
@@ -100,7 +106,7 @@ Radarr is currently undergoing rapid development and pull requests are actively
|
|||||||
|
|
||||||
### Requirements
|
### Requirements
|
||||||
|
|
||||||
* [Visual Studio Community](https://www.visualstudio.com/vs/community/) or [MonoDevelop](http://www.monodevelop.com)
|
* [Visual Studio Community 2017](https://www.visualstudio.com/vs/community/) or [Rider](http://www.jetbrains.com/rider/)
|
||||||
* [Git](https://git-scm.com/downloads)
|
* [Git](https://git-scm.com/downloads)
|
||||||
* [Node.js](https://nodejs.org/en/download/)
|
* [Node.js](https://nodejs.org/en/download/)
|
||||||
|
|
||||||
@@ -119,15 +125,39 @@ Radarr is currently undergoing rapid development and pull requests are actively
|
|||||||
|
|
||||||
* To build run `sh build.sh`
|
* To build run `sh build.sh`
|
||||||
|
|
||||||
**Note:** Windows users must have bash available to do this. [cmder](http://cmder.net/) which is a console emulator for windows has bash as part of it's default installation.
|
**Note:** Windows users must have bash available to do this. If you installed git, you should have a git bash utility that works.
|
||||||
|
|
||||||
### Development
|
### Development
|
||||||
|
|
||||||
* Open `NzbDrone.sln` in Visual Studio or run the build.sh script, if Mono is installed
|
* Open `NzbDrone.sln` in Visual Studio 2017 or run the build.sh script, if Mono is installed. Alternatively you can use Jetbrains Rider, since it works on all Platforms.
|
||||||
* Make sure `NzbDrone.Console` is set as the startup project
|
* Make sure `NzbDrone.Console` is set as the startup project
|
||||||
* Run `build.sh` before running
|
* Run `build.sh` before running
|
||||||
|
|
||||||
### License
|
## Supporters
|
||||||
|
|
||||||
|
This project would not be possible without the support by these amazing folks. [**Become a sponsor or backer**](https://opencollective.com/radarr) to help us out!
|
||||||
|
|
||||||
|
### Sponsors
|
||||||
|
|
||||||
|
[](https://opencollective.com/radarr/order/3851)
|
||||||
|
|
||||||
|
### Flexible Sponsors
|
||||||
|
|
||||||
|
[](https://opencollective.com/radarr/order/3856)
|
||||||
|
|
||||||
|
### Backers
|
||||||
|
|
||||||
|
[](https://opencollective.com/radarr/order/3850)
|
||||||
|
|
||||||
|
### JetBrains
|
||||||
|
|
||||||
|
Thank you to [<img src="/Logo/jetbrains.svg" alt="JetBrains" width="32"> JetBrains](http://www.jetbrains.com/) for providing us with free licenses to their great tools
|
||||||
|
* [<img src="/Logo/resharper.svg" alt="ReSharper" width="32"> ReSharper](http://www.jetbrains.com/resharper/)
|
||||||
|
* [<img src="/Logo/webstorm.svg" alt="WebStorm" width="32"> WebStorm](http://www.jetbrains.com/webstorm/)
|
||||||
|
* [<img src="/Logo/rider.svg" alt="Rider" width="32"> Rider](http://www.jetbrains.com/rider/)
|
||||||
|
* [<img src="/Logo/dottrace.svg" alt="dotTrace" width="32"> dotTrace](http://www.jetbrains.com/dottrace/)
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
* [GNU GPL v3](http://www.gnu.org/licenses/gpl.html)
|
* [GNU GPL v3](http://www.gnu.org/licenses/gpl.html)
|
||||||
* Copyright 2010-2017
|
* Copyright 2010-2018
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
version: '0.2.0.{build}'
|
version: '0.2.0.{build}'
|
||||||
|
|
||||||
|
image: Visual Studio 2017
|
||||||
|
|
||||||
assembly_info:
|
assembly_info:
|
||||||
patch: true
|
patch: true
|
||||||
file: 'src\NzbDrone.Common\Properties\SharedAssemblyInfo.cs'
|
file: 'src\NzbDrone.Common\Properties\SharedAssemblyInfo.cs'
|
||||||
@@ -12,6 +14,9 @@ environment:
|
|||||||
|
|
||||||
install:
|
install:
|
||||||
- git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
|
|
||||||
|
#init:
|
||||||
|
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- ps: ./build-appveyor.ps1
|
- ps: ./build-appveyor.ps1
|
||||||
@@ -38,6 +43,7 @@ pull_requests:
|
|||||||
do_not_increment_build_number: true
|
do_not_increment_build_number: true
|
||||||
|
|
||||||
on_failure:
|
on_failure:
|
||||||
|
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||||
- ps: Get-ChildItem .\_artifacts\*.zip | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
|
- ps: Get-ChildItem .\_artifacts\*.zip | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
|
||||||
- ps: Get-ChildItem .\_artifacts\*.exe | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
|
- ps: Get-ChildItem .\_artifacts\*.exe | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
|
||||||
- ps: Get-ChildItem .\_artifacts\*.tar.gz | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
|
- ps: Get-ChildItem .\_artifacts\*.tar.gz | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
|
||||||
|
|||||||
+14
-14
@@ -1,6 +1,6 @@
|
|||||||
#addin nuget:?package=Cake.Npm&version=0.12.1
|
#addin nuget:?package=Cake.Npm
|
||||||
#addin nuget:?package=SharpZipLib&version=0.86.0
|
#addin nuget:?package=SharpZipLib
|
||||||
#addin nuget:?package=Cake.Compression&version=0.1.4
|
#addin nuget:?package=Cake.Compression
|
||||||
|
|
||||||
// Build variables
|
// Build variables
|
||||||
var outputFolder = "./_output";
|
var outputFolder = "./_output";
|
||||||
@@ -27,7 +27,7 @@ public void RemoveEmptyFolders(string startLocation) {
|
|||||||
{
|
{
|
||||||
RemoveEmptyFolders(directory);
|
RemoveEmptyFolders(directory);
|
||||||
|
|
||||||
if (System.IO.Directory.GetFiles(directory).Length == 0 &&
|
if (System.IO.Directory.GetFiles(directory).Length == 0 &&
|
||||||
System.IO.Directory.GetDirectories(directory).Length == 0)
|
System.IO.Directory.GetDirectories(directory).Length == 0)
|
||||||
{
|
{
|
||||||
DeleteDirectory(directory, false);
|
DeleteDirectory(directory, false);
|
||||||
@@ -57,12 +57,12 @@ public void CleanFolder(string path, bool keepConfigFiles) {
|
|||||||
public void CreateMdbs(string path) {
|
public void CreateMdbs(string path) {
|
||||||
foreach (var file in System.IO.Directory.EnumerateFiles(path, "*.pdb", System.IO.SearchOption.AllDirectories)) {
|
foreach (var file in System.IO.Directory.EnumerateFiles(path, "*.pdb", System.IO.SearchOption.AllDirectories)) {
|
||||||
var actualFile = file.Substring(0, file.Length - 4);
|
var actualFile = file.Substring(0, file.Length - 4);
|
||||||
|
|
||||||
if (FileExists(actualFile + ".exe")) {
|
if (FileExists(actualFile + ".exe")) {
|
||||||
StartProcess("./tools/pdb2mdb/pdb2mdb.exe", new ProcessSettings()
|
StartProcess("./tools/pdb2mdb/pdb2mdb.exe", new ProcessSettings()
|
||||||
.WithArguments(args => args.Append(actualFile + ".exe")));
|
.WithArguments(args => args.Append(actualFile + ".exe")));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FileExists(actualFile + ".dll")) {
|
if (FileExists(actualFile + ".dll")) {
|
||||||
StartProcess("./tools/pdb2mdb/pdb2mdb.exe", new ProcessSettings()
|
StartProcess("./tools/pdb2mdb/pdb2mdb.exe", new ProcessSettings()
|
||||||
.WithArguments(args => args.Append(actualFile + ".dll")));
|
.WithArguments(args => args.Append(actualFile + ".dll")));
|
||||||
@@ -77,15 +77,15 @@ Task("Compile").Does(() => {
|
|||||||
DeleteDirectory(outputFolder, true);
|
DeleteDirectory(outputFolder, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
MSBuild(solutionFile, config =>
|
MSBuild(solutionFile, config =>
|
||||||
config.UseToolVersion(MSBuildToolVersion.VS2015)
|
config.UseToolVersion(MSBuildToolVersion.VS2017)
|
||||||
.WithTarget("Clean")
|
.WithTarget("Clean")
|
||||||
.SetVerbosity(Verbosity.Minimal));
|
.SetVerbosity(Verbosity.Minimal));
|
||||||
|
|
||||||
NuGetRestore(solutionFile);
|
NuGetRestore(solutionFile);
|
||||||
|
|
||||||
MSBuild(solutionFile, config =>
|
MSBuild(solutionFile, config =>
|
||||||
config.UseToolVersion(MSBuildToolVersion.VS2015)
|
config.UseToolVersion(MSBuildToolVersion.VS2017)
|
||||||
.SetPlatformTarget(PlatformTarget.x86)
|
.SetPlatformTarget(PlatformTarget.x86)
|
||||||
.SetConfiguration("Release")
|
.SetConfiguration("Release")
|
||||||
.WithProperty("AllowedReferenceRelatedFileExtensions", new string[] { ".pdb" })
|
.WithProperty("AllowedReferenceRelatedFileExtensions", new string[] { ".pdb" })
|
||||||
@@ -109,7 +109,7 @@ Task("Gulp").Does(() => {
|
|||||||
WorkingDirectory = "./",
|
WorkingDirectory = "./",
|
||||||
Production = true
|
Production = true
|
||||||
});
|
});
|
||||||
|
|
||||||
NpmRunScript("build");
|
NpmRunScript("build");
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@ Task("PackageMono").Does(() => {
|
|||||||
// Remove service helpers
|
// Remove service helpers
|
||||||
DeleteFiles(outputFolderMono + "/ServiceUninstall.*");
|
DeleteFiles(outputFolderMono + "/ServiceUninstall.*");
|
||||||
DeleteFiles(outputFolderMono + "/ServiceInstall.*");
|
DeleteFiles(outputFolderMono + "/ServiceInstall.*");
|
||||||
|
|
||||||
// Remove native windows binaries
|
// Remove native windows binaries
|
||||||
DeleteFiles(outputFolderMono + "/sqlite3.*");
|
DeleteFiles(outputFolderMono + "/sqlite3.*");
|
||||||
DeleteFiles(outputFolderMono + "/MediaInfo.*");
|
DeleteFiles(outputFolderMono + "/MediaInfo.*");
|
||||||
@@ -173,7 +173,7 @@ Task("PackageOsx").Does(() => {
|
|||||||
.WithArguments(args => args
|
.WithArguments(args => args
|
||||||
.Append("+x")
|
.Append("+x")
|
||||||
.Append(outputFolderOsx + "/Radarr")));
|
.Append(outputFolderOsx + "/Radarr")));
|
||||||
|
|
||||||
// Adding Startup script
|
// Adding Startup script
|
||||||
CopyFile("./osx/Radarr", outputFolderOsx + "/Radarr");
|
CopyFile("./osx/Radarr", outputFolderOsx + "/Radarr");
|
||||||
});
|
});
|
||||||
@@ -219,7 +219,7 @@ Task("PackageTests").Does(() => {
|
|||||||
|
|
||||||
// Copy dlls
|
// Copy dlls
|
||||||
CopyFiles(outputFolder + "/*.dll", testPackageFolder);
|
CopyFiles(outputFolder + "/*.dll", testPackageFolder);
|
||||||
|
|
||||||
// Copy scripts
|
// Copy scripts
|
||||||
CopyFiles("./*.sh", testPackageFolder);
|
CopyFiles("./*.sh", testPackageFolder);
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
msBuild='/c/Program Files (x86)/MSBuild/14.0/Bin'
|
msBuild='/MSBuild/15.0/Bin'
|
||||||
outputFolder='./_output'
|
outputFolder='./_output'
|
||||||
outputFolderMono='./_output_mono'
|
outputFolderMono='./_output_mono'
|
||||||
outputFolderOsx='./_output_osx'
|
outputFolderOsx='./_output_osx'
|
||||||
@@ -64,6 +64,7 @@ AddJsonNet()
|
|||||||
BuildWithMSBuild()
|
BuildWithMSBuild()
|
||||||
{
|
{
|
||||||
export PATH=$msBuild:$PATH
|
export PATH=$msBuild:$PATH
|
||||||
|
echo $PATH
|
||||||
CheckExitCode MSBuild.exe $slnFile //t:Clean //m
|
CheckExitCode MSBuild.exe $slnFile //t:Clean //m
|
||||||
$nuget restore $slnFile
|
$nuget restore $slnFile
|
||||||
CheckExitCode MSBuild.exe $slnFile //p:Configuration=Release //p:Platform=x86 //t:Build //m //p:AllowedReferenceRelatedFileExtensions=.pdb
|
CheckExitCode MSBuild.exe $slnFile //p:Configuration=Release //p:Platform=x86 //t:Build //m //p:AllowedReferenceRelatedFileExtensions=.pdb
|
||||||
@@ -78,13 +79,13 @@ RestoreNuget()
|
|||||||
CleanWithXbuild()
|
CleanWithXbuild()
|
||||||
{
|
{
|
||||||
export MONO_IOMAP=case
|
export MONO_IOMAP=case
|
||||||
CheckExitCode xbuild /t:Clean $slnFile
|
CheckExitCode msbuild /t:Clean $slnFile
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildWithXbuild()
|
BuildWithXbuild()
|
||||||
{
|
{
|
||||||
export MONO_IOMAP=case
|
export MONO_IOMAP=case
|
||||||
CheckExitCode xbuild /p:Configuration=Release /p:Platform=x86 /t:Build /p:AllowedReferenceRelatedFileExtensions=.pdb $slnFile
|
CheckExitCode msbuild /p:Configuration=Release /p:Platform=x86 /t:Build /p:AllowedReferenceRelatedFileExtensions=.pdb /maxcpucount:3 $slnFile
|
||||||
}
|
}
|
||||||
|
|
||||||
Build()
|
Build()
|
||||||
@@ -261,6 +262,9 @@ case "$(uname -s)" in
|
|||||||
CYGWIN*|MINGW32*|MINGW64*|MSYS*)
|
CYGWIN*|MINGW32*|MINGW64*|MSYS*)
|
||||||
# on windows, use dotnet
|
# on windows, use dotnet
|
||||||
runtime="dotnet"
|
runtime="dotnet"
|
||||||
|
vsLoc=$(./vswhere.exe -property installationPath)
|
||||||
|
vsLoc=$(echo "/$vsLoc" | sed -e 's/\\/\//g' -e 's/://')
|
||||||
|
msBuild="$vsLoc$msBuild"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# otherwise use mono
|
# otherwise use mono
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
{{#sections}}
|
{{#sections}}
|
||||||
### {{{label}}}
|
### {{{label}}}
|
||||||
{{#commits}}
|
{{#commits}}
|
||||||
- {{{subject}}} [{{{author}}}]
|
- {{{subject}}} [<a href="https://github.com/{{{author}}}">{{{author}}}</a>]
|
||||||
{{/commits}}
|
{{/commits}}
|
||||||
|
|
||||||
{{/sections}}
|
{{/sections}}
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
**To receive further Pre-Release updates, please change the branch to develop. (Settings -> General (Show Advanced Settings) -> Updates -> Branch)**
|
||||||
|
|
||||||
|
{{#versions}}
|
||||||
|
|
||||||
|
{{#sections}}
|
||||||
|
{{{label}}}
|
||||||
|
{{#commits}}
|
||||||
|
- {{{subject}}} [<a href="https://github.com/{{{author}}}">{{{author}}}</a>]
|
||||||
|
{{/commits}}
|
||||||
|
|
||||||
|
{{/sections}}
|
||||||
|
|
||||||
|
{{/versions}}
|
||||||
|
|
||||||
|
**Note**: The OSX version does not automatically launch the browser. You have to go to http://localhost:7878 by yourself in a browser of your choice.
|
||||||
@@ -9,7 +9,11 @@ APPNAME="Radarr"
|
|||||||
|
|
||||||
#set up environment
|
#set up environment
|
||||||
if [[ -x '/opt/local/bin/mono' ]]; then
|
if [[ -x '/opt/local/bin/mono' ]]; then
|
||||||
|
# Macports and mono-supplied installer path
|
||||||
export PATH="/opt/local/bin:$PATH"
|
export PATH="/opt/local/bin:$PATH"
|
||||||
|
elif [[ -x '/usr/local/bin/mono' ]]; then
|
||||||
|
# Homebrew-supplied path to mono
|
||||||
|
export PATH="/usr/local/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export DYLD_FALLBACK_LIBRARY_PATH="$DIR"
|
export DYLD_FALLBACK_LIBRARY_PATH="$DIR"
|
||||||
|
|||||||
Generated
+5924
-10
File diff suppressed because it is too large
Load Diff
@@ -38,6 +38,7 @@
|
|||||||
"handlebars": "3.0.3",
|
"handlebars": "3.0.3",
|
||||||
"jshint-loader": "0.8.3",
|
"jshint-loader": "0.8.3",
|
||||||
"jshint-stylish": "2.0.1",
|
"jshint-stylish": "2.0.1",
|
||||||
|
"npm": "^6.0.1",
|
||||||
"run-sequence": "1.1.1",
|
"run-sequence": "1.1.1",
|
||||||
"streamqueue": "1.1.0",
|
"streamqueue": "1.1.0",
|
||||||
"tar.gz": "0.1.1",
|
"tar.gz": "0.1.1",
|
||||||
|
|||||||
+9
-2
@@ -8,7 +8,14 @@
|
|||||||
#define AppExeName "Radarr.exe"
|
#define AppExeName "Radarr.exe"
|
||||||
#define BuildNumber "2.0"
|
#define BuildNumber "2.0"
|
||||||
#define BuildVersion GetEnv('APPVEYOR_BUILD_VERSION')
|
#define BuildVersion GetEnv('APPVEYOR_BUILD_VERSION')
|
||||||
#define BranchName GetEnv('APPVEYOR_REPO_BRANCH')
|
#define BranchName StringChange(GetEnv('APPVEYOR_REPO_BRANCH'), "/", "-")
|
||||||
|
|
||||||
|
#if BuildVersion == ""
|
||||||
|
|
||||||
|
#define BuildVersion GetEnv('BUILD_VERSION') + GetEnv('$CIRCLE_BUILD_NUM')
|
||||||
|
#define BranchName StringChange(GetEnv('CIRCLE_BRANCH'), "/", "-")
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
[Setup]
|
[Setup]
|
||||||
; NOTE: The value of AppId uniquely identifies this application.
|
; NOTE: The value of AppId uniquely identifies this application.
|
||||||
@@ -44,7 +51,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
|
|||||||
Name: "windowsService"; Description: "Install as a Windows Service"
|
Name: "windowsService"; Description: "Install as a Windows Service"
|
||||||
|
|
||||||
[Files]
|
[Files]
|
||||||
Source: "..\_output\Radarr.exe"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "..\_output\Radarr.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "..\_output\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
Source: "..\_output\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||||
|
|
||||||
|
|||||||
-3485
File diff suppressed because it is too large
Load Diff
+1
@@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ContentModelUserStore">
|
<component name="ContentModelUserStore">
|
||||||
|
<attachedFolders />
|
||||||
<explicitIncludes />
|
<explicitIncludes />
|
||||||
<explicitExcludes />
|
<explicitExcludes />
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
-8
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectModuleManager">
|
|
||||||
<modules>
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/.idea.NzbDrone/riderModule.iml" filepath="$PROJECT_DIR$/.idea/.idea.NzbDrone/riderModule.iml" />
|
|
||||||
</modules>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
Generated
+7
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||||
|
<mapping directory="$PROJECT_DIR$/ExternalModules/CurlSharp" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Generated
-103
@@ -1,103 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module type="RIDER_MODULE" version="4">
|
|
||||||
<component name="NewModuleRootManager">
|
|
||||||
<content url="file://$MODULE_DIR$/../../../Logo/1024.png">
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../../Logo/1024.png" isTestSource="false" />
|
|
||||||
</content>
|
|
||||||
<content url="file://$MODULE_DIR$/../../../Logo/64.png">
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../../Logo/64.png" isTestSource="false" />
|
|
||||||
</content>
|
|
||||||
<content url="file://$MODULE_DIR$/../..">
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../.nuget/NuGet.exe" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../Common/CommonAssemblyInfo.cs" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../Common/CommonVersionInfo.cs" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../Common/GlobalSuppressions.cs" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../ExternalModules/CurlSharp/CurlSharp" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../Libraries/MediaInfo/libmediainfo.0.dylib" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../Libraries/MediaInfo/MediaInfo.dll" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../Libraries/Sqlite/libsqlite3.0.dylib" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../Libraries/Sqlite/sqlite3.dll" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../LogentriesCore" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../LogentriesNLog" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../Marr.Data" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../Microsoft.AspNet.SignalR.Core" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../Microsoft.AspNet.SignalR.Owin" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../MonoTorrent" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../NzbDrone" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../NzbDrone.Api" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../NzbDrone.Api.Test" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../NzbDrone.App.Test" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../NzbDrone.Automation.Test" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../NzbDrone.Common" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../NzbDrone.Common.Test" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../NzbDrone.Console" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../NzbDrone.Core" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../NzbDrone.Core.Test" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../NzbDrone.Host" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../NzbDrone.Integration.Test" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../NzbDrone.Libraries.Test" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../NzbDrone.Mono" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../NzbDrone.Mono.Test" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../NzbDrone.SignalR" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../NzbDrone.Test.Common" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../NzbDrone.Test.Dummy" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../NzbDrone.Update" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../NzbDrone.Update.Test" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../NzbDrone.Windows" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../NzbDrone.Windows.Test" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../ServiceHelpers/ServiceInstall" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../ServiceHelpers/ServiceUninstall" isTestSource="false" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../ExternalModules/CurlSharp/CurlSharp/bin" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../ExternalModules/CurlSharp/CurlSharp/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../LogentriesCore/bin" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../LogentriesCore/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../LogentriesNLog/bin" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../LogentriesNLog/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../Marr.Data/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../Microsoft.AspNet.SignalR.Core/bin" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../Microsoft.AspNet.SignalR.Core/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../Microsoft.AspNet.SignalR.Owin/bin" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../Microsoft.AspNet.SignalR.Owin/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../MonoTorrent/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Api.Test/bin" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Api.Test/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Api/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.App.Test/bin" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.App.Test/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Automation.Test/bin" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Automation.Test/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Common.Test/bin" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Common.Test/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Common/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Console/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Core.Test/bin" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Core.Test/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Core/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Host/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Integration.Test/bin" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Integration.Test/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Libraries.Test/bin" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Libraries.Test/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Mono.Test/bin" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Mono.Test/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Mono/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.SignalR/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Test.Common/bin" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Test.Common/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Test.Dummy/bin" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Test.Dummy/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Update.Test/bin" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Update.Test/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Update/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Windows.Test/bin" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Windows.Test/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone.Windows/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../NzbDrone/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../ServiceHelpers/ServiceInstall/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../ServiceHelpers/ServiceUninstall/obj" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../_ReSharper.Caches/ReSharperHost8.NzbDrone.00" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../packages" />
|
|
||||||
</content>
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
||||||
Binary file not shown.
Binary file not shown.
@@ -22,7 +22,7 @@ namespace Marr.Data.QGen
|
|||||||
if (this.Any(t => t.EntityType == table.EntityType))
|
if (this.Any(t => t.EntityType == table.EntityType))
|
||||||
{
|
{
|
||||||
// Already exists -- don't add
|
// Already exists -- don't add
|
||||||
return;
|
//return; This prevents joining on the same table!
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create an alias (ex: "t0", "t1", "t2", etc...)
|
// Create an alias (ex: "t0", "t1", "t2", etc...)
|
||||||
@@ -37,7 +37,7 @@ namespace Marr.Data.QGen
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Tries to find a table for a given member.
|
/// Tries to find a table for a given member.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Table FindTable(Type declaringType)
|
public Table FindTable(Type declaringType)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -31,8 +31,6 @@ namespace NzbDrone.Api.Blacklist
|
|||||||
{
|
{
|
||||||
Id = model.Id,
|
Id = model.Id,
|
||||||
MovieId = model.MovieId,
|
MovieId = model.MovieId,
|
||||||
SeriesId = model.SeriesId,
|
|
||||||
EpisodeIds = model.EpisodeIds,
|
|
||||||
SourceTitle = model.SourceTitle,
|
SourceTitle = model.SourceTitle,
|
||||||
Quality = model.Quality,
|
Quality = model.Quality,
|
||||||
Date = model.Date,
|
Date = model.Date,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using Ical.Net.General;
|
|||||||
using Ical.Net.Interfaces.Serialization;
|
using Ical.Net.Interfaces.Serialization;
|
||||||
using Ical.Net.Serialization;
|
using Ical.Net.Serialization;
|
||||||
using Ical.Net.Serialization.iCalendar.Factory;
|
using Ical.Net.Serialization.iCalendar.Factory;
|
||||||
using NzbDrone.Core.Tv;
|
using NzbDrone.Core.Movies;
|
||||||
using Nancy.Responses;
|
using Nancy.Responses;
|
||||||
using NzbDrone.Core.Tags;
|
using NzbDrone.Core.Tags;
|
||||||
using NzbDrone.Common.Extensions;
|
using NzbDrone.Common.Extensions;
|
||||||
@@ -98,44 +98,8 @@ namespace NzbDrone.Api.Calendar
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var occurrence = calendar.Create<Event>();
|
CreateEvent(calendar, movie, true);
|
||||||
occurrence.Uid = "NzbDrone_movie_" + movie.Id;
|
CreateEvent(calendar, movie, false);
|
||||||
occurrence.Status = movie.HasFile ? EventStatus.Confirmed : EventStatus.Tentative;
|
|
||||||
|
|
||||||
switch (movie.Status)
|
|
||||||
{
|
|
||||||
case MovieStatusType.PreDB:
|
|
||||||
if (movie.PhysicalRelease != null)
|
|
||||||
{
|
|
||||||
occurrence.Start = new CalDateTime(movie.PhysicalRelease.Value) { HasTime = true };
|
|
||||||
occurrence.End = new CalDateTime(movie.PhysicalRelease.Value.AddMinutes(movie.Runtime)) { HasTime = true };
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MovieStatusType.InCinemas:
|
|
||||||
if (movie.InCinemas != null)
|
|
||||||
{
|
|
||||||
occurrence.Start = new CalDateTime(movie.InCinemas.Value) { HasTime = true };
|
|
||||||
occurrence.End = new CalDateTime(movie.InCinemas.Value.AddMinutes(movie.Runtime)) { HasTime = true };
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MovieStatusType.Announced:
|
|
||||||
continue; // no date
|
|
||||||
|
|
||||||
default:
|
|
||||||
if (movie.PhysicalRelease != null)
|
|
||||||
{
|
|
||||||
occurrence.Start = new CalDateTime(movie.PhysicalRelease.Value) { HasTime = true };
|
|
||||||
occurrence.End = new CalDateTime(movie.PhysicalRelease.Value.AddMinutes(movie.Runtime)) { HasTime = true };
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
occurrence.Description = movie.Overview;
|
|
||||||
occurrence.Categories = new List<string>() { movie.Studio };
|
|
||||||
|
|
||||||
occurrence.Summary = $"{movie.Title}";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,5 +108,30 @@ namespace NzbDrone.Api.Calendar
|
|||||||
|
|
||||||
return new TextResponse(icalendar, "text/calendar");
|
return new TextResponse(icalendar, "text/calendar");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void CreateEvent(Ical.Net.Calendar calendar, Movie movie, bool cinemasRelease)
|
||||||
|
{
|
||||||
|
var date = cinemasRelease ? movie.InCinemas : movie.PhysicalRelease;
|
||||||
|
if (!date.HasValue)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var occurrence = calendar.Create<Event>();
|
||||||
|
occurrence.Uid = "NzbDrone_movie_" + movie.Id + (cinemasRelease ? "_cinemas" : "_physical");
|
||||||
|
occurrence.Status = movie.Status == MovieStatusType.Announced ? EventStatus.Tentative : EventStatus.Confirmed;
|
||||||
|
|
||||||
|
occurrence.Start = new CalDateTime(date.Value);
|
||||||
|
occurrence.End = occurrence.Start;
|
||||||
|
occurrence.IsAllDay = true;
|
||||||
|
|
||||||
|
occurrence.Description = movie.Overview;
|
||||||
|
occurrence.Categories = new List<string>() { movie.Studio };
|
||||||
|
|
||||||
|
var physicalText = movie.PhysicalReleaseNote.IsNotNullOrWhiteSpace()
|
||||||
|
? $"(Physical Release, {movie.PhysicalReleaseNote})"
|
||||||
|
: "(Physical Release)";
|
||||||
|
occurrence.Summary = $"{movie.Title} " + (cinemasRelease ? "(Theatrical Release)" : physicalText);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,11 +8,9 @@ using NzbDrone.Core.MediaCover;
|
|||||||
using NzbDrone.Core.MediaFiles;
|
using NzbDrone.Core.MediaFiles;
|
||||||
using NzbDrone.Core.MediaFiles.Events;
|
using NzbDrone.Core.MediaFiles.Events;
|
||||||
using NzbDrone.Core.Messaging.Events;
|
using NzbDrone.Core.Messaging.Events;
|
||||||
using NzbDrone.Core.MovieStats;
|
using NzbDrone.Core.Movies;
|
||||||
using NzbDrone.Core.Tv;
|
using NzbDrone.Core.Movies.Events;
|
||||||
using NzbDrone.Core.Tv.Events;
|
|
||||||
using NzbDrone.Core.Validation.Paths;
|
using NzbDrone.Core.Validation.Paths;
|
||||||
using NzbDrone.Core.DataAugmentation.Scene;
|
|
||||||
using NzbDrone.Core.Validation;
|
using NzbDrone.Core.Validation;
|
||||||
using NzbDrone.Core.DecisionEngine;
|
using NzbDrone.Core.DecisionEngine;
|
||||||
using NzbDrone.SignalR;
|
using NzbDrone.SignalR;
|
||||||
@@ -23,10 +21,8 @@ namespace NzbDrone.Api.Calendar
|
|||||||
{
|
{
|
||||||
public CalendarModule(IBroadcastSignalRMessage signalR,
|
public CalendarModule(IBroadcastSignalRMessage signalR,
|
||||||
IMovieService moviesService,
|
IMovieService moviesService,
|
||||||
IMovieStatisticsService moviesStatisticsService,
|
|
||||||
ISceneMappingService sceneMappingService,
|
|
||||||
IMapCoversToLocal coverMapper)
|
IMapCoversToLocal coverMapper)
|
||||||
: base(signalR, moviesService, moviesStatisticsService, sceneMappingService, coverMapper, "calendar")
|
: base(signalR, moviesService, coverMapper, "calendar")
|
||||||
{
|
{
|
||||||
|
|
||||||
GetResourceAll = GetCalendar;
|
GetResourceAll = GetCalendar;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using NzbDrone.Common.EnsureThat;
|
|||||||
using NzbDrone.Common.Extensions;
|
using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Common.Reflection;
|
using NzbDrone.Common.Reflection;
|
||||||
using NzbDrone.Core.Annotations;
|
using NzbDrone.Core.Annotations;
|
||||||
|
using NzbDrone.Core.Download.Clients.Nzbget;
|
||||||
using NzbDrone.Core.Qualities;
|
using NzbDrone.Core.Qualities;
|
||||||
using NzbDrone.Core.Profiles;
|
using NzbDrone.Core.Profiles;
|
||||||
|
|
||||||
@@ -41,7 +42,7 @@ namespace NzbDrone.Api.ClientSchema
|
|||||||
};
|
};
|
||||||
|
|
||||||
var value = propertyInfo.GetValue(model, null);
|
var value = propertyInfo.GetValue(model, null);
|
||||||
|
|
||||||
if (propertyInfo.PropertyType.HasAttribute<FlagsAttribute>())
|
if (propertyInfo.PropertyType.HasAttribute<FlagsAttribute>())
|
||||||
{
|
{
|
||||||
int intVal = (int)value;
|
int intVal = (int)value;
|
||||||
@@ -50,7 +51,7 @@ namespace NzbDrone.Api.ClientSchema
|
|||||||
.Where(f=> (f & intVal) == f)
|
.Where(f=> (f & intVal) == f)
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value != null)
|
if (value != null)
|
||||||
{
|
{
|
||||||
field.Value = value;
|
field.Value = value;
|
||||||
@@ -112,14 +113,14 @@ namespace NzbDrone.Api.ClientSchema
|
|||||||
{
|
{
|
||||||
IEnumerable<int> value;
|
IEnumerable<int> value;
|
||||||
|
|
||||||
if (field.Value.GetType() == typeof(JArray))
|
if (field.Value?.GetType() == typeof(JArray))
|
||||||
{
|
{
|
||||||
value = ((JArray)field.Value).Select(s => s.Value<int>());
|
value = ((JArray)field.Value).Select(s => s.Value<int>());
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
value = field.Value.ToString().Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(s => Convert.ToInt32(s));
|
value = field.Value?.ToString().Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(s => Convert.ToInt32(s));
|
||||||
}
|
}
|
||||||
|
|
||||||
propertyInfo.SetValue(target, value, null);
|
propertyInfo.SetValue(target, value, null);
|
||||||
@@ -141,7 +142,7 @@ namespace NzbDrone.Api.ClientSchema
|
|||||||
|
|
||||||
propertyInfo.SetValue(target, value, null);
|
propertyInfo.SetValue(target, value, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (propertyInfo.PropertyType.HasAttribute<FlagsAttribute>())
|
else if (propertyInfo.PropertyType.HasAttribute<FlagsAttribute>())
|
||||||
{
|
{
|
||||||
int value = field.Value.ToString().Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(s => Convert.ToInt32(s)).Sum();
|
int value = field.Value.ToString().Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(s => Convert.ToInt32(s)).Sum();
|
||||||
@@ -181,6 +182,11 @@ namespace NzbDrone.Api.ClientSchema
|
|||||||
var options = from Enum e in Enum.GetValues(selectOptions)
|
var options = from Enum e in Enum.GetValues(selectOptions)
|
||||||
select new SelectOption { Value = Convert.ToInt32(e), Name = e.ToString() };
|
select new SelectOption { Value = Convert.ToInt32(e), Name = e.ToString() };
|
||||||
|
|
||||||
|
if (selectOptions == typeof(NzbgetPriority))
|
||||||
|
{
|
||||||
|
return options.OrderBy(o => o.Value).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
return options.OrderBy(o => o.Name).ToList();
|
return options.OrderBy(o => o.Name).ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
using NzbDrone.Api.Validation;
|
using NzbDrone.Api.Validation;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
|
|
||||||
@@ -13,6 +13,9 @@ namespace NzbDrone.Api.Config
|
|||||||
SharedValidator.RuleFor(c => c.MinimumAge)
|
SharedValidator.RuleFor(c => c.MinimumAge)
|
||||||
.GreaterThanOrEqualTo(0);
|
.GreaterThanOrEqualTo(0);
|
||||||
|
|
||||||
|
SharedValidator.RuleFor(c => c.MaximumSize)
|
||||||
|
.GreaterThanOrEqualTo(0);
|
||||||
|
|
||||||
SharedValidator.RuleFor(c => c.Retention)
|
SharedValidator.RuleFor(c => c.Retention)
|
||||||
.GreaterThanOrEqualTo(0);
|
.GreaterThanOrEqualTo(0);
|
||||||
|
|
||||||
@@ -25,4 +28,4 @@ namespace NzbDrone.Api.Config
|
|||||||
return IndexerConfigResourceMapper.ToResource(model);
|
return IndexerConfigResourceMapper.ToResource(model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using NzbDrone.Api.REST;
|
using NzbDrone.Api.REST;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
using NzbDrone.Core.Parser;
|
using NzbDrone.Core.Parser;
|
||||||
|
|
||||||
@@ -7,6 +7,7 @@ namespace NzbDrone.Api.Config
|
|||||||
public class IndexerConfigResource : RestResource
|
public class IndexerConfigResource : RestResource
|
||||||
{
|
{
|
||||||
public int MinimumAge { get; set; }
|
public int MinimumAge { get; set; }
|
||||||
|
public int MaximumSize { get; set; }
|
||||||
public int Retention { get; set; }
|
public int Retention { get; set; }
|
||||||
public int RssSyncInterval { get; set; }
|
public int RssSyncInterval { get; set; }
|
||||||
public bool PreferIndexerFlags { get; set; }
|
public bool PreferIndexerFlags { get; set; }
|
||||||
@@ -23,6 +24,7 @@ namespace NzbDrone.Api.Config
|
|||||||
return new IndexerConfigResource
|
return new IndexerConfigResource
|
||||||
{
|
{
|
||||||
MinimumAge = model.MinimumAge,
|
MinimumAge = model.MinimumAge,
|
||||||
|
MaximumSize = model.MaximumSize,
|
||||||
Retention = model.Retention,
|
Retention = model.Retention,
|
||||||
RssSyncInterval = model.RssSyncInterval,
|
RssSyncInterval = model.RssSyncInterval,
|
||||||
PreferIndexerFlags = model.PreferIndexerFlags,
|
PreferIndexerFlags = model.PreferIndexerFlags,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
using FluentValidation.Results;
|
using FluentValidation.Results;
|
||||||
@@ -34,11 +34,6 @@ namespace NzbDrone.Api.Config
|
|||||||
Get["/samples"] = x => GetExamples(this.Bind<NamingConfigResource>());
|
Get["/samples"] = x => GetExamples(this.Bind<NamingConfigResource>());
|
||||||
|
|
||||||
SharedValidator.RuleFor(c => c.MultiEpisodeStyle).InclusiveBetween(0, 5);
|
SharedValidator.RuleFor(c => c.MultiEpisodeStyle).InclusiveBetween(0, 5);
|
||||||
/*SharedValidator.RuleFor(c => c.StandardEpisodeFormat).ValidEpisodeFormat();
|
|
||||||
SharedValidator.RuleFor(c => c.DailyEpisodeFormat).ValidDailyEpisodeFormat();
|
|
||||||
SharedValidator.RuleFor(c => c.AnimeEpisodeFormat).ValidAnimeEpisodeFormat();
|
|
||||||
SharedValidator.RuleFor(c => c.SeriesFolderFormat).ValidSeriesFolderFormat();
|
|
||||||
SharedValidator.RuleFor(c => c.SeasonFolderFormat).ValidSeasonFolderFormat();*/
|
|
||||||
SharedValidator.RuleFor(c => c.StandardMovieFormat).ValidMovieFormat();
|
SharedValidator.RuleFor(c => c.StandardMovieFormat).ValidMovieFormat();
|
||||||
SharedValidator.RuleFor(c => c.MovieFolderFormat).ValidMovieFolderFormat();
|
SharedValidator.RuleFor(c => c.MovieFolderFormat).ValidMovieFolderFormat();
|
||||||
}
|
}
|
||||||
@@ -56,12 +51,6 @@ namespace NzbDrone.Api.Config
|
|||||||
var nameSpec = _namingConfigService.GetConfig();
|
var nameSpec = _namingConfigService.GetConfig();
|
||||||
var resource = nameSpec.ToResource();
|
var resource = nameSpec.ToResource();
|
||||||
|
|
||||||
//if (resource.StandardEpisodeFormat.IsNotNullOrWhiteSpace())
|
|
||||||
//{
|
|
||||||
// var basicConfig = _filenameBuilder.GetBasicNamingConfig(nameSpec);
|
|
||||||
// basicConfig.AddToResource(resource);
|
|
||||||
//}
|
|
||||||
|
|
||||||
if (resource.StandardMovieFormat.IsNotNullOrWhiteSpace())
|
if (resource.StandardMovieFormat.IsNotNullOrWhiteSpace())
|
||||||
{
|
{
|
||||||
var basicConfig = _filenameBuilder.GetBasicNamingConfig(nameSpec);
|
var basicConfig = _filenameBuilder.GetBasicNamingConfig(nameSpec);
|
||||||
@@ -80,48 +69,13 @@ namespace NzbDrone.Api.Config
|
|||||||
{
|
{
|
||||||
var nameSpec = config.ToModel();
|
var nameSpec = config.ToModel();
|
||||||
var sampleResource = new NamingSampleResource();
|
var sampleResource = new NamingSampleResource();
|
||||||
|
|
||||||
//var singleEpisodeSampleResult = _filenameSampleService.GetStandardSample(nameSpec);
|
|
||||||
//var multiEpisodeSampleResult = _filenameSampleService.GetMultiEpisodeSample(nameSpec);
|
|
||||||
//var dailyEpisodeSampleResult = _filenameSampleService.GetDailySample(nameSpec);
|
|
||||||
//var animeEpisodeSampleResult = _filenameSampleService.GetAnimeSample(nameSpec);
|
|
||||||
//var animeMultiEpisodeSampleResult = _filenameSampleService.GetAnimeMultiEpisodeSample(nameSpec);
|
|
||||||
|
|
||||||
var movieSampleResult = _filenameSampleService.GetMovieSample(nameSpec);
|
var movieSampleResult = _filenameSampleService.GetMovieSample(nameSpec);
|
||||||
|
|
||||||
|
|
||||||
//sampleResource.SingleEpisodeExample = _filenameValidationService.ValidateStandardFilename(singleEpisodeSampleResult) != null
|
|
||||||
// ? "Invalid format"
|
|
||||||
// : singleEpisodeSampleResult.FileName;
|
|
||||||
|
|
||||||
//sampleResource.MultiEpisodeExample = _filenameValidationService.ValidateStandardFilename(multiEpisodeSampleResult) != null
|
|
||||||
// ? "Invalid format"
|
|
||||||
// : multiEpisodeSampleResult.FileName;
|
|
||||||
|
|
||||||
//sampleResource.DailyEpisodeExample = _filenameValidationService.ValidateDailyFilename(dailyEpisodeSampleResult) != null
|
|
||||||
// ? "Invalid format"
|
|
||||||
// : dailyEpisodeSampleResult.FileName;
|
|
||||||
|
|
||||||
//sampleResource.AnimeEpisodeExample = _filenameValidationService.ValidateAnimeFilename(animeEpisodeSampleResult) != null
|
|
||||||
// ? "Invalid format"
|
|
||||||
// : animeEpisodeSampleResult.FileName;
|
|
||||||
|
|
||||||
//sampleResource.AnimeMultiEpisodeExample = _filenameValidationService.ValidateAnimeFilename(animeMultiEpisodeSampleResult) != null
|
|
||||||
// ? "Invalid format"
|
|
||||||
// : animeMultiEpisodeSampleResult.FileName;
|
|
||||||
|
|
||||||
sampleResource.MovieExample = nameSpec.StandardMovieFormat.IsNullOrWhiteSpace()
|
sampleResource.MovieExample = nameSpec.StandardMovieFormat.IsNullOrWhiteSpace()
|
||||||
? "Invalid Format"
|
? "Invalid Format"
|
||||||
: movieSampleResult.FileName;
|
: movieSampleResult.FileName;
|
||||||
|
|
||||||
//sampleResource.SeriesFolderExample = nameSpec.SeriesFolderFormat.IsNullOrWhiteSpace()
|
|
||||||
// ? "Invalid format"
|
|
||||||
// : _filenameSampleService.GetSeriesFolderSample(nameSpec);
|
|
||||||
|
|
||||||
//sampleResource.SeasonFolderExample = nameSpec.SeasonFolderFormat.IsNullOrWhiteSpace()
|
|
||||||
// ? "Invalid format"
|
|
||||||
// : _filenameSampleService.GetSeasonFolderSample(nameSpec);
|
|
||||||
|
|
||||||
sampleResource.MovieFolderExample = nameSpec.MovieFolderFormat.IsNullOrWhiteSpace()
|
sampleResource.MovieFolderExample = nameSpec.MovieFolderFormat.IsNullOrWhiteSpace()
|
||||||
? "Invalid format"
|
? "Invalid format"
|
||||||
: _filenameSampleService.GetMovieFolderSample(nameSpec);
|
: _filenameSampleService.GetMovieFolderSample(nameSpec);
|
||||||
@@ -131,30 +85,12 @@ namespace NzbDrone.Api.Config
|
|||||||
|
|
||||||
private void ValidateFormatResult(NamingConfig nameSpec)
|
private void ValidateFormatResult(NamingConfig nameSpec)
|
||||||
{
|
{
|
||||||
var singleEpisodeSampleResult = _filenameSampleService.GetStandardSample(nameSpec);
|
|
||||||
var multiEpisodeSampleResult = _filenameSampleService.GetMultiEpisodeSample(nameSpec);
|
|
||||||
var dailyEpisodeSampleResult = _filenameSampleService.GetDailySample(nameSpec);
|
|
||||||
var animeEpisodeSampleResult = _filenameSampleService.GetAnimeSample(nameSpec);
|
|
||||||
var animeMultiEpisodeSampleResult = _filenameSampleService.GetAnimeMultiEpisodeSample(nameSpec);
|
|
||||||
|
|
||||||
var movieSampleResult = _filenameSampleService.GetMovieSample(nameSpec);
|
var movieSampleResult = _filenameSampleService.GetMovieSample(nameSpec);
|
||||||
|
|
||||||
var singleEpisodeValidationResult = _filenameValidationService.ValidateStandardFilename(singleEpisodeSampleResult);
|
|
||||||
var multiEpisodeValidationResult = _filenameValidationService.ValidateStandardFilename(multiEpisodeSampleResult);
|
|
||||||
var dailyEpisodeValidationResult = _filenameValidationService.ValidateDailyFilename(dailyEpisodeSampleResult);
|
|
||||||
var animeEpisodeValidationResult = _filenameValidationService.ValidateAnimeFilename(animeEpisodeSampleResult);
|
|
||||||
var animeMultiEpisodeValidationResult = _filenameValidationService.ValidateAnimeFilename(animeMultiEpisodeSampleResult);
|
|
||||||
|
|
||||||
//var standardMovieValidationResult = _filenameValidationService.ValidateMovieFilename(movieSampleResult); For now, let's hope the user is not stupid enough :/
|
//var standardMovieValidationResult = _filenameValidationService.ValidateMovieFilename(movieSampleResult); For now, let's hope the user is not stupid enough :/
|
||||||
|
|
||||||
var validationFailures = new List<ValidationFailure>();
|
var validationFailures = new List<ValidationFailure>();
|
||||||
|
|
||||||
//validationFailures.AddIfNotNull(singleEpisodeValidationResult);
|
|
||||||
//validationFailures.AddIfNotNull(multiEpisodeValidationResult);
|
|
||||||
//validationFailures.AddIfNotNull(dailyEpisodeValidationResult);
|
|
||||||
//validationFailures.AddIfNotNull(animeEpisodeValidationResult);
|
|
||||||
//validationFailures.AddIfNotNull(animeMultiEpisodeValidationResult);
|
|
||||||
|
|
||||||
//validationFailures.AddIfNotNull(standardMovieValidationResult);
|
//validationFailures.AddIfNotNull(standardMovieValidationResult);
|
||||||
|
|
||||||
if (validationFailures.Any())
|
if (validationFailures.Any())
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using NzbDrone.Api.REST;
|
using NzbDrone.Api.REST;
|
||||||
using NzbDrone.Core.Organizer;
|
using NzbDrone.Core.Organizer;
|
||||||
|
|
||||||
namespace NzbDrone.Api.Config
|
namespace NzbDrone.Api.Config
|
||||||
@@ -7,14 +7,10 @@ namespace NzbDrone.Api.Config
|
|||||||
{
|
{
|
||||||
public bool RenameEpisodes { get; set; }
|
public bool RenameEpisodes { get; set; }
|
||||||
public bool ReplaceIllegalCharacters { get; set; }
|
public bool ReplaceIllegalCharacters { get; set; }
|
||||||
|
public ColonReplacementFormat ColonReplacementFormat { get; set; }
|
||||||
public string StandardMovieFormat { get; set; }
|
public string StandardMovieFormat { get; set; }
|
||||||
public string MovieFolderFormat { get; set; }
|
public string MovieFolderFormat { get; set; }
|
||||||
public int MultiEpisodeStyle { get; set; }
|
public int MultiEpisodeStyle { get; set; }
|
||||||
public string StandardEpisodeFormat { get; set; }
|
|
||||||
public string DailyEpisodeFormat { get; set; }
|
|
||||||
public string AnimeEpisodeFormat { get; set; }
|
|
||||||
public string SeriesFolderFormat { get; set; }
|
|
||||||
public string SeasonFolderFormat { get; set; }
|
|
||||||
public bool IncludeSeriesTitle { get; set; }
|
public bool IncludeSeriesTitle { get; set; }
|
||||||
public bool IncludeEpisodeTitle { get; set; }
|
public bool IncludeEpisodeTitle { get; set; }
|
||||||
public bool IncludeQuality { get; set; }
|
public bool IncludeQuality { get; set; }
|
||||||
@@ -33,12 +29,8 @@ namespace NzbDrone.Api.Config
|
|||||||
|
|
||||||
RenameEpisodes = model.RenameEpisodes,
|
RenameEpisodes = model.RenameEpisodes,
|
||||||
ReplaceIllegalCharacters = model.ReplaceIllegalCharacters,
|
ReplaceIllegalCharacters = model.ReplaceIllegalCharacters,
|
||||||
|
ColonReplacementFormat = model.ColonReplacementFormat,
|
||||||
MultiEpisodeStyle = model.MultiEpisodeStyle,
|
MultiEpisodeStyle = model.MultiEpisodeStyle,
|
||||||
StandardEpisodeFormat = model.StandardEpisodeFormat,
|
|
||||||
DailyEpisodeFormat = model.DailyEpisodeFormat,
|
|
||||||
AnimeEpisodeFormat = model.AnimeEpisodeFormat,
|
|
||||||
SeriesFolderFormat = model.SeriesFolderFormat,
|
|
||||||
SeasonFolderFormat = model.SeasonFolderFormat,
|
|
||||||
StandardMovieFormat = model.StandardMovieFormat,
|
StandardMovieFormat = model.StandardMovieFormat,
|
||||||
MovieFolderFormat = model.MovieFolderFormat
|
MovieFolderFormat = model.MovieFolderFormat
|
||||||
//IncludeSeriesTitle
|
//IncludeSeriesTitle
|
||||||
@@ -68,15 +60,10 @@ namespace NzbDrone.Api.Config
|
|||||||
|
|
||||||
RenameEpisodes = resource.RenameEpisodes,
|
RenameEpisodes = resource.RenameEpisodes,
|
||||||
ReplaceIllegalCharacters = resource.ReplaceIllegalCharacters,
|
ReplaceIllegalCharacters = resource.ReplaceIllegalCharacters,
|
||||||
//MultiEpisodeStyle = resource.MultiEpisodeStyle,
|
ColonReplacementFormat = resource.ColonReplacementFormat,
|
||||||
//StandardEpisodeFormat = resource.StandardEpisodeFormat,
|
|
||||||
//DailyEpisodeFormat = resource.DailyEpisodeFormat,
|
|
||||||
//AnimeEpisodeFormat = resource.AnimeEpisodeFormat,
|
|
||||||
//SeriesFolderFormat = resource.SeriesFolderFormat,
|
|
||||||
//SeasonFolderFormat = resource.SeasonFolderFormat,
|
|
||||||
StandardMovieFormat = resource.StandardMovieFormat,
|
StandardMovieFormat = resource.StandardMovieFormat,
|
||||||
MovieFolderFormat = resource.MovieFolderFormat
|
MovieFolderFormat = resource.MovieFolderFormat
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
using Nancy;
|
using Nancy;
|
||||||
@@ -24,8 +24,7 @@ namespace NzbDrone.Api.Indexers
|
|||||||
private readonly IPrioritizeDownloadDecision _prioritizeDownloadDecision;
|
private readonly IPrioritizeDownloadDecision _prioritizeDownloadDecision;
|
||||||
private readonly IDownloadService _downloadService;
|
private readonly IDownloadService _downloadService;
|
||||||
private readonly Logger _logger;
|
private readonly Logger _logger;
|
||||||
|
|
||||||
private readonly ICached<RemoteEpisode> _remoteEpisodeCache;
|
|
||||||
private readonly ICached<RemoteMovie> _remoteMovieCache;
|
private readonly ICached<RemoteMovie> _remoteMovieCache;
|
||||||
|
|
||||||
public ReleaseModule(IFetchAndParseRss rssFetcherAndParser,
|
public ReleaseModule(IFetchAndParseRss rssFetcherAndParser,
|
||||||
@@ -48,44 +47,23 @@ namespace NzbDrone.Api.Indexers
|
|||||||
|
|
||||||
//PostValidator.RuleFor(s => s.DownloadAllowed).Equal(true);
|
//PostValidator.RuleFor(s => s.DownloadAllowed).Equal(true);
|
||||||
PostValidator.RuleFor(s => s.Guid).NotEmpty();
|
PostValidator.RuleFor(s => s.Guid).NotEmpty();
|
||||||
|
|
||||||
_remoteEpisodeCache = cacheManager.GetCache<RemoteEpisode>(GetType(), "remoteEpisodes");
|
|
||||||
_remoteMovieCache = cacheManager.GetCache<RemoteMovie>(GetType(), "remoteMovies");
|
_remoteMovieCache = cacheManager.GetCache<RemoteMovie>(GetType(), "remoteMovies");
|
||||||
}
|
}
|
||||||
|
|
||||||
private Response DownloadRelease(ReleaseResource release)
|
private Response DownloadRelease(ReleaseResource release)
|
||||||
{
|
{
|
||||||
var remoteEpisode = _remoteEpisodeCache.Find(release.Guid);
|
var remoteMovie = _remoteMovieCache.Find(release.Guid);
|
||||||
|
|
||||||
if (remoteEpisode == null)
|
if (remoteMovie == null)
|
||||||
{
|
{
|
||||||
_logger.Debug("Couldn't find requested release in cache, cache timeout probably expired.");
|
_logger.Debug("Couldn't find requested release in cache, cache timeout probably expired.");
|
||||||
|
|
||||||
var remoteMovie = _remoteMovieCache.Find(release.Guid);
|
return new NotFoundResponse();
|
||||||
|
|
||||||
if (remoteMovie == null)
|
|
||||||
{
|
|
||||||
return new NotFoundResponse();
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
_downloadService.DownloadReport(remoteMovie, false);
|
|
||||||
}
|
|
||||||
catch (ReleaseDownloadException ex)
|
|
||||||
{
|
|
||||||
_logger.Error(ex, ex.Message);
|
|
||||||
throw new NzbDroneClientException(HttpStatusCode.Conflict, "Getting release from indexer failed");
|
|
||||||
}
|
|
||||||
|
|
||||||
return release.AsResponse();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_downloadService.DownloadReport(remoteEpisode);
|
_downloadService.DownloadReport(remoteMovie, false);
|
||||||
}
|
}
|
||||||
catch (ReleaseDownloadException ex)
|
catch (ReleaseDownloadException ex)
|
||||||
{
|
{
|
||||||
@@ -98,11 +76,6 @@ namespace NzbDrone.Api.Indexers
|
|||||||
|
|
||||||
private List<ReleaseResource> GetReleases()
|
private List<ReleaseResource> GetReleases()
|
||||||
{
|
{
|
||||||
if (Request.Query.episodeId != null)
|
|
||||||
{
|
|
||||||
return GetEpisodeReleases(Request.Query.episodeId);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Request.Query.movieId != null)
|
if (Request.Query.movieId != null)
|
||||||
{
|
{
|
||||||
return GetMovieReleases(Request.Query.movieId);
|
return GetMovieReleases(Request.Query.movieId);
|
||||||
@@ -111,23 +84,6 @@ namespace NzbDrone.Api.Indexers
|
|||||||
return GetRss();
|
return GetRss();
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<ReleaseResource> GetEpisodeReleases(int episodeId)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var decisions = _nzbSearchService.EpisodeSearch(episodeId, true);
|
|
||||||
var prioritizedDecisions = _prioritizeDownloadDecision.PrioritizeDecisions(decisions);
|
|
||||||
|
|
||||||
return MapDecisions(prioritizedDecisions);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.Error(ex, "Episode search failed: " + ex.Message);
|
|
||||||
}
|
|
||||||
|
|
||||||
return new List<ReleaseResource>();
|
|
||||||
}
|
|
||||||
|
|
||||||
private List<ReleaseResource> GetMovieReleases(int movieId)
|
private List<ReleaseResource> GetMovieReleases(int movieId)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -153,23 +109,17 @@ namespace NzbDrone.Api.Indexers
|
|||||||
{
|
{
|
||||||
var reports = _rssFetcherAndParser.Fetch();
|
var reports = _rssFetcherAndParser.Fetch();
|
||||||
var decisions = _downloadDecisionMaker.GetRssDecision(reports);
|
var decisions = _downloadDecisionMaker.GetRssDecision(reports);
|
||||||
var prioritizedDecisions = _prioritizeDownloadDecision.PrioritizeDecisions(decisions);
|
var prioritizedDecisions = _prioritizeDownloadDecision.PrioritizeDecisionsForMovies(decisions);
|
||||||
|
|
||||||
return MapDecisions(prioritizedDecisions);
|
return MapDecisions(prioritizedDecisions);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override ReleaseResource MapDecision(DownloadDecision decision, int initialWeight)
|
protected override ReleaseResource MapDecision(DownloadDecision decision, int initialWeight)
|
||||||
{
|
{
|
||||||
if (decision.IsForMovie)
|
|
||||||
{
|
_remoteMovieCache.Set(decision.RemoteMovie.Release.Guid, decision.RemoteMovie, TimeSpan.FromMinutes(30));
|
||||||
_remoteMovieCache.Set(decision.RemoteMovie.Release.Guid, decision.RemoteMovie, TimeSpan.FromMinutes(30));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_remoteEpisodeCache.Set(decision.RemoteEpisode.Release.Guid, decision.RemoteEpisode, TimeSpan.FromMinutes(30));
|
|
||||||
}
|
|
||||||
|
|
||||||
return base.MapDecision(decision, initialWeight);
|
return base.MapDecision(decision, initialWeight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using NzbDrone.Api.REST;
|
using NzbDrone.Api.REST;
|
||||||
@@ -29,7 +29,7 @@ namespace NzbDrone.Api.Indexers
|
|||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
public bool FullSeason { get; set; }
|
public bool FullSeason { get; set; }
|
||||||
public int SeasonNumber { get; set; }
|
public int SeasonNumber { get; set; }
|
||||||
public Language Language { get; set; }
|
public List<Language> Languages { get; set; }
|
||||||
public int Year { get; set; }
|
public int Year { get; set; }
|
||||||
public string MovieTitle { get; set; }
|
public string MovieTitle { get; set; }
|
||||||
public int[] EpisodeNumbers { get; set; }
|
public int[] EpisodeNumbers { get; set; }
|
||||||
@@ -48,7 +48,7 @@ namespace NzbDrone.Api.Indexers
|
|||||||
public int ReleaseWeight { get; set; }
|
public int ReleaseWeight { get; set; }
|
||||||
public int SuspectedMovieId { get; set; }
|
public int SuspectedMovieId { get; set; }
|
||||||
|
|
||||||
public IEnumerable<string> IndexerFlags { get; set; }
|
public IEnumerable<string> IndexerFlags { get; set; }
|
||||||
|
|
||||||
public string MagnetUrl { get; set; }
|
public string MagnetUrl { get; set; }
|
||||||
public string InfoHash { get; set; }
|
public string InfoHash { get; set; }
|
||||||
@@ -86,90 +86,31 @@ namespace NzbDrone.Api.Indexers
|
|||||||
{
|
{
|
||||||
public static ReleaseResource ToResource(this DownloadDecision model)
|
public static ReleaseResource ToResource(this DownloadDecision model)
|
||||||
{
|
{
|
||||||
var releaseInfo = model.RemoteEpisode.Release;
|
var releaseInfo = model.RemoteMovie.Release;
|
||||||
var parsedEpisodeInfo = model.RemoteEpisode.ParsedEpisodeInfo;
|
var remoteMovie = model.RemoteMovie;
|
||||||
var remoteEpisode = model.RemoteEpisode;
|
var torrentInfo = (model.RemoteMovie.Release as TorrentInfo) ?? new TorrentInfo();
|
||||||
var torrentInfo = (model.RemoteEpisode.Release as TorrentInfo) ?? new TorrentInfo();
|
|
||||||
var mappingResult = MappingResultType.Success;
|
var mappingResult = MappingResultType.Success;
|
||||||
if (model.IsForMovie)
|
mappingResult = model.RemoteMovie.MappingResult;
|
||||||
{
|
var parsedMovieInfo = model.RemoteMovie.ParsedMovieInfo;
|
||||||
mappingResult = model.RemoteMovie.MappingResult;
|
var movieId = model.RemoteMovie.Movie?.Id ?? 0; //Why not pull this out in frontend instead of passing another variable
|
||||||
var parsedMovieInfo = model.RemoteMovie.ParsedMovieInfo;
|
|
||||||
var movieId = model.RemoteMovie.Movie?.Id ?? 0;
|
|
||||||
|
|
||||||
return new ReleaseResource
|
|
||||||
{
|
|
||||||
Guid = releaseInfo.Guid,
|
|
||||||
Quality = parsedMovieInfo.Quality,
|
|
||||||
QualityWeight = parsedMovieInfo.Quality.Quality.Id, //Id kinda hacky for wheight, but what you gonna do? TODO: Fix this shit!
|
|
||||||
Age = releaseInfo.Age,
|
|
||||||
AgeHours = releaseInfo.AgeHours,
|
|
||||||
AgeMinutes = releaseInfo.AgeMinutes,
|
|
||||||
Size = releaseInfo.Size,
|
|
||||||
IndexerId = releaseInfo.IndexerId,
|
|
||||||
Indexer = releaseInfo.Indexer,
|
|
||||||
ReleaseGroup = parsedMovieInfo.ReleaseGroup,
|
|
||||||
ReleaseHash = parsedMovieInfo.ReleaseHash,
|
|
||||||
Title = releaseInfo.Title,
|
|
||||||
//FullSeason = parsedMovieInfo.FullSeason,
|
|
||||||
//SeasonNumber = parsedMovieInfo.SeasonNumber,
|
|
||||||
Language = parsedMovieInfo.Language,
|
|
||||||
Year = parsedMovieInfo.Year,
|
|
||||||
MovieTitle = parsedMovieInfo.MovieTitle,
|
|
||||||
EpisodeNumbers = new int[0],
|
|
||||||
AbsoluteEpisodeNumbers = new int[0],
|
|
||||||
Approved = model.Approved,
|
|
||||||
TemporarilyRejected = model.TemporarilyRejected,
|
|
||||||
Rejected = model.Rejected,
|
|
||||||
TvdbId = releaseInfo.TvdbId,
|
|
||||||
TvRageId = releaseInfo.TvRageId,
|
|
||||||
Rejections = model.Rejections.Select(r => r.Reason).ToList(),
|
|
||||||
PublishDate = releaseInfo.PublishDate,
|
|
||||||
CommentUrl = releaseInfo.CommentUrl,
|
|
||||||
DownloadUrl = releaseInfo.DownloadUrl,
|
|
||||||
InfoUrl = releaseInfo.InfoUrl,
|
|
||||||
MappingResult = mappingResult,
|
|
||||||
//ReleaseWeight
|
|
||||||
|
|
||||||
SuspectedMovieId = movieId,
|
|
||||||
|
|
||||||
MagnetUrl = torrentInfo.MagnetUrl,
|
|
||||||
InfoHash = torrentInfo.InfoHash,
|
|
||||||
Seeders = torrentInfo.Seeders,
|
|
||||||
Leechers = (torrentInfo.Peers.HasValue && torrentInfo.Seeders.HasValue) ? (torrentInfo.Peers.Value - torrentInfo.Seeders.Value) : (int?)null,
|
|
||||||
Protocol = releaseInfo.DownloadProtocol,
|
|
||||||
IndexerFlags = torrentInfo.IndexerFlags.ToString().Split(new string[] { ", " }, StringSplitOptions.None),
|
|
||||||
Edition = parsedMovieInfo.Edition,
|
|
||||||
|
|
||||||
IsDaily = false,
|
|
||||||
IsAbsoluteNumbering = false,
|
|
||||||
IsPossibleSpecialEpisode = false,
|
|
||||||
//Special = parsedMovieInfo.Special,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: Clean this mess up. don't mix data from multiple classes, use sub-resources instead? (Got a huge Deja Vu, didn't we talk about this already once?)
|
|
||||||
return new ReleaseResource
|
return new ReleaseResource
|
||||||
{
|
{
|
||||||
Guid = releaseInfo.Guid,
|
Guid = releaseInfo.Guid,
|
||||||
Quality = parsedEpisodeInfo.Quality,
|
Quality = parsedMovieInfo.Quality,
|
||||||
//QualityWeight
|
QualityWeight = parsedMovieInfo.Quality.Quality.Id, //Id kinda hacky for wheight, but what you gonna do? TODO: Fix this shit!
|
||||||
Age = releaseInfo.Age,
|
Age = releaseInfo.Age,
|
||||||
AgeHours = releaseInfo.AgeHours,
|
AgeHours = releaseInfo.AgeHours,
|
||||||
AgeMinutes = releaseInfo.AgeMinutes,
|
AgeMinutes = releaseInfo.AgeMinutes,
|
||||||
Size = releaseInfo.Size,
|
Size = releaseInfo.Size,
|
||||||
IndexerId = releaseInfo.IndexerId,
|
IndexerId = releaseInfo.IndexerId,
|
||||||
Indexer = releaseInfo.Indexer,
|
Indexer = releaseInfo.Indexer,
|
||||||
ReleaseGroup = parsedEpisodeInfo.ReleaseGroup,
|
ReleaseGroup = parsedMovieInfo.ReleaseGroup,
|
||||||
ReleaseHash = parsedEpisodeInfo.ReleaseHash,
|
ReleaseHash = parsedMovieInfo.ReleaseHash,
|
||||||
Title = releaseInfo.Title,
|
Title = releaseInfo.Title,
|
||||||
FullSeason = parsedEpisodeInfo.FullSeason,
|
Languages = parsedMovieInfo.Languages,
|
||||||
SeasonNumber = parsedEpisodeInfo.SeasonNumber,
|
Year = parsedMovieInfo.Year,
|
||||||
Language = parsedEpisodeInfo.Language,
|
MovieTitle = parsedMovieInfo.MovieTitle,
|
||||||
//AirDate = parsedEpisodeInfo.AirDate,
|
|
||||||
//SeriesTitle = parsedEpisodeInfo.SeriesTitle,
|
|
||||||
EpisodeNumbers = parsedEpisodeInfo.EpisodeNumbers,
|
|
||||||
AbsoluteEpisodeNumbers = parsedEpisodeInfo.AbsoluteEpisodeNumbers,
|
|
||||||
Approved = model.Approved,
|
Approved = model.Approved,
|
||||||
TemporarilyRejected = model.TemporarilyRejected,
|
TemporarilyRejected = model.TemporarilyRejected,
|
||||||
Rejected = model.Rejected,
|
Rejected = model.Rejected,
|
||||||
@@ -180,19 +121,20 @@ namespace NzbDrone.Api.Indexers
|
|||||||
CommentUrl = releaseInfo.CommentUrl,
|
CommentUrl = releaseInfo.CommentUrl,
|
||||||
DownloadUrl = releaseInfo.DownloadUrl,
|
DownloadUrl = releaseInfo.DownloadUrl,
|
||||||
InfoUrl = releaseInfo.InfoUrl,
|
InfoUrl = releaseInfo.InfoUrl,
|
||||||
//DownloadAllowed = downloadAllowed,
|
MappingResult = mappingResult,
|
||||||
//ReleaseWeight
|
//ReleaseWeight
|
||||||
|
|
||||||
|
SuspectedMovieId = movieId,
|
||||||
|
|
||||||
MagnetUrl = torrentInfo.MagnetUrl,
|
MagnetUrl = torrentInfo.MagnetUrl,
|
||||||
InfoHash = torrentInfo.InfoHash,
|
InfoHash = torrentInfo.InfoHash,
|
||||||
Seeders = torrentInfo.Seeders,
|
Seeders = torrentInfo.Seeders,
|
||||||
Leechers = (torrentInfo.Peers.HasValue && torrentInfo.Seeders.HasValue) ? (torrentInfo.Peers.Value - torrentInfo.Seeders.Value) : (int?)null,
|
Leechers = (torrentInfo.Peers.HasValue && torrentInfo.Seeders.HasValue) ? (torrentInfo.Peers.Value - torrentInfo.Seeders.Value) : (int?)null,
|
||||||
Protocol = releaseInfo.DownloadProtocol,
|
Protocol = releaseInfo.DownloadProtocol,
|
||||||
|
IndexerFlags = torrentInfo.IndexerFlags.ToString().Split(new string[] { ", " }, StringSplitOptions.None),
|
||||||
|
Edition = parsedMovieInfo.Edition,
|
||||||
|
|
||||||
IsDaily = parsedEpisodeInfo.IsDaily,
|
//Special = parsedMovieInfo.Special,
|
||||||
IsAbsoluteNumbering = parsedEpisodeInfo.IsAbsoluteNumbering,
|
|
||||||
IsPossibleSpecialEpisode = parsedEpisodeInfo.IsPossibleSpecialEpisode,
|
|
||||||
Special = parsedEpisodeInfo.Special,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -232,4 +174,4 @@ namespace NzbDrone.Api.Indexers
|
|||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NzbDrone.Core.MediaFiles.EpisodeImport.Manual;
|
using NzbDrone.Core.MediaFiles.MovieImport.Manual;
|
||||||
using NzbDrone.Core.Qualities;
|
using NzbDrone.Core.Qualities;
|
||||||
|
|
||||||
namespace NzbDrone.Api.ManualImport
|
namespace NzbDrone.Api.ManualImport
|
||||||
@@ -36,8 +36,8 @@ namespace NzbDrone.Api.ManualImport
|
|||||||
item.QualityWeight += item.Quality.Revision.Real * 10;
|
item.QualityWeight += item.Quality.Revision.Real * 10;
|
||||||
item.QualityWeight += item.Quality.Revision.Version;
|
item.QualityWeight += item.Quality.Revision.Version;
|
||||||
}
|
}
|
||||||
|
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ namespace NzbDrone.Api.ManualImport
|
|||||||
|
|
||||||
public static class ManualImportResourceMapper
|
public static class ManualImportResourceMapper
|
||||||
{
|
{
|
||||||
public static ManualImportResource ToResource(this Core.MediaFiles.EpisodeImport.Manual.ManualImportItem model)
|
public static ManualImportResource ToResource(this Core.MediaFiles.MovieImport.Manual.ManualImportItem model)
|
||||||
{
|
{
|
||||||
if (model == null) return null;
|
if (model == null) return null;
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ namespace NzbDrone.Api.ManualImport
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<ManualImportResource> ToResource(this IEnumerable<Core.MediaFiles.EpisodeImport.Manual.ManualImportItem> models)
|
public static List<ManualImportResource> ToResource(this IEnumerable<Core.MediaFiles.MovieImport.Manual.ManualImportItem> models)
|
||||||
{
|
{
|
||||||
return models.Select(ToResource).ToList();
|
return models.Select(ToResource).ToList();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ using NzbDrone.Core.Datastore.Events;
|
|||||||
using NzbDrone.Core.MediaFiles;
|
using NzbDrone.Core.MediaFiles;
|
||||||
using NzbDrone.Core.MediaFiles.Events;
|
using NzbDrone.Core.MediaFiles.Events;
|
||||||
using NzbDrone.Core.Messaging.Events;
|
using NzbDrone.Core.Messaging.Events;
|
||||||
using NzbDrone.Core.Tv;
|
using NzbDrone.Core.Movies;
|
||||||
using NzbDrone.Core.DecisionEngine;
|
using NzbDrone.Core.DecisionEngine;
|
||||||
using NzbDrone.SignalR;
|
using NzbDrone.SignalR;
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ namespace NzbDrone.Api.MovieFiles
|
|||||||
|
|
||||||
|
|
||||||
private void SetQuality(MovieFileResource movieFileResource)
|
private void SetQuality(MovieFileResource movieFileResource)
|
||||||
{
|
{
|
||||||
var movieFile = _mediaFileService.GetMovie(movieFileResource.Id);
|
var movieFile = _mediaFileService.GetMovie(movieFileResource.Id);
|
||||||
movieFile.Quality = movieFileResource.Quality;
|
movieFile.Quality = movieFileResource.Quality;
|
||||||
_mediaFileService.Update(movieFile);
|
_mediaFileService.Update(movieFile);
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NzbDrone.Api.REST;
|
using NzbDrone.Api.REST;
|
||||||
using NzbDrone.Api.Movies;
|
using NzbDrone.Api.Movies;
|
||||||
using NzbDrone.Core.MediaCover;
|
|
||||||
using NzbDrone.Core.Tv;
|
|
||||||
using NzbDrone.Core.Qualities;
|
using NzbDrone.Core.Qualities;
|
||||||
using NzbDrone.Core.MediaFiles;
|
using NzbDrone.Core.MediaFiles;
|
||||||
|
|
||||||
@@ -14,7 +12,7 @@ namespace NzbDrone.Api.MovieFiles
|
|||||||
{
|
{
|
||||||
public MovieFileResource()
|
public MovieFileResource()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Todo: Sorters should be done completely on the client
|
//Todo: Sorters should be done completely on the client
|
||||||
@@ -75,7 +73,7 @@ namespace NzbDrone.Api.MovieFiles
|
|||||||
|
|
||||||
return new MovieFile
|
return new MovieFile
|
||||||
{
|
{
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,14 +8,14 @@ using NzbDrone.Common.Cache;
|
|||||||
using NzbDrone.Common.Extensions;
|
using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Core.MediaCover;
|
using NzbDrone.Core.MediaCover;
|
||||||
using NzbDrone.Core.MediaFiles;
|
using NzbDrone.Core.MediaFiles;
|
||||||
using NzbDrone.Core.MediaFiles.EpisodeImport;
|
using NzbDrone.Core.MediaFiles.MovieImport;
|
||||||
using NzbDrone.Core.Messaging.Events;
|
using NzbDrone.Core.Messaging.Events;
|
||||||
using NzbDrone.Core.MetadataSource;
|
using NzbDrone.Core.MetadataSource;
|
||||||
using NzbDrone.Core.MetadataSource.RadarrAPI;
|
using NzbDrone.Core.MetadataSource.RadarrAPI;
|
||||||
using NzbDrone.Core.Movies.AlternativeTitles;
|
using NzbDrone.Core.Movies.AlternativeTitles;
|
||||||
using NzbDrone.Core.RootFolders;
|
using NzbDrone.Core.RootFolders;
|
||||||
using NzbDrone.Core.Tv;
|
using NzbDrone.Core.Movies;
|
||||||
using NzbDrone.Core.Tv.Events;
|
using NzbDrone.Core.Movies.Events;
|
||||||
|
|
||||||
namespace NzbDrone.Api.Movies
|
namespace NzbDrone.Api.Movies
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NzbDrone.Api.REST;
|
using NzbDrone.Api.REST;
|
||||||
using NzbDrone.Core.MediaCover;
|
using NzbDrone.Core.MediaCover;
|
||||||
using NzbDrone.Core.Tv;
|
using NzbDrone.Core.Movies;
|
||||||
using NzbDrone.Core.Qualities;
|
using NzbDrone.Core.Qualities;
|
||||||
using NzbDrone.Core.MediaFiles;
|
using NzbDrone.Core.MediaFiles;
|
||||||
using NzbDrone.Core.Movies.AlternativeTitles;
|
using NzbDrone.Core.Movies.AlternativeTitles;
|
||||||
|
|||||||
@@ -9,14 +9,14 @@ using NzbDrone.Common.Extensions;
|
|||||||
using NzbDrone.Common.Messaging;
|
using NzbDrone.Common.Messaging;
|
||||||
using NzbDrone.Core.MediaCover;
|
using NzbDrone.Core.MediaCover;
|
||||||
using NzbDrone.Core.MediaFiles;
|
using NzbDrone.Core.MediaFiles;
|
||||||
using NzbDrone.Core.MediaFiles.EpisodeImport;
|
using NzbDrone.Core.MediaFiles.MovieImport;
|
||||||
using NzbDrone.Core.Messaging.Events;
|
using NzbDrone.Core.Messaging.Events;
|
||||||
using NzbDrone.Core.MetadataSource;
|
using NzbDrone.Core.MetadataSource;
|
||||||
using NzbDrone.Core.MetadataSource.RadarrAPI;
|
using NzbDrone.Core.MetadataSource.RadarrAPI;
|
||||||
using NzbDrone.Core.Movies.AlternativeTitles;
|
using NzbDrone.Core.Movies.AlternativeTitles;
|
||||||
using NzbDrone.Core.RootFolders;
|
using NzbDrone.Core.RootFolders;
|
||||||
using NzbDrone.Core.Tv;
|
using NzbDrone.Core.Movies;
|
||||||
using NzbDrone.Core.Tv.Events;
|
using NzbDrone.Core.Movies.Events;
|
||||||
|
|
||||||
namespace NzbDrone.Api.Movies
|
namespace NzbDrone.Api.Movies
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NzbDrone.Api.REST;
|
using NzbDrone.Api.REST;
|
||||||
using NzbDrone.Core.MediaCover;
|
using NzbDrone.Core.MediaCover;
|
||||||
using NzbDrone.Core.Tv;
|
using NzbDrone.Core.Movies;
|
||||||
using NzbDrone.Core.Qualities;
|
using NzbDrone.Core.Qualities;
|
||||||
using NzbDrone.Core.MediaFiles;
|
using NzbDrone.Core.MediaFiles;
|
||||||
using NzbDrone.Core.Movies.AlternativeTitles;
|
using NzbDrone.Core.Movies.AlternativeTitles;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ namespace NzbDrone.Api.Movies
|
|||||||
{
|
{
|
||||||
var results = _fetchNetImport.FetchAndFilter((int) Request.Query.listId, false);
|
var results = _fetchNetImport.FetchAndFilter((int) Request.Query.listId, false);
|
||||||
|
|
||||||
List<Core.Tv.Movie> realResults = new List<Core.Tv.Movie>();
|
List<Core.Movies.Movie> realResults = new List<Core.Movies.Movie>();
|
||||||
|
|
||||||
/*foreach (var movie in results)
|
/*foreach (var movie in results)
|
||||||
{
|
{
|
||||||
@@ -42,7 +42,7 @@ namespace NzbDrone.Api.Movies
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static IEnumerable<MovieResource> MapToResource(IEnumerable<Core.Tv.Movie> movies)
|
private static IEnumerable<MovieResource> MapToResource(IEnumerable<Core.Movies.Movie> movies)
|
||||||
{
|
{
|
||||||
foreach (var currentSeries in movies)
|
foreach (var currentSeries in movies)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,10 +10,11 @@ using Marr.Data;
|
|||||||
using NzbDrone.Common.Extensions;
|
using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Core.Datastore;
|
using NzbDrone.Core.Datastore;
|
||||||
using NzbDrone.Core.MediaFiles;
|
using NzbDrone.Core.MediaFiles;
|
||||||
using NzbDrone.Core.MediaFiles.EpisodeImport;
|
using NzbDrone.Core.MediaFiles.MovieImport;
|
||||||
using NzbDrone.Core.RootFolders;
|
using NzbDrone.Core.RootFolders;
|
||||||
using NzbDrone.Common.Cache;
|
using NzbDrone.Common.Cache;
|
||||||
using NzbDrone.Core.Tv;
|
using NzbDrone.Core.Movies;
|
||||||
|
using NzbDrone.Core.Profiles;
|
||||||
|
|
||||||
namespace NzbDrone.Api.Movies
|
namespace NzbDrone.Api.Movies
|
||||||
{
|
{
|
||||||
@@ -32,19 +33,25 @@ namespace NzbDrone.Api.Movies
|
|||||||
private readonly IRootFolderService _rootFolderService;
|
private readonly IRootFolderService _rootFolderService;
|
||||||
private readonly IMakeImportDecision _importDecisionMaker;
|
private readonly IMakeImportDecision _importDecisionMaker;
|
||||||
private readonly IDiskScanService _diskScanService;
|
private readonly IDiskScanService _diskScanService;
|
||||||
private readonly ICached<Core.Tv.Movie> _mappedMovies;
|
private readonly ICached<Core.Movies.Movie> _mappedMovies;
|
||||||
|
private readonly IParsingService _parsingService;
|
||||||
|
private readonly IProfileService _profileService;
|
||||||
private readonly IMovieService _movieService;
|
private readonly IMovieService _movieService;
|
||||||
|
|
||||||
public MovieBulkImportModule(ISearchForNewMovie searchProxy, IRootFolderService rootFolderService, IMakeImportDecision importDecisionMaker,
|
public MovieBulkImportModule(ISearchForNewMovie searchProxy, IRootFolderService rootFolderService,
|
||||||
IDiskScanService diskScanService, ICacheManager cacheManager, IMovieService movieService)
|
IMakeImportDecision importDecisionMaker,
|
||||||
|
IDiskScanService diskScanService, ICacheManager cacheManager,
|
||||||
|
IParsingService parsingService, IProfileService profileService, IMovieService movieService)
|
||||||
: base("/movies/bulkimport")
|
: base("/movies/bulkimport")
|
||||||
{
|
{
|
||||||
_searchProxy = searchProxy;
|
_searchProxy = searchProxy;
|
||||||
_rootFolderService = rootFolderService;
|
_rootFolderService = rootFolderService;
|
||||||
_importDecisionMaker = importDecisionMaker;
|
_importDecisionMaker = importDecisionMaker;
|
||||||
_diskScanService = diskScanService;
|
_diskScanService = diskScanService;
|
||||||
_mappedMovies = cacheManager.GetCache<Core.Tv.Movie>(GetType(), "mappedMoviesCache");
|
_mappedMovies = cacheManager.GetCache<Core.Movies.Movie>(GetType(), "mappedMoviesCache");
|
||||||
_movieService = movieService;
|
_movieService = movieService;
|
||||||
|
_profileService = profileService;
|
||||||
|
_parsingService = parsingService;
|
||||||
Get["/"] = x => Search();
|
Get["/"] = x => Search();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,6 +63,8 @@ namespace NzbDrone.Api.Movies
|
|||||||
//Todo error handling
|
//Todo error handling
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Profile tempProfile = _profileService.All().First();
|
||||||
|
|
||||||
RootFolder rootFolder = _rootFolderService.Get(Request.Query.Id);
|
RootFolder rootFolder = _rootFolderService.Get(Request.Query.Id);
|
||||||
|
|
||||||
int page = Request.Query.page;
|
int page = Request.Query.page;
|
||||||
@@ -80,7 +89,7 @@ namespace NzbDrone.Api.Movies
|
|||||||
|
|
||||||
var mapped = paged.Select(f =>
|
var mapped = paged.Select(f =>
|
||||||
{
|
{
|
||||||
Core.Tv.Movie m = null;
|
Core.Movies.Movie m = null;
|
||||||
|
|
||||||
var mappedMovie = _mappedMovies.Find(f.Name);
|
var mappedMovie = _mappedMovies.Find(f.Name);
|
||||||
|
|
||||||
@@ -89,23 +98,27 @@ namespace NzbDrone.Api.Movies
|
|||||||
return mappedMovie;
|
return mappedMovie;
|
||||||
}
|
}
|
||||||
|
|
||||||
var parsedTitle = Parser.ParseMoviePath(f.Name, false);
|
var parsedTitle = _parsingService.ParseMinimalPathMovieInfo(f.Name);
|
||||||
if (parsedTitle == null)
|
if (parsedTitle == null)
|
||||||
{
|
{
|
||||||
m = new Core.Tv.Movie
|
m = new Core.Movies.Movie
|
||||||
{
|
{
|
||||||
Title = f.Name.Replace(".", " ").Replace("-", " "),
|
Title = f.Name.Replace(".", " ").Replace("-", " "),
|
||||||
Path = f.Path,
|
Path = f.Path,
|
||||||
|
Profile = tempProfile
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m = new Core.Tv.Movie
|
parsedTitle.ImdbId = Parser.ParseImdbId(parsedTitle.SimpleReleaseTitle);
|
||||||
|
|
||||||
|
m = new Core.Movies.Movie
|
||||||
{
|
{
|
||||||
Title = parsedTitle.MovieTitle,
|
Title = parsedTitle.MovieTitle,
|
||||||
Year = parsedTitle.Year,
|
Year = parsedTitle.Year,
|
||||||
ImdbId = parsedTitle.ImdbId,
|
ImdbId = parsedTitle.ImdbId,
|
||||||
Path = f.Path
|
Path = f.Path,
|
||||||
|
Profile = tempProfile
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,7 +132,7 @@ namespace NzbDrone.Api.Movies
|
|||||||
{
|
{
|
||||||
var local = decision.LocalMovie;
|
var local = decision.LocalMovie;
|
||||||
|
|
||||||
m.MovieFile = new LazyLoaded<MovieFile>(new MovieFile
|
m.MovieFile = new MovieFile
|
||||||
{
|
{
|
||||||
Path = local.Path,
|
Path = local.Path,
|
||||||
Edition = local.ParsedMovieInfo.Edition,
|
Edition = local.ParsedMovieInfo.Edition,
|
||||||
@@ -127,7 +140,7 @@ namespace NzbDrone.Api.Movies
|
|||||||
MediaInfo = local.MediaInfo,
|
MediaInfo = local.MediaInfo,
|
||||||
ReleaseGroup = local.ParsedMovieInfo.ReleaseGroup,
|
ReleaseGroup = local.ParsedMovieInfo.ReleaseGroup,
|
||||||
RelativePath = f.Path.GetRelativePath(local.Path)
|
RelativePath = f.Path.GetRelativePath(local.Path)
|
||||||
});
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
mappedMovie = _searchProxy.MapMovieToTmdbMovie(m);
|
mappedMovie = _searchProxy.MapMovieToTmdbMovie(m);
|
||||||
@@ -143,7 +156,7 @@ namespace NzbDrone.Api.Movies
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
|
|
||||||
return new PagingResource<MovieResource>
|
return new PagingResource<MovieResource>
|
||||||
{
|
{
|
||||||
Page = page,
|
Page = page,
|
||||||
@@ -156,7 +169,7 @@ namespace NzbDrone.Api.Movies
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static IEnumerable<MovieResource> MapToResource(IEnumerable<Core.Tv.Movie> movies)
|
private static IEnumerable<MovieResource> MapToResource(IEnumerable<Core.Movies.Movie> movies)
|
||||||
{
|
{
|
||||||
foreach (var currentMovie in movies)
|
foreach (var currentMovie in movies)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ namespace NzbDrone.Api.Movies
|
|||||||
}).AsResponse();
|
}).AsResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IEnumerable<MovieResource> MapToResource(IEnumerable<Core.Tv.Movie> movies)
|
private static IEnumerable<MovieResource> MapToResource(IEnumerable<Core.Movies.Movie> movies)
|
||||||
{
|
{
|
||||||
foreach (var currentSeries in movies)
|
foreach (var currentSeries in movies)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using Nancy;
|
|||||||
using Nancy.Responses;
|
using Nancy.Responses;
|
||||||
using NzbDrone.Api.Extensions;
|
using NzbDrone.Api.Extensions;
|
||||||
using NzbDrone.Api.REST;
|
using NzbDrone.Api.REST;
|
||||||
using NzbDrone.Core.Tv;
|
using NzbDrone.Core.Movies;
|
||||||
|
|
||||||
namespace NzbDrone.Api.Movies
|
namespace NzbDrone.Api.Movies
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ namespace NzbDrone.Api.Movies
|
|||||||
return MapToResource(imdbResults).AsResponse();
|
return MapToResource(imdbResults).AsResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IEnumerable<MovieResource> MapToResource(IEnumerable<Core.Tv.Movie> movies)
|
private static IEnumerable<MovieResource> MapToResource(IEnumerable<Core.Movies.Movie> movies)
|
||||||
{
|
{
|
||||||
foreach (var currentSeries in movies)
|
foreach (var currentSeries in movies)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,11 +9,9 @@ using NzbDrone.Core.MediaCover;
|
|||||||
using NzbDrone.Core.MediaFiles;
|
using NzbDrone.Core.MediaFiles;
|
||||||
using NzbDrone.Core.MediaFiles.Events;
|
using NzbDrone.Core.MediaFiles.Events;
|
||||||
using NzbDrone.Core.Messaging.Events;
|
using NzbDrone.Core.Messaging.Events;
|
||||||
using NzbDrone.Core.MovieStats;
|
using NzbDrone.Core.Movies;
|
||||||
using NzbDrone.Core.Tv;
|
using NzbDrone.Core.Movies.Events;
|
||||||
using NzbDrone.Core.Tv.Events;
|
|
||||||
using NzbDrone.Core.Validation.Paths;
|
using NzbDrone.Core.Validation.Paths;
|
||||||
using NzbDrone.Core.DataAugmentation.Scene;
|
|
||||||
using NzbDrone.Core.Validation;
|
using NzbDrone.Core.Validation;
|
||||||
using NzbDrone.SignalR;
|
using NzbDrone.SignalR;
|
||||||
using NzbDrone.Core.Datastore;
|
using NzbDrone.Core.Datastore;
|
||||||
@@ -22,8 +20,8 @@ using Nancy;
|
|||||||
|
|
||||||
namespace NzbDrone.Api.Movies
|
namespace NzbDrone.Api.Movies
|
||||||
{
|
{
|
||||||
public class MovieModule : NzbDroneRestModuleWithSignalR<MovieResource, Core.Tv.Movie>,
|
public class MovieModule : NzbDroneRestModuleWithSignalR<MovieResource, Core.Movies.Movie>,
|
||||||
IHandle<MovieImportedEvent>,
|
IHandle<MovieImportedEvent>,
|
||||||
IHandle<MovieFileDeletedEvent>,
|
IHandle<MovieFileDeletedEvent>,
|
||||||
IHandle<MovieUpdatedEvent>,
|
IHandle<MovieUpdatedEvent>,
|
||||||
IHandle<MovieEditedEvent>,
|
IHandle<MovieEditedEvent>,
|
||||||
@@ -33,15 +31,12 @@ namespace NzbDrone.Api.Movies
|
|||||||
|
|
||||||
{
|
{
|
||||||
protected readonly IMovieService _moviesService;
|
protected readonly IMovieService _moviesService;
|
||||||
private readonly IMovieStatisticsService _moviesStatisticsService;
|
|
||||||
private readonly IMapCoversToLocal _coverMapper;
|
private readonly IMapCoversToLocal _coverMapper;
|
||||||
|
|
||||||
private const string TITLE_SLUG_ROUTE = "/titleslug/(?<slug>[^/]+)";
|
private const string TITLE_SLUG_ROUTE = "/titleslug/(?<slug>[^/]+)";
|
||||||
|
|
||||||
public MovieModule(IBroadcastSignalRMessage signalRBroadcaster,
|
public MovieModule(IBroadcastSignalRMessage signalRBroadcaster,
|
||||||
IMovieService moviesService,
|
IMovieService moviesService,
|
||||||
IMovieStatisticsService moviesStatisticsService,
|
|
||||||
ISceneMappingService sceneMappingService,
|
|
||||||
IMapCoversToLocal coverMapper,
|
IMapCoversToLocal coverMapper,
|
||||||
RootFolderValidator rootFolderValidator,
|
RootFolderValidator rootFolderValidator,
|
||||||
MoviePathValidator moviesPathValidator,
|
MoviePathValidator moviesPathValidator,
|
||||||
@@ -53,7 +48,6 @@ namespace NzbDrone.Api.Movies
|
|||||||
: base(signalRBroadcaster)
|
: base(signalRBroadcaster)
|
||||||
{
|
{
|
||||||
_moviesService = moviesService;
|
_moviesService = moviesService;
|
||||||
_moviesStatisticsService = moviesStatisticsService;
|
|
||||||
|
|
||||||
_coverMapper = coverMapper;
|
_coverMapper = coverMapper;
|
||||||
|
|
||||||
@@ -93,14 +87,11 @@ namespace NzbDrone.Api.Movies
|
|||||||
|
|
||||||
public MovieModule(IBroadcastSignalRMessage signalRBroadcaster,
|
public MovieModule(IBroadcastSignalRMessage signalRBroadcaster,
|
||||||
IMovieService moviesService,
|
IMovieService moviesService,
|
||||||
IMovieStatisticsService moviesStatisticsService,
|
|
||||||
ISceneMappingService sceneMappingService,
|
|
||||||
IMapCoversToLocal coverMapper,
|
IMapCoversToLocal coverMapper,
|
||||||
string resource)
|
string resource)
|
||||||
: base(signalRBroadcaster, resource)
|
: base(signalRBroadcaster, resource)
|
||||||
{
|
{
|
||||||
_moviesService = moviesService;
|
_moviesService = moviesService;
|
||||||
_moviesStatisticsService = moviesStatisticsService;
|
|
||||||
|
|
||||||
_coverMapper = coverMapper;
|
_coverMapper = coverMapper;
|
||||||
|
|
||||||
@@ -119,14 +110,14 @@ namespace NzbDrone.Api.Movies
|
|||||||
|
|
||||||
private PagingResource<MovieResource> GetMoviePaged(PagingResource<MovieResource> pagingResource)
|
private PagingResource<MovieResource> GetMoviePaged(PagingResource<MovieResource> pagingResource)
|
||||||
{
|
{
|
||||||
var pagingSpec = pagingResource.MapToPagingSpec<MovieResource, Core.Tv.Movie>();
|
var pagingSpec = pagingResource.MapToPagingSpec<MovieResource, Core.Movies.Movie>();
|
||||||
|
|
||||||
pagingSpec.FilterExpression = _moviesService.ConstructFilterExpression(pagingResource.FilterKey, pagingResource.FilterValue, pagingResource.FilterType);
|
pagingSpec.FilterExpression = _moviesService.ConstructFilterExpression(pagingResource.FilterKey, pagingResource.FilterValue, pagingResource.FilterType);
|
||||||
|
|
||||||
return ApplyToPage(_moviesService.Paged, pagingSpec, MapToResource);
|
return ApplyToPage(_moviesService.Paged, pagingSpec, MapToResource);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected MovieResource MapToResource(Core.Tv.Movie movies)
|
protected MovieResource MapToResource(Core.Movies.Movie movies)
|
||||||
{
|
{
|
||||||
if (movies == null) return null;
|
if (movies == null) return null;
|
||||||
|
|
||||||
@@ -140,11 +131,11 @@ namespace NzbDrone.Api.Movies
|
|||||||
|
|
||||||
private List<MovieResource> AllMovie()
|
private List<MovieResource> AllMovie()
|
||||||
{
|
{
|
||||||
var moviesStats = _moviesStatisticsService.MovieStatistics();
|
//var moviesStats = _moviesStatisticsService.MovieStatistics();
|
||||||
var moviesResources = _moviesService.GetAllMovies().ToResource();
|
var moviesResources = _moviesService.GetAllMovies().ToResource();
|
||||||
|
|
||||||
MapCoversToLocal(moviesResources.ToArray());
|
MapCoversToLocal(moviesResources.ToArray());
|
||||||
LinkMovieStatistics(moviesResources, moviesStats);
|
//LinkMovieStatistics(moviesResources, moviesStats);
|
||||||
PopulateAlternateTitles(moviesResources);
|
PopulateAlternateTitles(moviesResources);
|
||||||
|
|
||||||
return moviesResources;
|
return moviesResources;
|
||||||
@@ -216,28 +207,28 @@ namespace NzbDrone.Api.Movies
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FetchAndLinkMovieStatistics(MovieResource resource)
|
//private void FetchAndLinkMovieStatistics(MovieResource resource)
|
||||||
{
|
//{
|
||||||
LinkMovieStatistics(resource, _moviesStatisticsService.MovieStatistics(resource.Id));
|
// LinkMovieStatistics(resource, _moviesStatisticsService.MovieStatistics(resource.Id));
|
||||||
}
|
//}
|
||||||
|
|
||||||
private void LinkMovieStatistics(List<MovieResource> resources, List<MovieStatistics> moviesStatistics)
|
//private void LinkMovieStatistics(List<MovieResource> resources, List<MovieStatistics> moviesStatistics)
|
||||||
{
|
//{
|
||||||
var dictMovieStats = moviesStatistics.ToDictionary(v => v.MovieId);
|
// var dictMovieStats = moviesStatistics.ToDictionary(v => v.MovieId);
|
||||||
|
|
||||||
foreach (var movies in resources)
|
// foreach (var movies in resources)
|
||||||
{
|
// {
|
||||||
var stats = dictMovieStats.GetValueOrDefault(movies.Id);
|
// var stats = dictMovieStats.GetValueOrDefault(movies.Id);
|
||||||
if (stats == null) continue;
|
// if (stats == null) continue;
|
||||||
|
|
||||||
LinkMovieStatistics(movies, stats);
|
// LinkMovieStatistics(movies, stats);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
private void LinkMovieStatistics(MovieResource resource, MovieStatistics moviesStatistics)
|
//private void LinkMovieStatistics(MovieResource resource, MovieStatistics moviesStatistics)
|
||||||
{
|
//{
|
||||||
//resource.SizeOnDisk = 0;//TODO: incorporate movie statistics moviesStatistics.SizeOnDisk;
|
// //resource.SizeOnDisk = 0;//TODO: incorporate movie statistics moviesStatistics.SizeOnDisk;
|
||||||
}
|
//}
|
||||||
|
|
||||||
private void PopulateAlternateTitles(List<MovieResource> resources)
|
private void PopulateAlternateTitles(List<MovieResource> resources)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ using NzbDrone.Core.DecisionEngine;
|
|||||||
using NzbDrone.Core.Download;
|
using NzbDrone.Core.Download;
|
||||||
using NzbDrone.Core.MediaFiles.Events;
|
using NzbDrone.Core.MediaFiles.Events;
|
||||||
using NzbDrone.Core.Messaging.Events;
|
using NzbDrone.Core.Messaging.Events;
|
||||||
using NzbDrone.Core.Tv;
|
using NzbDrone.Core.Movies;
|
||||||
using NzbDrone.SignalR;
|
using NzbDrone.SignalR;
|
||||||
|
|
||||||
namespace NzbDrone.Api.Movies
|
namespace NzbDrone.Api.Movies
|
||||||
{
|
{
|
||||||
public abstract class MovieModuleWithSignalR : NzbDroneRestModuleWithSignalR<MovieResource, Core.Tv.Movie>,
|
public abstract class MovieModuleWithSignalR : NzbDroneRestModuleWithSignalR<MovieResource, Core.Movies.Movie>,
|
||||||
IHandle<MovieGrabbedEvent>,
|
IHandle<MovieGrabbedEvent>,
|
||||||
IHandle<MovieDownloadedEvent>
|
IHandle<MovieDownloadedEvent>
|
||||||
{
|
{
|
||||||
@@ -46,7 +46,7 @@ namespace NzbDrone.Api.Movies
|
|||||||
return resource;
|
return resource;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected MovieResource MapToResource(Core.Tv.Movie episode, bool includeSeries)
|
protected MovieResource MapToResource(Core.Movies.Movie episode, bool includeSeries)
|
||||||
{
|
{
|
||||||
var resource = episode.ToResource();
|
var resource = episode.ToResource();
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NzbDrone.Api.REST;
|
using NzbDrone.Api.REST;
|
||||||
using NzbDrone.Core.MediaCover;
|
using NzbDrone.Core.MediaCover;
|
||||||
using NzbDrone.Core.Tv;
|
using NzbDrone.Core.Movies;
|
||||||
using NzbDrone.Api.MovieFiles;
|
using NzbDrone.Api.MovieFiles;
|
||||||
|
|
||||||
namespace NzbDrone.Api.Movies
|
namespace NzbDrone.Api.Movies
|
||||||
@@ -88,7 +88,7 @@ namespace NzbDrone.Api.Movies
|
|||||||
|
|
||||||
public static class MovieResourceMapper
|
public static class MovieResourceMapper
|
||||||
{
|
{
|
||||||
public static MovieResource ToResource(this Core.Tv.Movie model)
|
public static MovieResource ToResource(this Core.Movies.Movie model)
|
||||||
{
|
{
|
||||||
if (model == null) return null;
|
if (model == null) return null;
|
||||||
|
|
||||||
@@ -171,11 +171,11 @@ namespace NzbDrone.Api.Movies
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Core.Tv.Movie ToModel(this MovieResource resource)
|
public static Core.Movies.Movie ToModel(this MovieResource resource)
|
||||||
{
|
{
|
||||||
if (resource == null) return null;
|
if (resource == null) return null;
|
||||||
|
|
||||||
return new Core.Tv.Movie
|
return new Core.Movies.Movie
|
||||||
{
|
{
|
||||||
Id = resource.Id,
|
Id = resource.Id,
|
||||||
TmdbId = resource.TmdbId,
|
TmdbId = resource.TmdbId,
|
||||||
@@ -225,7 +225,7 @@ namespace NzbDrone.Api.Movies
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Core.Tv.Movie ToModel(this MovieResource resource, Core.Tv.Movie movie)
|
public static Core.Movies.Movie ToModel(this MovieResource resource, Core.Movies.Movie movie)
|
||||||
{
|
{
|
||||||
movie.ImdbId = resource.ImdbId;
|
movie.ImdbId = resource.ImdbId;
|
||||||
movie.TmdbId = resource.TmdbId;
|
movie.TmdbId = resource.TmdbId;
|
||||||
@@ -244,7 +244,7 @@ namespace NzbDrone.Api.Movies
|
|||||||
return movie;
|
return movie;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<MovieResource> ToResource(this IEnumerable<Core.Tv.Movie> movies)
|
public static List<MovieResource> ToResource(this IEnumerable<Core.Movies.Movie> movies)
|
||||||
{
|
{
|
||||||
return movies.Select(ToResource).ToList();
|
return movies.Select(ToResource).ToList();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NzbDrone.Core.NetImport;
|
using NzbDrone.Core.NetImport;
|
||||||
using NzbDrone.Core.Tv;
|
using NzbDrone.Core.Movies;
|
||||||
|
|
||||||
namespace NzbDrone.Api.NetImport
|
namespace NzbDrone.Api.NetImport
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using Nancy.Extensions;
|
|||||||
using NzbDrone.Api.Extensions;
|
using NzbDrone.Api.Extensions;
|
||||||
using NzbDrone.Api.Movies;
|
using NzbDrone.Api.Movies;
|
||||||
using NzbDrone.Core.MetadataSource;
|
using NzbDrone.Core.MetadataSource;
|
||||||
using NzbDrone.Core.Tv;
|
using NzbDrone.Core.Movies;
|
||||||
|
|
||||||
namespace NzbDrone.Api.NetImport
|
namespace NzbDrone.Api.NetImport
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using NzbDrone.Core.Tv;
|
using NzbDrone.Core.Movies;
|
||||||
|
|
||||||
namespace NzbDrone.Api.NetImport
|
namespace NzbDrone.Api.NetImport
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,305 +1,309 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||||
<ProjectGuid>{FD286DF8-2D3A-4394-8AD5-443FADE55FB2}</ProjectGuid>
|
<ProjectGuid>{FD286DF8-2D3A-4394-8AD5-443FADE55FB2}</ProjectGuid>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>NzbDrone.Api</RootNamespace>
|
<RootNamespace>NzbDrone.Api</RootNamespace>
|
||||||
<AssemblyName>NzbDrone.Api</AssemblyName>
|
<AssemblyName>NzbDrone.Api</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||||
<RestorePackages>true</RestorePackages>
|
<RestorePackages>true</RestorePackages>
|
||||||
<TargetFrameworkProfile>
|
<TargetFrameworkProfile>
|
||||||
</TargetFrameworkProfile>
|
</TargetFrameworkProfile>
|
||||||
<ProductVersion>12.0.0</ProductVersion>
|
<ProductVersion>12.0.0</ProductVersion>
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<OutputPath>..\..\_output\</OutputPath>
|
<OutputPath>..\..\_output\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||||
<OutputPath>..\..\_output\</OutputPath>
|
<OutputPath>..\..\_output\</OutputPath>
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="antlr.runtime, Version=2.7.6.2, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="antlr.runtime, Version=2.7.6.2, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Ical.Net.2.2.25\lib\net40\antlr.runtime.dll</HintPath>
|
<HintPath>..\packages\Ical.Net.2.2.25\lib\net40\antlr.runtime.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="FluentValidation, Version=6.2.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="FluentValidation, Version=6.2.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\FluentValidation.6.2.1.0\lib\portable-net40+sl50+wp80+win8+wpa81\FluentValidation.dll</HintPath>
|
<HintPath>..\packages\FluentValidation.6.2.1.0\lib\portable-net40+sl50+wp80+win8+wpa81\FluentValidation.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Ical.Net, Version=2.1.0.30332, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Ical.Net, Version=2.1.0.30332, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Ical.Net.2.2.25\lib\net40\Ical.Net.dll</HintPath>
|
<HintPath>..\packages\Ical.Net.2.2.25\lib\net40\Ical.Net.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Ical.Net.Collections, Version=2.1.0.30331, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Ical.Net.Collections, Version=2.1.0.30331, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Ical.Net.2.2.25\lib\net40\Ical.Net.Collections.dll</HintPath>
|
<HintPath>..\packages\Ical.Net.2.2.25\lib\net40\Ical.Net.Collections.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Nancy, Version=1.4.2.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Nancy, Version=1.4.2.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Nancy.1.4.3\lib\net40\Nancy.dll</HintPath>
|
<HintPath>..\packages\Nancy.1.4.3\lib\net40\Nancy.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Nancy.Authentication.Basic, Version=1.4.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Nancy.Authentication.Basic, Version=1.4.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Nancy.Authentication.Basic.1.4.1\lib\net40\Nancy.Authentication.Basic.dll</HintPath>
|
<HintPath>..\packages\Nancy.Authentication.Basic.1.4.1\lib\net40\Nancy.Authentication.Basic.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Nancy.Authentication.Forms, Version=1.4.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Nancy.Authentication.Forms, Version=1.4.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Nancy.Authentication.Forms.1.4.1\lib\net40\Nancy.Authentication.Forms.dll</HintPath>
|
<HintPath>..\packages\Nancy.Authentication.Forms.1.4.1\lib\net40\Nancy.Authentication.Forms.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\Newtonsoft.Json.6.0.6\lib\net40\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.6.0.6\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.5.0-rc06\lib\net40-client\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.5.0-rc06\lib\net40-client\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NodaTime, Version=1.3.0.0, Culture=neutral, PublicKeyToken=4226afe0d9b296d1, processorArchitecture=MSIL">
|
<Reference Include="NodaTime, Version=1.3.0.0, Culture=neutral, PublicKeyToken=4226afe0d9b296d1, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Ical.Net.2.2.25\lib\net40\NodaTime.dll</HintPath>
|
<HintPath>..\packages\Ical.Net.2.2.25\lib\net40\NodaTime.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="System.Data.SQLite, Version=1.0.84.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
<Reference Include="System.Data.SQLite, Version=1.0.84.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\Libraries\Sqlite\System.Data.SQLite.dll</HintPath>
|
<HintPath>..\Libraries\Sqlite\System.Data.SQLite.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Runtime.Serialization" />
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
<Reference Include="System.ServiceModel" />
|
<Reference Include="System.ServiceModel" />
|
||||||
<Reference Include="System.Transactions" />
|
<Reference Include="System.Transactions" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="..\NzbDrone.Common\Properties\SharedAssemblyInfo.cs">
|
<Compile Include="..\NzbDrone.Common\Properties\SharedAssemblyInfo.cs">
|
||||||
<Link>Properties\SharedAssemblyInfo.cs</Link>
|
<Link>Properties\SharedAssemblyInfo.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Authentication\AuthenticationService.cs" />
|
<Compile Include="Authentication\AuthenticationService.cs" />
|
||||||
<Compile Include="Authentication\EnableAuthInNancy.cs" />
|
<Compile Include="Authentication\EnableAuthInNancy.cs" />
|
||||||
<Compile Include="Authentication\AuthenticationModule.cs" />
|
<Compile Include="Authentication\AuthenticationModule.cs" />
|
||||||
<Compile Include="Authentication\LoginResource.cs" />
|
<Compile Include="Authentication\LoginResource.cs" />
|
||||||
<Compile Include="Authentication\NzbDroneUser.cs" />
|
<Compile Include="Authentication\NzbDroneUser.cs" />
|
||||||
<Compile Include="Blacklist\BlacklistModule.cs" />
|
<Compile Include="Blacklist\BlacklistModule.cs" />
|
||||||
<Compile Include="Blacklist\BlacklistResource.cs" />
|
<Compile Include="Blacklist\BlacklistResource.cs" />
|
||||||
<Compile Include="Calendar\CalendarFeedModule.cs" />
|
<Compile Include="Calendar\CalendarFeedModule.cs" />
|
||||||
<Compile Include="Calendar\CalendarModule.cs" />
|
<Compile Include="Calendar\CalendarModule.cs" />
|
||||||
<Compile Include="ClientSchema\Field.cs" />
|
<Compile Include="ClientSchema\Field.cs" />
|
||||||
<Compile Include="ClientSchema\FieldDefinitionAttribute.cs" />
|
<Compile Include="ClientSchema\FieldDefinitionAttribute.cs" />
|
||||||
<Compile Include="ClientSchema\SchemaBuilder.cs" />
|
<Compile Include="ClientSchema\SchemaBuilder.cs" />
|
||||||
<Compile Include="ClientSchema\SchemaDeserializer.cs" />
|
<Compile Include="ClientSchema\SchemaDeserializer.cs" />
|
||||||
<Compile Include="ClientSchema\SelectOption.cs" />
|
<Compile Include="ClientSchema\SelectOption.cs" />
|
||||||
<Compile Include="Commands\CommandModule.cs" />
|
<Compile Include="Commands\CommandModule.cs" />
|
||||||
<Compile Include="Commands\CommandResource.cs" />
|
<Compile Include="Commands\CommandResource.cs" />
|
||||||
<Compile Include="Config\NetImportConfigModule.cs" />
|
<Compile Include="Config\NetImportConfigModule.cs" />
|
||||||
<Compile Include="Config\NetImportConfigResource.cs" />
|
<Compile Include="Config\NetImportConfigResource.cs" />
|
||||||
<Compile Include="Extensions\AccessControlHeaders.cs" />
|
<Compile Include="Extensions\AccessControlHeaders.cs" />
|
||||||
<Compile Include="Extensions\Pipelines\CorsPipeline.cs" />
|
<Compile Include="Extensions\Pipelines\CorsPipeline.cs" />
|
||||||
<Compile Include="Extensions\Pipelines\UrlBasePipeline.cs" />
|
<Compile Include="Extensions\Pipelines\UrlBasePipeline.cs" />
|
||||||
<Compile Include="Extensions\Pipelines\RequestLoggingPipeline.cs" />
|
<Compile Include="Extensions\Pipelines\RequestLoggingPipeline.cs" />
|
||||||
<Compile Include="ExtraFiles\ExtraFileResource.cs" />
|
<Compile Include="ExtraFiles\ExtraFileResource.cs" />
|
||||||
<Compile Include="Frontend\Mappers\LoginHtmlMapper.cs" />
|
<Compile Include="Frontend\Mappers\LoginHtmlMapper.cs" />
|
||||||
<Compile Include="Frontend\Mappers\RobotsTxtMapper.cs" />
|
<Compile Include="Frontend\Mappers\RobotsTxtMapper.cs" />
|
||||||
<Compile Include="Indexers\ReleaseModuleBase.cs" />
|
<Compile Include="Indexers\ReleaseModuleBase.cs" />
|
||||||
<Compile Include="Indexers\ReleasePushModule.cs" />
|
<Compile Include="Indexers\ReleasePushModule.cs" />
|
||||||
<Compile Include="ExtraFiles\ExtraFileModule.cs" />
|
<Compile Include="ExtraFiles\ExtraFileModule.cs" />
|
||||||
<Compile Include="Movies\AlternativeTitleModule.cs" />
|
<Compile Include="Movies\AlternativeTitleModule.cs" />
|
||||||
<Compile Include="Movies\AlternativeYearResource.cs" />
|
<Compile Include="Movies\AlternativeYearResource.cs" />
|
||||||
<Compile Include="Movies\AlternativeYearModule.cs" />
|
<Compile Include="Movies\AlternativeYearModule.cs" />
|
||||||
<Compile Include="Movies\MovieModuleWithSignalR.cs" />
|
<Compile Include="Movies\MovieModuleWithSignalR.cs" />
|
||||||
<Compile Include="Movies\MovieBulkImportModule.cs" />
|
<Compile Include="Movies\MovieBulkImportModule.cs" />
|
||||||
<Compile Include="MovieFiles\MovieFileModule.cs" />
|
<Compile Include="MovieFiles\MovieFileModule.cs" />
|
||||||
<Compile Include="Movies\MovieModule.cs" />
|
<Compile Include="Movies\MovieModule.cs" />
|
||||||
<Compile Include="Movies\RenameMovieModule.cs" />
|
<Compile Include="Movies\RenameMovieModule.cs" />
|
||||||
<Compile Include="Movies\RenameMovieResource.cs" />
|
<Compile Include="Movies\RenameMovieResource.cs" />
|
||||||
<Compile Include="Movies\MovieEditorModule.cs" />
|
<Compile Include="Movies\MovieEditorModule.cs" />
|
||||||
<Compile Include="NetImport\ListImportModule.cs" />
|
<Compile Include="NetImport\ListImportModule.cs" />
|
||||||
<Compile Include="NetImport\NetImportModule.cs" />
|
<Compile Include="NetImport\NetImportModule.cs" />
|
||||||
<Compile Include="NetImport\NetImportResource.cs" />
|
<Compile Include="NetImport\NetImportResource.cs" />
|
||||||
<Compile Include="Parse\ParseModule.cs" />
|
<Compile Include="Parse\ParseModule.cs" />
|
||||||
<Compile Include="Parse\ParseResource.cs" />
|
<Compile Include="Parse\ParseResource.cs" />
|
||||||
<Compile Include="ManualImport\ManualImportModule.cs" />
|
<Compile Include="ManualImport\ManualImportModule.cs" />
|
||||||
<Compile Include="ManualImport\ManualImportResource.cs" />
|
<Compile Include="ManualImport\ManualImportResource.cs" />
|
||||||
<Compile Include="Profiles\Delay\DelayProfileModule.cs" />
|
<Compile Include="Profiles\Delay\DelayProfileModule.cs" />
|
||||||
<Compile Include="Profiles\Delay\DelayProfileResource.cs" />
|
<Compile Include="Profiles\Delay\DelayProfileResource.cs" />
|
||||||
<Compile Include="Queue\QueueActionModule.cs" />
|
<Compile Include="Qualities\CustomFormatModule.cs" />
|
||||||
<Compile Include="RemotePathMappings\RemotePathMappingModule.cs" />
|
<Compile Include="Qualities\CustomFormatResource.cs" />
|
||||||
<Compile Include="RemotePathMappings\RemotePathMappingResource.cs" />
|
<Compile Include="Qualities\FormatTagMatchResultResource.cs" />
|
||||||
<Compile Include="Config\UiConfigModule.cs" />
|
<Compile Include="Qualities\FormatTagValidator.cs" />
|
||||||
<Compile Include="Config\UiConfigResource.cs" />
|
<Compile Include="Queue\QueueActionModule.cs" />
|
||||||
<Compile Include="Config\DownloadClientConfigModule.cs" />
|
<Compile Include="RemotePathMappings\RemotePathMappingModule.cs" />
|
||||||
<Compile Include="Config\DownloadClientConfigResource.cs" />
|
<Compile Include="RemotePathMappings\RemotePathMappingResource.cs" />
|
||||||
<Compile Include="Config\HostConfigModule.cs" />
|
<Compile Include="Config\UiConfigModule.cs" />
|
||||||
<Compile Include="Config\HostConfigResource.cs" />
|
<Compile Include="Config\UiConfigResource.cs" />
|
||||||
<Compile Include="Config\IndexerConfigModule.cs" />
|
<Compile Include="Config\DownloadClientConfigModule.cs" />
|
||||||
<Compile Include="Config\IndexerConfigResource.cs" />
|
<Compile Include="Config\DownloadClientConfigResource.cs" />
|
||||||
<Compile Include="Config\MediaManagementConfigModule.cs" />
|
<Compile Include="Config\HostConfigModule.cs" />
|
||||||
<Compile Include="Config\MediaManagementConfigResource.cs" />
|
<Compile Include="Config\HostConfigResource.cs" />
|
||||||
<Compile Include="Config\NamingConfigModule.cs" />
|
<Compile Include="Config\IndexerConfigModule.cs" />
|
||||||
<Compile Include="Config\NamingConfigResource.cs" />
|
<Compile Include="Config\IndexerConfigResource.cs" />
|
||||||
<Compile Include="Config\NamingSampleResource.cs" />
|
<Compile Include="Config\MediaManagementConfigModule.cs" />
|
||||||
<Compile Include="Config\NzbDroneConfigModule.cs" />
|
<Compile Include="Config\MediaManagementConfigResource.cs" />
|
||||||
<Compile Include="FileSystem\FileSystemModule.cs" />
|
<Compile Include="Config\NamingConfigModule.cs" />
|
||||||
<Compile Include="DiskSpace\DiskSpaceModule.cs" />
|
<Compile Include="Config\NamingConfigResource.cs" />
|
||||||
<Compile Include="DiskSpace\DiskSpaceResource.cs" />
|
<Compile Include="Config\NamingSampleResource.cs" />
|
||||||
<Compile Include="DownloadClient\DownloadClientModule.cs" />
|
<Compile Include="Config\NzbDroneConfigModule.cs" />
|
||||||
<Compile Include="DownloadClient\DownloadClientResource.cs" />
|
<Compile Include="FileSystem\FileSystemModule.cs" />
|
||||||
<Compile Include="ErrorManagement\ApiException.cs" />
|
<Compile Include="DiskSpace\DiskSpaceModule.cs" />
|
||||||
<Compile Include="ErrorManagement\ErrorHandler.cs" />
|
<Compile Include="DiskSpace\DiskSpaceResource.cs" />
|
||||||
<Compile Include="ErrorManagement\ErrorModel.cs" />
|
<Compile Include="DownloadClient\DownloadClientModule.cs" />
|
||||||
<Compile Include="ErrorManagement\NzbDroneErrorPipeline.cs" />
|
<Compile Include="DownloadClient\DownloadClientResource.cs" />
|
||||||
<Compile Include="Exceptions\InvalidApiKeyException.cs" />
|
<Compile Include="ErrorManagement\ApiException.cs" />
|
||||||
<Compile Include="Extensions\NancyJsonSerializer.cs" />
|
<Compile Include="ErrorManagement\ErrorHandler.cs" />
|
||||||
<Compile Include="Extensions\Pipelines\CacheHeaderPipeline.cs" />
|
<Compile Include="ErrorManagement\ErrorModel.cs" />
|
||||||
<Compile Include="Extensions\Pipelines\GZipPipeline.cs" />
|
<Compile Include="ErrorManagement\NzbDroneErrorPipeline.cs" />
|
||||||
<Compile Include="Extensions\Pipelines\IfModifiedPipeline.cs" />
|
<Compile Include="Exceptions\InvalidApiKeyException.cs" />
|
||||||
<Compile Include="Extensions\Pipelines\IRegisterNancyPipeline.cs" />
|
<Compile Include="Extensions\NancyJsonSerializer.cs" />
|
||||||
<Compile Include="Extensions\Pipelines\NzbDroneVersionPipeline.cs" />
|
<Compile Include="Extensions\Pipelines\CacheHeaderPipeline.cs" />
|
||||||
<Compile Include="Extensions\ReqResExtensions.cs" />
|
<Compile Include="Extensions\Pipelines\GZipPipeline.cs" />
|
||||||
<Compile Include="Extensions\RequestExtensions.cs" />
|
<Compile Include="Extensions\Pipelines\IfModifiedPipeline.cs" />
|
||||||
<Compile Include="Frontend\CacheableSpecification.cs" />
|
<Compile Include="Extensions\Pipelines\IRegisterNancyPipeline.cs" />
|
||||||
<Compile Include="Frontend\Mappers\BackupFileMapper.cs" />
|
<Compile Include="Extensions\Pipelines\NzbDroneVersionPipeline.cs" />
|
||||||
<Compile Include="Frontend\Mappers\CacheBreakerProvider.cs" />
|
<Compile Include="Extensions\ReqResExtensions.cs" />
|
||||||
<Compile Include="Frontend\Mappers\FaviconMapper.cs" />
|
<Compile Include="Extensions\RequestExtensions.cs" />
|
||||||
<Compile Include="Frontend\Mappers\IMapHttpRequestsToDisk.cs" />
|
<Compile Include="Frontend\CacheableSpecification.cs" />
|
||||||
<Compile Include="Frontend\Mappers\IndexHtmlMapper.cs" />
|
<Compile Include="Frontend\Mappers\BackupFileMapper.cs" />
|
||||||
<Compile Include="Frontend\Mappers\LogFileMapper.cs" />
|
<Compile Include="Frontend\Mappers\CacheBreakerProvider.cs" />
|
||||||
<Compile Include="Frontend\Mappers\MediaCoverMapper.cs" />
|
<Compile Include="Frontend\Mappers\FaviconMapper.cs" />
|
||||||
<Compile Include="Frontend\Mappers\StaticResourceMapper.cs" />
|
<Compile Include="Frontend\Mappers\IMapHttpRequestsToDisk.cs" />
|
||||||
<Compile Include="Frontend\Mappers\StaticResourceMapperBase.cs" />
|
<Compile Include="Frontend\Mappers\IndexHtmlMapper.cs" />
|
||||||
<Compile Include="Frontend\Mappers\UpdateLogFileMapper.cs" />
|
<Compile Include="Frontend\Mappers\LogFileMapper.cs" />
|
||||||
<Compile Include="Frontend\StaticResourceModule.cs" />
|
<Compile Include="Frontend\Mappers\MediaCoverMapper.cs" />
|
||||||
<Compile Include="Health\HealthModule.cs" />
|
<Compile Include="Frontend\Mappers\StaticResourceMapper.cs" />
|
||||||
<Compile Include="Health\HealthResource.cs" />
|
<Compile Include="Frontend\Mappers\StaticResourceMapperBase.cs" />
|
||||||
<Compile Include="History\HistoryModule.cs" />
|
<Compile Include="Frontend\Mappers\UpdateLogFileMapper.cs" />
|
||||||
<Compile Include="History\HistoryResource.cs" />
|
<Compile Include="Frontend\StaticResourceModule.cs" />
|
||||||
<Compile Include="Indexers\IndexerModule.cs" />
|
<Compile Include="Health\HealthModule.cs" />
|
||||||
<Compile Include="Indexers\IndexerResource.cs" />
|
<Compile Include="Health\HealthResource.cs" />
|
||||||
<Compile Include="Indexers\ReleaseModule.cs" />
|
<Compile Include="History\HistoryModule.cs" />
|
||||||
<Compile Include="Indexers\ReleaseResource.cs" />
|
<Compile Include="History\HistoryResource.cs" />
|
||||||
<Compile Include="Logs\LogFileModule.cs" />
|
<Compile Include="Indexers\IndexerModule.cs" />
|
||||||
<Compile Include="Logs\LogFileModuleBase.cs" />
|
<Compile Include="Indexers\IndexerResource.cs" />
|
||||||
<Compile Include="Logs\LogFileResource.cs" />
|
<Compile Include="Indexers\ReleaseModule.cs" />
|
||||||
<Compile Include="Logs\LogModule.cs" />
|
<Compile Include="Indexers\ReleaseResource.cs" />
|
||||||
<Compile Include="Logs\LogResource.cs" />
|
<Compile Include="Logs\LogFileModule.cs" />
|
||||||
<Compile Include="Logs\UpdateLogFileModule.cs" />
|
<Compile Include="Logs\LogFileModuleBase.cs" />
|
||||||
<Compile Include="MediaCovers\MediaCoverModule.cs" />
|
<Compile Include="Logs\LogFileResource.cs" />
|
||||||
<Compile Include="Metadata\MetadataModule.cs" />
|
<Compile Include="Logs\LogModule.cs" />
|
||||||
<Compile Include="Metadata\MetadataResource.cs" />
|
<Compile Include="Logs\LogResource.cs" />
|
||||||
<Compile Include="NancyBootstrapper.cs" />
|
<Compile Include="Logs\UpdateLogFileModule.cs" />
|
||||||
<Compile Include="Notifications\NotificationModule.cs" />
|
<Compile Include="MediaCovers\MediaCoverModule.cs" />
|
||||||
<Compile Include="Notifications\NotificationResource.cs" />
|
<Compile Include="Metadata\MetadataModule.cs" />
|
||||||
<Compile Include="NzbDroneApiModule.cs" />
|
<Compile Include="Metadata\MetadataResource.cs" />
|
||||||
<Compile Include="NzbDroneFeedModule.cs" />
|
<Compile Include="NancyBootstrapper.cs" />
|
||||||
<Compile Include="NzbDroneRestModule.cs" />
|
<Compile Include="Notifications\NotificationModule.cs" />
|
||||||
<Compile Include="NzbDroneRestModuleWithSignalR.cs" />
|
<Compile Include="Notifications\NotificationResource.cs" />
|
||||||
<Compile Include="PagingResource.cs" />
|
<Compile Include="NzbDroneApiModule.cs" />
|
||||||
<Compile Include="Profiles\Languages\LanguageModule.cs" />
|
<Compile Include="NzbDroneFeedModule.cs" />
|
||||||
<Compile Include="Profiles\Languages\LanguageResource.cs" />
|
<Compile Include="NzbDroneRestModule.cs" />
|
||||||
<Compile Include="Profiles\LegacyProfileModule.cs" />
|
<Compile Include="NzbDroneRestModuleWithSignalR.cs" />
|
||||||
<Compile Include="Profiles\ProfileModule.cs" />
|
<Compile Include="PagingResource.cs" />
|
||||||
<Compile Include="Profiles\ProfileResource.cs" />
|
<Compile Include="Profiles\Languages\LanguageModule.cs" />
|
||||||
<Compile Include="Profiles\ProfileSchemaModule.cs" />
|
<Compile Include="Profiles\Languages\LanguageResource.cs" />
|
||||||
<Compile Include="Profiles\ProfileValidation.cs" />
|
<Compile Include="Profiles\LegacyProfileModule.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Profiles\ProfileModule.cs" />
|
||||||
<Compile Include="ProviderModuleBase.cs" />
|
<Compile Include="Profiles\ProfileResource.cs" />
|
||||||
<Compile Include="ProviderResource.cs" />
|
<Compile Include="Profiles\ProfileSchemaModule.cs" />
|
||||||
<Compile Include="Qualities\QualityDefinitionModule.cs" />
|
<Compile Include="Profiles\ProfileValidation.cs" />
|
||||||
<Compile Include="Qualities\QualityDefinitionResource.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Queue\QueueModule.cs" />
|
<Compile Include="ProviderModuleBase.cs" />
|
||||||
<Compile Include="Queue\QueueResource.cs" />
|
<Compile Include="ProviderResource.cs" />
|
||||||
<Compile Include="ResourceChangeMessage.cs" />
|
<Compile Include="Qualities\QualityDefinitionModule.cs" />
|
||||||
<Compile Include="Restrictions\RestrictionModule.cs" />
|
<Compile Include="Qualities\QualityDefinitionResource.cs" />
|
||||||
<Compile Include="Restrictions\RestrictionResource.cs" />
|
<Compile Include="Queue\QueueModule.cs" />
|
||||||
<Compile Include="REST\NotFoundException.cs" />
|
<Compile Include="Queue\QueueResource.cs" />
|
||||||
<Compile Include="REST\BadRequestException.cs" />
|
<Compile Include="ResourceChangeMessage.cs" />
|
||||||
<Compile Include="REST\MethodNotAllowedException.cs" />
|
<Compile Include="Restrictions\RestrictionModule.cs" />
|
||||||
<Compile Include="REST\ResourceValidator.cs" />
|
<Compile Include="Restrictions\RestrictionResource.cs" />
|
||||||
<Compile Include="REST\RestModule.cs" />
|
<Compile Include="REST\NotFoundException.cs" />
|
||||||
<Compile Include="REST\RestResource.cs" />
|
<Compile Include="REST\BadRequestException.cs" />
|
||||||
<Compile Include="RootFolders\RootFolderModule.cs" />
|
<Compile Include="REST\MethodNotAllowedException.cs" />
|
||||||
<Compile Include="RootFolders\RootFolderResource.cs" />
|
<Compile Include="REST\ResourceValidator.cs" />
|
||||||
<Compile Include="Movies\AlternativeTitleResource.cs" />
|
<Compile Include="REST\RestModule.cs" />
|
||||||
<Compile Include="MovieFiles\MovieFileResource.cs" />
|
<Compile Include="REST\RestResource.cs" />
|
||||||
<Compile Include="Movies\FetchMovieListModule.cs" />
|
<Compile Include="RootFolders\RootFolderModule.cs" />
|
||||||
<Compile Include="Movies\MovieLookupModule.cs" />
|
<Compile Include="RootFolders\RootFolderResource.cs" />
|
||||||
<Compile Include="Series\SeriesModule.cs" />
|
<Compile Include="Movies\AlternativeTitleResource.cs" />
|
||||||
<Compile Include="Movies\MovieResource.cs" />
|
<Compile Include="MovieFiles\MovieFileResource.cs" />
|
||||||
<Compile Include="Series\SeriesResource.cs" />
|
<Compile Include="Movies\FetchMovieListModule.cs" />
|
||||||
<Compile Include="System\Backup\BackupModule.cs" />
|
<Compile Include="Movies\MovieLookupModule.cs" />
|
||||||
<Compile Include="System\Backup\BackupResource.cs" />
|
<Compile Include="Series\SeriesModule.cs" />
|
||||||
<Compile Include="System\Tasks\TaskModule.cs" />
|
<Compile Include="Movies\MovieResource.cs" />
|
||||||
<Compile Include="System\Tasks\TaskResource.cs" />
|
<Compile Include="Series\SeriesResource.cs" />
|
||||||
<Compile Include="System\SystemModule.cs" />
|
<Compile Include="System\Backup\BackupModule.cs" />
|
||||||
<Compile Include="Tags\TagModule.cs" />
|
<Compile Include="System\Backup\BackupResource.cs" />
|
||||||
<Compile Include="Tags\TagResource.cs" />
|
<Compile Include="System\Tasks\TaskModule.cs" />
|
||||||
<Compile Include="TinyIoCNancyBootstrapper.cs" />
|
<Compile Include="System\Tasks\TaskResource.cs" />
|
||||||
<Compile Include="Update\UpdateModule.cs" />
|
<Compile Include="System\SystemModule.cs" />
|
||||||
<Compile Include="Update\UpdateResource.cs" />
|
<Compile Include="Tags\TagModule.cs" />
|
||||||
<Compile Include="Validation\NetImportSyncIntervalValidator.cs" />
|
<Compile Include="Tags\TagResource.cs" />
|
||||||
<Compile Include="Validation\RssSyncIntervalValidator.cs" />
|
<Compile Include="TinyIoCNancyBootstrapper.cs" />
|
||||||
<Compile Include="Validation\EmptyCollectionValidator.cs" />
|
<Compile Include="Update\UpdateModule.cs" />
|
||||||
<Compile Include="Validation\RuleBuilderExtensions.cs" />
|
<Compile Include="Update\UpdateResource.cs" />
|
||||||
<Compile Include="Wanted\LegacyMissingModule.cs" />
|
<Compile Include="Validation\NetImportSyncIntervalValidator.cs" />
|
||||||
<Compile Include="Wanted\MovieCutoffModule.cs" />
|
<Compile Include="Validation\RssSyncIntervalValidator.cs" />
|
||||||
<Compile Include="Wanted\MovieMissingModule.cs" />
|
<Compile Include="Validation\EmptyCollectionValidator.cs" />
|
||||||
<Compile Include="Movies\MovieDiscoverModule.cs" />
|
<Compile Include="Validation\RuleBuilderExtensions.cs" />
|
||||||
<Compile Include="NetImport\ImportExclusionsModule.cs" />
|
<Compile Include="Wanted\LegacyMissingModule.cs" />
|
||||||
<Compile Include="NetImport\ImportExclusionsResource.cs" />
|
<Compile Include="Wanted\MovieCutoffModule.cs" />
|
||||||
</ItemGroup>
|
<Compile Include="Wanted\MovieMissingModule.cs" />
|
||||||
<ItemGroup>
|
<Compile Include="Movies\MovieDiscoverModule.cs" />
|
||||||
<None Include="app.config" />
|
<Compile Include="NetImport\ImportExclusionsModule.cs" />
|
||||||
<None Include="packages.config">
|
<Compile Include="NetImport\ImportExclusionsResource.cs" />
|
||||||
<SubType>Designer</SubType>
|
</ItemGroup>
|
||||||
</None>
|
<ItemGroup>
|
||||||
</ItemGroup>
|
<None Include="app.config" />
|
||||||
<ItemGroup>
|
<None Include="packages.config">
|
||||||
<ProjectReference Include="..\Marr.Data\Marr.Data.csproj">
|
<SubType>Designer</SubType>
|
||||||
<Project>{F6FC6BE7-0847-4817-A1ED-223DC647C3D7}</Project>
|
</None>
|
||||||
<Name>Marr.Data</Name>
|
</ItemGroup>
|
||||||
</ProjectReference>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\NzbDrone.Common\NzbDrone.Common.csproj">
|
<ProjectReference Include="..\Marr.Data\Marr.Data.csproj">
|
||||||
<Project>{F2BE0FDF-6E47-4827-A420-DD4EF82407F8}</Project>
|
<Project>{F6FC6BE7-0847-4817-A1ED-223DC647C3D7}</Project>
|
||||||
<Name>NzbDrone.Common</Name>
|
<Name>Marr.Data</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\NzbDrone.Core\NzbDrone.Core.csproj">
|
<ProjectReference Include="..\NzbDrone.Common\NzbDrone.Common.csproj">
|
||||||
<Project>{FF5EE3B6-913B-47CE-9CEB-11C51B4E1205}</Project>
|
<Project>{F2BE0FDF-6E47-4827-A420-DD4EF82407F8}</Project>
|
||||||
<Name>NzbDrone.Core</Name>
|
<Name>NzbDrone.Common</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\NzbDrone.SignalR\NzbDrone.SignalR.csproj">
|
<ProjectReference Include="..\NzbDrone.Core\NzbDrone.Core.csproj">
|
||||||
<Project>{7C2CC69F-5CA0-4E5C-85CB-983F9F6C3B36}</Project>
|
<Project>{FF5EE3B6-913B-47CE-9CEB-11C51B4E1205}</Project>
|
||||||
<Name>NzbDrone.SignalR</Name>
|
<Name>NzbDrone.Core</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
<ProjectReference Include="..\NzbDrone.SignalR\NzbDrone.SignalR.csproj">
|
||||||
<ItemGroup />
|
<Project>{7C2CC69F-5CA0-4E5C-85CB-983F9F6C3B36}</Project>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Name>NzbDrone.SignalR</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup />
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
</Target>
|
</Target>
|
||||||
-->
|
-->
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
using NzbDrone.Api.Movies;
|
using NzbDrone.Api.Movies;
|
||||||
using NzbDrone.Core.Parser;
|
using NzbDrone.Core.Parser;
|
||||||
|
|
||||||
@@ -17,7 +18,8 @@ namespace NzbDrone.Api.Parse
|
|||||||
private ParseResource Parse()
|
private ParseResource Parse()
|
||||||
{
|
{
|
||||||
var title = Request.Query.Title.Value as string;
|
var title = Request.Query.Title.Value as string;
|
||||||
var parsedMovieInfo = Parser.ParseMovieTitle(title, false);
|
var parsedMovieInfo = _parsingService.ParseMovieInfo(title, new List<object>());
|
||||||
|
|
||||||
|
|
||||||
if (parsedMovieInfo == null)
|
if (parsedMovieInfo == null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
|
using NzbDrone.Common.Extensions;
|
||||||
|
using NzbDrone.Core.CustomFormats;
|
||||||
using NzbDrone.Core.Profiles;
|
using NzbDrone.Core.Profiles;
|
||||||
using NzbDrone.Core.Validation;
|
using NzbDrone.Core.Validation;
|
||||||
|
|
||||||
@@ -8,14 +11,26 @@ namespace NzbDrone.Api.Profiles
|
|||||||
public class ProfileModule : NzbDroneRestModule<ProfileResource>
|
public class ProfileModule : NzbDroneRestModule<ProfileResource>
|
||||||
{
|
{
|
||||||
private readonly IProfileService _profileService;
|
private readonly IProfileService _profileService;
|
||||||
|
private readonly ICustomFormatService _formatService;
|
||||||
|
|
||||||
public ProfileModule(IProfileService profileService)
|
public ProfileModule(IProfileService profileService, ICustomFormatService formatService)
|
||||||
{
|
{
|
||||||
_profileService = profileService;
|
_profileService = profileService;
|
||||||
|
_formatService = formatService;
|
||||||
SharedValidator.RuleFor(c => c.Name).NotEmpty();
|
SharedValidator.RuleFor(c => c.Name).NotEmpty();
|
||||||
SharedValidator.RuleFor(c => c.Cutoff).NotNull();
|
SharedValidator.RuleFor(c => c.Cutoff).NotNull();
|
||||||
SharedValidator.RuleFor(c => c.Items).MustHaveAllowedQuality();
|
SharedValidator.RuleFor(c => c.Items).MustHaveAllowedQuality();
|
||||||
SharedValidator.RuleFor(c => c.Language).ValidLanguage();
|
SharedValidator.RuleFor(c => c.Language).ValidLanguage();
|
||||||
|
SharedValidator.RuleFor(c => c.FormatItems).Must(items =>
|
||||||
|
{
|
||||||
|
var all = _formatService.All().Select(f => f.Id).ToList();
|
||||||
|
all.Add(CustomFormat.None.Id);
|
||||||
|
var ids = items.Select(i => i.Format.Id);
|
||||||
|
|
||||||
|
return all.Except(ids).Empty();
|
||||||
|
}).WithMessage("All Custom Formats and no extra ones need to be present inside your Profile! Try refreshing your browser.");
|
||||||
|
SharedValidator.RuleFor(c => c.FormatCutoff)
|
||||||
|
.Must(c => _formatService.All().Select(f => f.Id).Contains(c.Id) || c.Id == CustomFormat.None.Id).WithMessage("The Custom Format Cutoff must be a valid Custom Format! Try refreshing your browser.");
|
||||||
|
|
||||||
GetResourceAll = GetAll;
|
GetResourceAll = GetAll;
|
||||||
GetResourceById = GetById;
|
GetResourceById = GetById;
|
||||||
@@ -53,4 +68,4 @@ namespace NzbDrone.Api.Profiles
|
|||||||
return _profileService.All().ToResource();
|
return _profileService.All().ToResource();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NzbDrone.Api.REST;
|
using NzbDrone.Api.Qualities;
|
||||||
|
using NzbDrone.Api.REST;
|
||||||
using NzbDrone.Core.Parser;
|
using NzbDrone.Core.Parser;
|
||||||
using NzbDrone.Core.Profiles;
|
using NzbDrone.Core.Profiles;
|
||||||
using NzbDrone.Core.Qualities;
|
using NzbDrone.Core.Qualities;
|
||||||
@@ -13,6 +14,8 @@ namespace NzbDrone.Api.Profiles
|
|||||||
public Quality Cutoff { get; set; }
|
public Quality Cutoff { get; set; }
|
||||||
public string PreferredTags { get; set; }
|
public string PreferredTags { get; set; }
|
||||||
public List<ProfileQualityItemResource> Items { get; set; }
|
public List<ProfileQualityItemResource> Items { get; set; }
|
||||||
|
public CustomFormatResource FormatCutoff { get; set; }
|
||||||
|
public List<ProfileFormatItemResource> FormatItems { get; set; }
|
||||||
public Language Language { get; set; }
|
public Language Language { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -22,6 +25,12 @@ namespace NzbDrone.Api.Profiles
|
|||||||
public bool Allowed { get; set; }
|
public bool Allowed { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class ProfileFormatItemResource : RestResource
|
||||||
|
{
|
||||||
|
public CustomFormatResource Format { get; set; }
|
||||||
|
public bool Allowed { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public static class ProfileResourceMapper
|
public static class ProfileResourceMapper
|
||||||
{
|
{
|
||||||
public static ProfileResource ToResource(this Profile model)
|
public static ProfileResource ToResource(this Profile model)
|
||||||
@@ -36,6 +45,8 @@ namespace NzbDrone.Api.Profiles
|
|||||||
Cutoff = model.Cutoff,
|
Cutoff = model.Cutoff,
|
||||||
PreferredTags = model.PreferredTags != null ? string.Join(",", model.PreferredTags) : "",
|
PreferredTags = model.PreferredTags != null ? string.Join(",", model.PreferredTags) : "",
|
||||||
Items = model.Items.ConvertAll(ToResource),
|
Items = model.Items.ConvertAll(ToResource),
|
||||||
|
FormatCutoff = model.FormatCutoff.ToResource(),
|
||||||
|
FormatItems = model.FormatItems.ConvertAll(ToResource),
|
||||||
Language = model.Language
|
Language = model.Language
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -50,7 +61,16 @@ namespace NzbDrone.Api.Profiles
|
|||||||
Allowed = model.Allowed
|
Allowed = model.Allowed
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ProfileFormatItemResource ToResource(this ProfileFormatItem model)
|
||||||
|
{
|
||||||
|
return new ProfileFormatItemResource
|
||||||
|
{
|
||||||
|
Format = model.Format.ToResource(),
|
||||||
|
Allowed = model.Allowed
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
public static Profile ToModel(this ProfileResource resource)
|
public static Profile ToModel(this ProfileResource resource)
|
||||||
{
|
{
|
||||||
if (resource == null) return null;
|
if (resource == null) return null;
|
||||||
@@ -63,6 +83,8 @@ namespace NzbDrone.Api.Profiles
|
|||||||
Cutoff = (Quality)resource.Cutoff.Id,
|
Cutoff = (Quality)resource.Cutoff.Id,
|
||||||
PreferredTags = resource.PreferredTags.Split(',').ToList(),
|
PreferredTags = resource.PreferredTags.Split(',').ToList(),
|
||||||
Items = resource.Items.ConvertAll(ToModel),
|
Items = resource.Items.ConvertAll(ToModel),
|
||||||
|
FormatCutoff = resource.FormatCutoff.ToModel(),
|
||||||
|
FormatItems = resource.FormatItems.ConvertAll(ToModel),
|
||||||
Language = resource.Language
|
Language = resource.Language
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -78,9 +100,18 @@ namespace NzbDrone.Api.Profiles
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ProfileFormatItem ToModel(this ProfileFormatItemResource resource)
|
||||||
|
{
|
||||||
|
return new ProfileFormatItem
|
||||||
|
{
|
||||||
|
Format = resource.Format.ToModel(),
|
||||||
|
Allowed = resource.Allowed
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
public static List<ProfileResource> ToResource(this IEnumerable<Profile> models)
|
public static List<ProfileResource> ToResource(this IEnumerable<Profile> models)
|
||||||
{
|
{
|
||||||
return models.Select(ToResource).ToList();
|
return models.Select(ToResource).ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NzbDrone.Core.Parser;
|
using NzbDrone.Core.CustomFormats;
|
||||||
|
using NzbDrone.Core.Parser;
|
||||||
using NzbDrone.Core.Profiles;
|
using NzbDrone.Core.Profiles;
|
||||||
using NzbDrone.Core.Qualities;
|
using NzbDrone.Core.Qualities;
|
||||||
|
|
||||||
@@ -9,11 +10,13 @@ namespace NzbDrone.Api.Profiles
|
|||||||
public class ProfileSchemaModule : NzbDroneRestModule<ProfileResource>
|
public class ProfileSchemaModule : NzbDroneRestModule<ProfileResource>
|
||||||
{
|
{
|
||||||
private readonly IQualityDefinitionService _qualityDefinitionService;
|
private readonly IQualityDefinitionService _qualityDefinitionService;
|
||||||
|
private readonly ICustomFormatService _formatService;
|
||||||
|
|
||||||
public ProfileSchemaModule(IQualityDefinitionService qualityDefinitionService)
|
public ProfileSchemaModule(IQualityDefinitionService qualityDefinitionService, ICustomFormatService formatService)
|
||||||
: base("/profile/schema")
|
: base("/profile/schema")
|
||||||
{
|
{
|
||||||
_qualityDefinitionService = qualityDefinitionService;
|
_qualityDefinitionService = qualityDefinitionService;
|
||||||
|
_formatService = formatService;
|
||||||
|
|
||||||
GetResourceAll = GetAll;
|
GetResourceAll = GetAll;
|
||||||
}
|
}
|
||||||
@@ -25,12 +28,25 @@ namespace NzbDrone.Api.Profiles
|
|||||||
.Select(v => new ProfileQualityItem { Quality = v.Quality, Allowed = false })
|
.Select(v => new ProfileQualityItem { Quality = v.Quality, Allowed = false })
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
var formatItems = _formatService.All().Select(v => new ProfileFormatItem
|
||||||
|
{
|
||||||
|
Format = v, Allowed = true
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
|
formatItems.Insert(0, new ProfileFormatItem
|
||||||
|
{
|
||||||
|
Format = CustomFormat.None,
|
||||||
|
Allowed = true
|
||||||
|
});
|
||||||
|
|
||||||
var profile = new Profile();
|
var profile = new Profile();
|
||||||
profile.Cutoff = Quality.Unknown;
|
profile.Cutoff = Quality.Unknown;
|
||||||
profile.Items = items;
|
profile.Items = items;
|
||||||
|
profile.FormatCutoff = CustomFormat.None;
|
||||||
|
profile.FormatItems = formatItems;
|
||||||
profile.Language = Language.English;
|
profile.Language = Language.English;
|
||||||
|
|
||||||
return new List<ProfileResource> { profile.ToResource() };
|
return new List<ProfileResource> { profile.ToResource() };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,132 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using FluentValidation;
|
||||||
|
using Nancy;
|
||||||
|
using NzbDrone.Api.Extensions;
|
||||||
|
using NzbDrone.Api.Validation;
|
||||||
|
using NzbDrone.Core.CustomFormats;
|
||||||
|
using NzbDrone.Core.Parser;
|
||||||
|
|
||||||
|
namespace NzbDrone.Api.Qualities
|
||||||
|
{
|
||||||
|
public class CustomFormatModule : NzbDroneRestModule<CustomFormatResource>
|
||||||
|
{
|
||||||
|
private readonly ICustomFormatService _formatService;
|
||||||
|
private readonly IParsingService _parsingService;
|
||||||
|
|
||||||
|
public CustomFormatModule(ICustomFormatService formatService, IParsingService parsingService)
|
||||||
|
{
|
||||||
|
_formatService = formatService;
|
||||||
|
_parsingService = parsingService;
|
||||||
|
|
||||||
|
SharedValidator.RuleFor(c => c.Name).NotEmpty();
|
||||||
|
SharedValidator.RuleFor(c => c.Name)
|
||||||
|
.Must((v, c) => !_formatService.All().Any(f => f.Name == c && f.Id != v.Id)).WithMessage("Must be unique.");
|
||||||
|
SharedValidator.RuleFor(c => c.FormatTags).AreValidFormatTags();
|
||||||
|
SharedValidator.RuleFor(c => c.FormatTags).Must((v, c) =>
|
||||||
|
{
|
||||||
|
var allFormats = _formatService.All();
|
||||||
|
return !allFormats.Any(f =>
|
||||||
|
{
|
||||||
|
var allTags = f.FormatTags.Select(t => t.Raw.ToLower());
|
||||||
|
var allNewTags = c.Select(t => t.ToLower());
|
||||||
|
var enumerable = allTags.ToList();
|
||||||
|
var newTags = allNewTags.ToList();
|
||||||
|
return (enumerable.All(newTags.Contains) && f.Id != v.Id && enumerable.Count() == newTags.Count());
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.WithMessage("Should be unique.");
|
||||||
|
|
||||||
|
GetResourceAll = GetAll;
|
||||||
|
|
||||||
|
GetResourceById = GetById;
|
||||||
|
|
||||||
|
UpdateResource = Update;
|
||||||
|
|
||||||
|
CreateResource = Create;
|
||||||
|
|
||||||
|
DeleteResource = Delete;
|
||||||
|
|
||||||
|
Get["/test"] = x => Test();
|
||||||
|
|
||||||
|
Post["/test"] = x => TestWithNewModel();
|
||||||
|
|
||||||
|
Get["schema"] = x => GetTemplates();
|
||||||
|
}
|
||||||
|
|
||||||
|
private int Create(CustomFormatResource customFormatResource)
|
||||||
|
{
|
||||||
|
var model = customFormatResource.ToModel();
|
||||||
|
return _formatService.Insert(model).Id;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Update(CustomFormatResource resource)
|
||||||
|
{
|
||||||
|
var model = resource.ToModel();
|
||||||
|
_formatService.Update(model);
|
||||||
|
}
|
||||||
|
|
||||||
|
private CustomFormatResource GetById(int id)
|
||||||
|
{
|
||||||
|
return _formatService.GetById(id).ToResource();
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<CustomFormatResource> GetAll()
|
||||||
|
{
|
||||||
|
return _formatService.All().ToResource();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Delete(int id)
|
||||||
|
{
|
||||||
|
_formatService.Delete(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Response GetTemplates()
|
||||||
|
{
|
||||||
|
return CustomFormatService.Templates.SelectMany(t =>
|
||||||
|
{
|
||||||
|
return t.Value.Select(m =>
|
||||||
|
{
|
||||||
|
var r = m.ToResource();
|
||||||
|
r.Simplicity = t.Key;
|
||||||
|
return r;
|
||||||
|
});
|
||||||
|
}).AsResponse();
|
||||||
|
}
|
||||||
|
|
||||||
|
private CustomFormatTestResource Test()
|
||||||
|
{
|
||||||
|
var parsed = _parsingService.ParseMovieInfo((string) Request.Query.title, new List<object>());
|
||||||
|
if (parsed == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return new CustomFormatTestResource
|
||||||
|
{
|
||||||
|
Matches = _parsingService.MatchFormatTags(parsed).ToResource(),
|
||||||
|
MatchedFormats = parsed.Quality.CustomFormats.ToResource()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private CustomFormatTestResource TestWithNewModel()
|
||||||
|
{
|
||||||
|
var queryTitle = (string) Request.Query.title;
|
||||||
|
|
||||||
|
var resource = ReadResourceFromRequest();
|
||||||
|
|
||||||
|
var model = resource.ToModel();
|
||||||
|
model.Name = model.Name += " (New)";
|
||||||
|
|
||||||
|
var parsed = _parsingService.ParseMovieInfo(queryTitle, new List<object>{model});
|
||||||
|
if (parsed == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return new CustomFormatTestResource
|
||||||
|
{
|
||||||
|
Matches = _parsingService.MatchFormatTags(parsed).ToResource(),
|
||||||
|
MatchedFormats = parsed.Quality.CustomFormats.ToResource()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using NzbDrone.Api.REST;
|
||||||
|
using NzbDrone.Core.CustomFormats;
|
||||||
|
|
||||||
|
namespace NzbDrone.Api.Qualities
|
||||||
|
{
|
||||||
|
public class CustomFormatResource : RestResource
|
||||||
|
{
|
||||||
|
public string Name { get; set; }
|
||||||
|
public List<string> FormatTags { get; set; }
|
||||||
|
public string Simplicity { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class CustomFormatResourceMapper
|
||||||
|
{
|
||||||
|
public static CustomFormatResource ToResource(this CustomFormat model)
|
||||||
|
{
|
||||||
|
return new CustomFormatResource
|
||||||
|
{
|
||||||
|
Id = model.Id,
|
||||||
|
Name = model.Name,
|
||||||
|
FormatTags = model.FormatTags.Select(t => t.Raw.ToUpper()).ToList(),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public static CustomFormat ToModel(this CustomFormatResource resource)
|
||||||
|
{
|
||||||
|
return new CustomFormat
|
||||||
|
{
|
||||||
|
Id = resource.Id,
|
||||||
|
Name = resource.Name,
|
||||||
|
FormatTags = resource.FormatTags.Select(s => new FormatTag(s)).ToList(),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<CustomFormatResource> ToResource(this IEnumerable<CustomFormat> models)
|
||||||
|
{
|
||||||
|
return models.Select(m => m.ToResource()).ToList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using NzbDrone.Api.REST;
|
||||||
|
using NzbDrone.Common.Extensions;
|
||||||
|
using NzbDrone.Core.CustomFormats;
|
||||||
|
using NzbDrone.Core.Qualities;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace NzbDrone.Api.Qualities
|
||||||
|
{
|
||||||
|
public class FormatTagMatchResultResource : RestResource
|
||||||
|
{
|
||||||
|
public CustomFormatResource CustomFormat { get; set; }
|
||||||
|
public List<FormatTagGroupMatchesResource> GroupMatches { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class FormatTagGroupMatchesResource : RestResource
|
||||||
|
{
|
||||||
|
public string GroupName { get; set; }
|
||||||
|
public IDictionary<string, bool> Matches { get; set; }
|
||||||
|
public bool DidMatch { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CustomFormatTestResource : RestResource
|
||||||
|
{
|
||||||
|
public List<FormatTagMatchResultResource> Matches { get; set; }
|
||||||
|
public List<CustomFormatResource> MatchedFormats { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class QualityTagMatchResultResourceMapper
|
||||||
|
{
|
||||||
|
public static FormatTagMatchResultResource ToResource(this FormatTagMatchResult model)
|
||||||
|
{
|
||||||
|
if (model == null) return null;
|
||||||
|
|
||||||
|
return new FormatTagMatchResultResource
|
||||||
|
{
|
||||||
|
CustomFormat = model.CustomFormat.ToResource(),
|
||||||
|
GroupMatches = model.GroupMatches.ToResource()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<FormatTagMatchResultResource> ToResource(this IList<FormatTagMatchResult> models)
|
||||||
|
{
|
||||||
|
return models.Select(ToResource).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static FormatTagGroupMatchesResource ToResource(this FormatTagMatchesGroup model)
|
||||||
|
{
|
||||||
|
return new FormatTagGroupMatchesResource
|
||||||
|
{
|
||||||
|
GroupName = model.Type.ToString(),
|
||||||
|
DidMatch = model.DidMatch,
|
||||||
|
Matches = model.Matches.SelectDictionary(m => m.Key.Raw, m => m.Value)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<FormatTagGroupMatchesResource> ToResource(this IList<FormatTagMatchesGroup> models)
|
||||||
|
{
|
||||||
|
return models.Select(ToResource).ToList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using FluentValidation.Validators;
|
||||||
|
using NzbDrone.Core.CustomFormats;
|
||||||
|
|
||||||
|
namespace NzbDrone.Api.Qualities
|
||||||
|
{
|
||||||
|
public class FormatTagValidator : PropertyValidator
|
||||||
|
{
|
||||||
|
public FormatTagValidator() : base("{ValidationMessage}")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override bool IsValid(PropertyValidatorContext context)
|
||||||
|
{
|
||||||
|
if (context.PropertyValue == null)
|
||||||
|
{
|
||||||
|
context.SetMessage("Format Tags cannot be null!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var tags = (IEnumerable<string>) context.PropertyValue;
|
||||||
|
|
||||||
|
var invalidTags = tags.Where(t => !FormatTag.QualityTagRegex.IsMatch(t));
|
||||||
|
|
||||||
|
if (invalidTags.Count() == 0) return true;
|
||||||
|
|
||||||
|
var formatMessage =
|
||||||
|
$"Format Tags ({string.Join(", ", invalidTags)}) are in an invalid format! Check the Wiki to learn how they should look.";
|
||||||
|
context.SetMessage(formatMessage);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class PropertyValidatorExtensions
|
||||||
|
{
|
||||||
|
public static void SetMessage(this PropertyValidatorContext context, string message, string argument = "ValidationMessage")
|
||||||
|
{
|
||||||
|
context.MessageFormatter.AppendArgument(argument, message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,8 @@
|
|||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using NzbDrone.Api.REST;
|
||||||
|
using NzbDrone.Core.Parser;
|
||||||
|
using NzbDrone.Core.Parser.Model;
|
||||||
using NzbDrone.Core.Qualities;
|
using NzbDrone.Core.Qualities;
|
||||||
|
|
||||||
namespace NzbDrone.Api.Qualities
|
namespace NzbDrone.Api.Qualities
|
||||||
@@ -6,16 +10,25 @@ namespace NzbDrone.Api.Qualities
|
|||||||
public class QualityDefinitionModule : NzbDroneRestModule<QualityDefinitionResource>
|
public class QualityDefinitionModule : NzbDroneRestModule<QualityDefinitionResource>
|
||||||
{
|
{
|
||||||
private readonly IQualityDefinitionService _qualityDefinitionService;
|
private readonly IQualityDefinitionService _qualityDefinitionService;
|
||||||
|
private readonly IParsingService _parsingService;
|
||||||
|
|
||||||
public QualityDefinitionModule(IQualityDefinitionService qualityDefinitionService)
|
public QualityDefinitionModule(IQualityDefinitionService qualityDefinitionService, IParsingService parsingService)
|
||||||
{
|
{
|
||||||
_qualityDefinitionService = qualityDefinitionService;
|
_qualityDefinitionService = qualityDefinitionService;
|
||||||
|
_parsingService = parsingService;
|
||||||
|
|
||||||
GetResourceAll = GetAll;
|
GetResourceAll = GetAll;
|
||||||
|
|
||||||
GetResourceById = GetById;
|
GetResourceById = GetById;
|
||||||
|
|
||||||
UpdateResource = Update;
|
UpdateResource = Update;
|
||||||
|
|
||||||
|
CreateResource = Create;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int Create(QualityDefinitionResource qualityDefinitionResource)
|
||||||
|
{
|
||||||
|
throw new BadRequestException("Not allowed!");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update(QualityDefinitionResource resource)
|
private void Update(QualityDefinitionResource resource)
|
||||||
@@ -34,4 +47,4 @@ namespace NzbDrone.Api.Qualities
|
|||||||
return _qualityDefinitionService.All().ToResource();
|
return _qualityDefinitionService.All().ToResource();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ namespace NzbDrone.Api.Qualities
|
|||||||
Weight = model.Weight,
|
Weight = model.Weight,
|
||||||
|
|
||||||
MinSize = model.MinSize,
|
MinSize = model.MinSize,
|
||||||
MaxSize = model.MaxSize
|
MaxSize = model.MaxSize,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ namespace NzbDrone.Api.Qualities
|
|||||||
Weight = resource.Weight,
|
Weight = resource.Weight,
|
||||||
|
|
||||||
MinSize = resource.MinSize,
|
MinSize = resource.MinSize,
|
||||||
MaxSize = resource.MaxSize
|
MaxSize = resource.MaxSize,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,4 +62,4 @@ namespace NzbDrone.Api.Qualities
|
|||||||
return models.Select(ToResource).ToList();
|
return models.Select(ToResource).ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ namespace NzbDrone.Api.RootFolders
|
|||||||
|
|
||||||
private List<RootFolderResource> GetRootFolders()
|
private List<RootFolderResource> GetRootFolders()
|
||||||
{
|
{
|
||||||
return _rootFolderService.AllWithUnmappedFolders().ToResource();
|
return _rootFolderService.AllWithSpace().ToResource();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DeleteFolder(int id)
|
private void DeleteFolder(int id)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using NzbDrone.SignalR;
|
|||||||
namespace NzbDrone.Api.Series
|
namespace NzbDrone.Api.Series
|
||||||
{
|
{
|
||||||
[Obsolete("SeriesModule is Obsolete, Remove with new UI")]
|
[Obsolete("SeriesModule is Obsolete, Remove with new UI")]
|
||||||
public class SeriesModule : NzbDroneRestModuleWithSignalR<SeriesResource, Core.Tv.Series>
|
public class SeriesModule : NzbDroneRestModuleWithSignalR<SeriesResource, Core.Movies.Movie>
|
||||||
|
|
||||||
{
|
{
|
||||||
public SeriesModule(IBroadcastSignalRMessage signalRBroadcaster
|
public SeriesModule(IBroadcastSignalRMessage signalRBroadcaster
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
using FluentValidation.Validators;
|
using FluentValidation.Validators;
|
||||||
|
using NzbDrone.Api.Qualities;
|
||||||
|
|
||||||
namespace NzbDrone.Api.Validation
|
namespace NzbDrone.Api.Validation
|
||||||
{
|
{
|
||||||
@@ -41,5 +42,11 @@ namespace NzbDrone.Api.Validation
|
|||||||
{
|
{
|
||||||
return ruleBuilder.SetValidator(new NetImportSyncIntervalValidator());
|
return ruleBuilder.SetValidator(new NetImportSyncIntervalValidator());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static IRuleBuilderOptions<T, IEnumerable<TProp>> AreValidFormatTags<T, TProp>(
|
||||||
|
this IRuleBuilder<T, IEnumerable<TProp>> ruleBuilder)
|
||||||
|
{
|
||||||
|
return ruleBuilder.SetValidator(new FormatTagValidator());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using NzbDrone.Api.Movies;
|
using NzbDrone.Api.Movies;
|
||||||
using NzbDrone.Core.DecisionEngine;
|
using NzbDrone.Core.DecisionEngine;
|
||||||
using NzbDrone.Core.Tv;
|
using NzbDrone.Core.Movies;
|
||||||
using NzbDrone.Core.Datastore;
|
using NzbDrone.Core.Datastore;
|
||||||
using NzbDrone.SignalR;
|
using NzbDrone.SignalR;
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ namespace NzbDrone.Api.Wanted
|
|||||||
|
|
||||||
private PagingResource<MovieResource> GetCutoffUnmetMovies(PagingResource<MovieResource> pagingResource)
|
private PagingResource<MovieResource> GetCutoffUnmetMovies(PagingResource<MovieResource> pagingResource)
|
||||||
{
|
{
|
||||||
var pagingSpec = pagingResource.MapToPagingSpec<MovieResource, Core.Tv.Movie>("title", SortDirection.Ascending);
|
var pagingSpec = pagingResource.MapToPagingSpec<MovieResource, Core.Movies.Movie>("title", SortDirection.Ascending);
|
||||||
|
|
||||||
pagingSpec.FilterExpression = _movieService.ConstructFilterExpression(pagingResource.FilterKey, pagingResource.FilterValue);
|
pagingSpec.FilterExpression = _movieService.ConstructFilterExpression(pagingResource.FilterKey, pagingResource.FilterValue);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using NzbDrone.Api.Movies;
|
using NzbDrone.Api.Movies;
|
||||||
using NzbDrone.Core.DecisionEngine;
|
using NzbDrone.Core.DecisionEngine;
|
||||||
using NzbDrone.Core.Tv;
|
using NzbDrone.Core.Movies;
|
||||||
using NzbDrone.Core.Datastore;
|
using NzbDrone.Core.Datastore;
|
||||||
using NzbDrone.SignalR;
|
using NzbDrone.SignalR;
|
||||||
using NzbDrone.Core.Download;
|
using NzbDrone.Core.Download;
|
||||||
@@ -27,7 +27,7 @@ namespace NzbDrone.Api.Wanted
|
|||||||
|
|
||||||
private PagingResource<MovieResource> GetMissingMovies(PagingResource<MovieResource> pagingResource)
|
private PagingResource<MovieResource> GetMissingMovies(PagingResource<MovieResource> pagingResource)
|
||||||
{
|
{
|
||||||
var pagingSpec = pagingResource.MapToPagingSpec<MovieResource, Core.Tv.Movie>("title", SortDirection.Descending);
|
var pagingSpec = pagingResource.MapToPagingSpec<MovieResource, Core.Movies.Movie>("title", SortDirection.Descending);
|
||||||
|
|
||||||
pagingSpec.FilterExpression = _movieService.ConstructFilterExpression(pagingResource.FilterKey, pagingResource.FilterValue);
|
pagingSpec.FilterExpression = _movieService.ConstructFilterExpression(pagingResource.FilterKey, pagingResource.FilterValue);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using NzbDrone.Common;
|
using NzbDrone.Common;
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
using NzbDrone.Common.EnvironmentInfo;
|
||||||
@@ -77,8 +77,8 @@ namespace NzbDrone.App.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void should_return_same_instance_of_singletons_by_different_same_interface()
|
public void should_return_same_instance_of_singletons_by_different_same_interface()
|
||||||
{
|
{
|
||||||
var first = _container.ResolveAll<IHandle<EpisodeGrabbedEvent>>().OfType<DownloadMonitoringService>().Single();
|
var first = _container.ResolveAll<IHandle<MovieGrabbedEvent>>().OfType<DownloadMonitoringService>().Single();
|
||||||
var second = _container.ResolveAll<IHandle<EpisodeGrabbedEvent>>().OfType<DownloadMonitoringService>().Single();
|
var second = _container.ResolveAll<IHandle<MovieGrabbedEvent>>().OfType<DownloadMonitoringService>().Single();
|
||||||
|
|
||||||
first.Should().BeSameAs(second);
|
first.Should().BeSameAs(second);
|
||||||
}
|
}
|
||||||
@@ -86,10 +86,10 @@ namespace NzbDrone.App.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void should_return_same_instance_of_singletons_by_different_interfaces()
|
public void should_return_same_instance_of_singletons_by_different_interfaces()
|
||||||
{
|
{
|
||||||
var first = _container.ResolveAll<IHandle<EpisodeGrabbedEvent>>().OfType<DownloadMonitoringService>().Single();
|
var first = _container.ResolveAll<IHandle<MovieGrabbedEvent>>().OfType<DownloadMonitoringService>().Single();
|
||||||
var second = (DownloadMonitoringService)_container.Resolve<IExecute<CheckForFinishedDownloadCommand>>();
|
var second = (DownloadMonitoringService)_container.Resolve<IExecute<CheckForFinishedDownloadCommand>>();
|
||||||
|
|
||||||
first.Should().BeSameAs(second);
|
first.Should().BeSameAs(second);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,6 +111,9 @@
|
|||||||
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
|
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<Target Name="Build">
|
||||||
|
<MSBuild Projects="@(ProjectReference)" Targets="Build" />
|
||||||
|
</Target>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent Condition="('$(OS)' == 'Windows_NT')">
|
<PostBuildEvent Condition="('$(OS)' == 'Windows_NT')">
|
||||||
xcopy /s /y "$(SolutionDir)\..\_output\NzbDrone.Mono.*" "$(TargetDir)"
|
xcopy /s /y "$(SolutionDir)\..\_output\NzbDrone.Mono.*" "$(TargetDir)"
|
||||||
@@ -121,11 +124,11 @@
|
|||||||
cp -rv $(SolutionDir)\..\_output\NzbDrone.Windows.* $(TargetDir)
|
cp -rv $(SolutionDir)\..\_output\NzbDrone.Windows.* $(TargetDir)
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
</Target>
|
</Target>
|
||||||
-->
|
-->
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ namespace NzbDrone.Common.Test.DiskTests
|
|||||||
{
|
{
|
||||||
public abstract class FreeSpaceFixtureBase<TSubject> : TestBase<TSubject> where TSubject : class, IDiskProvider
|
public abstract class FreeSpaceFixtureBase<TSubject> : TestBase<TSubject> where TSubject : class, IDiskProvider
|
||||||
{
|
{
|
||||||
|
[Ignore("Docker")]
|
||||||
[Test]
|
[Test]
|
||||||
public void should_get_free_space_for_folder()
|
public void should_get_free_space_for_folder()
|
||||||
{
|
{
|
||||||
@@ -17,6 +18,7 @@ namespace NzbDrone.Common.Test.DiskTests
|
|||||||
Subject.GetAvailableSpace(path).Should().NotBe(0);
|
Subject.GetAvailableSpace(path).Should().NotBe(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Ignore("Docker")]
|
||||||
[Test]
|
[Test]
|
||||||
public void should_get_free_space_for_folder_that_doesnt_exist()
|
public void should_get_free_space_for_folder_that_doesnt_exist()
|
||||||
{
|
{
|
||||||
@@ -25,6 +27,7 @@ namespace NzbDrone.Common.Test.DiskTests
|
|||||||
Subject.GetAvailableSpace(Path.Combine(path, "invalidFolder")).Should().NotBe(0);
|
Subject.GetAvailableSpace(Path.Combine(path, "invalidFolder")).Should().NotBe(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Ignore("Docker")]
|
||||||
[Test]
|
[Test]
|
||||||
public void should_be_able_to_check_space_on_ramdrive()
|
public void should_be_able_to_check_space_on_ramdrive()
|
||||||
{
|
{
|
||||||
@@ -32,6 +35,7 @@ namespace NzbDrone.Common.Test.DiskTests
|
|||||||
Subject.GetAvailableSpace("/").Should().NotBe(0);
|
Subject.GetAvailableSpace("/").Should().NotBe(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Ignore("Docker")]
|
||||||
[Test]
|
[Test]
|
||||||
public void should_return_free_disk_space()
|
public void should_return_free_disk_space()
|
||||||
{
|
{
|
||||||
@@ -58,7 +62,7 @@ namespace NzbDrone.Common.Test.DiskTests
|
|||||||
{
|
{
|
||||||
if (new DriveInfo(driveletter.ToString()).IsReady)
|
if (new DriveInfo(driveletter.ToString()).IsReady)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Assert.Throws<DirectoryNotFoundException>(() => Subject.GetAvailableSpace(driveletter + @":\NOT_A_REAL_PATH\DOES_NOT_EXIST".AsOsAgnostic()));
|
Assert.Throws<DirectoryNotFoundException>(() => Subject.GetAvailableSpace(driveletter + @":\NOT_A_REAL_PATH\DOES_NOT_EXIST".AsOsAgnostic()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -66,6 +70,7 @@ namespace NzbDrone.Common.Test.DiskTests
|
|||||||
Assert.Inconclusive("No drive available for testing.");
|
Assert.Inconclusive("No drive available for testing.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Ignore("Docker")]
|
||||||
[Test]
|
[Test]
|
||||||
public void should_be_able_to_get_space_on_folder_that_doesnt_exist()
|
public void should_be_able_to_get_space_on_folder_that_doesnt_exist()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -273,19 +273,74 @@ namespace NzbDrone.Common.Test.Http
|
|||||||
response.Resource.Headers.Should().NotContainKey("Cookie");
|
response.Resource.Headers.Should().NotContainKey("Cookie");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void should_not_store_request_cookie()
|
||||||
|
{
|
||||||
|
var requestGet = new HttpRequest($"http://{_httpBinHost}/get");
|
||||||
|
requestGet.Cookies.Add("my", "cookie");
|
||||||
|
requestGet.AllowAutoRedirect = false;
|
||||||
|
requestGet.StoreRequestCookie = false;
|
||||||
|
requestGet.StoreResponseCookie = false;
|
||||||
|
var responseGet = Subject.Get<HttpBinResource>(requestGet);
|
||||||
|
|
||||||
|
var requestCookies = new HttpRequest($"http://{_httpBinHost}/cookies");
|
||||||
|
requestCookies.AllowAutoRedirect = false;
|
||||||
|
var responseCookies = Subject.Get<HttpCookieResource>(requestCookies);
|
||||||
|
|
||||||
|
responseCookies.Resource.Cookies.Should().BeEmpty();
|
||||||
|
|
||||||
|
ExceptionVerification.IgnoreErrors();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void should_store_request_cookie()
|
||||||
|
{
|
||||||
|
var requestGet = new HttpRequest($"http://{_httpBinHost}/get");
|
||||||
|
requestGet.Cookies.Add("my", "cookie");
|
||||||
|
requestGet.AllowAutoRedirect = false;
|
||||||
|
requestGet.StoreRequestCookie.Should().BeTrue();
|
||||||
|
requestGet.StoreResponseCookie = false;
|
||||||
|
var responseGet = Subject.Get<HttpBinResource>(requestGet);
|
||||||
|
|
||||||
|
var requestCookies = new HttpRequest($"http://{_httpBinHost}/cookies");
|
||||||
|
requestCookies.AllowAutoRedirect = false;
|
||||||
|
var responseCookies = Subject.Get<HttpCookieResource>(requestCookies);
|
||||||
|
|
||||||
|
responseCookies.Resource.Cookies.Should().HaveCount(1).And.Contain("my", "cookie");
|
||||||
|
|
||||||
|
ExceptionVerification.IgnoreErrors();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void should_delete_request_cookie()
|
||||||
|
{
|
||||||
|
var requestDelete = new HttpRequest($"http://{_httpBinHost}/cookies/delete?my");
|
||||||
|
requestDelete.Cookies.Add("my", "cookie");
|
||||||
|
requestDelete.AllowAutoRedirect = true;
|
||||||
|
requestDelete.StoreRequestCookie = false;
|
||||||
|
requestDelete.StoreResponseCookie = false;
|
||||||
|
|
||||||
|
// Delete and redirect since that's the only way to check the internal temporary cookie container
|
||||||
|
var responseCookies = Subject.Get<HttpCookieResource>(requestDelete);
|
||||||
|
|
||||||
|
responseCookies.Resource.Cookies.Should().BeEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void should_not_store_response_cookie()
|
public void should_not_store_response_cookie()
|
||||||
{
|
{
|
||||||
var requestSet = new HttpRequest(string.Format("http://{0}/cookies/set?my=cookie", _httpBinHost));
|
var requestSet = new HttpRequest(string.Format("http://{0}/cookies/set?my=cookie", _httpBinHost));
|
||||||
requestSet.AllowAutoRedirect = false;
|
requestSet.AllowAutoRedirect = false;
|
||||||
|
requestSet.StoreRequestCookie = false;
|
||||||
|
requestSet.StoreResponseCookie.Should().BeFalse();
|
||||||
|
|
||||||
var responseSet = Subject.Get(requestSet);
|
var responseSet = Subject.Get(requestSet);
|
||||||
|
|
||||||
var request = new HttpRequest(string.Format("http://{0}/get", _httpBinHost));
|
var requestCookies = new HttpRequest($"http://{_httpBinHost}/cookies");
|
||||||
|
|
||||||
var response = Subject.Get<HttpBinResource>(request);
|
var responseCookies = Subject.Get<HttpCookieResource>(requestCookies);
|
||||||
|
|
||||||
response.Resource.Headers.Should().NotContainKey("Cookie");
|
responseCookies.Resource.Cookies.Should().BeEmpty();
|
||||||
|
|
||||||
ExceptionVerification.IgnoreErrors();
|
ExceptionVerification.IgnoreErrors();
|
||||||
}
|
}
|
||||||
@@ -295,19 +350,31 @@ namespace NzbDrone.Common.Test.Http
|
|||||||
{
|
{
|
||||||
var requestSet = new HttpRequest(string.Format("http://{0}/cookies/set?my=cookie", _httpBinHost));
|
var requestSet = new HttpRequest(string.Format("http://{0}/cookies/set?my=cookie", _httpBinHost));
|
||||||
requestSet.AllowAutoRedirect = false;
|
requestSet.AllowAutoRedirect = false;
|
||||||
|
requestSet.StoreRequestCookie = false;
|
||||||
requestSet.StoreResponseCookie = true;
|
requestSet.StoreResponseCookie = true;
|
||||||
|
|
||||||
var responseSet = Subject.Get(requestSet);
|
var responseSet = Subject.Get(requestSet);
|
||||||
|
|
||||||
var request = new HttpRequest(string.Format("http://{0}/get", _httpBinHost));
|
var requestCookies = new HttpRequest($"http://{_httpBinHost}/cookies");
|
||||||
|
|
||||||
var response = Subject.Get<HttpBinResource>(request);
|
var responseCookies = Subject.Get<HttpCookieResource>(requestCookies);
|
||||||
|
|
||||||
response.Resource.Headers.Should().ContainKey("Cookie");
|
responseCookies.Resource.Cookies.Should().HaveCount(1).And.Contain("my", "cookie");
|
||||||
|
|
||||||
var cookie = response.Resource.Headers["Cookie"].ToString();
|
ExceptionVerification.IgnoreErrors();
|
||||||
|
}
|
||||||
|
|
||||||
cookie.Should().Contain("my=cookie");
|
[Test]
|
||||||
|
public void should_temp_store_response_cookie()
|
||||||
|
{
|
||||||
|
var requestSet = new HttpRequest($"http://{_httpBinHost}/cookies/set?my=cookie");
|
||||||
|
requestSet.AllowAutoRedirect = true;
|
||||||
|
requestSet.StoreRequestCookie = false;
|
||||||
|
requestSet.StoreResponseCookie.Should().BeFalse();
|
||||||
|
var responseSet = Subject.Get<HttpCookieResource>(requestSet);
|
||||||
|
|
||||||
|
// Set and redirect since that's the only way to check the internal temporary cookie container
|
||||||
|
responseSet.Resource.Cookies.Should().HaveCount(1).And.Contain("my", "cookie");
|
||||||
|
|
||||||
ExceptionVerification.IgnoreErrors();
|
ExceptionVerification.IgnoreErrors();
|
||||||
}
|
}
|
||||||
@@ -315,26 +382,148 @@ namespace NzbDrone.Common.Test.Http
|
|||||||
[Test]
|
[Test]
|
||||||
public void should_overwrite_response_cookie()
|
public void should_overwrite_response_cookie()
|
||||||
{
|
{
|
||||||
var requestSet = new HttpRequest(string.Format("http://{0}/cookies/set?my=cookie", _httpBinHost));
|
var requestSet = new HttpRequest($"http://{_httpBinHost}/cookies/set?my=cookie");
|
||||||
|
requestSet.Cookies.Add("my", "oldcookie");
|
||||||
requestSet.AllowAutoRedirect = false;
|
requestSet.AllowAutoRedirect = false;
|
||||||
|
requestSet.StoreRequestCookie = false;
|
||||||
requestSet.StoreResponseCookie = true;
|
requestSet.StoreResponseCookie = true;
|
||||||
requestSet.Cookies["my"] = "oldcookie";
|
|
||||||
|
|
||||||
var responseSet = Subject.Get(requestSet);
|
var responseSet = Subject.Get(requestSet);
|
||||||
|
|
||||||
var request = new HttpRequest(string.Format("http://{0}/get", _httpBinHost));
|
var requestCookies = new HttpRequest($"http://{_httpBinHost}/cookies");
|
||||||
|
|
||||||
var response = Subject.Get<HttpBinResource>(request);
|
var responseCookies = Subject.Get<HttpCookieResource>(requestCookies);
|
||||||
|
|
||||||
response.Resource.Headers.Should().ContainKey("Cookie");
|
responseCookies.Resource.Cookies.Should().HaveCount(1).And.Contain("my", "cookie");
|
||||||
|
|
||||||
var cookie = response.Resource.Headers["Cookie"].ToString();
|
|
||||||
|
|
||||||
cookie.Should().Contain("my=cookie");
|
|
||||||
|
|
||||||
ExceptionVerification.IgnoreErrors();
|
ExceptionVerification.IgnoreErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void should_overwrite_temp_response_cookie()
|
||||||
|
{
|
||||||
|
var requestSet = new HttpRequest($"http://{_httpBinHost}/cookies/set?my=cookie");
|
||||||
|
requestSet.Cookies.Add("my", "oldcookie");
|
||||||
|
requestSet.AllowAutoRedirect = true;
|
||||||
|
requestSet.StoreRequestCookie = true;
|
||||||
|
requestSet.StoreResponseCookie = false;
|
||||||
|
|
||||||
|
var responseSet = Subject.Get<HttpCookieResource>(requestSet);
|
||||||
|
|
||||||
|
responseSet.Resource.Cookies.Should().HaveCount(1).And.Contain("my", "cookie");
|
||||||
|
|
||||||
|
var requestCookies = new HttpRequest($"http://{_httpBinHost}/cookies");
|
||||||
|
|
||||||
|
var responseCookies = Subject.Get<HttpCookieResource>(requestCookies);
|
||||||
|
|
||||||
|
responseCookies.Resource.Cookies.Should().HaveCount(1).And.Contain("my", "oldcookie");
|
||||||
|
|
||||||
|
ExceptionVerification.IgnoreErrors();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void should_not_delete_response_cookie()
|
||||||
|
{
|
||||||
|
var requestCookies = new HttpRequest($"http://{_httpBinHost}/cookies");
|
||||||
|
requestCookies.Cookies.Add("my", "cookie");
|
||||||
|
requestCookies.AllowAutoRedirect = false;
|
||||||
|
requestCookies.StoreRequestCookie = true;
|
||||||
|
requestCookies.StoreResponseCookie = false;
|
||||||
|
var responseCookies = Subject.Get<HttpCookieResource>(requestCookies);
|
||||||
|
|
||||||
|
responseCookies.Resource.Cookies.Should().HaveCount(1).And.Contain("my", "cookie");
|
||||||
|
|
||||||
|
var requestDelete = new HttpRequest($"http://{_httpBinHost}/cookies/delete?my");
|
||||||
|
requestDelete.AllowAutoRedirect = false;
|
||||||
|
requestDelete.StoreRequestCookie = false;
|
||||||
|
requestDelete.StoreResponseCookie = false;
|
||||||
|
|
||||||
|
var responseDelete = Subject.Get(requestDelete);
|
||||||
|
|
||||||
|
requestCookies = new HttpRequest($"http://{_httpBinHost}/cookies");
|
||||||
|
requestCookies.StoreRequestCookie = false;
|
||||||
|
requestCookies.StoreResponseCookie = false;
|
||||||
|
|
||||||
|
responseCookies = Subject.Get<HttpCookieResource>(requestCookies);
|
||||||
|
|
||||||
|
responseCookies.Resource.Cookies.Should().HaveCount(1).And.Contain("my", "cookie");
|
||||||
|
|
||||||
|
ExceptionVerification.IgnoreErrors();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void should_delete_response_cookie()
|
||||||
|
{
|
||||||
|
var requestCookies = new HttpRequest($"http://{_httpBinHost}/cookies");
|
||||||
|
requestCookies.Cookies.Add("my", "cookie");
|
||||||
|
requestCookies.AllowAutoRedirect = false;
|
||||||
|
requestCookies.StoreRequestCookie = true;
|
||||||
|
requestCookies.StoreResponseCookie = false;
|
||||||
|
var responseCookies = Subject.Get<HttpCookieResource>(requestCookies);
|
||||||
|
|
||||||
|
responseCookies.Resource.Cookies.Should().HaveCount(1).And.Contain("my", "cookie");
|
||||||
|
|
||||||
|
var requestDelete = new HttpRequest($"http://{_httpBinHost}/cookies/delete?my");
|
||||||
|
requestDelete.AllowAutoRedirect = false;
|
||||||
|
requestDelete.StoreRequestCookie = false;
|
||||||
|
requestDelete.StoreResponseCookie = true;
|
||||||
|
|
||||||
|
var responseDelete = Subject.Get(requestDelete);
|
||||||
|
|
||||||
|
requestCookies = new HttpRequest($"http://{_httpBinHost}/cookies");
|
||||||
|
requestCookies.StoreRequestCookie = false;
|
||||||
|
requestCookies.StoreResponseCookie = false;
|
||||||
|
|
||||||
|
responseCookies = Subject.Get<HttpCookieResource>(requestCookies);
|
||||||
|
|
||||||
|
responseCookies.Resource.Cookies.Should().BeEmpty();
|
||||||
|
|
||||||
|
ExceptionVerification.IgnoreErrors();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void should_delete_temp_response_cookie()
|
||||||
|
{
|
||||||
|
var requestCookies = new HttpRequest($"http://{_httpBinHost}/cookies");
|
||||||
|
requestCookies.Cookies.Add("my", "cookie");
|
||||||
|
requestCookies.AllowAutoRedirect = false;
|
||||||
|
requestCookies.StoreRequestCookie = true;
|
||||||
|
requestCookies.StoreResponseCookie = false;
|
||||||
|
var responseCookies = Subject.Get<HttpCookieResource>(requestCookies);
|
||||||
|
|
||||||
|
responseCookies.Resource.Cookies.Should().HaveCount(1).And.Contain("my", "cookie");
|
||||||
|
|
||||||
|
var requestDelete = new HttpRequest($"http://{_httpBinHost}/cookies/delete?my");
|
||||||
|
requestDelete.AllowAutoRedirect = true;
|
||||||
|
requestDelete.StoreRequestCookie = false;
|
||||||
|
requestDelete.StoreResponseCookie = false;
|
||||||
|
var responseDelete = Subject.Get<HttpCookieResource>(requestDelete);
|
||||||
|
|
||||||
|
responseDelete.Resource.Cookies.Should().BeEmpty();
|
||||||
|
|
||||||
|
requestCookies = new HttpRequest($"http://{_httpBinHost}/cookies");
|
||||||
|
requestCookies.StoreRequestCookie = false;
|
||||||
|
requestCookies.StoreResponseCookie = false;
|
||||||
|
|
||||||
|
responseCookies.Resource.Cookies.Should().HaveCount(1).And.Contain("my", "cookie");
|
||||||
|
|
||||||
|
ExceptionVerification.IgnoreErrors();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void should_not_send_old_cookie()
|
||||||
|
{
|
||||||
|
GivenOldCookie();
|
||||||
|
|
||||||
|
var requestCookies = new HttpRequest($"http://{_httpBinHost}/cookies");
|
||||||
|
requestCookies.IgnorePersistentCookies = true;
|
||||||
|
requestCookies.StoreRequestCookie = false;
|
||||||
|
requestCookies.StoreResponseCookie = false;
|
||||||
|
var responseCookies = Subject.Get<HttpCookieResource>(requestCookies);
|
||||||
|
|
||||||
|
responseCookies.Resource.Cookies.Should().BeEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void should_throw_on_http429_too_many_requests()
|
public void should_throw_on_http429_too_many_requests()
|
||||||
{
|
{
|
||||||
@@ -442,4 +631,9 @@ namespace NzbDrone.Common.Test.Http
|
|||||||
public string Url { get; set; }
|
public string Url { get; set; }
|
||||||
public string Data { get; set; }
|
public string Data { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class HttpCookieResource
|
||||||
|
{
|
||||||
|
public Dictionary<string, string> Cookies { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,4 +96,4 @@ namespace NzbDrone.Common.Composition
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,5 +28,19 @@ namespace NzbDrone.Common.Extensions
|
|||||||
{
|
{
|
||||||
collection.Add(new KeyValuePair<TKey, TValue>(key, value));
|
collection.Add(new KeyValuePair<TKey, TValue>(key, value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static IDictionary<TNewKey, TNewValue> SelectDictionary<TKey, TValue, TNewKey, TNewValue>(this IDictionary<TKey, TValue> dictionary,
|
||||||
|
Func<KeyValuePair<TKey, TValue>, ValueTuple<TNewKey, TNewValue>> selection)
|
||||||
|
{
|
||||||
|
return dictionary.Select(selection).ToDictionary(t => t.Item1, t => t.Item2);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IDictionary<TNewKey, TNewValue> SelectDictionary<TKey, TValue, TNewKey, TNewValue>(
|
||||||
|
this IDictionary<TKey, TValue> dictionary,
|
||||||
|
Func<KeyValuePair<TKey, TValue>, TNewKey> keySelector,
|
||||||
|
Func<KeyValuePair<TKey, TValue>, TNewValue> valueSelector)
|
||||||
|
{
|
||||||
|
return dictionary.SelectDictionary(p => { return (keySelector(p), valueSelector(p)); });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,6 +78,21 @@ namespace NzbDrone.Common.Extensions
|
|||||||
return !string.IsNullOrWhiteSpace(text);
|
return !string.IsNullOrWhiteSpace(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool StartsWithIgnoreCase(this string text, string startsWith)
|
||||||
|
{
|
||||||
|
return text.StartsWith(startsWith, StringComparison.InvariantCultureIgnoreCase);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool EndsWithIgnoreCase(this string text, string startsWith)
|
||||||
|
{
|
||||||
|
return text.EndsWith(startsWith, StringComparison.InvariantCultureIgnoreCase);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool EqualsIgnoreCase(this string text, string equals)
|
||||||
|
{
|
||||||
|
return text.Equals(equals, StringComparison.InvariantCultureIgnoreCase);
|
||||||
|
}
|
||||||
|
|
||||||
public static bool ContainsIgnoreCase(this string text, string contains)
|
public static bool ContainsIgnoreCase(this string text, string contains)
|
||||||
{
|
{
|
||||||
return text.IndexOf(contains, StringComparison.InvariantCultureIgnoreCase) > -1;
|
return text.IndexOf(contains, StringComparison.InvariantCultureIgnoreCase) > -1;
|
||||||
@@ -118,4 +133,4 @@ namespace NzbDrone.Common.Extensions
|
|||||||
return Encoding.ASCII.GetString(new [] { byteResult });
|
return Encoding.ASCII.GetString(new [] { byteResult });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,9 @@ namespace NzbDrone.Common.Http
|
|||||||
|
|
||||||
public HttpResponse Execute(HttpRequest request)
|
public HttpResponse Execute(HttpRequest request)
|
||||||
{
|
{
|
||||||
var response = ExecuteRequest(request);
|
var cookieContainer = InitializeRequestCookies(request);
|
||||||
|
|
||||||
|
var response = ExecuteRequest(request, cookieContainer);
|
||||||
|
|
||||||
if (request.AllowAutoRedirect && response.HasHttpRedirect)
|
if (request.AllowAutoRedirect && response.HasHttpRedirect)
|
||||||
{
|
{
|
||||||
@@ -64,7 +66,7 @@ namespace NzbDrone.Common.Http
|
|||||||
throw new WebException($"Too many automatic redirections were attempted for {string.Join(" -> ", autoRedirectChain)}", WebExceptionStatus.ProtocolError);
|
throw new WebException($"Too many automatic redirections were attempted for {string.Join(" -> ", autoRedirectChain)}", WebExceptionStatus.ProtocolError);
|
||||||
}
|
}
|
||||||
|
|
||||||
response = ExecuteRequest(request);
|
response = ExecuteRequest(request, cookieContainer);
|
||||||
}
|
}
|
||||||
while (response.HasHttpRedirect);
|
while (response.HasHttpRedirect);
|
||||||
}
|
}
|
||||||
@@ -91,7 +93,7 @@ namespace NzbDrone.Common.Http
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
private HttpResponse ExecuteRequest(HttpRequest request)
|
private HttpResponse ExecuteRequest(HttpRequest request, CookieContainer cookieContainer)
|
||||||
{
|
{
|
||||||
foreach (var interceptor in _requestInterceptors)
|
foreach (var interceptor in _requestInterceptors)
|
||||||
{
|
{
|
||||||
@@ -107,11 +109,11 @@ namespace NzbDrone.Common.Http
|
|||||||
|
|
||||||
var stopWatch = Stopwatch.StartNew();
|
var stopWatch = Stopwatch.StartNew();
|
||||||
|
|
||||||
var cookies = PrepareRequestCookies(request);
|
PrepareRequestCookies(request, cookieContainer);
|
||||||
|
|
||||||
var response = _httpDispatcher.GetResponse(request, cookies);
|
var response = _httpDispatcher.GetResponse(request, cookieContainer);
|
||||||
|
|
||||||
HandleResponseCookies(request, cookies);
|
HandleResponseCookies(response, cookieContainer);
|
||||||
|
|
||||||
stopWatch.Stop();
|
stopWatch.Stop();
|
||||||
|
|
||||||
@@ -130,49 +132,84 @@ namespace NzbDrone.Common.Http
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
private CookieContainer PrepareRequestCookies(HttpRequest request)
|
private CookieContainer InitializeRequestCookies(HttpRequest request)
|
||||||
{
|
{
|
||||||
lock (_cookieContainerCache)
|
lock (_cookieContainerCache)
|
||||||
{
|
{
|
||||||
var persistentCookieContainer = _cookieContainerCache.Get("container", () => new CookieContainer());
|
var sourceContainer = new CookieContainer();
|
||||||
|
|
||||||
|
var presistentContainer = _cookieContainerCache.Get("container", () => new CookieContainer());
|
||||||
|
|
||||||
|
if (!request.IgnorePersistentCookies)
|
||||||
|
{
|
||||||
|
var persistentCookies = presistentContainer.GetCookies((Uri)request.Url);
|
||||||
|
sourceContainer.Add(persistentCookies);
|
||||||
|
}
|
||||||
|
|
||||||
if (request.Cookies.Count != 0)
|
if (request.Cookies.Count != 0)
|
||||||
{
|
{
|
||||||
foreach (var pair in request.Cookies)
|
foreach (var pair in request.Cookies)
|
||||||
{
|
{
|
||||||
persistentCookieContainer.Add(new Cookie(pair.Key, pair.Value, "/", request.Url.Host)
|
var cookie = new Cookie(pair.Key, pair.Value, "/")
|
||||||
{
|
{
|
||||||
// Use Now rather than UtcNow to work around Mono cookie expiry bug.
|
// Use Now rather than UtcNow to work around Mono cookie expiry bug.
|
||||||
// See https://gist.github.com/ta264/7822b1424f72e5b4c961
|
// See https://gist.github.com/ta264/7822b1424f72e5b4c961
|
||||||
Expires = DateTime.Now.AddHours(1)
|
Expires = DateTime.Now.AddHours(1)
|
||||||
});
|
};
|
||||||
|
|
||||||
|
sourceContainer.Add((Uri)request.Url, cookie);
|
||||||
|
|
||||||
|
if (request.StoreRequestCookie)
|
||||||
|
{
|
||||||
|
presistentContainer.Add((Uri)request.Url, cookie);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var requestCookies = persistentCookieContainer.GetCookies((Uri)request.Url);
|
return sourceContainer;
|
||||||
|
|
||||||
var cookieContainer = new CookieContainer();
|
|
||||||
|
|
||||||
cookieContainer.Add(requestCookies);
|
|
||||||
|
|
||||||
return cookieContainer;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleResponseCookies(HttpRequest request, CookieContainer cookieContainer)
|
private void PrepareRequestCookies(HttpRequest request, CookieContainer cookieContainer)
|
||||||
{
|
{
|
||||||
if (!request.StoreResponseCookie)
|
// Don't collect persistnet cookies for intermediate/redirected urls.
|
||||||
|
/*lock (_cookieContainerCache)
|
||||||
|
{
|
||||||
|
var presistentContainer = _cookieContainerCache.Get("container", () => new CookieContainer());
|
||||||
|
var persistentCookies = presistentContainer.GetCookies((Uri)request.Url);
|
||||||
|
var existingCookies = cookieContainer.GetCookies((Uri)request.Url);
|
||||||
|
|
||||||
|
cookieContainer.Add(persistentCookies);
|
||||||
|
cookieContainer.Add(existingCookies);
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HandleResponseCookies(HttpResponse response, CookieContainer cookieContainer)
|
||||||
|
{
|
||||||
|
var cookieHeaders = response.GetCookieHeaders();
|
||||||
|
if (cookieHeaders.Empty())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
lock (_cookieContainerCache)
|
if (response.Request.StoreResponseCookie)
|
||||||
{
|
{
|
||||||
var persistentCookieContainer = _cookieContainerCache.Get("container", () => new CookieContainer());
|
lock (_cookieContainerCache)
|
||||||
|
{
|
||||||
|
var persistentCookieContainer = _cookieContainerCache.Get("container", () => new CookieContainer());
|
||||||
|
|
||||||
var cookies = cookieContainer.GetCookies((Uri)request.Url);
|
foreach (var cookieHeader in cookieHeaders)
|
||||||
|
{
|
||||||
persistentCookieContainer.Add(cookies);
|
try
|
||||||
|
{
|
||||||
|
persistentCookieContainer.SetCookies((Uri)response.Request.Url, cookieHeader);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.Debug(ex, "Invalid cookie in {0}", response.Request.Url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ namespace NzbDrone.Common.Http
|
|||||||
Url = new HttpUri(url);
|
Url = new HttpUri(url);
|
||||||
Headers = new HttpHeader();
|
Headers = new HttpHeader();
|
||||||
AllowAutoRedirect = true;
|
AllowAutoRedirect = true;
|
||||||
|
StoreRequestCookie = true;
|
||||||
|
IgnorePersistentCookies = false;
|
||||||
Cookies = new Dictionary<string, string>();
|
Cookies = new Dictionary<string, string>();
|
||||||
|
|
||||||
if (!RuntimeInfoBase.IsProduction)
|
if (!RuntimeInfoBase.IsProduction)
|
||||||
@@ -37,6 +39,8 @@ namespace NzbDrone.Common.Http
|
|||||||
public bool ConnectionKeepAlive { get; set; }
|
public bool ConnectionKeepAlive { get; set; }
|
||||||
public bool LogResponseContent { get; set; }
|
public bool LogResponseContent { get; set; }
|
||||||
public Dictionary<string, string> Cookies { get; private set; }
|
public Dictionary<string, string> Cookies { get; private set; }
|
||||||
|
public bool IgnorePersistentCookies { get; set; }
|
||||||
|
public bool StoreRequestCookie { get; set; }
|
||||||
public bool StoreResponseCookie { get; set; }
|
public bool StoreResponseCookie { get; set; }
|
||||||
public TimeSpan RequestTimeout { get; set; }
|
public TimeSpan RequestTimeout { get; set; }
|
||||||
public TimeSpan RateLimit { get; set; }
|
public TimeSpan RateLimit { get; set; }
|
||||||
|
|||||||
@@ -55,20 +55,22 @@ namespace NzbDrone.Common.Http
|
|||||||
StatusCode == HttpStatusCode.MovedPermanently ||
|
StatusCode == HttpStatusCode.MovedPermanently ||
|
||||||
StatusCode == HttpStatusCode.Found;
|
StatusCode == HttpStatusCode.Found;
|
||||||
|
|
||||||
|
public string[] GetCookieHeaders()
|
||||||
|
{
|
||||||
|
return Headers.GetValues("Set-Cookie") ?? new string[0];
|
||||||
|
}
|
||||||
|
|
||||||
public Dictionary<string, string> GetCookies()
|
public Dictionary<string, string> GetCookies()
|
||||||
{
|
{
|
||||||
var result = new Dictionary<string, string>();
|
var result = new Dictionary<string, string>();
|
||||||
|
|
||||||
var setCookieHeaders = Headers.GetValues("Set-Cookie");
|
var setCookieHeaders = GetCookieHeaders();
|
||||||
if (setCookieHeaders != null)
|
foreach (var cookie in setCookieHeaders)
|
||||||
{
|
{
|
||||||
foreach (var cookie in setCookieHeaders)
|
var match = RegexSetCookie.Match(cookie);
|
||||||
|
if (match.Success)
|
||||||
{
|
{
|
||||||
var match = RegexSetCookie.Match(cookie);
|
result[match.Groups[1].Value] = match.Groups[2].Value;
|
||||||
if (match.Success)
|
|
||||||
{
|
|
||||||
result[match.Groups[1].Value] = match.Groups[2].Value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user