diff --git a/.gitattributes b/.gitattributes index bf91795fb..c6eddec27 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,7 +3,7 @@ # Explicitly set bash scripts to have unix endings *.sh text eol=lf -macOS/Prowlarr text eol=lf +distribution/osx/Prowlarr text eol=lf # Custom for Visual Studio *.cs diff=csharp diff --git a/azure-pipelines.yml b/azure-pipelines.yml index eddb93337..c1c85975d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -183,8 +183,8 @@ stages: - bash: ./build.sh --packages displayName: Create Packages - bash: | - setup/inno/ISCC.exe setup/prowlarr.iss //DFramework=net5.0 - cp setup/output/Prowlarr.*windows.net5.0.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Prowlarr.${BUILDNAME}.windows-core-x64-installer.exe + distribution/windows/setup/inno/ISCC.exe distribution/windows/setup/prowlarr.iss //DFramework=net5.0 + cp distribution/windows/setup/output/Prowlarr.*windows.net5.0.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Prowlarr.${BUILDNAME}.windows-core-x64-installer.exe displayName: Create .NET Core Windows installer - publish: $(Build.ArtifactStagingDirectory) artifact: 'WindowsInstaller' diff --git a/build.sh b/build.sh index 2b4e01874..dd7c0c95b 100755 --- a/build.sh +++ b/build.sh @@ -21,7 +21,7 @@ UpdateVersionNumber() echo "Updating Version Info" sed -i'' -e "s/[0-9.*]\+<\/AssemblyVersion>/$PROWLARRVERSION<\/AssemblyVersion>/g" src/Directory.Build.props sed -i'' -e "s/[\$()A-Za-z-]\+<\/AssemblyConfiguration>/${BUILD_SOURCEBRANCHNAME}<\/AssemblyConfiguration>/g" src/Directory.Build.props - sed -i'' -e "s/10.0.0.0<\/string>/$PROWLARRVERSION<\/string>/g" macOS/Prowlarr.app/Contents/Info.plist + sed -i'' -e "s/10.0.0.0<\/string>/$PROWLARRVERSION<\/string>/g" distribution/osx/Prowlarr.app/Contents/Info.plist fi } @@ -163,7 +163,7 @@ PackageMacOSApp() rm -rf $folder mkdir -p $folder - cp -r macOS/Prowlarr.app $folder + cp -r distribution/osx/Prowlarr.app $folder mkdir -p $folder/Prowlarr.app/Contents/MacOS echo "Copying Binaries" diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index eb8f841a6..000000000 --- a/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -nzbdrone {version} {branch}; urgency=low - - * Automatic Release. - - -- NzbDrone Mon, 26 Aug 2013 00:00:00 -0700 diff --git a/debian/compat b/debian/compat deleted file mode 100644 index 45a4fb75d..000000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/debian/control b/debian/control deleted file mode 100644 index ba30c02ee..000000000 --- a/debian/control +++ /dev/null @@ -1,12 +0,0 @@ -Section: web -Priority: optional -Maintainer: Sonarr -Source: nzbdrone -Homepage: https://sonarr.tv -Vcs-Git: git@github.com:Sonarr/Sonarr.git -Vcs-Browser: https://github.com/Sonarr/Sonarr - -Package: nzbdrone -Architecture: all -Depends: libmono-cil-dev (>= 3.2), sqlite3 (>= 3.7), mediainfo (>= 0.7.52) -Description: Sonarr is an internet PVR diff --git a/debian/copyright b/debian/copyright deleted file mode 100755 index 666d9bf2d..000000000 --- a/debian/copyright +++ /dev/null @@ -1,24 +0,0 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: nzbdrone -Source: https://github.com/Sonarr/Sonarr - -Files: * -Copyright: 2010-2016 Sonarr - -License: GPL-3.0+ - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - . - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - . - You should have received a copy of the GNU General Public License - along with this program. If not, see . - . - On Debian systems, the complete text of the GNU General - Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". diff --git a/debian/install b/debian/install deleted file mode 100755 index 1810b9185..000000000 --- a/debian/install +++ /dev/null @@ -1 +0,0 @@ -nzbdrone_bin/* opt/NzbDrone diff --git a/debian/rules b/debian/rules deleted file mode 100644 index b760bee7f..000000000 --- a/debian/rules +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -%: - dh $@ diff --git a/macOS/Prowlarr.app/Contents/Info.plist b/distribution/osx/Prowlarr.app/Contents/Info.plist similarity index 100% rename from macOS/Prowlarr.app/Contents/Info.plist rename to distribution/osx/Prowlarr.app/Contents/Info.plist diff --git a/macOS/Prowlarr.app/Contents/Resources/prowlarr.icns b/distribution/osx/Prowlarr.app/Contents/Resources/prowlarr.icns similarity index 100% rename from macOS/Prowlarr.app/Contents/Resources/prowlarr.icns rename to distribution/osx/Prowlarr.app/Contents/Resources/prowlarr.icns diff --git a/setup/build.bat b/distribution/windows/setup/build.bat similarity index 100% rename from setup/build.bat rename to distribution/windows/setup/build.bat diff --git a/setup/inno/Default.isl b/distribution/windows/setup/inno/Default.isl similarity index 100% rename from setup/inno/Default.isl rename to distribution/windows/setup/inno/Default.isl diff --git a/setup/inno/ISCC.exe b/distribution/windows/setup/inno/ISCC.exe similarity index 100% rename from setup/inno/ISCC.exe rename to distribution/windows/setup/inno/ISCC.exe diff --git a/setup/inno/ISCmplr.dll b/distribution/windows/setup/inno/ISCmplr.dll similarity index 100% rename from setup/inno/ISCmplr.dll rename to distribution/windows/setup/inno/ISCmplr.dll diff --git a/setup/inno/ISPP.dll b/distribution/windows/setup/inno/ISPP.dll similarity index 100% rename from setup/inno/ISPP.dll rename to distribution/windows/setup/inno/ISPP.dll diff --git a/setup/inno/Setup.e32 b/distribution/windows/setup/inno/Setup.e32 similarity index 100% rename from setup/inno/Setup.e32 rename to distribution/windows/setup/inno/Setup.e32 diff --git a/setup/inno/SetupLdr.e32 b/distribution/windows/setup/inno/SetupLdr.e32 similarity index 100% rename from setup/inno/SetupLdr.e32 rename to distribution/windows/setup/inno/SetupLdr.e32 diff --git a/setup/inno/WizModernImage.bmp b/distribution/windows/setup/inno/WizModernImage.bmp similarity index 100% rename from setup/inno/WizModernImage.bmp rename to distribution/windows/setup/inno/WizModernImage.bmp diff --git a/setup/inno/WizModernSmallImage.bmp b/distribution/windows/setup/inno/WizModernSmallImage.bmp similarity index 100% rename from setup/inno/WizModernSmallImage.bmp rename to distribution/windows/setup/inno/WizModernSmallImage.bmp diff --git a/setup/inno/islzma.dll b/distribution/windows/setup/inno/islzma.dll similarity index 100% rename from setup/inno/islzma.dll rename to distribution/windows/setup/inno/islzma.dll diff --git a/setup/prowlarr.iss b/distribution/windows/setup/prowlarr.iss similarity index 93% rename from setup/prowlarr.iss rename to distribution/windows/setup/prowlarr.iss index acaf8e725..cb180f31e 100644 --- a/setup/prowlarr.iss +++ b/distribution/windows/setup/prowlarr.iss @@ -49,8 +49,8 @@ Name: "startupShortcut"; Description: "Create shortcut in Startup folder (Starts Name: "none"; Description: "Do not start automatically"; GroupDescription: "Start automatically"; Flags: exclusive unchecked [Files] -Source: "..\_artifacts\windows\{#Framework}\Prowlarr\Prowlarr.exe"; DestDir: "{app}"; Flags: ignoreversion -Source: "..\_artifacts\windows\{#Framework}\Prowlarr\*"; Excludes: "Prowlarr.Update"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "..\..\..\_artifacts\windows\{#Framework}\Prowlarr\Prowlarr.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "..\..\..\_artifacts\windows\{#Framework}\Prowlarr\*"; Excludes: "Prowlarr.Update"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Icons] diff --git a/frontend/src/Components/Filter/Builder/FilterBuilderRow.js b/frontend/src/Components/Filter/Builder/FilterBuilderRow.js index 6938a6162..d48c0951a 100644 --- a/frontend/src/Components/Filter/Builder/FilterBuilderRow.js +++ b/frontend/src/Components/Filter/Builder/FilterBuilderRow.js @@ -7,7 +7,6 @@ import BoolFilterBuilderRowValue from './BoolFilterBuilderRowValue'; import DateFilterBuilderRowValue from './DateFilterBuilderRowValue'; import FilterBuilderRowValueConnector from './FilterBuilderRowValueConnector'; import IndexerFilterBuilderRowValueConnector from './IndexerFilterBuilderRowValueConnector'; -import MovieStatusFilterBuilderRowValue from './MovieStatusFilterBuilderRowValue'; import ProtocolFilterBuilderRowValue from './ProtocolFilterBuilderRowValue'; import TagFilterBuilderRowValueConnector from './TagFilterBuilderRowValueConnector'; import styles from './FilterBuilderRow.css'; @@ -60,9 +59,6 @@ function getRowValueConnector(selectedFilterBuilderProp) { case filterBuilderValueTypes.PROTOCOL: return ProtocolFilterBuilderRowValue; - case filterBuilderValueTypes.MOVIE_STATUS: - return MovieStatusFilterBuilderRowValue; - case filterBuilderValueTypes.TAG: return TagFilterBuilderRowValueConnector; diff --git a/frontend/src/Components/Filter/Builder/MovieStatusFilterBuilderRowValue.js b/frontend/src/Components/Filter/Builder/MovieStatusFilterBuilderRowValue.js deleted file mode 100644 index d0ee81eeb..000000000 --- a/frontend/src/Components/Filter/Builder/MovieStatusFilterBuilderRowValue.js +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react'; -import FilterBuilderRowValue from './FilterBuilderRowValue'; - -const protocols = [ - { id: 'tba', name: 'TBA' }, - { id: 'announced', name: 'Announced' }, - { id: 'inCinemas', name: 'In Cinemas' }, - { id: 'released', name: 'Released' }, - { id: 'deleted', name: 'Deleted' } -]; - -function MovieStatusFilterBuilderRowValue(props) { - return ( - - ); -} - -export default MovieStatusFilterBuilderRowValue; diff --git a/frontend/src/Components/HeartRating.css b/frontend/src/Components/HeartRating.css deleted file mode 100644 index 705adfcae..000000000 --- a/frontend/src/Components/HeartRating.css +++ /dev/null @@ -1,4 +0,0 @@ -.heart { - margin-right: 5px; - color: $themeRed; -} diff --git a/frontend/src/Components/HeartRating.js b/frontend/src/Components/HeartRating.js deleted file mode 100644 index eba46cb1f..000000000 --- a/frontend/src/Components/HeartRating.js +++ /dev/null @@ -1,34 +0,0 @@ -import PropTypes from 'prop-types'; -import React from 'react'; -import Icon from 'Components/Icon'; -import { icons } from 'Helpers/Props'; -import styles from './HeartRating.css'; - -function HeartRating({ rating, iconSize, hideHeart }) { - return ( - - { - !hideHeart && - - } - - {rating * 10}% - - ); -} - -HeartRating.propTypes = { - rating: PropTypes.number.isRequired, - iconSize: PropTypes.number.isRequired, - hideHeart: PropTypes.bool -}; - -HeartRating.defaultProps = { - iconSize: 14 -}; - -export default HeartRating; diff --git a/frontend/src/Components/ImportListList.css b/frontend/src/Components/ImportListList.css deleted file mode 100644 index 6e6911082..000000000 --- a/frontend/src/Components/ImportListList.css +++ /dev/null @@ -1,3 +0,0 @@ -.lists { - flex: 1 0 auto; -} diff --git a/frontend/src/Components/ImportListList.js b/frontend/src/Components/ImportListList.js deleted file mode 100644 index 7695b26d3..000000000 --- a/frontend/src/Components/ImportListList.js +++ /dev/null @@ -1,43 +0,0 @@ -import _ from 'lodash'; -import PropTypes from 'prop-types'; -import React from 'react'; -import { kinds, sizes } from 'Helpers/Props'; -import Label from './Label'; -import styles from './ImportListList.css'; - -function ImportListList({ lists, importListList }) { - return ( -
- { - lists.map((t) => { - const list = _.find(importListList, { id: t }); - - if (!list) { - return null; - } - - return ( - - ); - }) - } -
- ); -} - -ImportListList.propTypes = { - lists: PropTypes.arrayOf(PropTypes.number).isRequired, - importListList: PropTypes.arrayOf(PropTypes.object).isRequired -}; - -ImportListList.defaultProps = { - lists: [] -}; - -export default ImportListList; diff --git a/frontend/src/Components/ImportListListConnector.js b/frontend/src/Components/ImportListListConnector.js deleted file mode 100644 index 8f7983048..000000000 --- a/frontend/src/Components/ImportListListConnector.js +++ /dev/null @@ -1,17 +0,0 @@ -import { connect } from 'react-redux'; -import { createSelector } from 'reselect'; -import createImportListSelector from 'Store/Selectors/createImportListSelector'; -import ImportListList from './ImportListList'; - -function createMapStateToProps() { - return createSelector( - createImportListSelector(), - (importListList) => { - return { - importListList - }; - } - ); -} - -export default connect(createMapStateToProps)(ImportListList); diff --git a/frontend/src/Components/Marquee.js b/frontend/src/Components/Marquee.js deleted file mode 100644 index 900ccafd6..000000000 --- a/frontend/src/Components/Marquee.js +++ /dev/null @@ -1,181 +0,0 @@ -import PropTypes from 'prop-types'; -import React, { Component } from 'react'; - -const FPS = 20; -const STEP = 1; -const TIMEOUT = 1 / FPS * 1000; - -class Marquee extends Component { - - static propTypes = { - text: PropTypes.string, - title: PropTypes.string, - hoverToStop: PropTypes.bool, - loop: PropTypes.bool, - className: PropTypes.string - }; - - static defaultProps = { - text: '', - title: '', - hoverToStop: true, - loop: false - }; - - state = { - animatedWidth: 0, - overflowWidth: 0, - direction: 0 - }; - - componentDidMount() { - this.measureText(); - - if (this.props.hoverToStop) { - this.startAnimation(); - } - } - - componentWillReceiveProps(nextProps) { - if (this.props.text.length !== nextProps.text.length) { - clearTimeout(this.marqueeTimer); - this.setState({ animatedWidth: 0, direction: 0 }); - } - } - - componentDidUpdate() { - this.measureText(); - - if (this.props.hoverToStop) { - this.startAnimation(); - } - } - - componentWillUnmount() { - clearTimeout(this.marqueeTimer); - } - - onHandleMouseEnter = () => { - if (this.props.hoverToStop) { - clearTimeout(this.marqueeTimer); - } else if (this.state.overflowWidth > 0) { - this.startAnimation(); - } - } - - onHandleMouseLeave = () => { - if (this.props.hoverToStop && this.state.overflowWidth > 0) { - this.startAnimation(); - } else { - clearTimeout(this.marqueeTimer); - this.setState({ animatedWidth: 0 }); - } - } - - startAnimation = () => { - clearTimeout(this.marqueeTimer); - const isLeading = this.state.animatedWidth === 0; - const timeout = isLeading ? 0 : TIMEOUT; - - const animate = () => { - const { overflowWidth } = this.state; - let animatedWidth = this.state.animatedWidth; - let direction = this.state.direction; - - if (direction === 0) { - animatedWidth = this.state.animatedWidth + STEP; - } else { - animatedWidth = this.state.animatedWidth - STEP; - } - - const isRoundOver = animatedWidth < 0; - const endOfText = animatedWidth > overflowWidth; - - if (endOfText) { - direction = direction === 1; - } - - if (isRoundOver) { - if (this.props.loop) { - direction = direction === 0; - } else { - return; - } - } - - this.setState({ animatedWidth, direction }); - this.marqueeTimer = setTimeout(animate, TIMEOUT); - }; - - this.marqueeTimer = setTimeout(animate, timeout); - } - - measureText = () => { - const container = this.container; - const node = this.text; - - if (container && node) { - const containerWidth = container.offsetWidth; - const textWidth = node.offsetWidth; - const overflowWidth = textWidth - containerWidth; - - if (overflowWidth !== this.state.overflowWidth) { - this.setState({ overflowWidth }); - } - } - } - - render() { - const style = { - position: 'relative', - right: this.state.animatedWidth, - whiteSpace: 'nowrap' - }; - - if (this.state.overflowWidth < 0) { - return ( -
{ - this.container = el; - }} - className={`ui-marquee ${this.props.className}`} - style={{ overflow: 'hidden' }} - > - { - this.text = el; - }} - style={style} - title={(this.props.title && (this.props.text !== this.props.title)) ? `Original Title: ${this.props.title}` : this.props.text} - > - {this.props.text} - -
- ); - } - - return ( -
{ - this.container = el; - }} - className={`ui-marquee ${this.props.className}`.trim()} - style={{ overflow: 'hidden' }} - onMouseEnter={this.onHandleMouseEnter} - onMouseLeave={this.onHandleMouseLeave} - > - { - this.text = el; - }} - style={style} - title={(this.props.title && (this.props.text !== this.props.title)) ? `Original Title: ${this.props.title}` : this.props.text} - > - {this.props.text} - -
- ); - } -} - -export default Marquee; diff --git a/frontend/src/Components/MonitorToggleButton.css b/frontend/src/Components/MonitorToggleButton.css deleted file mode 100644 index 09b64f1ab..000000000 --- a/frontend/src/Components/MonitorToggleButton.css +++ /dev/null @@ -1,11 +0,0 @@ -.toggleButton { - composes: button from '~Components/Link/IconButton.css'; - - padding: 0; - font-size: inherit; -} - -.isDisabled { - color: $disabledColor; - cursor: not-allowed; -} diff --git a/frontend/src/Components/MonitorToggleButton.js b/frontend/src/Components/MonitorToggleButton.js deleted file mode 100644 index 001603937..000000000 --- a/frontend/src/Components/MonitorToggleButton.js +++ /dev/null @@ -1,79 +0,0 @@ -import classNames from 'classnames'; -import PropTypes from 'prop-types'; -import React, { Component } from 'react'; -import SpinnerIconButton from 'Components/Link/SpinnerIconButton'; -import { icons } from 'Helpers/Props'; -import styles from './MonitorToggleButton.css'; - -function getTooltip(monitored, isDisabled) { - if (isDisabled) { - return 'Cannot toggle monitored state when movie is unmonitored'; - } - - if (monitored) { - return 'Monitored, click to unmonitor'; - } - - return 'Unmonitored, click to monitor'; -} - -class MonitorToggleButton extends Component { - - // - // Listeners - - onPress = (event) => { - const shiftKey = event.nativeEvent.shiftKey; - - this.props.onPress(!this.props.monitored, { shiftKey }); - } - - // - // Render - - render() { - const { - className, - monitored, - isDisabled, - isSaving, - size, - ...otherProps - } = this.props; - - const iconName = monitored ? icons.MONITORED : icons.UNMONITORED; - - return ( - - ); - } -} - -MonitorToggleButton.propTypes = { - className: PropTypes.string.isRequired, - monitored: PropTypes.bool.isRequired, - size: PropTypes.number, - isDisabled: PropTypes.bool.isRequired, - isSaving: PropTypes.bool.isRequired, - onPress: PropTypes.func.isRequired -}; - -MonitorToggleButton.defaultProps = { - className: styles.toggleButton, - isDisabled: false, - isSaving: false -}; - -export default MonitorToggleButton; diff --git a/frontend/src/Components/Page/Header/MovieSearchInput.css b/frontend/src/Components/Page/Header/IndexerSearchInput.css similarity index 100% rename from frontend/src/Components/Page/Header/MovieSearchInput.css rename to frontend/src/Components/Page/Header/IndexerSearchInput.css diff --git a/frontend/src/Components/Page/Header/MovieSearchInput.js b/frontend/src/Components/Page/Header/IndexerSearchInput.js similarity index 95% rename from frontend/src/Components/Page/Header/MovieSearchInput.js rename to frontend/src/Components/Page/Header/IndexerSearchInput.js index 42c98e9da..f6e01e81e 100644 --- a/frontend/src/Components/Page/Header/MovieSearchInput.js +++ b/frontend/src/Components/Page/Header/IndexerSearchInput.js @@ -6,12 +6,12 @@ import keyboardShortcuts, { shortcuts } from 'Components/keyboardShortcuts'; import LoadingIndicator from 'Components/Loading/LoadingIndicator'; import { icons } from 'Helpers/Props'; import translate from 'Utilities/String/translate'; -import MovieSearchResult from './MovieSearchResult'; -import styles from './MovieSearchInput.css'; +import IndexerSearchResult from './IndexerSearchResult'; +import styles from './IndexerSearchInput.css'; const ADD_NEW_TYPE = 'addNew'; -class MovieSearchInput extends Component { +class IndexerSearchInput extends Component { // // Lifecycle @@ -86,7 +86,7 @@ class MovieSearchInput extends Component { } return ( - @@ -239,9 +239,9 @@ class MovieSearchInput extends Component { } } -MovieSearchInput.propTypes = { +IndexerSearchInput.propTypes = { onGoToAddNewMovie: PropTypes.func.isRequired, bindShortcut: PropTypes.func.isRequired }; -export default keyboardShortcuts(MovieSearchInput); +export default keyboardShortcuts(IndexerSearchInput); diff --git a/frontend/src/Components/Page/Header/MovieSearchInputConnector.js b/frontend/src/Components/Page/Header/IndexerSearchInputConnector.js similarity index 91% rename from frontend/src/Components/Page/Header/MovieSearchInputConnector.js rename to frontend/src/Components/Page/Header/IndexerSearchInputConnector.js index fcfdd6f8a..6548826d6 100644 --- a/frontend/src/Components/Page/Header/MovieSearchInputConnector.js +++ b/frontend/src/Components/Page/Header/IndexerSearchInputConnector.js @@ -5,14 +5,14 @@ import { setSearchDefault } from 'Store/Actions/releaseActions'; import createAllIndexersSelector from 'Store/Selectors/createAllIndexersSelector'; import createDeepEqualSelector from 'Store/Selectors/createDeepEqualSelector'; import createTagsSelector from 'Store/Selectors/createTagsSelector'; -import MovieSearchInput from './MovieSearchInput'; +import IndexerSearchInput from './IndexerSearchInput'; function createCleanMovieSelector() { return createSelector( createAllIndexersSelector(), createTagsSelector(), - (allMovies, allTags) => { - return allMovies.map((movie) => { + (allIndexers, allTags) => { + return allIndexers.map((movie) => { const { name, titleSlug, @@ -66,4 +66,4 @@ function createMapDispatchToProps(dispatch, props) { }; } -export default connect(createMapStateToProps, createMapDispatchToProps)(MovieSearchInput); +export default connect(createMapStateToProps, createMapDispatchToProps)(IndexerSearchInput); diff --git a/frontend/src/Components/Page/Header/MovieSearchResult.css b/frontend/src/Components/Page/Header/IndexerSearchResult.css similarity index 100% rename from frontend/src/Components/Page/Header/MovieSearchResult.css rename to frontend/src/Components/Page/Header/IndexerSearchResult.css diff --git a/frontend/src/Components/Page/Header/MovieSearchResult.js b/frontend/src/Components/Page/Header/IndexerSearchResult.js similarity index 89% rename from frontend/src/Components/Page/Header/MovieSearchResult.js rename to frontend/src/Components/Page/Header/IndexerSearchResult.js index b5d11b74f..68f6709a9 100644 --- a/frontend/src/Components/Page/Header/MovieSearchResult.js +++ b/frontend/src/Components/Page/Header/IndexerSearchResult.js @@ -2,9 +2,9 @@ import PropTypes from 'prop-types'; import React from 'react'; import Label from 'Components/Label'; import { kinds } from 'Helpers/Props'; -import styles from './MovieSearchResult.css'; +import styles from './IndexerSearchResult.css'; -function MovieSearchResult(props) { +function IndexerSearchResult(props) { const { match, title, @@ -54,7 +54,7 @@ function MovieSearchResult(props) { ); } -MovieSearchResult.propTypes = { +IndexerSearchResult.propTypes = { title: PropTypes.string.isRequired, year: PropTypes.number.isRequired, alternateTitles: PropTypes.arrayOf(PropTypes.object).isRequired, @@ -62,4 +62,4 @@ MovieSearchResult.propTypes = { match: PropTypes.object.isRequired }; -export default MovieSearchResult; +export default IndexerSearchResult; diff --git a/frontend/src/Components/Page/Header/PageHeader.js b/frontend/src/Components/Page/Header/PageHeader.js index 879536f43..7c3c50795 100644 --- a/frontend/src/Components/Page/Header/PageHeader.js +++ b/frontend/src/Components/Page/Header/PageHeader.js @@ -5,8 +5,8 @@ import IconButton from 'Components/Link/IconButton'; import Link from 'Components/Link/Link'; import { icons } from 'Helpers/Props'; import translate from 'Utilities/String/translate'; +import IndexerSearchInputConnector from './IndexerSearchInputConnector'; import KeyboardShortcutsModal from './KeyboardShortcutsModal'; -import MovieSearchInputConnector from './MovieSearchInputConnector'; import PageHeaderActionsMenuConnector from './PageHeaderActionsMenuConnector'; import styles from './PageHeader.css'; @@ -68,7 +68,7 @@ class PageHeader extends Component { /> - +
- - - ); -} - -OrganizeMovieModal.propTypes = { - isOpen: PropTypes.bool.isRequired, - onModalClose: PropTypes.func.isRequired -}; - -export default OrganizeMovieModal; diff --git a/frontend/src/Indexer/Editor/Organize/OrganizeMovieModalContent.css b/frontend/src/Indexer/Editor/Organize/OrganizeMovieModalContent.css deleted file mode 100644 index 0b896f4ef..000000000 --- a/frontend/src/Indexer/Editor/Organize/OrganizeMovieModalContent.css +++ /dev/null @@ -1,8 +0,0 @@ -.renameIcon { - margin-left: 5px; -} - -.message { - margin-top: 20px; - margin-bottom: 10px; -} diff --git a/frontend/src/Indexer/Editor/Organize/OrganizeMovieModalContent.js b/frontend/src/Indexer/Editor/Organize/OrganizeMovieModalContent.js deleted file mode 100644 index 946005455..000000000 --- a/frontend/src/Indexer/Editor/Organize/OrganizeMovieModalContent.js +++ /dev/null @@ -1,75 +0,0 @@ -import PropTypes from 'prop-types'; -import React from 'react'; -import Alert from 'Components/Alert'; -import Icon from 'Components/Icon'; -import Button from 'Components/Link/Button'; -import ModalBody from 'Components/Modal/ModalBody'; -import ModalContent from 'Components/Modal/ModalContent'; -import ModalFooter from 'Components/Modal/ModalFooter'; -import ModalHeader from 'Components/Modal/ModalHeader'; -import { icons, kinds } from 'Helpers/Props'; -import translate from 'Utilities/String/translate'; -import styles from './OrganizeMovieModalContent.css'; - -function OrganizeMovieModalContent(props) { - const { - movieTitles, - onModalClose, - onOrganizeMoviePress - } = props; - - return ( - - - Organize Selected Movies - - - - - Tip: To preview a rename... select "Cancel" then click any movie title and use the - - - -
- Are you sure you want to organize all files in the {movieTitles.length} selected movie(s)? -
- -
    - { - movieTitles.map((title) => { - return ( -
  • - {title} -
  • - ); - }) - } -
-
- - - - - - -
- ); -} - -OrganizeMovieModalContent.propTypes = { - movieTitles: PropTypes.arrayOf(PropTypes.string).isRequired, - onModalClose: PropTypes.func.isRequired, - onOrganizeMoviePress: PropTypes.func.isRequired -}; - -export default OrganizeMovieModalContent; diff --git a/frontend/src/Indexer/Editor/Organize/OrganizeMovieModalContentConnector.js b/frontend/src/Indexer/Editor/Organize/OrganizeMovieModalContentConnector.js deleted file mode 100644 index de10d9a97..000000000 --- a/frontend/src/Indexer/Editor/Organize/OrganizeMovieModalContentConnector.js +++ /dev/null @@ -1,67 +0,0 @@ -import _ from 'lodash'; -import PropTypes from 'prop-types'; -import React, { Component } from 'react'; -import { connect } from 'react-redux'; -import { createSelector } from 'reselect'; -import * as commandNames from 'Commands/commandNames'; -import { executeCommand } from 'Store/Actions/commandActions'; -import createAllMoviesSelector from 'Store/Selectors/createAllMoviesSelector'; -import OrganizeMovieModalContent from './OrganizeMovieModalContent'; - -function createMapStateToProps() { - return createSelector( - (state, { movieIds }) => movieIds, - createAllMoviesSelector(), - (movieIds, allMovies) => { - const movies = _.intersectionWith(allMovies, movieIds, (s, id) => { - return s.id === id; - }); - - const sortedMovies = _.orderBy(movies, 'sortTitle'); - const movieTitles = _.map(sortedMovies, 'title'); - - return { - movieTitles - }; - } - ); -} - -const mapDispatchToProps = { - executeCommand -}; - -class OrganizeMovieModalContentConnector extends Component { - - // - // Listeners - - onOrganizeMoviePress = () => { - this.props.executeCommand({ - name: commandNames.RENAME_MOVIE, - movieIds: this.props.movieIds - }); - - this.props.onModalClose(true); - } - - // - // Render - - render(props) { - return ( - - ); - } -} - -OrganizeMovieModalContentConnector.propTypes = { - movieIds: PropTypes.arrayOf(PropTypes.number).isRequired, - onModalClose: PropTypes.func.isRequired, - executeCommand: PropTypes.func.isRequired -}; - -export default connect(createMapStateToProps, mapDispatchToProps)(OrganizeMovieModalContentConnector); diff --git a/frontend/src/Indexer/Index/IndexerIndex.js b/frontend/src/Indexer/Index/IndexerIndex.js index c9479f220..2fbcea39b 100644 --- a/frontend/src/Indexer/Index/IndexerIndex.js +++ b/frontend/src/Indexer/Index/IndexerIndex.js @@ -11,10 +11,10 @@ import PageToolbarSection from 'Components/Page/Toolbar/PageToolbarSection'; import PageToolbarSeparator from 'Components/Page/Toolbar/PageToolbarSeparator'; import TableOptionsModalWrapper from 'Components/Table/TableOptions/TableOptionsModalWrapper'; import { align, icons, sortDirections } from 'Helpers/Props'; +import AddIndexerModal from 'Indexer/Add/AddIndexerModal'; +import EditIndexerModalConnector from 'Indexer/Edit/EditIndexerModalConnector'; import IndexerEditorFooter from 'Indexer/Editor/IndexerEditorFooter.js'; import NoIndexer from 'Indexer/NoIndexer'; -import AddIndexerModal from 'Settings/Indexers/Indexers/AddIndexerModal'; -import EditIndexerModalConnector from 'Settings/Indexers/Indexers/EditIndexerModalConnector'; import * as keyCodes from 'Utilities/Constants/keyCodes'; import getErrorMessage from 'Utilities/Object/getErrorMessage'; import hasDifferentItemsOrOrder from 'Utilities/Object/hasDifferentItemsOrOrder'; @@ -23,14 +23,14 @@ import getSelectedIds from 'Utilities/Table/getSelectedIds'; import selectAll from 'Utilities/Table/selectAll'; import toggleSelected from 'Utilities/Table/toggleSelected'; import IndexerIndexFooterConnector from './IndexerIndexFooterConnector'; -import MovieIndexFilterMenu from './Menus/MovieIndexFilterMenu'; -import MovieIndexSortMenu from './Menus/MovieIndexSortMenu'; -import MovieIndexTableConnector from './Table/MovieIndexTableConnector'; -import MovieIndexTableOptionsConnector from './Table/MovieIndexTableOptionsConnector'; +import IndexerIndexFilterMenu from './Menus/IndexerIndexFilterMenu'; +import IndexerIndexSortMenu from './Menus/IndexerIndexSortMenu'; +import IndexerIndexTableConnector from './Table/IndexerIndexTableConnector'; +import IndexerIndexTableOptionsConnector from './Table/IndexerIndexTableOptionsConnector'; import styles from './IndexerIndex.css'; function getViewComponent() { - return MovieIndexTableConnector; + return IndexerIndexTableConnector; } class IndexerIndex extends Component { @@ -354,7 +354,7 @@ class IndexerIndex extends Component { - - state.movies.items, + (state) => state.indexers.items, (state) => state.indexerIndex.filterBuilderProps, (sectionItems, filterBuilderProps) => { return { diff --git a/frontend/src/Indexer/Index/MovieIndexItemConnector.js b/frontend/src/Indexer/Index/IndexerIndexItemConnector.js similarity index 94% rename from frontend/src/Indexer/Index/MovieIndexItemConnector.js rename to frontend/src/Indexer/Index/IndexerIndexItemConnector.js index 4856cf140..709a396e0 100644 --- a/frontend/src/Indexer/Index/MovieIndexItemConnector.js +++ b/frontend/src/Indexer/Index/IndexerIndexItemConnector.js @@ -53,7 +53,7 @@ const mapDispatchToProps = { dispatchExecuteCommand: executeCommand }; -class MovieIndexItemConnector extends Component { +class IndexerIndexItemConnector extends Component { // // Render @@ -78,10 +78,10 @@ class MovieIndexItemConnector extends Component { } } -MovieIndexItemConnector.propTypes = { +IndexerIndexItemConnector.propTypes = { id: PropTypes.number, component: PropTypes.elementType.isRequired, dispatchExecuteCommand: PropTypes.func.isRequired }; -export default connect(createMapStateToProps, mapDispatchToProps)(MovieIndexItemConnector); +export default connect(createMapStateToProps, mapDispatchToProps)(IndexerIndexItemConnector); diff --git a/frontend/src/Indexer/Index/Menus/MovieIndexFilterMenu.js b/frontend/src/Indexer/Index/Menus/IndexerIndexFilterMenu.js similarity index 72% rename from frontend/src/Indexer/Index/Menus/MovieIndexFilterMenu.js rename to frontend/src/Indexer/Index/Menus/IndexerIndexFilterMenu.js index a2846512c..6b318d415 100644 --- a/frontend/src/Indexer/Index/Menus/MovieIndexFilterMenu.js +++ b/frontend/src/Indexer/Index/Menus/IndexerIndexFilterMenu.js @@ -2,9 +2,9 @@ import PropTypes from 'prop-types'; import React from 'react'; import FilterMenu from 'Components/Menu/FilterMenu'; import { align } from 'Helpers/Props'; -import MovieIndexFilterModalConnector from 'Indexer/Index/MovieIndexFilterModalConnector'; +import IndexerIndexFilterModalConnector from 'Indexer/Index/IndexerIndexFilterModalConnector'; -function MovieIndexFilterMenu(props) { +function IndexerIndexFilterMenu(props) { const { selectedFilterKey, filters, @@ -20,13 +20,13 @@ function MovieIndexFilterMenu(props) { selectedFilterKey={selectedFilterKey} filters={filters} customFilters={customFilters} - filterModalConnectorComponent={MovieIndexFilterModalConnector} + filterModalConnectorComponent={IndexerIndexFilterModalConnector} onFilterSelect={onFilterSelect} /> ); } -MovieIndexFilterMenu.propTypes = { +IndexerIndexFilterMenu.propTypes = { selectedFilterKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, filters: PropTypes.arrayOf(PropTypes.object).isRequired, customFilters: PropTypes.arrayOf(PropTypes.object).isRequired, @@ -34,8 +34,8 @@ MovieIndexFilterMenu.propTypes = { onFilterSelect: PropTypes.func.isRequired }; -MovieIndexFilterMenu.defaultProps = { +IndexerIndexFilterMenu.defaultProps = { showCustomFilters: false }; -export default MovieIndexFilterMenu; +export default IndexerIndexFilterMenu; diff --git a/frontend/src/Indexer/Index/Menus/MovieIndexSortMenu.js b/frontend/src/Indexer/Index/Menus/IndexerIndexSortMenu.js similarity index 94% rename from frontend/src/Indexer/Index/Menus/MovieIndexSortMenu.js rename to frontend/src/Indexer/Index/Menus/IndexerIndexSortMenu.js index 23940e497..c57c94e96 100644 --- a/frontend/src/Indexer/Index/Menus/MovieIndexSortMenu.js +++ b/frontend/src/Indexer/Index/Menus/IndexerIndexSortMenu.js @@ -6,7 +6,7 @@ import SortMenuItem from 'Components/Menu/SortMenuItem'; import { align, sortDirections } from 'Helpers/Props'; import translate from 'Utilities/String/translate'; -function MovieIndexSortMenu(props) { +function IndexerIndexSortMenu(props) { const { sortKey, sortDirection, @@ -78,11 +78,11 @@ function MovieIndexSortMenu(props) { ); } -MovieIndexSortMenu.propTypes = { +IndexerIndexSortMenu.propTypes = { sortKey: PropTypes.string, sortDirection: PropTypes.oneOf(sortDirections.all), isDisabled: PropTypes.bool.isRequired, onSortSelect: PropTypes.func.isRequired }; -export default MovieIndexSortMenu; +export default IndexerIndexSortMenu; diff --git a/frontend/src/Indexer/Index/Menus/MovieIndexSearchMenu.js b/frontend/src/Indexer/Index/Menus/MovieIndexSearchMenu.js deleted file mode 100644 index 91c147a47..000000000 --- a/frontend/src/Indexer/Index/Menus/MovieIndexSearchMenu.js +++ /dev/null @@ -1,52 +0,0 @@ -import PropTypes from 'prop-types'; -import React, { Component } from 'react'; -import Menu from 'Components/Menu/Menu'; -import MenuContent from 'Components/Menu/MenuContent'; -import SearchMenuItem from 'Components/Menu/SearchMenuItem'; -import ToolbarMenuButton from 'Components/Menu/ToolbarMenuButton'; -import { align, icons } from 'Helpers/Props'; - -class MovieIndexSearchMenu extends Component { - - render() { - const { - isDisabled, - onSearchPress - } = this.props; - - return ( - - - - - Search Missing - - - - Search Cutoff Unmet - - - - ); - } -} - -MovieIndexSearchMenu.propTypes = { - isDisabled: PropTypes.bool.isRequired, - onSearchPress: PropTypes.func.isRequired -}; - -export default MovieIndexSearchMenu; diff --git a/frontend/src/Indexer/Index/Table/MovieIndexActionsCell.js b/frontend/src/Indexer/Index/Table/IndexerIndexActionsCell.js similarity index 94% rename from frontend/src/Indexer/Index/Table/MovieIndexActionsCell.js rename to frontend/src/Indexer/Index/Table/IndexerIndexActionsCell.js index feefdb07f..1a649235f 100644 --- a/frontend/src/Indexer/Index/Table/MovieIndexActionsCell.js +++ b/frontend/src/Indexer/Index/Table/IndexerIndexActionsCell.js @@ -8,7 +8,7 @@ import DeleteMovieModal from 'Indexer/Delete/DeleteMovieModal'; import EditMovieModalConnector from 'Indexer/Edit/EditMovieModalConnector'; import translate from 'Utilities/String/translate'; -class MovieIndexActionsCell extends Component { +class IndexerIndexActionsCell extends Component { // // Lifecycle @@ -94,10 +94,10 @@ class MovieIndexActionsCell extends Component { } } -MovieIndexActionsCell.propTypes = { +IndexerIndexActionsCell.propTypes = { id: PropTypes.number.isRequired, isRefreshingMovie: PropTypes.bool.isRequired, onRefreshMoviePress: PropTypes.func.isRequired }; -export default MovieIndexActionsCell; +export default IndexerIndexActionsCell; diff --git a/frontend/src/Indexer/Index/Table/MovieIndexHeader.css b/frontend/src/Indexer/Index/Table/IndexerIndexHeader.css similarity index 100% rename from frontend/src/Indexer/Index/Table/MovieIndexHeader.css rename to frontend/src/Indexer/Index/Table/IndexerIndexHeader.css diff --git a/frontend/src/Indexer/Index/Table/MovieIndexHeader.js b/frontend/src/Indexer/Index/Table/IndexerIndexHeader.js similarity index 91% rename from frontend/src/Indexer/Index/Table/MovieIndexHeader.js rename to frontend/src/Indexer/Index/Table/IndexerIndexHeader.js index e961e094f..5dacee870 100644 --- a/frontend/src/Indexer/Index/Table/MovieIndexHeader.js +++ b/frontend/src/Indexer/Index/Table/IndexerIndexHeader.js @@ -6,10 +6,10 @@ import VirtualTableHeader from 'Components/Table/VirtualTableHeader'; import VirtualTableHeaderCell from 'Components/Table/VirtualTableHeaderCell'; import VirtualTableSelectAllHeaderCell from 'Components/Table/VirtualTableSelectAllHeaderCell'; import { icons } from 'Helpers/Props'; -import MovieIndexTableOptionsConnector from './MovieIndexTableOptionsConnector'; -import styles from './MovieIndexHeader.css'; +import IndexerIndexTableOptionsConnector from './IndexerIndexTableOptionsConnector'; +import styles from './IndexerIndexHeader.css'; -class MovieIndexHeader extends Component { +class IndexerIndexHeader extends Component { // // Lifecycle @@ -111,7 +111,7 @@ class MovieIndexHeader extends Component { @@ -120,7 +120,7 @@ class MovieIndexHeader extends Component { } } -MovieIndexHeader.propTypes = { +IndexerIndexHeader.propTypes = { columns: PropTypes.arrayOf(PropTypes.object).isRequired, onTableOptionChange: PropTypes.func.isRequired, allSelected: PropTypes.bool.isRequired, @@ -129,4 +129,4 @@ MovieIndexHeader.propTypes = { isMovieEditorActive: PropTypes.bool.isRequired }; -export default MovieIndexHeader; +export default IndexerIndexHeader; diff --git a/frontend/src/Indexer/Index/Table/MovieIndexHeaderConnector.js b/frontend/src/Indexer/Index/Table/IndexerIndexHeaderConnector.js similarity index 66% rename from frontend/src/Indexer/Index/Table/MovieIndexHeaderConnector.js rename to frontend/src/Indexer/Index/Table/IndexerIndexHeaderConnector.js index 7361b0fef..59c95b73a 100644 --- a/frontend/src/Indexer/Index/Table/MovieIndexHeaderConnector.js +++ b/frontend/src/Indexer/Index/Table/IndexerIndexHeaderConnector.js @@ -1,6 +1,6 @@ import { connect } from 'react-redux'; import { setMovieTableOption } from 'Store/Actions/indexerIndexActions'; -import MovieIndexHeader from './MovieIndexHeader'; +import IndexerIndexHeader from './IndexerIndexHeader'; function createMapDispatchToProps(dispatch, props) { return { @@ -10,4 +10,4 @@ function createMapDispatchToProps(dispatch, props) { }; } -export default connect(undefined, createMapDispatchToProps)(MovieIndexHeader); +export default connect(undefined, createMapDispatchToProps)(IndexerIndexHeader); diff --git a/frontend/src/Indexer/Index/Table/IndexerIndexRow.js b/frontend/src/Indexer/Index/Table/IndexerIndexRow.js index 04e529cf6..182cf4d31 100644 --- a/frontend/src/Indexer/Index/Table/IndexerIndexRow.js +++ b/frontend/src/Indexer/Index/Table/IndexerIndexRow.js @@ -8,7 +8,7 @@ import VirtualTableSelectCell from 'Components/Table/Cells/VirtualTableSelectCel import TagListConnector from 'Components/TagListConnector'; import { icons } from 'Helpers/Props'; import DeleteIndexerModal from 'Indexer/Delete/DeleteIndexerModal'; -import EditIndexerModalConnector from 'Settings/Indexers/Indexers/EditIndexerModalConnector'; +import EditIndexerModalConnector from 'Indexer/Edit/EditIndexerModalConnector'; import titleCase from 'Utilities/String/titleCase'; import translate from 'Utilities/String/translate'; import CapabilitiesLabel from './CapabilitiesLabel'; diff --git a/frontend/src/Indexer/Index/Table/MovieIndexTable.css b/frontend/src/Indexer/Index/Table/IndexerIndexTable.css similarity index 100% rename from frontend/src/Indexer/Index/Table/MovieIndexTable.css rename to frontend/src/Indexer/Index/Table/IndexerIndexTable.css diff --git a/frontend/src/Indexer/Index/Table/MovieIndexTable.js b/frontend/src/Indexer/Index/Table/IndexerIndexTable.js similarity index 85% rename from frontend/src/Indexer/Index/Table/MovieIndexTable.js rename to frontend/src/Indexer/Index/Table/IndexerIndexTable.js index 8ef60f9a7..79e733b65 100644 --- a/frontend/src/Indexer/Index/Table/MovieIndexTable.js +++ b/frontend/src/Indexer/Index/Table/IndexerIndexTable.js @@ -3,13 +3,13 @@ import React, { Component } from 'react'; import VirtualTable from 'Components/Table/VirtualTable'; import VirtualTableRow from 'Components/Table/VirtualTableRow'; import { sortDirections } from 'Helpers/Props'; -import MovieIndexItemConnector from 'Indexer/Index/MovieIndexItemConnector'; +import IndexerIndexItemConnector from 'Indexer/Index/IndexerIndexItemConnector'; import getIndexOfFirstCharacter from 'Utilities/Array/getIndexOfFirstCharacter'; +import IndexerIndexHeaderConnector from './IndexerIndexHeaderConnector'; import IndexerIndexRow from './IndexerIndexRow'; -import MovieIndexHeaderConnector from './MovieIndexHeaderConnector'; -import styles from './MovieIndexTable.css'; +import styles from './IndexerIndexTable.css'; -class MovieIndexTable extends Component { +class IndexerIndexTable extends Component { // // Lifecycle @@ -49,8 +49,7 @@ class MovieIndexTable extends Component { columns, selectedState, onSelectedChange, - isMovieEditorActive, - movieRuntimeFormat + isMovieEditorActive } = this.props; const movie = items[rowIndex]; @@ -60,7 +59,7 @@ class MovieIndexTable extends Component { key={key} style={style} > - ); @@ -104,7 +102,7 @@ class MovieIndexTable extends Component { overscanRowCount={2} rowRenderer={this.rowRenderer} header={ - state.app.dimensions, (state) => state.indexerIndex.tableOptions, (state) => state.indexerIndex.columns, - (state) => state.settings.ui.item.movieRuntimeFormat, - (dimensions, tableOptions, columns, movieRuntimeFormat) => { + (dimensions, tableOptions, columns) => { return { isSmallScreen: dimensions.isSmallScreen, showBanners: tableOptions.showBanners, - columns, - movieRuntimeFormat + columns }; } ); @@ -28,4 +26,4 @@ function createMapDispatchToProps(dispatch, props) { }; } -export default connect(createMapStateToProps, createMapDispatchToProps)(MovieIndexTable); +export default connect(createMapStateToProps, createMapDispatchToProps)(IndexerIndexTable); diff --git a/frontend/src/Indexer/Index/Table/MovieIndexTableOptions.js b/frontend/src/Indexer/Index/Table/IndexerIndexTableOptions.js similarity index 92% rename from frontend/src/Indexer/Index/Table/MovieIndexTableOptions.js rename to frontend/src/Indexer/Index/Table/IndexerIndexTableOptions.js index 774d8da90..ee52f454f 100644 --- a/frontend/src/Indexer/Index/Table/MovieIndexTableOptions.js +++ b/frontend/src/Indexer/Index/Table/IndexerIndexTableOptions.js @@ -6,7 +6,7 @@ import FormLabel from 'Components/Form/FormLabel'; import { inputTypes } from 'Helpers/Props'; import translate from 'Utilities/String/translate'; -class MovieIndexTableOptions extends Component { +class IndexerIndexTableOptions extends Component { // // Lifecycle @@ -69,9 +69,9 @@ class MovieIndexTableOptions extends Component { } } -MovieIndexTableOptions.propTypes = { +IndexerIndexTableOptions.propTypes = { showSearchAction: PropTypes.bool.isRequired, onTableOptionChange: PropTypes.func.isRequired }; -export default MovieIndexTableOptions; +export default IndexerIndexTableOptions; diff --git a/frontend/src/Indexer/Index/Table/MovieIndexTableOptionsConnector.js b/frontend/src/Indexer/Index/Table/IndexerIndexTableOptionsConnector.js similarity index 64% rename from frontend/src/Indexer/Index/Table/MovieIndexTableOptionsConnector.js rename to frontend/src/Indexer/Index/Table/IndexerIndexTableOptionsConnector.js index c4a40a92f..5ae673eae 100644 --- a/frontend/src/Indexer/Index/Table/MovieIndexTableOptionsConnector.js +++ b/frontend/src/Indexer/Index/Table/IndexerIndexTableOptionsConnector.js @@ -1,6 +1,6 @@ import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import MovieIndexTableOptions from './MovieIndexTableOptions'; +import IndexerIndexTableOptions from './IndexerIndexTableOptions'; function createMapStateToProps() { return createSelector( @@ -11,4 +11,4 @@ function createMapStateToProps() { ); } -export default connect(createMapStateToProps)(MovieIndexTableOptions); +export default connect(createMapStateToProps)(IndexerIndexTableOptions); diff --git a/frontend/src/Indexer/MovieLanguage.js b/frontend/src/Indexer/MovieLanguage.js deleted file mode 100644 index b11e6ebbd..000000000 --- a/frontend/src/Indexer/MovieLanguage.js +++ /dev/null @@ -1,70 +0,0 @@ -import PropTypes from 'prop-types'; -import React from 'react'; -import Label from 'Components/Label'; -import Popover from 'Components/Tooltip/Popover'; -import { kinds, tooltipPositions } from 'Helpers/Props'; -import translate from 'Utilities/String/translate'; - -function MovieLanguage(props) { - const { - className, - languages, - isCutoffNotMet - } = props; - - if (!languages) { - return null; - } - - if (languages.length === 1) { - return ( - - ); - } - - return ( - - Multi-Language - - } - title={translate('Languages')} - body={ -
    - { - languages.map((language) => { - return ( -
  • - {language.name} -
  • - ); - }) - } -
- } - position={tooltipPositions.LEFT} - /> - ); -} - -MovieLanguage.propTypes = { - className: PropTypes.string, - languages: PropTypes.arrayOf(PropTypes.object), - isCutoffNotMet: PropTypes.bool -}; - -MovieLanguage.defaultProps = { - isCutoffNotMet: true -}; - -export default MovieLanguage; diff --git a/frontend/src/Indexer/MovieQuality.js b/frontend/src/Indexer/MovieQuality.js deleted file mode 100644 index ba4d4cc09..000000000 --- a/frontend/src/Indexer/MovieQuality.js +++ /dev/null @@ -1,77 +0,0 @@ -import PropTypes from 'prop-types'; -import React from 'react'; -import Label from 'Components/Label'; -import { kinds } from 'Helpers/Props'; -import formatBytes from 'Utilities/Number/formatBytes'; - -function getTooltip(title, quality, size, isMonitored, isCutoffNotMet) { - const revision = quality.revision; - - if (revision.real && revision.real > 0) { - title += ' [REAL]'; - } - - if (revision.version && revision.version > 1) { - title += ' [PROPER]'; - } - - if (size) { - title += ` - ${formatBytes(size)}`; - } - - if (!isMonitored) { - title += ' [Not Monitored]'; - } else if (isCutoffNotMet) { - title += ' [Cutoff Not Met]'; - } - - return title; -} - -function MovieQuality(props) { - const { - className, - title, - quality, - size, - isMonitored, - isCutoffNotMet - } = props; - - let kind = kinds.DEFAULT; - if (!isMonitored) { - kind = kinds.DISABLED; - } else if (isCutoffNotMet) { - kind = kinds.INVERSE; - } - - if (!quality) { - return null; - } - - return ( - - ); -} - -MovieQuality.propTypes = { - className: PropTypes.string, - title: PropTypes.string, - quality: PropTypes.object.isRequired, - size: PropTypes.number, - isMonitored: PropTypes.bool, - isCutoffNotMet: PropTypes.bool -}; - -MovieQuality.defaultProps = { - title: '', - isMonitored: true -}; - -export default MovieQuality; diff --git a/frontend/src/Indexer/MovieStatus.js b/frontend/src/Indexer/MovieStatus.js deleted file mode 100644 index 3df5f695a..000000000 --- a/frontend/src/Indexer/MovieStatus.js +++ /dev/null @@ -1,32 +0,0 @@ -import { icons } from 'Helpers/Props'; - -export function getMovieStatusDetails(status) { - - let statusDetails = { - icon: icons.ANNOUNCED, - title: 'Announced', - message: 'Movie is announced' - }; - - if (status === 'deleted') { - statusDetails = { - icon: icons.MOVIE_DELETED, - title: 'Deleted', - message: 'Movie was deleted from TMDb' - }; - } else if (status === 'inCinemas') { - statusDetails = { - icon: icons.IN_CINEMAS, - title: 'In Cinemas', - message: 'Movie is in Cinemas' - }; - } else if (status === 'released') { - statusDetails = { - icon: icons.MOVIE_FILE, - title: 'Released', - message: 'Movie is released' - }; - } - - return statusDetails; -} diff --git a/frontend/src/Indexer/MovieTitleLink.js b/frontend/src/Indexer/MovieTitleLink.js deleted file mode 100644 index 840465653..000000000 --- a/frontend/src/Indexer/MovieTitleLink.js +++ /dev/null @@ -1,31 +0,0 @@ -import PropTypes from 'prop-types'; -import React, { PureComponent } from 'react'; -import Link from 'Components/Link/Link'; - -class MovieTitleLink extends PureComponent { - - render() { - const { - titleSlug, - title - } = this.props; - - const link = `/movie/${titleSlug}`; - - return ( - - {title} - - ); - } -} - -MovieTitleLink.propTypes = { - titleSlug: PropTypes.string.isRequired, - title: PropTypes.string.isRequired -}; - -export default MovieTitleLink; diff --git a/frontend/src/Search/SearchIndex.js b/frontend/src/Search/SearchIndex.js index 0309c4666..716aa6910 100644 --- a/frontend/src/Search/SearchIndex.js +++ b/frontend/src/Search/SearchIndex.js @@ -11,9 +11,9 @@ import PageToolbarSection from 'Components/Page/Toolbar/PageToolbarSection'; import PageToolbarSeparator from 'Components/Page/Toolbar/PageToolbarSeparator'; import TableOptionsModalWrapper from 'Components/Table/TableOptions/TableOptionsModalWrapper'; import { align, icons, sortDirections } from 'Helpers/Props'; +import AddIndexerModal from 'Indexer/Add/AddIndexerModal'; +import EditIndexerModalConnector from 'Indexer/Edit/EditIndexerModalConnector'; import NoIndexer from 'Indexer/NoIndexer'; -import AddIndexerModal from 'Settings/Indexers/Indexers/AddIndexerModal'; -import EditIndexerModalConnector from 'Settings/Indexers/Indexers/EditIndexerModalConnector'; import * as keyCodes from 'Utilities/Constants/keyCodes'; import getErrorMessage from 'Utilities/Object/getErrorMessage'; import hasDifferentItemsOrOrder from 'Utilities/Object/hasDifferentItemsOrOrder'; diff --git a/frontend/src/Settings/Indexers/Indexers/Indexer.css b/frontend/src/Settings/Indexers/Indexers/Indexer.css deleted file mode 100644 index 693f94f87..000000000 --- a/frontend/src/Settings/Indexers/Indexers/Indexer.css +++ /dev/null @@ -1,30 +0,0 @@ -.indexer { - composes: card from '~Components/Card.css'; - - width: 290px; -} - -.nameContainer { - display: flex; - justify-content: space-between; -} - -.name { - @add-mixin truncate; - - margin-bottom: 20px; - font-weight: 300; - font-size: 24px; -} - -.cloneButton { - composes: button from '~Components/Link/IconButton.css'; - - height: 36px; -} - -.enabled { - display: flex; - flex-wrap: wrap; - margin-top: 5px; -} diff --git a/frontend/src/Settings/Indexers/Indexers/Indexer.js b/frontend/src/Settings/Indexers/Indexers/Indexer.js deleted file mode 100644 index 76af5f3e2..000000000 --- a/frontend/src/Settings/Indexers/Indexers/Indexer.js +++ /dev/null @@ -1,152 +0,0 @@ -import PropTypes from 'prop-types'; -import React, { Component } from 'react'; -import Card from 'Components/Card'; -import Label from 'Components/Label'; -import IconButton from 'Components/Link/IconButton'; -import ConfirmModal from 'Components/Modal/ConfirmModal'; -import { icons, kinds } from 'Helpers/Props'; -import translate from 'Utilities/String/translate'; -import EditIndexerModalConnector from './EditIndexerModalConnector'; -import styles from './Indexer.css'; - -class Indexer extends Component { - - // - // Lifecycle - - constructor(props, context) { - super(props, context); - - this.state = { - isEditIndexerModalOpen: false, - isDeleteIndexerModalOpen: false - }; - } - - // - // Listeners - - onEditIndexerPress = () => { - this.setState({ isEditIndexerModalOpen: true }); - } - - onEditIndexerModalClose = () => { - this.setState({ isEditIndexerModalOpen: false }); - } - - onDeleteIndexerPress = () => { - this.setState({ - isEditIndexerModalOpen: false, - isDeleteIndexerModalOpen: true - }); - } - - onDeleteIndexerModalClose= () => { - this.setState({ isDeleteIndexerModalOpen: false }); - } - - onConfirmDeleteIndexer = () => { - this.props.onConfirmDeleteIndexer(this.props.id); - } - - onCloneIndexerPress = () => { - const { - id, - onCloneIndexerPress - } = this.props; - - onCloneIndexerPress(id); - } - - // - // Render - - render() { - const { - id, - name, - enable, - supportsRss, - priority, - showPriority - } = this.props; - - return ( - -
-
- {name} -
- - -
- -
- - { - supportsRss && enable && - - } - - { - showPriority && - - } - { - !enable && - - } -
- - - - -
- ); - } -} - -Indexer.propTypes = { - id: PropTypes.number.isRequired, - name: PropTypes.string.isRequired, - enable: PropTypes.bool.isRequired, - supportsRss: PropTypes.bool.isRequired, - supportsSearch: PropTypes.bool.isRequired, - onCloneIndexerPress: PropTypes.func.isRequired, - onConfirmDeleteIndexer: PropTypes.func.isRequired, - priority: PropTypes.number.isRequired, - showPriority: PropTypes.bool.isRequired -}; - -export default Indexer; diff --git a/frontend/src/Settings/Indexers/Indexers/Indexers.css b/frontend/src/Settings/Indexers/Indexers/Indexers.css deleted file mode 100644 index bf2e72ba4..000000000 --- a/frontend/src/Settings/Indexers/Indexers/Indexers.css +++ /dev/null @@ -1,20 +0,0 @@ -.indexers { - display: flex; - flex-wrap: wrap; -} - -.addIndexer { - composes: indexer from '~./Indexer.css'; - - background-color: $cardAlternateBackgroundColor; - color: $gray; - text-align: center; -} - -.center { - display: inline-block; - padding: 5px 20px 0; - border: 1px solid $borderColor; - border-radius: 4px; - background-color: $white; -} diff --git a/frontend/src/Settings/Indexers/Indexers/Indexers.js b/frontend/src/Settings/Indexers/Indexers/Indexers.js deleted file mode 100644 index 1ff6d211e..000000000 --- a/frontend/src/Settings/Indexers/Indexers/Indexers.js +++ /dev/null @@ -1,126 +0,0 @@ -import PropTypes from 'prop-types'; -import React, { Component } from 'react'; -import Card from 'Components/Card'; -import FieldSet from 'Components/FieldSet'; -import Icon from 'Components/Icon'; -import PageSectionContent from 'Components/Page/PageSectionContent'; -import { icons } from 'Helpers/Props'; -import translate from 'Utilities/String/translate'; -import AddIndexerModal from './AddIndexerModal'; -import EditIndexerModalConnector from './EditIndexerModalConnector'; -import Indexer from './Indexer'; -import styles from './Indexers.css'; - -class Indexers extends Component { - - // - // Lifecycle - - constructor(props, context) { - super(props, context); - - this.state = { - isAddIndexerModalOpen: false, - isEditIndexerModalOpen: false - }; - } - - // - // Listeners - - onAddIndexerPress = () => { - this.setState({ isAddIndexerModalOpen: true }); - } - - onCloneIndexerPress = (id) => { - this.props.dispatchCloneIndexer({ id }); - this.setState({ isEditIndexerModalOpen: true }); - } - - onAddIndexerModalClose = ({ indexerSelected = false } = {}) => { - this.setState({ - isAddIndexerModalOpen: false, - isEditIndexerModalOpen: indexerSelected - }); - } - - onEditIndexerModalClose = () => { - this.setState({ isEditIndexerModalOpen: false }); - } - - // - // Render - - render() { - const { - items, - dispatchCloneIndexer, - onConfirmDeleteIndexer, - ...otherProps - } = this.props; - - const { - isAddIndexerModalOpen, - isEditIndexerModalOpen - } = this.state; - - const showPriority = items.some((index) => index.priority !== 25); - - return ( -
- -
- { - items.map((item) => { - return ( - - ); - }) - } - - -
- -
-
-
- - - - -
-
- ); - } -} - -Indexers.propTypes = { - isFetching: PropTypes.bool.isRequired, - error: PropTypes.object, - items: PropTypes.arrayOf(PropTypes.object).isRequired, - dispatchCloneIndexer: PropTypes.func.isRequired, - onConfirmDeleteIndexer: PropTypes.func.isRequired -}; - -export default Indexers; diff --git a/frontend/src/Settings/Indexers/Indexers/IndexersConnector.js b/frontend/src/Settings/Indexers/Indexers/IndexersConnector.js deleted file mode 100644 index b857ddc26..000000000 --- a/frontend/src/Settings/Indexers/Indexers/IndexersConnector.js +++ /dev/null @@ -1,58 +0,0 @@ -import PropTypes from 'prop-types'; -import React, { Component } from 'react'; -import { connect } from 'react-redux'; -import { createSelector } from 'reselect'; -import { cloneIndexer, deleteIndexer, fetchIndexers } from 'Store/Actions/indexerActions'; -import createSortedSectionSelector from 'Store/Selectors/createSortedSectionSelector'; -import sortByName from 'Utilities/Array/sortByName'; -import Indexers from './Indexers'; - -function createMapStateToProps() { - return createSelector( - createSortedSectionSelector('indexers', sortByName), - (indexers) => indexers - ); -} - -const mapDispatchToProps = { - dispatchFetchIndexers: fetchIndexers, - dispatchDeleteIndexer: deleteIndexer, - dispatchCloneIndexer: cloneIndexer -}; - -class IndexersConnector extends Component { - - // - // Lifecycle - - componentDidMount() { - this.props.dispatchFetchIndexers(); - } - - // - // Listeners - - onConfirmDeleteIndexer = (id) => { - this.props.dispatchDeleteIndexer({ id }); - } - - // - // Render - - render() { - return ( - - ); - } -} - -IndexersConnector.propTypes = { - dispatchFetchIndexers: PropTypes.func.isRequired, - dispatchDeleteIndexer: PropTypes.func.isRequired, - dispatchCloneIndexer: PropTypes.func.isRequired -}; - -export default connect(createMapStateToProps, mapDispatchToProps)(IndexersConnector); diff --git a/frontend/src/Settings/Quality/Definition/QualityDefinition.css b/frontend/src/Settings/Quality/Definition/QualityDefinition.css deleted file mode 100644 index e81febc1e..000000000 --- a/frontend/src/Settings/Quality/Definition/QualityDefinition.css +++ /dev/null @@ -1,93 +0,0 @@ -.qualityDefinition { - display: flex; - align-content: stretch; - margin: 5px 0; - padding-top: 5px; - height: 45px; - border-top: 1px solid $borderColor; -} - -.quality, -.title { - flex: 0 1 250px; - padding-right: 20px; - line-height: 40px; -} - -.sizeLimit { - flex: 0 1 500px; - padding-right: 30px; -} - -.slider { - width: 100%; - height: 20px; -} - -.bar { - top: 9px; - margin: 0 5px; - height: 3px; - background-color: $sliderAccentColor; - box-shadow: 0 0 0 #000; - - &:nth-child(3n+1) { - background-color: #ddd; - } -} - -.handle { - top: 1px; - z-index: 0 !important; - width: 18px; - height: 18px; - border: 3px solid $sliderAccentColor; - border-radius: 50%; - background-color: $white; - text-align: center; - cursor: pointer; -} - -.sizes { - display: flex; - justify-content: space-between; -} - -.megabytesPerMinute { - display: flex; - justify-content: space-between; - flex: 0 0 400px; -} - -.sizeInput { - composes: input from '~Components/Form/TextInput.css'; - - display: inline-block; - margin-left: 5px; - padding: 6px; - width: 75px; -} - -@media only screen and (max-width: $breakpointSmall) { - .qualityDefinition { - flex-wrap: wrap; - height: auto; - - &:first-child { - border-top: none; - } - } - - .qualityDefinition:first-child { - border-top: none; - } - - .quality { - font-weight: bold; - line-height: inherit; - } - - .sizeLimit { - margin-top: 10px; - } -} diff --git a/frontend/src/Settings/Quality/Definition/QualityDefinition.js b/frontend/src/Settings/Quality/Definition/QualityDefinition.js deleted file mode 100644 index 0ee8b76e1..000000000 --- a/frontend/src/Settings/Quality/Definition/QualityDefinition.js +++ /dev/null @@ -1,308 +0,0 @@ -import PropTypes from 'prop-types'; -import React, { Component } from 'react'; -import ReactSlider from 'react-slider'; -import NumberInput from 'Components/Form/NumberInput'; -import TextInput from 'Components/Form/TextInput'; -import Label from 'Components/Label'; -import Popover from 'Components/Tooltip/Popover'; -import { kinds, tooltipPositions } from 'Helpers/Props'; -import formatBytes from 'Utilities/Number/formatBytes'; -import roundNumber from 'Utilities/Number/roundNumber'; -import translate from 'Utilities/String/translate'; -import QualityDefinitionLimits from './QualityDefinitionLimits'; -import styles from './QualityDefinition.css'; - -const MIN = 0; -const MAX = 400; - -const slider = { - min: MIN, - max: roundNumber(Math.pow(MAX, 1 / 1.1)), - step: 0.1 -}; - -function getValue(inputValue) { - if (inputValue < MIN) { - return MIN; - } - - if (inputValue > MAX) { - return MAX; - } - - return roundNumber(inputValue); -} - -function getSliderValue(value, defaultValue) { - const sliderValue = value ? Math.pow(value, 1 / 1.1) : defaultValue; - - return roundNumber(sliderValue); -} - -class QualityDefinition extends Component { - - // - // Lifecycle - - constructor(props, context) { - super(props, context); - - this.state = { - sliderMinSize: getSliderValue(props.minSize, slider.min), - sliderMaxSize: getSliderValue(props.maxSize, slider.max), - sliderPreferredSize: getSliderValue(props.preferredSize, (slider.max - 3)) - }; - } - - // - // Listeners - - onSliderChange = ([sliderMinSize, sliderPreferredSize, sliderMaxSize]) => { - this.setState({ - sliderMinSize, - sliderMaxSize, - sliderPreferredSize - }); - - this.props.onSizeChange({ - minSize: roundNumber(Math.pow(sliderMinSize, 1.1)), - preferredSize: sliderPreferredSize === (slider.max - 3) ? null : roundNumber(Math.pow(sliderPreferredSize, 1.1)), - maxSize: sliderMaxSize === slider.max ? null : roundNumber(Math.pow(sliderMaxSize, 1.1)) - }); - } - - onAfterSliderChange = () => { - const { - minSize, - maxSize, - preferredSize - } = this.props; - - this.setState({ - sliderMiSize: getSliderValue(minSize, slider.min), - sliderMaxSize: getSliderValue(maxSize, slider.max), - sliderPreferredSize: getSliderValue(preferredSize, (slider.max - 3)) // fix - }); - } - - onMinSizeChange = ({ value }) => { - const minSize = getValue(value); - - this.setState({ - sliderMinSize: getSliderValue(minSize, slider.min) - }); - - this.props.onSizeChange({ - minSize, - maxSize: this.props.maxSize, - preferredSize: this.props.preferredSize - }); - } - - onPreferredSizeChange = ({ value }) => { - const preferredSize = value === (MAX - 3) ? null : getValue(value); - - this.setState({ - sliderPreferredSize: getSliderValue(preferredSize, slider.preferred) - }); - - this.props.onSizeChange({ - minSize: this.props.minSize, - maxSize: this.props.maxSize, - preferredSize - }); - } - - onMaxSizeChange = ({ value }) => { - const maxSize = value === MAX ? null : getValue(value); - - this.setState({ - sliderMaxSize: getSliderValue(maxSize, slider.max) - }); - - this.props.onSizeChange({ - minSize: this.props.minSize, - maxSize, - preferredSize: this.props.preferredSize - }); - } - - // - // Render - - render() { - const { - id, - quality, - title, - minSize, - maxSize, - preferredSize, - advancedSettings, - onTitleChange - } = this.props; - - const { - sliderMinSize, - sliderMaxSize, - sliderPreferredSize - } = this.state; - - const minBytes = minSize * 1024 * 1024; - const minSixty = `${formatBytes(minBytes * 60)}/h`; - - const preferredBytes = preferredSize * 1024 * 1024; - const preferredSixty = preferredBytes ? `${formatBytes(preferredBytes * 60)}/h` : 'Unlimited'; - - const maxBytes = maxSize && maxSize * 1024 * 1024; - const maxSixty = maxBytes ? `${formatBytes(maxBytes * 60)}/h` : 'Unlimited'; - - return ( -
-
- {quality.name} -
- -
- -
- -
- - -
-
- {minSixty} - } - title={translate('MinimumLimits')} - body={ - - } - position={tooltipPositions.BOTTOM} - /> -
- -
- {preferredSixty} - } - title={translate('PreferredSize')} - body={ - - } - position={tooltipPositions.BOTTOM} - /> -
- -
- {maxSixty} - } - title={translate('MaximumLimits')} - body={ - - } - position={tooltipPositions.BOTTOM} - /> -
-
-
- - { - advancedSettings && -
-
- Min - - -
- -
- Preferred - - -
- -
- Max - - -
-
- } -
- ); - } -} - -QualityDefinition.propTypes = { - id: PropTypes.number.isRequired, - quality: PropTypes.object.isRequired, - title: PropTypes.string.isRequired, - minSize: PropTypes.number, - maxSize: PropTypes.number, - preferredSize: PropTypes.number, - advancedSettings: PropTypes.bool.isRequired, - onTitleChange: PropTypes.func.isRequired, - onSizeChange: PropTypes.func.isRequired -}; - -export default QualityDefinition; diff --git a/frontend/src/Settings/Quality/Definition/QualityDefinitionConnector.js b/frontend/src/Settings/Quality/Definition/QualityDefinitionConnector.js deleted file mode 100644 index 09e5b5525..000000000 --- a/frontend/src/Settings/Quality/Definition/QualityDefinitionConnector.js +++ /dev/null @@ -1,70 +0,0 @@ -import PropTypes from 'prop-types'; -import React, { Component } from 'react'; -import { connect } from 'react-redux'; -import { clearPendingChanges } from 'Store/Actions/baseActions'; -import { setQualityDefinitionValue } from 'Store/Actions/settingsActions'; -import QualityDefinition from './QualityDefinition'; - -const mapDispatchToProps = { - setQualityDefinitionValue, - clearPendingChanges -}; - -class QualityDefinitionConnector extends Component { - - componentWillUnmount() { - this.props.clearPendingChanges({ section: 'settings.qualityDefinitions' }); - } - - // - // Listeners - - onTitleChange = ({ value }) => { - this.props.setQualityDefinitionValue({ id: this.props.id, name: 'title', value }); - } - - onSizeChange = ({ minSize, maxSize, preferredSize }) => { - const { - id, - minSize: currentMinSize, - maxSize: currentMaxSize, - preferredSize: currentPreferredSize - } = this.props; - - if (minSize !== currentMinSize) { - this.props.setQualityDefinitionValue({ id, name: 'minSize', value: minSize }); - } - - if (maxSize !== currentMaxSize) { - this.props.setQualityDefinitionValue({ id, name: 'maxSize', value: maxSize }); - } - - if (preferredSize !== currentPreferredSize) { - this.props.setQualityDefinitionValue({ id, name: 'preferredSize', value: preferredSize }); - } - } - - // - // Render - - render() { - return ( - - ); - } -} - -QualityDefinitionConnector.propTypes = { - id: PropTypes.number.isRequired, - minSize: PropTypes.number, - maxSize: PropTypes.number, - preferredSize: PropTypes.number, - setQualityDefinitionValue: PropTypes.func.isRequired, - clearPendingChanges: PropTypes.func.isRequired -}; - -export default connect(null, mapDispatchToProps)(QualityDefinitionConnector); diff --git a/frontend/src/Settings/Quality/Definition/QualityDefinitionLimits.js b/frontend/src/Settings/Quality/Definition/QualityDefinitionLimits.js deleted file mode 100644 index 2f8886b1f..000000000 --- a/frontend/src/Settings/Quality/Definition/QualityDefinitionLimits.js +++ /dev/null @@ -1,40 +0,0 @@ -import PropTypes from 'prop-types'; -import React from 'react'; -import formatBytes from 'Utilities/Number/formatBytes'; -import translate from 'Utilities/String/translate'; - -function QualityDefinitionLimits(props) { - const { - bytes, - message - } = props; - - if (!bytes) { - return
{message}
; - } - - const sixty = formatBytes(bytes * 60); - const ninety = formatBytes(bytes * 90); - const hundredTwenty = formatBytes(bytes * 120); - - return ( -
-
- {translate('MinutesSixty', [sixty])} -
-
- {translate('MinutesNinety', [ninety])} -
-
- {translate('MinutesHundredTwenty', [hundredTwenty])} -
-
- ); -} - -QualityDefinitionLimits.propTypes = { - bytes: PropTypes.number, - message: PropTypes.string.isRequired -}; - -export default QualityDefinitionLimits; diff --git a/frontend/src/Settings/Quality/Definition/QualityDefinitions.css b/frontend/src/Settings/Quality/Definition/QualityDefinitions.css deleted file mode 100644 index 689017684..000000000 --- a/frontend/src/Settings/Quality/Definition/QualityDefinitions.css +++ /dev/null @@ -1,41 +0,0 @@ -.header { - display: flex; - font-weight: bold; -} - -.quality, -.title { - flex: 0 1 250px; -} - -.sizeLimit { - flex: 0 1 500px; -} - -.megabytesPerMinute { - flex: 0 0 250px; -} - -.sizeLimitHelpTextContainer { - display: flex; - justify-content: flex-end; - margin-top: 20px; - max-width: 1000px; -} - -.sizeLimitHelpText { - max-width: 500px; - color: $helpTextColor; -} - -@media only screen and (max-width: $breakpointSmall) { - .header { - display: none; - } - - .definitions { - &:first-child { - border-top: none; - } - } -} diff --git a/frontend/src/Settings/Quality/Definition/QualityDefinitions.js b/frontend/src/Settings/Quality/Definition/QualityDefinitions.js deleted file mode 100644 index 0b886839a..000000000 --- a/frontend/src/Settings/Quality/Definition/QualityDefinitions.js +++ /dev/null @@ -1,74 +0,0 @@ -import PropTypes from 'prop-types'; -import React, { Component } from 'react'; -import FieldSet from 'Components/FieldSet'; -import PageSectionContent from 'Components/Page/PageSectionContent'; -import translate from 'Utilities/String/translate'; -import QualityDefinitionConnector from './QualityDefinitionConnector'; -import styles from './QualityDefinitions.css'; - -class QualityDefinitions extends Component { - - // - // Render - - render() { - const { - items, - advancedSettings, - ...otherProps - } = this.props; - - return ( -
- -
-
Quality
-
Title
-
Size Limit
- - { - advancedSettings ? -
- Megabytes Per Minute -
: - null - } -
- -
- { - items.map((item) => { - return ( - - ); - }) - } -
- -
-
- Limits are automatically adjusted for the movie runtime. -
-
-
-
- ); - } -} - -QualityDefinitions.propTypes = { - isFetching: PropTypes.bool.isRequired, - error: PropTypes.object, - defaultProfile: PropTypes.object, - items: PropTypes.arrayOf(PropTypes.object).isRequired, - advancedSettings: PropTypes.bool.isRequired -}; - -export default QualityDefinitions; diff --git a/frontend/src/Settings/Quality/Definition/QualityDefinitionsConnector.js b/frontend/src/Settings/Quality/Definition/QualityDefinitionsConnector.js deleted file mode 100644 index b7a36fe72..000000000 --- a/frontend/src/Settings/Quality/Definition/QualityDefinitionsConnector.js +++ /dev/null @@ -1,92 +0,0 @@ -import _ from 'lodash'; -import PropTypes from 'prop-types'; -import React, { Component } from 'react'; -import { connect } from 'react-redux'; -import { createSelector } from 'reselect'; -import { fetchQualityDefinitions, saveQualityDefinitions } from 'Store/Actions/settingsActions'; -import QualityDefinitions from './QualityDefinitions'; - -function createMapStateToProps() { - return createSelector( - (state) => state.settings.qualityDefinitions, - (state) => state.settings.advancedSettings, - (qualityDefinitions, advancedSettings) => { - const items = qualityDefinitions.items.map((item) => { - const pendingChanges = qualityDefinitions.pendingChanges[item.id] || {}; - - return Object.assign({}, item, pendingChanges); - }); - - return { - ...qualityDefinitions, - items, - hasPendingChanges: !_.isEmpty(qualityDefinitions.pendingChanges), - advancedSettings - }; - } - ); -} - -const mapDispatchToProps = { - dispatchFetchQualityDefinitions: fetchQualityDefinitions, - dispatchSaveQualityDefinitions: saveQualityDefinitions -}; - -class QualityDefinitionsConnector extends Component { - - // - // Lifecycle - - componentDidMount() { - this.props.dispatchFetchQualityDefinitions(); - - const { - dispatchFetchQualityDefinitions, - dispatchSaveQualityDefinitions, - onChildMounted - } = this.props; - - dispatchFetchQualityDefinitions(); - onChildMounted(dispatchSaveQualityDefinitions); - } - - componentDidUpdate(prevProps) { - const { - hasPendingChanges, - isSaving, - onChildStateChange - } = this.props; - - if ( - prevProps.isSaving !== isSaving || - prevProps.hasPendingChanges !== hasPendingChanges - ) { - onChildStateChange({ - isSaving, - hasPendingChanges - }); - } - } - - // - // Render - - render() { - return ( - - ); - } -} - -QualityDefinitionsConnector.propTypes = { - isSaving: PropTypes.bool.isRequired, - hasPendingChanges: PropTypes.bool.isRequired, - dispatchFetchQualityDefinitions: PropTypes.func.isRequired, - dispatchSaveQualityDefinitions: PropTypes.func.isRequired, - onChildMounted: PropTypes.func.isRequired, - onChildStateChange: PropTypes.func.isRequired -}; - -export default connect(createMapStateToProps, mapDispatchToProps, null)(QualityDefinitionsConnector); diff --git a/frontend/src/Settings/Quality/Quality.js b/frontend/src/Settings/Quality/Quality.js deleted file mode 100644 index 17b7ad48e..000000000 --- a/frontend/src/Settings/Quality/Quality.js +++ /dev/null @@ -1,69 +0,0 @@ -import React, { Component } from 'react'; -import PageContent from 'Components/Page/PageContent'; -import PageContentBody from 'Components/Page/PageContentBody'; -import SettingsToolbarConnector from 'Settings/SettingsToolbarConnector'; -import translate from 'Utilities/String/translate'; -import QualityDefinitionsConnector from './Definition/QualityDefinitionsConnector'; - -class Quality extends Component { - - // - // Lifecycle - - constructor(props, context) { - super(props, context); - - this._saveCallback = null; - - this.state = { - isSaving: false, - hasPendingChanges: false - }; - } - - // - // Listeners - - onChildMounted = (saveCallback) => { - this._saveCallback = saveCallback; - } - - onChildStateChange = (payload) => { - this.setState(payload); - } - - onSavePress = () => { - if (this._saveCallback) { - this._saveCallback(); - } - } - - // - // Render - - render() { - const { - isSaving, - hasPendingChanges - } = this.state; - - return ( - - - - - - - - ); - } -} - -export default Quality; diff --git a/frontend/src/Store/Actions/index.js b/frontend/src/Store/Actions/index.js index cdb94861e..1f0eccd71 100644 --- a/frontend/src/Store/Actions/index.js +++ b/frontend/src/Store/Actions/index.js @@ -7,7 +7,6 @@ import * as indexers from './indexerActions'; import * as indexerIndex from './indexerIndexActions'; import * as indexerStats from './indexerStatsActions'; import * as indexerStatus from './indexerStatusActions'; -import * as movies from './movieActions'; import * as oAuth from './oAuthActions'; import * as paths from './pathActions'; import * as providerOptions from './providerOptionActions'; @@ -26,7 +25,6 @@ export default [ paths, providerOptions, releases, - movies, indexers, indexerIndex, indexerStats, diff --git a/frontend/src/Store/Actions/indexerActions.js b/frontend/src/Store/Actions/indexerActions.js index 17ba60f1b..fdc0b8fb1 100644 --- a/frontend/src/Store/Actions/indexerActions.js +++ b/frontend/src/Store/Actions/indexerActions.js @@ -9,8 +9,10 @@ import createTestProviderHandler, { createCancelTestProviderHandler } from 'Stor import createSetProviderFieldValueReducer from 'Store/Actions/Creators/Reducers/createSetProviderFieldValueReducer'; import createSetSettingValueReducer from 'Store/Actions/Creators/Reducers/createSetSettingValueReducer'; import { createThunk, handleThunks } from 'Store/thunks'; +import dateFilterPredicate from 'Utilities/Date/dateFilterPredicate'; import getSectionState from 'Utilities/State/getSectionState'; import updateSectionState from 'Utilities/State/updateSectionState'; +import translate from 'Utilities/String/translate'; import createHandleActions from './Creators/createHandleActions'; import createSetClientSideCollectionSortReducer from './Creators/Reducers/createSetClientSideCollectionSortReducer'; @@ -45,6 +47,22 @@ export const defaultState = { } }; +export const filters = [ + { + key: 'all', + label: translate('All'), + filters: [] + } +]; + +export const filterPredicates = { + added: function(item, filterValue, type) { + return dateFilterPredicate(item.added, filterValue, type); + } +}; + +export const sortPredicates = {}; + // // Actions Types diff --git a/frontend/src/Store/Actions/indexerIndexActions.js b/frontend/src/Store/Actions/indexerIndexActions.js index 08e895cdb..4b88d6791 100644 --- a/frontend/src/Store/Actions/indexerIndexActions.js +++ b/frontend/src/Store/Actions/indexerIndexActions.js @@ -9,7 +9,7 @@ import createHandleActions from './Creators/createHandleActions'; import createSetClientSideCollectionFilterReducer from './Creators/Reducers/createSetClientSideCollectionFilterReducer'; import createSetClientSideCollectionSortReducer from './Creators/Reducers/createSetClientSideCollectionSortReducer'; import createSetTableOptionReducer from './Creators/Reducers/createSetTableOptionReducer'; -import { filterPredicates, filters, sortPredicates } from './movieActions'; +import { filterPredicates, filters, sortPredicates } from './indexerActions'; // // Variables diff --git a/frontend/src/Store/Actions/movieActions.js b/frontend/src/Store/Actions/movieActions.js deleted file mode 100644 index 5be6399da..000000000 --- a/frontend/src/Store/Actions/movieActions.js +++ /dev/null @@ -1,193 +0,0 @@ -import _ from 'lodash'; -import { createAction } from 'redux-actions'; -import { sortDirections } from 'Helpers/Props'; -import { createThunk, handleThunks } from 'Store/thunks'; -// import { batchActions } from 'redux-batched-actions'; -import createAjaxRequest from 'Utilities/createAjaxRequest'; -import dateFilterPredicate from 'Utilities/Date/dateFilterPredicate'; -import translate from 'Utilities/String/translate'; -import { updateItem } from './baseActions'; -import createFetchHandler from './Creators/createFetchHandler'; -import createHandleActions from './Creators/createHandleActions'; -import createRemoveItemHandler from './Creators/createRemoveItemHandler'; -import createSaveProviderHandler from './Creators/createSaveProviderHandler'; -import createSetSettingValueReducer from './Creators/Reducers/createSetSettingValueReducer'; - -// -// Variables - -export const section = 'movies'; - -export const filters = [ - { - key: 'all', - label: translate('All'), - filters: [] - } -]; - -export const filterPredicates = { - added: function(item, filterValue, type) { - return dateFilterPredicate(item.added, filterValue, type); - } -}; - -export const sortPredicates = { - status: function(item) { - let result = 0; - - if (item.monitored) { - result += 4; - } - - if (item.status === 'announced') { - result++; - } - - if (item.status === 'inCinemas') { - result += 2; - } - - if (item.status === 'released') { - result += 3; - } - - return result; - } -}; - -// -// State - -export const defaultState = { - isFetching: false, - isPopulated: false, - error: null, - isSaving: false, - saveError: null, - items: [], - sortKey: 'name', - sortDirection: sortDirections.ASCENDING, - pendingChanges: {} -}; - -// -// Actions Types - -export const FETCH_MOVIES = 'movies/fetchMovies'; -export const SET_MOVIE_VALUE = 'movies/setMovieValue'; -export const SAVE_MOVIE = 'movies/saveMovie'; -export const DELETE_MOVIE = 'movies/deleteMovie'; - -export const TOGGLE_MOVIE_MONITORED = 'movies/toggleMovieMonitored'; - -// -// Action Creators - -export const fetchMovies = createThunk(FETCH_MOVIES); -export const saveMovie = createThunk(SAVE_MOVIE, (payload) => { - const newPayload = { - ...payload - }; - - if (payload.moveFiles) { - newPayload.queryParams = { - moveFiles: true - }; - } - - delete newPayload.moveFiles; - - return newPayload; -}); - -export const deleteMovie = createThunk(DELETE_MOVIE, (payload) => { - return { - ...payload, - queryParams: { - deleteFiles: payload.deleteFiles - } - }; -}); - -export const toggleMovieMonitored = createThunk(TOGGLE_MOVIE_MONITORED); - -export const setMovieValue = createAction(SET_MOVIE_VALUE, (payload) => { - return { - section, - ...payload - }; -}); - -// -// Helpers - -function getSaveAjaxOptions({ ajaxOptions, payload }) { - if (payload.moveFolder) { - ajaxOptions.url = `${ajaxOptions.url}?moveFolder=true`; - } - - return ajaxOptions; -} - -// -// Action Handlers - -export const actionHandlers = handleThunks({ - - [FETCH_MOVIES]: createFetchHandler(section, '/movie'), - [SAVE_MOVIE]: createSaveProviderHandler(section, '/movie', { getAjaxOptions: getSaveAjaxOptions }), - [DELETE_MOVIE]: createRemoveItemHandler(section, '/movie'), - - [TOGGLE_MOVIE_MONITORED]: (getState, payload, dispatch) => { - const { - movieId: id, - monitored - } = payload; - - const movie = _.find(getState().movies.items, { id }); - - dispatch(updateItem({ - id, - section, - isSaving: true - })); - - const promise = createAjaxRequest({ - url: `/movie/${id}`, - method: 'PUT', - data: JSON.stringify({ - ...movie, - monitored - }), - dataType: 'json' - }).request; - - promise.done((data) => { - dispatch(updateItem({ - id, - section, - isSaving: false, - monitored - })); - }); - - promise.fail((xhr) => { - dispatch(updateItem({ - id, - section, - isSaving: false - })); - }); - } - -}); - -// -// Reducers - -export const reducers = createHandleActions({ - - [SET_MOVIE_VALUE]: createSetSettingValueReducer(section) - -}, defaultState, section); diff --git a/frontend/src/Store/Selectors/createExistingMovieSelector.js b/frontend/src/Store/Selectors/createExistingMovieSelector.js deleted file mode 100644 index 94bb63687..000000000 --- a/frontend/src/Store/Selectors/createExistingMovieSelector.js +++ /dev/null @@ -1,15 +0,0 @@ -import _ from 'lodash'; -import { createSelector } from 'reselect'; -import createAllMoviesSelector from './createAllMoviesSelector'; - -function createExistingMovieSelector() { - return createSelector( - (state, { tmdbId }) => tmdbId, - createAllMoviesSelector(), - (tmdbId, movies) => { - return _.some(movies, { tmdbId }); - } - ); -} - -export default createExistingMovieSelector; diff --git a/frontend/src/Store/Selectors/createImportMovieItemSelector.js b/frontend/src/Store/Selectors/createImportMovieItemSelector.js deleted file mode 100644 index 4dd4abedc..000000000 --- a/frontend/src/Store/Selectors/createImportMovieItemSelector.js +++ /dev/null @@ -1,26 +0,0 @@ -import _ from 'lodash'; -import { createSelector } from 'reselect'; -import createAllMoviesSelector from './createAllMoviesSelector'; - -function createImportMovieItemSelector() { - return createSelector( - (state, { id }) => id, - (state) => state.addMovie, - (state) => state.importMovie, - createAllMoviesSelector(), - (id, addMovie, importMovie, movies) => { - const item = _.find(importMovie.items, { id }) || {}; - const selectedMovie = item && item.selectedMovie; - const isExistingMovie = !!selectedMovie && _.some(movies, { tmdbId: selectedMovie.tmdbId }); - - return { - defaultMonitor: addMovie.defaults.monitor, - defaultQualityProfileId: addMovie.defaults.qualityProfileId, - ...item, - isExistingMovie - }; - } - ); -} - -export default createImportMovieItemSelector; diff --git a/frontend/src/Store/Selectors/createMovieCountSelector.js b/frontend/src/Store/Selectors/createMovieCountSelector.js deleted file mode 100644 index 17d04afa2..000000000 --- a/frontend/src/Store/Selectors/createMovieCountSelector.js +++ /dev/null @@ -1,21 +0,0 @@ -import { createSelector } from 'reselect'; -import createAllMoviesSelector from './createAllMoviesSelector'; - -function createMovieCountSelector() { - return createSelector( - createAllMoviesSelector(), - (state) => state.movies.error, - (state) => state.movies.isFetching, - (state) => state.movies.isPopulated, - (movies, error, isFetching, isPopulated) => { - return { - count: movies.length, - error, - isFetching, - isPopulated - }; - } - ); -} - -export default createMovieCountSelector; diff --git a/frontend/src/Utilities/Date/formatRuntime.js b/frontend/src/Utilities/Date/formatRuntime.js deleted file mode 100644 index e3ac68ad3..000000000 --- a/frontend/src/Utilities/Date/formatRuntime.js +++ /dev/null @@ -1,15 +0,0 @@ -function formatRuntime(minutes, format) { - if (!minutes) { - return (format === 'hoursMinutes') ? '0m' : '0 mins'; - } - - if (format === 'minutes') { - return `${minutes} mins`; - } - - const movieHours = Math.floor(minutes / 60); - const movieMinutes = (minutes <= 59) ? minutes : minutes % 60; - return `${((movieHours > 0) ? `${movieHours}h ` : '') + movieMinutes}m`; -} - -export default formatRuntime; diff --git a/frontend/src/Utilities/Episode/updateEpisodes.js b/frontend/src/Utilities/Episode/updateEpisodes.js deleted file mode 100644 index 80890b53f..000000000 --- a/frontend/src/Utilities/Episode/updateEpisodes.js +++ /dev/null @@ -1,21 +0,0 @@ -import _ from 'lodash'; -import { update } from 'Store/Actions/baseActions'; - -function updateEpisodes(section, episodes, episodeIds, options) { - const data = _.reduce(episodes, (result, item) => { - if (episodeIds.indexOf(item.id) > -1) { - result.push({ - ...item, - ...options - }); - } else { - result.push(item); - } - - return result; - }, []); - - return update({ section, data }); -} - -export default updateEpisodes; diff --git a/frontend/src/Utilities/Movie/getNewMovie.js b/frontend/src/Utilities/Movie/getNewMovie.js deleted file mode 100644 index e9dc84489..000000000 --- a/frontend/src/Utilities/Movie/getNewMovie.js +++ /dev/null @@ -1,26 +0,0 @@ - -function getNewMovie(movie, payload) { - const { - rootFolderPath, - monitor, - qualityProfileId, - minimumAvailability, - tags, - searchForMovie = false - } = payload; - - const addOptions = { - searchForMovie - }; - - movie.addOptions = addOptions; - movie.monitored = monitor === 'true'; - movie.qualityProfileId = qualityProfileId; - movie.minimumAvailability = minimumAvailability; - movie.rootFolderPath = rootFolderPath; - movie.tags = tags; - - return movie; -} - -export default getNewMovie; diff --git a/frontend/src/Utilities/Movie/getProgressBarKind.js b/frontend/src/Utilities/Movie/getProgressBarKind.js deleted file mode 100644 index 7b84d8931..000000000 --- a/frontend/src/Utilities/Movie/getProgressBarKind.js +++ /dev/null @@ -1,27 +0,0 @@ -import { kinds } from 'Helpers/Props'; - -function getProgressBarKind(status, monitored, hasFile, isAvailable, queue = false) { - if (queue) { - return kinds.QUEUE; - } - - if (hasFile && monitored) { - return kinds.SUCCESS; - } - - if (hasFile && !monitored) { - return kinds.DEFAULT; - } - - if (isAvailable) { - return kinds.DANGER; - } - - if (!monitored) { - return kinds.WARNING; - } - - return kinds.PRIMARY; -} - -export default getProgressBarKind; diff --git a/frontend/src/Utilities/Movie/getQueueStatusText.js b/frontend/src/Utilities/Movie/getQueueStatusText.js deleted file mode 100644 index d99bde234..000000000 --- a/frontend/src/Utilities/Movie/getQueueStatusText.js +++ /dev/null @@ -1,50 +0,0 @@ -import titleCase from 'Utilities/String/titleCase'; -import translate from 'Utilities/String/translate'; - -export default function getQueueStatusText(queueStatus, queueState) { - if (!queueStatus) { - return; - } - - let status = translate('Downloading'); - - switch (true) { - case queueStatus !== 'completed': - switch (queueStatus) { - case 'queue': - case 'paused': - case 'failed': - case 'downloading': - status = titleCase(queueStatus); - break; - case 'delay': - status = translate('Pending'); - break; - case 'DownloadClientUnavailable': - case 'warning': - status = translate('Error'); - break; - default: - } - break; - - case queueStatus === 'completed': - switch (queueState) { - case 'importPending': - status = translate('Pending'); - break; - case 'importing': - status = translate('Importing'); - break; - case 'failedPending': - status = translate('Waiting'); - break; - default: - } - break; - - default: - } - - return status; -} diff --git a/frontend/src/Utilities/Quality/getQualities.js b/frontend/src/Utilities/Quality/getQualities.js deleted file mode 100644 index da09851ea..000000000 --- a/frontend/src/Utilities/Quality/getQualities.js +++ /dev/null @@ -1,16 +0,0 @@ -export default function getQualities(qualities) { - if (!qualities) { - return []; - } - - return qualities.reduce((acc, item) => { - if (item.quality) { - acc.push(item.quality); - } else { - const groupQualities = item.items.map((i) => i.quality); - acc.push(...groupQualities); - } - - return acc; - }, []); -} diff --git a/gulpFile.js b/gulpFile.js deleted file mode 100644 index 42b01903a..000000000 --- a/gulpFile.js +++ /dev/null @@ -1 +0,0 @@ -require('./frontend/gulp/gulpFile.js'); \ No newline at end of file diff --git a/src/NzbDrone.Core/Configuration/ConfigService.cs b/src/NzbDrone.Core/Configuration/ConfigService.cs index 256f1b467..4ca375459 100644 --- a/src/NzbDrone.Core/Configuration/ConfigService.cs +++ b/src/NzbDrone.Core/Configuration/ConfigService.cs @@ -224,13 +224,6 @@ namespace NzbDrone.Core.Configuration set { SetValue("CalendarWeekColumnHeader", value); } } - public MovieRuntimeFormatType MovieRuntimeFormat - { - get { return GetValueEnum("MovieRuntimeFormat", MovieRuntimeFormatType.HoursMinutes); } - - set { SetValue("MovieRuntimeFormat", value); } - } - public string ShortDateFormat { get { return GetValue("ShortDateFormat", "MMM D YYYY"); } diff --git a/src/NzbDrone.Core/Configuration/IConfigService.cs b/src/NzbDrone.Core/Configuration/IConfigService.cs index 1485e6de6..78bd52664 100644 --- a/src/NzbDrone.Core/Configuration/IConfigService.cs +++ b/src/NzbDrone.Core/Configuration/IConfigService.cs @@ -45,7 +45,6 @@ namespace NzbDrone.Core.Configuration //UI int FirstDayOfWeek { get; set; } string CalendarWeekColumnHeader { get; set; } - MovieRuntimeFormatType MovieRuntimeFormat { get; set; } string ShortDateFormat { get; set; } string LongDateFormat { get; set; } diff --git a/src/NzbDrone.Core/Configuration/MovieRuntimeFormatType.cs b/src/NzbDrone.Core/Configuration/MovieRuntimeFormatType.cs deleted file mode 100644 index f95540727..000000000 --- a/src/NzbDrone.Core/Configuration/MovieRuntimeFormatType.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace NzbDrone.Core.Configuration -{ - public enum MovieRuntimeFormatType - { - HoursMinutes, - Minutes - } -} diff --git a/src/Prowlarr.Api.V1/Config/UiConfigResource.cs b/src/Prowlarr.Api.V1/Config/UiConfigResource.cs index 29ee0c4eb..b1ea90f03 100644 --- a/src/Prowlarr.Api.V1/Config/UiConfigResource.cs +++ b/src/Prowlarr.Api.V1/Config/UiConfigResource.cs @@ -9,9 +9,6 @@ namespace Prowlarr.Api.V1.Config public int FirstDayOfWeek { get; set; } public string CalendarWeekColumnHeader { get; set; } - // Movies - public MovieRuntimeFormatType MovieRuntimeFormat { get; set; } - //Dates public string ShortDateFormat { get; set; } public string LongDateFormat { get; set; } @@ -32,8 +29,6 @@ namespace Prowlarr.Api.V1.Config FirstDayOfWeek = model.FirstDayOfWeek, CalendarWeekColumnHeader = model.CalendarWeekColumnHeader, - MovieRuntimeFormat = model.MovieRuntimeFormat, - ShortDateFormat = model.ShortDateFormat, LongDateFormat = model.LongDateFormat, TimeFormat = model.TimeFormat, diff --git a/src/Prowlarr.Api.V1/swagger.json b/src/Prowlarr.Api.V1/swagger.json index 969a776b4..8d70d9764 100644 --- a/src/Prowlarr.Api.V1/swagger.json +++ b/src/Prowlarr.Api.V1/swagger.json @@ -1907,9 +1907,6 @@ "calendarWeekColumnHeader": { "type": "string" }, - "movieRuntimeFormat": { - "type": "string" - }, "shortDateFormat": { "type": "string" }, @@ -1938,7 +1935,6 @@ "value": { "firstDayOfWeek": 0, "calendarWeekColumnHeader": "ddd M/D", - "movieRuntimeFormat": "hoursMinutes", "shortDateFormat": "MMM D YYYY", "longDateFormat": "dddd, MMMM D YYYY", "timeFormat": "h(:mm)a",