1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-17 21:26:13 -04:00

Compare commits

..

61 Commits

Author SHA1 Message Date
Taloth Saldono
90697d77a5 Bumped package version for main 2021-03-07 23:27:22 +01:00
Qstick
fa7aa05d60 Cleanup formatting in PackageGlobalMessageCheck.cs 2021-03-07 13:26:19 -08:00
Mark McDowall
4ed5fefcc6 Fixed: Remove selected in queue
Closes #4364
2021-03-07 12:24:06 -08:00
Taloth Saldono
4c324fbbbf Fixed failing test 2021-03-07 00:00:41 +01:00
Taloth Saldono
7da02c236a Added mechanism for package maintainers to produce a health check error. 2021-03-06 22:47:15 +01:00
Taloth Saldono
79cfa3a5f6 Removed bad file from commit 2021-03-06 22:47:15 +01:00
Qstick
2746556ae2 Cleanup trailing space in HttpResponse 2021-03-06 17:49:14 +01:00
Taloth Saldono
d668e923af New: Allow user to choose whether delay profile should apply to release of the highest enabled quality 2021-03-06 13:57:11 +01:00
Taloth Saldono
24ca47356e Sentry logging exceptions and some trace logging 2021-03-06 13:57:11 +01:00
Taloth Saldono
ab4f57f2fa Debug logging for email notifications
ref #4348
2021-03-06 13:57:10 +01:00
Mark McDowall
13ff2d4c70 Fixed: Restoring a backup with a different API didn't reload properly 2021-03-05 18:29:00 -08:00
Mark McDowall
2728bf79ca New: Improve messaging if release is in queue because all episodes in release were not imported 2021-03-05 18:29:00 -08:00
Mark McDowall
cd28af98ee Fixed: Removal of previous service 2021-03-05 18:28:59 -08:00
Mark McDowall
e9818b9982 Fixed: Queue refresh closing manual import from queue if items change 2021-03-05 18:28:59 -08:00
Qstick
d6cf370bcd Handle 303 and 307 redirects in Http Requests 2021-03-03 20:43:44 -08:00
Michael Casey
cb8ed74fe9 New: Add Recommended to the List types for Trakt
Closes #4167
2021-02-27 12:18:07 -08:00
bakerboy448
4e81b33006 Update contributing.md Github docs URL 2021-02-27 12:16:38 -08:00
bakerboy448
e67864fecb Fixed: Cleanse Tracker Announce Keys from logs
Closes #4341
2021-02-25 00:22:58 +01:00
Taloth Saldono
e289c428c6 Fixed: Refresh scene naming exceptions on series add to help first-use scenario 2021-02-20 20:04:34 +01:00
Taloth Saldono
23047623ee Cleanse more /home/username scenarios 2021-02-20 20:04:34 +01:00
Mark McDowall
062e47e27e Fixed: History details incorrect when preferred word score was 0
Closes #4328
2021-02-16 22:35:11 -08:00
Taloth Saldono
28ba037630 Fixed: Searching specials with NNTMux-based usenet indexers 2021-02-16 21:57:53 +01:00
Taloth Saldono
82da38941e Fixed: Debian package dependencies
closes #4332
2021-02-16 21:57:53 +01:00
Mark McDowall
10c770b116 Fixed: Use original file path when calculating preferred word score for existing file
Closes #3488
Closes #3913
2021-02-13 17:13:09 -08:00
Mark McDowall
3c45349404 New: Include renamed file information for Webhook and Custom Scripts
Closes #3927
2021-02-13 17:13:09 -08:00
Mark McDowall
b815d27a10 New: Include episode file with episode file deleted events
Closes #4282
2021-02-12 17:01:31 -08:00
Mark McDowall
ec698c2cf7 Fixed: Parsing of release names with trailing colon in the title
Closes #4238
2021-02-11 17:00:11 -08:00
Mark McDowall
e7d57a95f2 Series editor column fixes
Fixed: Series Editor sorting by size on disk
Fixed: Series Editor column order/enabled lost on refresh
2021-02-10 16:52:21 -08:00
Mark McDowall
1250d71e80 Appeasing the lint gods 2021-02-09 20:17:53 -08:00
Mark McDowall
e42d1af5ff Fixed: Unable to close indexer category select input on mobile
Closes #4296
2021-02-09 17:35:32 -08:00
Mark McDowall
88ad6f9544 Fixed: Error checking if files should be deleted after import won't leave import in limbo
Closes #4318
2021-02-09 17:35:32 -08:00
Michael Casey
54c386dd22 Use SVG for loading page icon
closes #4311
2021-02-09 19:20:59 +01:00
Mark McDowall
694360457d Fixed: Error logged when notification fails to send after episode file is deleted
Closes #4289
2021-02-09 07:55:25 -08:00
Mark McDowall
ae196af2ad New: Health check for import lists with missing root folders
New: Show missing root folder path in edit for Import List

Closes #4315
2021-02-08 23:12:23 -08:00
Mark McDowall
12fafb2457 Fixed: Mark as Failed errors 2021-02-08 19:26:06 -08:00
Mark McDowall
795bc91d25 Fixed: Error logged when notification fails to send after episode file is deleted
Closes #4289
2021-02-08 16:39:47 -08:00
Mark McDowall
044342f677 Fixed: Scene name not being set during import 2021-02-08 11:10:42 -08:00
Mark McDowall
5960035d5d Fixed: Restoring backup from zip file on disk 2021-02-08 08:21:14 -08:00
Mark McDowall
6c324c8a1c Fixed: Errors loading queue after episodes in series are removed
Closes #3565
2021-02-07 20:25:44 -08:00
Mark McDowall
54a267d860 Fixed: Don't automatically import if absolutely numbered file if it doesn't match expected season
Closes #377
2021-02-07 17:28:16 -08:00
Mark McDowall
b5f08a8f06 Alternate titles prop validation 2021-02-07 16:52:57 -08:00
Mark McDowall
653db8290e Update column properties when restoring persisted state 2021-02-07 16:52:57 -08:00
Mark McDowall
cbc4295f28 Fixed: Use file name when importing batch release when renaming is disabled
Closes #3056
2021-02-07 16:52:57 -08:00
Mark McDowall
8876c9194d New: Show preferred word score in history 2021-02-07 16:52:56 -08:00
Taloth Saldono
d898f55660 Generalized RateLimit logic to all indexers based on indexer id 2021-02-08 00:09:59 +01:00
Taloth Saldono
a85979c2f6 New: Added Hindi language
closes #4275
2021-02-07 21:35:30 +01:00
bakerboy448
ae63373b2b Update parser tests to be generic 2021-02-07 21:06:41 +01:00
Mark McDowall
044cb563a6 Fixed: Table column order resetting after refresh
#4297
2021-02-07 11:52:44 -08:00
Michael Casey
5302ee05bc New: Add logo to loading page
Closes #4304
2021-02-07 11:51:53 -08:00
Taloth Saldono
29bc660cfb Fixed: Jackett indexer search performance 2021-02-07 19:50:04 +01:00
Taloth Saldono
f8b8afdaa2 New: Added Arabic language 2021-02-07 19:50:04 +01:00
Ricardo Loureiro
33b708927c Fixed: Authentication on DSM 7
closes #3943
ref #4313
2021-02-07 14:05:31 +01:00
Mark McDowall
42d9e37e7d Fixed: Settings fields being altered during save
Closes #4309
2021-02-06 19:28:41 -08:00
Michael Casey
fc3bea370f New: Persist search settings in add new series
Closes #4245
2021-02-06 19:18:47 -08:00
Robin Dadswell
a1ddcf2b7b New: Show number of files as tooltip over size on disk
Closes #4203
2021-02-06 19:15:31 -08:00
bakerboy448
5b98a17873 Update feature request template 2021-02-06 19:06:53 -08:00
Mark McDowall
8fd4adbdb6 New: use-credentials for maniftest requests
Closes #4305
2021-02-04 20:28:24 -08:00
Mark McDowall
952a7248c9 New: Add FileId to History data for import events 2021-02-04 20:28:24 -08:00
bakerboy448
577604fccc Fixed: Series Removed From TVDB wiki link 2021-02-03 20:50:43 -08:00
Matt Evans
3d3cd8cf5c Detect Dolby Vision as HDR and MediaInfo Update
Fixed: Detect Dolby Vision as HDR
New: Updated MediaInfo on Windows and MacOS
Closes #4276
2021-02-02 17:19:22 -08:00
Robert Dailey
5e4c9dfe60 New: Add name field to release profiles 2021-02-02 16:51:06 -08:00
181 changed files with 2744 additions and 1426 deletions

View File

@@ -2,7 +2,7 @@
name: Bug Report
about: Support Requests will be closed immediately, if you are not 100% certain this is a bug please go to our Reddit, Discord, Forums, or IRC first. Exceptions do not mean you found a bug!
title: ''
labels: 'bug'
labels: ''
assignees: ''
---

View File

@@ -1,14 +1,20 @@
---
name: Feature request
about: Suggest an idea for Sonarr
title: ''
labels: ''
assignees: ''
---
**Describe the problem**
A clear and concise description of the problem you're looking to solve.
**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 any solutions you think might work**
A clear and concise description of any solutions or features you've considered.
**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.
<!-- Add any other context or screenshots about the feature request here. -->

View File

@@ -17,7 +17,7 @@ Setup guides, [FAQ](https://wiki.servarr.com/Sonarr_FAQ), the more information w
### Getting started ###
1. Fork Sonarr
2. Clone the repository into your development machine. [*info*](https://help.github.com/articles/working-with-repositories)
2. Clone the repository into your development machine. [*info*](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository-from-github)
3. Install the required Node Packages `yarn install`
4. Start gulp to monitor your dev environment for any changes that need post processing using `yarn start` command.
5. Build the project in Visual Studio, Setting startup project to `Sonarr.Console` and framework to `x86`

View File

@@ -1,4 +1,5 @@
fromdos ./debian/*
chmod ugo-x ./debian/*
cp -r ./debian ./debian_backup
BuildVersion=${dependent_build_number:-3.10.0.999}

View File

@@ -1 +1 @@
8
10

View File

@@ -1,2 +1,3 @@
ignores msbuild
ignores libmediainfo0v5
ignores libc6

View File

@@ -1,16 +1,25 @@
FROM ubuntu:xenial AS builder
FROM ubuntu:focal AS builder
ENV DEBIAN_FRONTEND noninteractive
ENV MONO_VERSION 5.18
RUN apt-get update && \
apt-get -y -o Dpkg::Options::="--force-confold" install --no-install-recommends \
apt-transport-https \
wget dirmngr gpg gpg-agent \
# add-apt-repository for PPAs
software-properties-common && \
rm -rf /var/lib/apt/lists/*
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \
echo "deb http://download.mono-project.com/repo/debian stable-xenial/snapshots/$MONO_VERSION main" > /etc/apt/sources.list.d/mono-official-stable.list && \
echo "deb http://download.mono-project.com/repo/debian stable-focal main" > /etc/apt/sources.list.d/mono-official-stable.list && \
apt-get update && apt-get install -y \
devscripts build-essential tofrodos \
dh-make dh-systemd \
cli-common-dev \
mono-complete \
sqlite3 libcurl3 mediainfo
sqlite3 libcurl4 mediainfo
RUN apt-get upgrade -y
RUN apt-cache policy mono-complete
RUN apt-cache policy cli-common-dev

View File

@@ -63,9 +63,9 @@ Name: "{commonappdata}\NzbDrone\bin"; Type: filesandordirs
Name: "{app}"; Type: filesandordirs
[Run]
Filename: "{app}\Sonarr.Console.exe"; StatusMsg: "Removing previous Windows Service"; Parameters: "/u"; Flags: runhidden waituntilterminated;
Filename: "{app}\Sonarr.Console.exe"; Description: "Enable Access from Other Devices"; StatusMsg: "Enabling Remote access"; Parameters: "/registerurl"; Flags: postinstall runascurrentuser runhidden waituntilterminated; Tasks: startupShortcut none;
Filename: "{app}\Sonarr.Console.exe"; StatusMsg: "Installing Windows Service"; Parameters: "/i"; Flags: runhidden waituntilterminated; Tasks: windowsService
Filename: "{app}\Sonarr.Console.exe"; StatusMsg: "Removing previous Windows Service"; Parameters: "/u /exitimmediately"; Flags: runhidden waituntilterminated;
Filename: "{app}\Sonarr.Console.exe"; Description: "Enable Access from Other Devices"; StatusMsg: "Enabling Remote access"; Parameters: "/registerurl /exitimmediately"; Flags: postinstall runascurrentuser runhidden waituntilterminated; Tasks: startupShortcut none;
Filename: "{app}\Sonarr.Console.exe"; StatusMsg: "Installing Windows Service"; Parameters: "/i /exitimmediately"; Flags: runhidden waituntilterminated; Tasks: windowsService
Filename: "{app}\Sonarr.exe"; Description: "Open Sonarr Web UI"; Flags: postinstall skipifsilent nowait; Tasks: windowsService;
Filename: "{app}\Sonarr.exe"; Description: "Start Sonarr"; Flags: postinstall skipifsilent nowait; Tasks: startupShortcut none;

View File

@@ -1,7 +1,8 @@
import PropTypes from 'prop-types';
import React from 'react';
import formatDateTime from 'Utilities/Date/formatDateTime';
import formatAge from 'Utilities/Number/formatAge';
import formatDateTime from 'Utilities/Date/formatDateTime';
import formatPreferredWordScore from 'Utilities/Number/formatPreferredWordScore';
import Link from 'Components/Link/Link';
import DescriptionList from 'Components/DescriptionList/DescriptionList';
import DescriptionListItem from 'Components/DescriptionList/DescriptionListItem';
@@ -22,6 +23,7 @@ function HistoryDetails(props) {
const {
indexer,
releaseGroup,
preferredWordScore,
nzbInfoUrl,
downloadClient,
downloadId,
@@ -40,24 +42,35 @@ function HistoryDetails(props) {
/>
{
!!indexer &&
indexer ?
<DescriptionListItem
title="Indexer"
data={indexer}
/>
/> :
null
}
{
!!releaseGroup &&
releaseGroup ?
<DescriptionListItem
descriptionClassName={styles.description}
title="Release Group"
data={releaseGroup}
/>
/> :
null
}
{
!!nzbInfoUrl &&
preferredWordScore && preferredWordScore !== '0' ?
<DescriptionListItem
title="Preferred Word Score"
data={formatPreferredWordScore(preferredWordScore)}
/> :
null
}
{
nzbInfoUrl ?
<span>
<DescriptionListItemTitle>
Info URL
@@ -66,39 +79,44 @@ function HistoryDetails(props) {
<DescriptionListItemDescription>
<Link to={nzbInfoUrl}>{nzbInfoUrl}</Link>
</DescriptionListItemDescription>
</span>
</span> :
null
}
{
!!downloadClient &&
downloadClient ?
<DescriptionListItem
title="Download Client"
data={downloadClient}
/>
/> :
null
}
{
!!downloadId &&
downloadId ?
<DescriptionListItem
title="Grab ID"
data={downloadId}
/>
/> :
null
}
{
!!indexer &&
age || ageHours || ageMinutes ?
<DescriptionListItem
title="Age (when grabbed)"
data={formatAge(age, ageHours, ageMinutes)}
/>
/> :
null
}
{
!!publishedDate &&
publishedDate ?
<DescriptionListItem
title="Published Date"
data={formatDateTime(publishedDate, shortDateFormat, timeFormat, { includeSeconds: true })}
/>
/> :
null
}
</DescriptionList>
);
@@ -118,11 +136,12 @@ function HistoryDetails(props) {
/>
{
!!message &&
message ?
<DescriptionListItem
title="Message"
data={message}
/>
/> :
null
}
</DescriptionList>
);
@@ -130,6 +149,7 @@ function HistoryDetails(props) {
if (eventType === 'downloadFolderImported') {
const {
preferredWordScore,
droppedPath,
importedPath
} = data;
@@ -143,21 +163,32 @@ function HistoryDetails(props) {
/>
{
!!droppedPath &&
droppedPath ?
<DescriptionListItem
descriptionClassName={styles.description}
title="Source"
data={droppedPath}
/>
/> :
null
}
{
!!importedPath &&
importedPath ?
<DescriptionListItem
descriptionClassName={styles.description}
title="Imported To"
data={importedPath}
/>
/> :
null
}
{
preferredWordScore && preferredWordScore !== '0' ?
<DescriptionListItem
title="Preferred Word Score"
data={formatPreferredWordScore(preferredWordScore)}
/> :
null
}
</DescriptionList>
);
@@ -165,7 +196,8 @@ function HistoryDetails(props) {
if (eventType === 'episodeFileDeleted') {
const {
reason
reason,
preferredWordScore
} = data;
let reasonMessage = '';
@@ -195,6 +227,15 @@ function HistoryDetails(props) {
title="Reason"
data={reasonMessage}
/>
{
preferredWordScore && preferredWordScore !== '0' ?
<DescriptionListItem
title="Preferred Word Score"
data={formatPreferredWordScore(preferredWordScore)}
/> :
null
}
</DescriptionList>
);
}
@@ -246,11 +287,12 @@ function HistoryDetails(props) {
/>
{
!!message &&
message ?
<DescriptionListItem
title="Message"
data={message}
/>
/> :
null
}
</DescriptionList>
);

View File

@@ -10,6 +10,12 @@
width: 80px;
}
.preferredWordScore {
composes: cell from '~Components/Table/Cells/TableRowCell.css';
width: 55px;
}
.releaseGroup {
composes: cell from '~Components/Table/Cells/TableRowCell.css';

View File

@@ -1,5 +1,6 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import formatPreferredWordScore from 'Utilities/Number/formatPreferredWordScore';
import { icons } from 'Helpers/Props';
import IconButton from 'Components/Link/IconButton';
import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector';
@@ -194,6 +195,17 @@ class HistoryRow extends Component {
);
}
if (name === 'preferredWordScore') {
return (
<TableRowCell
key={name}
className={styles.preferredWordScore}
>
{formatPreferredWordScore(data.preferredWordScore)}
</TableRowCell>
);
}
if (name === 'releaseGroup') {
return (
<TableRowCell

View File

@@ -44,12 +44,8 @@ class Queue extends Component {
};
}
shouldComponentUpdate(nextProps) {
if (!this._shouldBlockRefresh) {
return true;
}
if (hasDifferentItems(this.props.items, nextProps.items)) {
shouldComponentUpdate() {
if (this._shouldBlockRefresh) {
return false;
}
@@ -115,19 +111,20 @@ class Queue extends Component {
}
onRemoveSelectedPress = () => {
this._shouldBlockRefresh = true;
this.setState({ isConfirmRemoveModalOpen: true });
this.setState({ isConfirmRemoveModalOpen: true }, () => {
this._shouldBlockRefresh = true;
});
}
onRemoveSelectedConfirmed = (payload) => {
this._shouldBlockRefresh = false;
this.props.onRemoveSelectedPress({ ids: this.getSelectedIds(), ...payload });
this.setState({ isConfirmRemoveModalOpen: false });
this._shouldBlockRefresh = false;
}
onConfirmRemoveModalClose = () => {
this.setState({ isConfirmRemoveModalOpen: false });
this._shouldBlockRefresh = false;
this.setState({ isConfirmRemoveModalOpen: false });
}
//

View File

@@ -3,3 +3,7 @@
width: 30px;
}
.noMessages {
margin-bottom: 10px;
}

View File

@@ -12,7 +12,10 @@ function getDetailedPopoverBody(statusMessages) {
{
statusMessages.map(({ title, messages }) => {
return (
<div key={title}>
<div
key={title}
className={messages.length ? undefined: styles.noMessages}
>
{title}
<ul>
{

View File

@@ -30,9 +30,7 @@ class AddNewSeriesModalContent extends Component {
this.state = {
seriesType: props.initialSeriesType === seriesTypes.STANDARD ?
props.seriesType.value :
props.initialSeriesType,
searchForMissingEpisodes: false,
searchForCutoffUnmetEpisodes: false
props.initialSeriesType
};
}
@@ -45,14 +43,6 @@ class AddNewSeriesModalContent extends Component {
//
// Listeners
onSearchForMissingEpisodesChange = ({ value }) => {
this.setState({ searchForMissingEpisodes: value });
}
onSearchForCutoffUnmetEpisodesChange = ({ value }) => {
this.setState({ searchForCutoffUnmetEpisodes: value });
}
onQualityProfileIdChange = ({ value }) => {
this.props.onInputChange({ name: 'qualityProfileId', value: parseInt(value) });
}
@@ -63,14 +53,10 @@ class AddNewSeriesModalContent extends Component {
onAddSeriesPress = () => {
const {
searchForMissingEpisodes,
searchForCutoffUnmetEpisodes,
seriesType
} = this.state;
this.props.onAddSeriesPress(
searchForMissingEpisodes,
searchForCutoffUnmetEpisodes,
seriesType
);
}
@@ -91,6 +77,8 @@ class AddNewSeriesModalContent extends Component {
languageProfileId,
seriesType,
seasonFolder,
searchForMissingEpisodes,
searchForCutoffUnmetEpisodes,
folder,
tags,
showLanguageProfile,
@@ -101,11 +89,6 @@ class AddNewSeriesModalContent extends Component {
...otherProps
} = this.props;
const {
searchForMissingEpisodes,
searchForCutoffUnmetEpisodes
} = this.state;
return (
<ModalContent onModalClose={onModalClose}>
<ModalHeader>
@@ -271,8 +254,8 @@ class AddNewSeriesModalContent extends Component {
containerClassName={styles.searchInputContainer}
className={styles.searchInput}
name="searchForMissingEpisodes"
value={searchForMissingEpisodes}
onChange={this.onSearchForMissingEpisodesChange}
onChange={onInputChange}
{...searchForMissingEpisodes}
/>
</label>
@@ -285,8 +268,8 @@ class AddNewSeriesModalContent extends Component {
containerClassName={styles.searchInputContainer}
className={styles.searchInput}
name="searchForCutoffUnmetEpisodes"
value={searchForCutoffUnmetEpisodes}
onChange={this.onSearchForCutoffUnmetEpisodesChange}
onChange={onInputChange}
{...searchForCutoffUnmetEpisodes}
/>
</label>
</div>
@@ -319,6 +302,8 @@ AddNewSeriesModalContent.propTypes = {
languageProfileId: PropTypes.object,
seriesType: PropTypes.object.isRequired,
seasonFolder: PropTypes.object.isRequired,
searchForMissingEpisodes: PropTypes.object.isRequired,
searchForCutoffUnmetEpisodes: PropTypes.object.isRequired,
folder: PropTypes.string.isRequired,
tags: PropTypes.object.isRequired,
showLanguageProfile: PropTypes.bool.isRequired,

View File

@@ -55,7 +55,7 @@ class AddNewSeriesModalContentConnector extends Component {
this.props.setAddSeriesDefault({ [name]: value });
}
onAddSeriesPress = (searchForMissingEpisodes, searchForCutoffUnmetEpisodes, seriesType) => {
onAddSeriesPress = (seriesType) => {
const {
tvdbId,
rootFolderPath,
@@ -63,6 +63,8 @@ class AddNewSeriesModalContentConnector extends Component {
qualityProfileId,
languageProfileId,
seasonFolder,
searchForMissingEpisodes,
searchForCutoffUnmetEpisodes,
tags
} = this.props;
@@ -74,9 +76,9 @@ class AddNewSeriesModalContentConnector extends Component {
languageProfileId: languageProfileId.value,
seriesType,
seasonFolder: seasonFolder.value,
tags: tags.value,
searchForMissingEpisodes,
searchForCutoffUnmetEpisodes
searchForMissingEpisodes: searchForMissingEpisodes.value,
searchForCutoffUnmetEpisodes: searchForCutoffUnmetEpisodes.value,
tags: tags.value
});
}
@@ -102,6 +104,8 @@ AddNewSeriesModalContentConnector.propTypes = {
languageProfileId: PropTypes.object,
seriesType: PropTypes.object.isRequired,
seasonFolder: PropTypes.object.isRequired,
searchForMissingEpisodes: PropTypes.object.isRequired,
searchForCutoffUnmetEpisodes: PropTypes.object.isRequired,
tags: PropTypes.object.isRequired,
onModalClose: PropTypes.func.isRequired,
setAddSeriesDefault: PropTypes.func.isRequired,

View File

@@ -85,3 +85,21 @@
display: inline-block;
margin: 5px -5px 5px 0;
}
.mobileCloseButtonContainer {
display: flex;
justify-content: flex-end;
height: 40px;
border-bottom: 1px solid $borderColor;
}
.mobileCloseButton {
width: 40px;
height: 40px;
text-align: center;
line-height: 40px;
&:hover {
color: $modalCloseButtonHoverColor;
}
}

View File

@@ -518,6 +518,18 @@ class EnhancedSelectInput extends Component {
scrollDirection={scrollDirections.NONE}
>
<Scroller className={styles.optionsModalScroller}>
<div className={styles.mobileCloseButtonContainer}>
<Link
className={styles.mobileCloseButton}
onPress={this.onOptionsModalClose}
>
<Icon
name={icons.CLOSE}
size={18}
/>
</Link>
</div>
{
values.map((v, index) => {
const hasParent = v.parentKey !== undefined;

View File

@@ -54,4 +54,8 @@
&:last-child {
border: none;
}
&:hover {
background-color: unset;
}
}

View File

@@ -12,7 +12,9 @@ class EnhancedSelectInputOption extends Component {
//
// Listeners
onPress = () => {
onPress = (e) => {
e.preventDefault();
const {
id,
onSelect

View File

@@ -10,13 +10,16 @@ const ADD_NEW_KEY = 'addNew';
function createMapStateToProps() {
return createSelector(
(state) => state.rootFolders,
(state, { value }) => value,
(state, { includeMissingValue }) => includeMissingValue,
(state, { includeNoChange }) => includeNoChange,
(rootFolders, includeNoChange) => {
(rootFolders, value, includeMissingValue, includeNoChange) => {
const values = rootFolders.items.map((rootFolder) => {
return {
key: rootFolder.path,
value: rootFolder.path,
freeSpace: rootFolder.freeSpace
freeSpace: rootFolder.freeSpace,
isMissing: false
};
});
@@ -24,7 +27,8 @@ function createMapStateToProps() {
values.unshift({
key: 'noChange',
value: 'No Change',
isDisabled: true
isDisabled: true,
isMissing: false
});
}
@@ -37,6 +41,15 @@ function createMapStateToProps() {
});
}
if (includeMissingValue && !values.find((v) => v.key === value)) {
values.push({
key: value,
value,
isMissing: true,
isDisabled: true
});
}
values.push({
key: ADD_NEW_KEY,
value: 'Add a new path'

View File

@@ -27,3 +27,9 @@
color: $darkGray;
font-size: $smallFontSize;
}
.isMissing {
margin-left: 15px;
color: $dangerColor;
font-size: $smallFontSize;
}

View File

@@ -10,6 +10,7 @@ function RootFolderSelectInputOption(props) {
id,
value,
freeSpace,
isMissing,
seriesFolder,
isMobile,
isWindows,
@@ -43,11 +44,20 @@ function RootFolderSelectInputOption(props) {
</div>
{
freeSpace != null &&
freeSpace == null ?
null :
<div className={styles.freeSpace}>
{formatBytes(freeSpace)} Free
</div>
}
{
isMissing ?
<div className={styles.isMissing}>
Missing
</div> :
null
}
</div>
</EnhancedSelectInputOption>
);
@@ -57,6 +67,7 @@ RootFolderSelectInputOption.propTypes = {
id: PropTypes.string.isRequired,
value: PropTypes.string.isRequired,
freeSpace: PropTypes.number,
isMissing: PropTypes.boolean,
seriesFolder: PropTypes.string,
isMobile: PropTypes.bool.isRequired,
isWindows: PropTypes.bool

View File

@@ -1,5 +1,5 @@
.loadingMessage {
margin: 50px 10px 0;
margin: 10px 10px 0;
text-align: center;
font-weight: 300;
font-size: 36px;

View File

@@ -1,3 +1,12 @@
.page {
composes: page from '~./Page.css';
}
.logoFull {
margin-top: 50px;
margin-right: auto;
margin-left: auto;
width: 48px;
height: 48px;
opacity: 0.65;
}

View File

@@ -3,9 +3,15 @@ import LoadingIndicator from 'Components/Loading/LoadingIndicator';
import LoadingMessage from 'Components/Loading/LoadingMessage';
import styles from './LoadingPage.css';
const sonarrLogo = 'data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjIxNi45IiB2aWV3Qm94PSIwIDAgMjE2LjcgMjE2LjkiIHdpZHRoPSIyMTYuNyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yMTYuNyAxMDguNDVjMCAyOS44MzMtMTAuNTMzIDU1LjQtMzEuNiA3Ni43LS43LjgzMy0xLjQ4MyAxLjYtMi4zNSAyLjMtMy40NjYgMy40LTcuMTMzIDYuNDg0LTExIDkuMjUtMTguMjY3IDEzLjQ2Ny0zOS4zNjcgMjAuMi02My4zIDIwLjItMjMuOTY3IDAtNDUuMDMzLTYuNzMzLTYzLjItMjAuMi00LjgtMy40LTkuMy03LjI1LTEzLjUtMTEuNTUtMTYuMzY3LTE2LjI2Ni0yNi40MTctMzUuMTY3LTMwLjE1LTU2LjctLjczMy00LjItMS4yMTctOC40NjctMS40NS0xMi44LS4xLTIuNC0uMTUtNC44LS4xNS03LjIgMC0yLjUzMy4wNS00Ljk1LjE1LTcuMjUgMC0uMjMzLjA2Ni0uNDY3LjItLjcgMS41NjctMjYuNiAxMi4wMzMtNDkuNTgzIDMxLjQtNjguOTVDNTMuMDUgMTAuNTE3IDc4LjYxNyAwIDEwOC40NSAwYzI5LjkzMyAwIDU1LjQ4NCAxMC41MTcgNzYuNjUgMzEuNTUgMjEuMDY3IDIxLjQzMyAzMS42IDQ3LjA2NyAzMS42IDc2Ljl6IiBmaWxsPSIjRUVFIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz4KICA8cGF0aCBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xOTQuNjUgNDIuNWwtMjIuNCAyMi40QzE1OS4xNTIgNzcuOTk4IDE1OCA4OS40IDE1OCAxMDkuNWMwIDE3LjkzNCAyLjg1MiAzNC4zNTIgMTYuMiA0Ny43IDkuNzQ2IDkuNzQ2IDE5IDE4Ljk1IDE5IDE4Ljk1LTIuNSAzLjA2Ny01LjIgNi4wNjctOC4xIDktLjcuODMzLTEuNDgzIDEuNi0yLjM1IDIuMy0yLjUzMyAyLjUtNS4xNjcgNC44MTctNy45IDYuOTVsLTE3LjU1LTE3LjU1Yy0xNS41OTgtMTUuNi0yNy45OTYtMTcuMS00OC42LTE3LjEtMTkuNzcgMC0zMy4yMjMgMS44MjItNDcuNyAxNi4zLTguNjQ3IDguNjQ3LTE4LjU1IDE4LjYtMTguNTUgMTguNi0zLjc2Ny0yLjg2Ny03LjMzMy02LjAzNC0xMC43LTkuNS0yLjgtMi44LTUuNDE3LTUuNjY3LTcuODUtOC42IDAgMCA5Ljc5OC05Ljg0OCAxOS4xNS0xOS4yIDEzLjg1Mi0xMy44NTMgMTYuMS0yOS45MTYgMTYuMS00Ny44NSAwLTE3LjUtMi44NzQtMzMuODIzLTE1LjYtNDYuNTUtOC44MzUtOC44MzYtMjEuMDUtMjEtMjEuMDUtMjEgMi44MzMtMy42IDUuOTE3LTcuMDY3IDkuMjUtMTAuNCAyLjkzNC0yLjg2NyA1LjkzNC01LjU1IDktOC4wNUw2MS4xIDQzLjg1Qzc0LjEwMiA1Ni44NTIgOTAuNzY3IDYwLjIgMTA4LjcgNjAuMmMxOC40NjcgMCAzNS4wNzctMy41NzcgNDguNi0xNy4xIDguMzItOC4zMiAxOS4zLTE5LjI1IDE5LjMtMTkuMjUgMi45IDIuMzY3IDUuNzMzIDQuOTMzIDguNSA3LjcgMy40NjcgMy41MzMgNi42NSA3LjE4MyA5LjU1IDEwLjk1eiIgZmlsbD0iIzNBM0Y1MSIgZmlsbC1ydWxlPSJldmVub2RkIi8+CiAgPGcgY2xpcC1ydWxlPSJldmVub2RkIj4KICAgIDxwYXRoIGQ9Ik03OC43IDExNGMtLjItMS4xNjctLjMzMi0yLjM1LS40LTMuNTUtLjAzMi0uNjY3LS4wNS0xLjMzMy0uMDUtMiAwLS43LjAxOC0xLjM2Ny4wNS0yIDAtLjA2Ny4wMTgtLjEzMy4wNS0uMi40MzUtNy4zNjcgMy4zMzQtMTMuNzMzIDguNy0xOS4xIDUuOS01LjgzMyAxMi45ODQtOC43NSAyMS4yNS04Ljc1IDguMyAwIDE1LjM4NCAyLjkxNyAyMS4yNSA4Ljc1IDUuODM0IDUuOTM0IDguNzUgMTMuMDMzIDguNzUgMjEuMyAwIDguMjY3LTIuOTE2IDE1LjM1LTguNzUgMjEuMjUtLjIuMjMzLS40MTYuNDUtLjY1LjY1LS45NjYuOTMzLTEuOTgyIDEuNzgzLTMuMDUgMi41NS01LjA2NSAzLjczMy0xMC45MTYgNS42LTE3LjU1IDUuNnMtMTIuNDY2LTEuODY2LTE3LjUtNS42Yy0xLjMzMi0uOTM0LTIuNTgyLTItMy43NS0zLjItNC41MzItNC41LTcuMzE2LTkuNzM0LTguMzUtMTUuN3oiIGZpbGw9IiMwQ0YiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPgogICAgPHBhdGggZD0iTTE1Ny44IDU5Ljc1bC0xNSAxNC42NU0zMC43ODUgMzIuNTI2TDcxLjY1IDczLjI1bTg0LjYgODQuMjVsMjcuODA4IDI4Ljc4bTEuODU1LTE1My44OTRMMTU3LjggNTkuNzVtLTEyNS40NSAxMjZsMjcuMzUtMjcuNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMENGIiBzdHJva2UtbWl0ZXJsaW1pdD0iMSIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBkPSJNMTU3LjggNTkuNzVsLTE2Ljk1IDE3LjJNNTguOTcgNjAuNjA0bDE3LjIgMTcuMTVNNTkuNjIzIDE1OC40M2wxNi43NS0xNy40bTYxLjkyOC0xLjM5NmwxOC4wMjggMTcuOTQ1IiBmaWxsPSJub25lIiBzdHJva2U9IiMwQ0YiIHN0cm9rZS1taXRlcmxpbWl0PSIxIiBzdHJva2Utd2lkdGg9IjciLz4KICA8L2c+Cjwvc3ZnPg==';
function LoadingPage() {
return (
<div className={styles.page}>
<img
className={styles.logoFull}
src={sonarrLogo}
/>
<LoadingMessage />
<LoadingIndicator />
</div>

View File

@@ -191,7 +191,7 @@ class TableOptionsModal extends Component {
<TableOptionsColumnDragSource
key={name}
name={name}
label={label || columnLabel}
label={columnLabel || label}
isVisible={isVisible}
isModifiable={true}
index={index}
@@ -209,7 +209,7 @@ class TableOptionsModal extends Component {
<TableOptionsColumn
key={name}
name={name}
label={label || columnLabel}
label={columnLabel || label}
isVisible={isVisible}
index={index}
isModifiable={false}

View File

@@ -14,6 +14,7 @@
&.inverse {
background-color: $themeDarkColor;
box-shadow: 0 5px 10px $popoverShadowInverseColor;
color: $white;
}
}

View File

@@ -3,6 +3,7 @@ import React, { Component } from 'react';
import formatDateTime from 'Utilities/Date/formatDateTime';
import formatAge from 'Utilities/Number/formatAge';
import formatBytes from 'Utilities/Number/formatBytes';
import formatPreferredWordScore from 'Utilities/Number/formatPreferredWordScore';
import { icons, kinds, tooltipPositions } from 'Helpers/Props';
import Icon from 'Components/Icon';
import SpinnerIconButton from 'Components/Link/SpinnerIconButton';
@@ -193,8 +194,7 @@ class InteractiveSearchRow extends Component {
</TableRowCell>
<TableRowCell className={styles.preferredWordScore}>
{preferredWordScore > 0 && `+${preferredWordScore}`}
{preferredWordScore < 0 && preferredWordScore}
{formatPreferredWordScore(preferredWordScore)}
</TableRowCell>
<TableRowCell className={styles.rejected}>

View File

@@ -26,7 +26,7 @@ function SeriesAlternateTitles({ alternateTitles }) {
}
SeriesAlternateTitles.propTypes = {
alternateTitles: PropTypes.arrayOf(PropTypes.string).isRequired
alternateTitles: PropTypes.arrayOf(PropTypes.object).isRequired
};
export default SeriesAlternateTitles;

View File

@@ -119,6 +119,13 @@
margin: 5px 10px 5px 0;
}
.fileCountMessage {
padding: 5px;
white-space: nowrap;
font-weight: 300;
font-size: 15px;
}
.path,
.sizeOnDisk,
.qualityProfileName,

View File

@@ -432,22 +432,32 @@ class SeriesDetails extends Component {
</span>
</Label>
<Label
className={styles.detailsLabel}
title={episodeFilesCountMessage}
size={sizes.LARGE}
>
<Icon
name={icons.DRIVE}
size={17}
/>
<Tooltip
anchor={
<Label
className={styles.detailsLabel}
size={sizes.LARGE}
>
<Icon
name={icons.DRIVE}
size={17}
/>
<span className={styles.sizeOnDisk}>
{
formatBytes(sizeOnDisk || 0)
}
</span>
</Label>
<span className={styles.sizeOnDisk}>
{
formatBytes(sizeOnDisk || 0)
}
</span>
</Label>
}
tooltip={
<span>
{episodeFilesCountMessage}
</span>
}
kind={kinds.INVERSE}
position={tooltipPositions.BOTTOM}
/>
<Label
className={styles.detailsLabel}
@@ -694,7 +704,7 @@ SeriesDetails.propTypes = {
overview: PropTypes.string.isRequired,
images: PropTypes.arrayOf(PropTypes.object).isRequired,
seasons: PropTypes.arrayOf(PropTypes.object).isRequired,
alternateTitles: PropTypes.arrayOf(PropTypes.string).isRequired,
alternateTitles: PropTypes.arrayOf(PropTypes.object).isRequired,
tags: PropTypes.arrayOf(PropTypes.number).isRequired,
isSaving: PropTypes.bool.isRequired,
saveError: PropTypes.object,

View File

@@ -131,6 +131,7 @@ function EditImportListModalContent(props) {
name="rootFolderPath"
helpText={'Root Folder list items will be added to'}
{...rootFolderPath}
includeMissingValue={true}
onChange={onInputChange}
/>
</FormGroup>

View File

@@ -39,6 +39,7 @@ function EditDelayProfileModalContent(props) {
enableTorrent,
usenetDelay,
torrentDelay,
bypassIfHighestQuality,
tags
} = item;
@@ -107,6 +108,20 @@ function EditDelayProfileModalContent(props) {
</FormGroup>
}
{
<FormGroup>
<FormLabel>Bypass if Highest Quality</FormLabel>
<FormInputGroup
type={inputTypes.CHECK}
name="bypassIfHighestQuality"
{...bypassIfHighestQuality}
helpText="Bypass delay when release has the highest enabled quality in the quality profile"
onChange={onInputChange}
/>
</FormGroup>
}
{
id === 1 ?
<Alert>

View File

@@ -29,6 +29,7 @@ function EditReleaseProfileModalContent(props) {
const {
id,
name,
enabled,
required,
ignored,
@@ -46,6 +47,20 @@ function EditReleaseProfileModalContent(props) {
<ModalBody>
<Form {...otherProps}>
<FormGroup>
<FormLabel>Name</FormLabel>
<FormInputGroup
type={inputTypes.TEXT}
name="name"
{...name}
placeholder="Optional name"
canEdit={true}
onChange={onInputChange}
/>
</FormGroup>
<FormGroup>
<FormLabel>Enable Profile</FormLabel>

View File

@@ -9,3 +9,11 @@
flex-wrap: wrap;
margin-top: 5px;
}
.name {
@add-mixin truncate;
margin-bottom: 20px;
font-weight: 300;
font-size: 24px;
}

View File

@@ -56,6 +56,7 @@ class ReleaseProfile extends Component {
render() {
const {
id,
name,
enabled,
required,
ignored,
@@ -79,6 +80,14 @@ class ReleaseProfile extends Component {
overlayContent={true}
onPress={this.onEditReleaseProfilePress}
>
{
name ?
<div className={styles.name}>
{name}
</div> :
null
}
<div>
{
split(required).map((item) => {
@@ -184,6 +193,7 @@ class ReleaseProfile extends Component {
ReleaseProfile.propTypes = {
id: PropTypes.number.isRequired,
name: PropTypes.string,
enabled: PropTypes.bool.isRequired,
required: PropTypes.string.isRequired,
ignored: PropTypes.string.isRequired,

View File

@@ -37,6 +37,8 @@ export const defaultState = {
languageProfileId: 0,
seriesType: seriesTypes.STANDARD,
seasonFolder: true,
searchForMissingEpisodes: false,
searchForCutoffUnmetEpisodes: false,
tags: []
}
};

View File

@@ -1,7 +1,9 @@
import _ from 'lodash';
import { createAction } from 'redux-actions';
import createAjaxRequest from 'Utilities/createAjaxRequest';
import getSectionState from 'Utilities/State/getSectionState';
import updateSectionState from 'Utilities/State/updateSectionState';
import { createThunk, handleThunks } from 'Store/thunks';
import createHandleActions from './Creators/createHandleActions';
function getDimensions(width, height) {
@@ -22,6 +24,8 @@ function getDimensions(width, height) {
export const section = 'app';
const messagesSection = 'app.messages';
let abortPingServer = null;
let pingTimeout = null;
//
// State
@@ -50,6 +54,8 @@ export const SET_VERSION = 'app/setVersion';
export const SET_APP_VALUE = 'app/setAppValue';
export const SET_IS_SIDEBAR_VISIBLE = 'app/setIsSidebarVisible';
export const PING_SERVER = 'app/pingServer';
//
// Action Creators
@@ -59,6 +65,70 @@ export const setIsSidebarVisible = createAction(SET_IS_SIDEBAR_VISIBLE);
export const setAppValue = createAction(SET_APP_VALUE);
export const showMessage = createAction(SHOW_MESSAGE);
export const hideMessage = createAction(HIDE_MESSAGE);
export const pingServer = createThunk(PING_SERVER);
//
// Helpers
function pingServerAfterTimeout(getState, dispatch) {
if (abortPingServer) {
abortPingServer();
abortPingServer = null;
}
if (pingTimeout) {
clearTimeout(pingTimeout);
pingTimeout = null;
}
pingTimeout = setTimeout(() => {
if (!getState().isRestarting && getState().isConnected) {
return;
}
const ajaxOptions = {
url: '/system/status',
method: 'GET',
contentType: 'application/json'
};
const { request, abortRequest } = createAjaxRequest(ajaxOptions);
abortPingServer = abortRequest;
request.done(() => {
abortPingServer = null;
pingTimeout = null;
dispatch(setAppValue({
isRestarting: false
}));
});
request.fail((xhr) => {
abortPingServer = null;
pingTimeout = null;
// Unauthorized, but back online
if (xhr.status === 401) {
dispatch(setAppValue({
isRestarting: false
}));
} else {
pingServerAfterTimeout(getState, dispatch);
}
});
}, 5000);
}
//
// Action Handlers
export const actionHandlers = handleThunks({
[PING_SERVER]: function(getState, payload, dispatch) {
pingServerAfterTimeout(getState, dispatch);
}
});
//
// Reducers
@@ -135,4 +205,3 @@ export const reducers = createHandleActions({
}
}, defaultState, section);

View File

@@ -86,11 +86,8 @@ export const actionHandlers = handleThunks({
} = payload;
const promise = createAjaxRequest({
url: '/history/failed',
method: 'POST',
data: {
id: historyId
}
url: `/history/failed/${historyId}`,
method: 'POST'
}).request;
promise.done(() => {

View File

@@ -1,7 +1,9 @@
import React from 'react';
import { createAction } from 'redux-actions';
import createAjaxRequest from 'Utilities/createAjaxRequest';
import serverSideCollectionHandlers from 'Utilities/serverSideCollectionHandlers';
import { filterTypes, sortDirections } from 'Helpers/Props';
import { filterTypes, icons, sortDirections } from 'Helpers/Props';
import Icon from 'Components/Icon';
import { createThunk, handleThunks } from 'Store/thunks';
import createClearReducer from './Creators/Reducers/createClearReducer';
import createSetTableOptionReducer from './Creators/Reducers/createSetTableOptionReducer';
@@ -80,6 +82,15 @@ export const defaultState = {
label: 'Release Group',
isVisible: false
},
{
name: 'preferredWordScore',
columnLabel: 'Preferred Word Score',
label: React.createElement(Icon, {
name: icons.SCORE,
title: 'Preferred word score'
}),
isVisible: false
},
{
name: 'details',
columnLabel: 'Details',
@@ -233,11 +244,9 @@ export const actionHandlers = handleThunks({
}));
const promise = createAjaxRequest({
url: '/history/failed',
url: `/history/failed/${id}`,
method: 'POST',
data: {
id
}
dataType: 'json'
}).request;
promise.done(() => {

View File

@@ -63,6 +63,8 @@ export const defaultState = {
};
export const persistState = [
'interactiveImport.sortKey',
'interactiveImport.sortDirection',
'interactiveImport.recentFolders',
'interactiveImport.importMode'
];

View File

@@ -8,7 +8,7 @@ import createSetClientSideCollectionSortReducer from './Creators/Reducers/create
import createSetClientSideCollectionFilterReducer from './Creators/Reducers/createSetClientSideCollectionFilterReducer';
import createHandleActions from './Creators/createHandleActions';
import { set, updateItem } from './baseActions';
import { filters, filterPredicates, filterBuilderProps } from './seriesActions';
import { filters, filterPredicates, filterBuilderProps, sortPredicates } from './seriesActions';
//
// Variables
@@ -27,6 +27,7 @@ export const defaultState = {
sortDirection: sortDirections.ASCENDING,
secondarySortKey: 'sortTitle',
secondarySortDirection: sortDirections.ASCENDING,
sortPredicates,
selectedFilterKey: 'all',
filters,
filterPredicates,
@@ -97,7 +98,8 @@ export const persistState = [
'seriesEditor.sortKey',
'seriesEditor.sortDirection',
'seriesEditor.selectedFilterKey',
'seriesEditor.customFilters'
'seriesEditor.customFilters',
'seriesEditor.columns'
];
//

View File

@@ -10,6 +10,7 @@ import createFetchHandler from './Creators/createFetchHandler';
import createRemoveItemHandler from './Creators/createRemoveItemHandler';
import createHandleActions from './Creators/createHandleActions';
import createServerSideCollectionHandlers from './Creators/createServerSideCollectionHandlers';
import { pingServer } from './appActions';
import { set } from './baseActions';
//
@@ -351,6 +352,7 @@ export const actionHandlers = handleThunks({
promise.done(() => {
dispatch(setAppValue({ isRestarting: true }));
dispatch(pingServer());
});
},

View File

@@ -29,27 +29,32 @@ function mergeColumns(path, initialState, persistedState, computedState) {
const columns = [];
initialColumns.forEach((initialColumn) => {
const persistedColumnIndex = _.findIndex(persistedColumns, { name: initialColumn.name });
const column = Object.assign({}, initialColumn);
const persistedColumn = persistedColumnIndex > -1 ? persistedColumns[persistedColumnIndex] : undefined;
// Add persisted columns in the same order they're currently in
// as long as they haven't been removed.
if (persistedColumn) {
column.isVisible = persistedColumn.isVisible;
persistedColumns.forEach((persistedColumn) => {
const column = initialColumns.find((i) => i.name === persistedColumn.name);
if (column) {
columns.push({
...column,
isVisible: persistedColumn.isVisible
});
}
// If there is a persisted column, it's index doesn't exceed the column list
// and it's modifiable, insert it in the proper position.
if (persistedColumn && columns.length - 1 > persistedColumnIndex && persistedColumn.isModifiable !== false) {
columns.splice(persistedColumnIndex, 0, column);
} else {
columns.push(column);
}
// Set the columns in the persisted state
_.set(computedState, path, columns);
});
// Add any columns added to the app in the initial position.
initialColumns.forEach((initialColumn, index) => {
const persistedColumnIndex = persistedColumns.findIndex((i) => i.name === initialColumn.name);
const column = Object.assign({}, initialColumn);
if (persistedColumnIndex === -1) {
columns.splice(index, 0, column);
}
});
// Set the columns in the persisted state
_.set(computedState, path, columns);
}
function slicer(paths_) {

View File

@@ -0,0 +1,16 @@
function formatPreferredWordScore(input) {
const score = Number(input);
if (score > 0) {
return `+${score}`;
}
if (score < 0) {
return score;
}
return '';
}
export default formatPreferredWordScore;

View File

@@ -28,6 +28,15 @@ function addApiKey(ajaxOptions) {
ajaxOptions.headers['X-Api-Key'] = window.Sonarr.apiKey;
}
function addContentType(ajaxOptions) {
if (
ajaxOptions.contentType == null &&
ajaxOptions.dataType === 'json' &&
(ajaxOptions.method === 'PUT' || ajaxOptions.method === 'POST')) {
ajaxOptions.contentType = 'application/json';
}
}
export default function createAjaxRequest(originalAjaxOptions) {
const requestXHR = new window.XMLHttpRequest();
let aborted = false;
@@ -46,6 +55,7 @@ export default function createAjaxRequest(originalAjaxOptions) {
moveBodyToQuery(ajaxOptions);
addRootUrl(ajaxOptions);
addApiKey(ajaxOptions);
addContentType(ajaxOptions);
}
const request = $.ajax({

View File

@@ -30,7 +30,7 @@
sizes="16x16"
href="/Content/Images/Icons/favicon-16x16.png"
/>
<link rel="manifest" href="/Content/Images/Icons/manifest.json" />
<link rel="manifest" href="/Content/Images/Icons/manifest.json" crossorigin="use-credentials" />
<link
rel="mask-icon"
href="/Content/Images/Icons/safari-pinned-tab.svg"

View File

@@ -30,7 +30,7 @@
sizes="16x16"
href="/Content/Images/Icons/favicon-16x16.png"
/>
<link rel="manifest" href="/Content/Images/Icons/manifest.json" />
<link rel="manifest" href="/Content/Images/Icons/manifest.json" crossorigin="use-credentials" />
<link
rel="mask-icon"
href="/Content/Images/Icons/safari-pinned-tab.svg"

View File

@@ -13,6 +13,7 @@ namespace NzbDrone.Api.Profiles.Delay
public DownloadProtocol PreferredProtocol { get; set; }
public int UsenetDelay { get; set; }
public int TorrentDelay { get; set; }
public bool BypassIfHighestQuality { get; set; }
public int Order { get; set; }
public HashSet<int> Tags { get; set; }
}
@@ -32,6 +33,7 @@ namespace NzbDrone.Api.Profiles.Delay
PreferredProtocol = model.PreferredProtocol,
UsenetDelay = model.UsenetDelay,
TorrentDelay = model.TorrentDelay,
BypassIfHighestQuality = model.BypassIfHighestQuality,
Order = model.Order,
Tags = new HashSet<int>(model.Tags)
};
@@ -50,6 +52,7 @@ namespace NzbDrone.Api.Profiles.Delay
PreferredProtocol = resource.PreferredProtocol,
UsenetDelay = resource.UsenetDelay,
TorrentDelay = resource.TorrentDelay,
BypassIfHighestQuality = resource.BypassIfHighestQuality,
Order = resource.Order,
Tags = new HashSet<int>(resource.Tags)
};

View File

@@ -48,6 +48,19 @@ namespace NzbDrone.Common.Test.InstrumentationTests
[TestCase(@"""DownloadURL"":""https:\/\/broadcasthe.net\/torrents.php?action=download&id=123&authkey=mySecret&torrent_pass=mySecret""")]
// Plex
[TestCase(@" http://localhost:32400/library/metadata/12345/refresh?X-Plex-Client-Identifier=1234530f-422f-4aac-b6b3-01233210aaaa&X-Plex-Product=Sonarr&X-Plex-Platform=Windows&X-Plex-Platform-Version=7&X-Plex-Device-Name=Sonarr&X-Plex-Version=3.0.3.833&X-Plex-Token=mySecret")]
// Internal
[TestCase(@"OutputPath=/home/mySecret/Downloads")]
[TestCase("Hardlinking episode file: /home/mySecret/Downloads to /media/abc.mkv")]
[TestCase("Hardlink '/home/mySecret/Downloads/abs.mkv' to '/media/abc.mkv' failed.")]
// Announce URLs (passkeys) Magnet & Tracker
[TestCase(@"magnet_uri"":""magnet:?xt=urn:btih:9pr04sgkillroyimaveql2tyu8xyui&dn=&tr=https%3a%2f%2fxxx.yyy%2f9pr04sg601233210imaveql2tyu8xyui%2fannounce""}")]
[TestCase(@"magnet_uri"":""magnet:?xt=urn:btih:9pr04sgkillroyimaveql2tyu8xyui&dn=&tr=https%3a%2f%2fxxx.yyy%2ftracker.php%2f9pr04sg601233210imaveql2tyu8xyui%2fannounce""}")]
[TestCase(@"magnet_uri"":""magnet:?xt=urn:btih:9pr04sgkillroyimaveql2tyu8xyui&dn=&tr=https%3a%2f%2fxxx.yyy%2fannounce%2f9pr04sg601233210imaveql2tyu8xyui""}")]
[TestCase(@"magnet_uri"":""magnet:?xt=urn:btih:9pr04sgkillroyimaveql2tyu8xyui&dn=&tr=https%3a%2f%2fxxx.yyy%2fannounce.php%3fpasskey%3d9pr04sg601233210imaveql2tyu8xyui""}")]
[TestCase(@"tracker"":""https://xxx.yyy/9pr04sg601233210imaveql2tyu8xyui/announce""}")]
[TestCase(@"tracker"":""https://xxx.yyy/tracker.php/9pr04sg601233210imaveql2tyu8xyui/announce""}")]
[TestCase(@"tracker"":""https://xxx.yyy/announce/9pr04sg601233210imaveql2tyu8xyui""}")]
[TestCase(@"tracker"":""https://xxx.yyy/announce.php?passkey=9pr04sg601233210imaveql2tyu8xyui""}")]
public void should_clean_message(string message)
{
var cleansedMessage = CleanseLogMessage.Cleanse(message);

View File

@@ -88,5 +88,38 @@ namespace NzbDrone.Common.Test.TPLTests
(GetRateLimitStore()["me"] - _epoch).Should().BeGreaterOrEqualTo(TimeSpan.FromMilliseconds(100));
}
[Test]
public void should_extend_subkey_delay()
{
GivenExisting("me", _epoch + TimeSpan.FromMilliseconds(200));
GivenExisting("me-sub", _epoch + TimeSpan.FromMilliseconds(300));
Subject.WaitAndPulse("me", "sub", TimeSpan.FromMilliseconds(100));
(GetRateLimitStore()["me-sub"] - _epoch).Should().BeGreaterOrEqualTo(TimeSpan.FromMilliseconds(400));
}
[Test]
public void should_honor_basekey_delay()
{
GivenExisting("me", _epoch + TimeSpan.FromMilliseconds(200));
GivenExisting("me-sub", _epoch + TimeSpan.FromMilliseconds(0));
Subject.WaitAndPulse("me", "sub", TimeSpan.FromMilliseconds(100));
(GetRateLimitStore()["me-sub"] - _epoch).Should().BeGreaterOrEqualTo(TimeSpan.FromMilliseconds(200));
}
[Test]
public void should_not_extend_basekey_delay()
{
GivenExisting("me", _epoch + TimeSpan.FromMilliseconds(200));
GivenExisting("me-sub", _epoch + TimeSpan.FromMilliseconds(100));
Subject.WaitAndPulse("me", "sub", TimeSpan.FromMilliseconds(100));
(GetRateLimitStore()["me"] - _epoch).Should().BeCloseTo(TimeSpan.FromMilliseconds(200));
}
}
}

View File

@@ -24,6 +24,7 @@ namespace NzbDrone.Common.EnvironmentInfo
public const string TERMINATE = "terminateexisting";
public const string RESTART = "restart";
public const string REGISTER_URL = "registerurl";
public const string EXIT_IMMEDIATELY = "exitimmediately";
public StartupContext(params string[] args)
{
@@ -54,6 +55,7 @@ namespace NzbDrone.Common.EnvironmentInfo
public bool InstallService => Flags.Contains(INSTALL_SERVICE);
public bool UninstallService => Flags.Contains(UNINSTALL_SERVICE);
public bool RegisterUrl => Flags.Contains(REGISTER_URL);
public bool ExitImmediately => Flags.Contains(EXIT_IMMEDIATELY);
public string PreservedArguments
{

View File

@@ -111,7 +111,7 @@ namespace NzbDrone.Common.Http
if (request.RateLimit != TimeSpan.Zero)
{
_rateLimitService.WaitAndPulse(request.Url.Host, request.RateLimit);
_rateLimitService.WaitAndPulse(request.Url.Host, request.RateLimitKey, request.RateLimit);
}
_logger.Trace(request);

View File

@@ -44,6 +44,7 @@ namespace NzbDrone.Common.Http
public bool StoreResponseCookie { get; set; }
public TimeSpan RequestTimeout { get; set; }
public TimeSpan RateLimit { get; set; }
public string RateLimitKey { get; set; }
public Stream ResponseStream { get; set; }
public override string ToString()

View File

@@ -53,7 +53,10 @@ namespace NzbDrone.Common.Http
public bool HasHttpRedirect => StatusCode == HttpStatusCode.Moved ||
StatusCode == HttpStatusCode.MovedPermanently ||
StatusCode == HttpStatusCode.Found;
StatusCode == HttpStatusCode.Found ||
StatusCode == HttpStatusCode.TemporaryRedirect ||
StatusCode == HttpStatusCode.RedirectMethod ||
StatusCode == HttpStatusCode.SeeOther;
public string[] GetCookieHeaders()
{

View File

@@ -19,9 +19,12 @@ namespace NzbDrone.Common.Instrumentation
new Regex(@"/fetch/[a-z0-9]{32}/(?<secret>[a-z0-9]{32})", RegexOptions.Compiled),
new Regex(@"getnzb.*?(?<=\?|&)(r)=(?<secret>[^&=]+?)(?= |&|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase),
// Trackers Announce Keys; Designed for Qbit Json; should work for all in theory
new Regex(@"announce(\.php)?(/|%2f|%3fpasskey%3d)(?<secret>[a-z0-9]{16,})|(?<secret>[a-z0-9]{16,})(/|%2f)announce"),
// Path
new Regex(@"""C:\\Users\\(?<secret>[^\""]+?)(\\|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase),
new Regex(@"""/home/(?<secret>[^/""]+?)(/|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase),
new Regex(@"C:\\Users\\(?<secret>[^\""]+?)(\\|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase),
new Regex(@"/home/(?<secret>[^/""]+?)(/|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase),
// NzbGet
new Regex(@"""Name""\s*:\s*""[^""]*(username|password)""\s*,\s*""Value""\s*:\s*""(?<secret>[^""]+?)""", RegexOptions.Compiled | RegexOptions.IgnoreCase),

View File

@@ -18,6 +18,12 @@ namespace NzbDrone.Common.Instrumentation
{
var exception = e.Exception;
if (exception.InnerException is ObjectDisposedException disposedException && disposedException.ObjectName == "System.Net.HttpListenerRequest")
{
// We don't care about web connections
return;
}
Console.WriteLine("Task Error: {0}", exception);
Logger.Error(exception, "Task Error");
}

View File

@@ -195,7 +195,10 @@ namespace NzbDrone.Common.Instrumentation.Sentry
if (ex != null)
{
fingerPrint.Add(ex.GetType().FullName);
fingerPrint.Add(ex.TargetSite.ToString());
if (ex.TargetSite != null)
{
fingerPrint.Add(ex.TargetSite.ToString());
}
if (ex.InnerException != null)
{
fingerPrint.Add(ex.InnerException.GetType().FullName);

View File

@@ -2,12 +2,14 @@
using System.Collections.Concurrent;
using NLog;
using NzbDrone.Common.Cache;
using NzbDrone.Common.Extensions;
namespace NzbDrone.Common.TPL
{
public interface IRateLimitService
{
void WaitAndPulse(string key, TimeSpan interval);
void WaitAndPulse(string key, string subKey, TimeSpan interval);
}
public class RateLimitService : IRateLimitService
@@ -23,9 +25,37 @@ namespace NzbDrone.Common.TPL
public void WaitAndPulse(string key, TimeSpan interval)
{
var waitUntil = _rateLimitStore.AddOrUpdate(key,
(s) => DateTime.UtcNow + interval,
(s,i) => new DateTime(Math.Max(DateTime.UtcNow.Ticks, i.Ticks), DateTimeKind.Utc) + interval);
WaitAndPulse(key, null, interval);
}
public void WaitAndPulse(string key, string subKey, TimeSpan interval)
{
var waitUntil = DateTime.UtcNow.Add(interval);
if (subKey.IsNotNullOrWhiteSpace())
{
// Expand the base key timer, but don't extend it beyond now+interval.
var baseUntil = _rateLimitStore.AddOrUpdate(key,
(s) => waitUntil,
(s, i) => new DateTime(Math.Max(waitUntil.Ticks, i.Ticks), DateTimeKind.Utc));
if (baseUntil > waitUntil)
{
waitUntil = baseUntil;
}
// Wait for the full key
var combinedKey = key + "-" + subKey;
waitUntil = _rateLimitStore.AddOrUpdate(combinedKey,
(s) => waitUntil,
(s, i) => new DateTime(Math.Max(waitUntil.Ticks, i.Add(interval).Ticks), DateTimeKind.Utc));
}
else
{
waitUntil = _rateLimitStore.AddOrUpdate(key,
(s) => waitUntil,
(s, i) => new DateTime(Math.Max(waitUntil.Ticks, i.Add(interval).Ticks), DateTimeKind.Utc));
}
waitUntil -= interval;

View File

@@ -25,10 +25,11 @@ namespace NzbDrone.Console
public static void Main(string[] args)
{
RuntimePatcher.Initialize();
StartupContext startupArgs = null;
try
{
var startupArgs = new StartupContext(args);
startupArgs = new StartupContext(args);
try
{
NzbDroneLogger.Register(startupArgs, false, true);
@@ -45,21 +46,21 @@ namespace NzbDrone.Console
System.Console.WriteLine("");
System.Console.WriteLine("");
Logger.Fatal(ex, "EPIC FAIL!");
Exit(ExitCodes.NonRecoverableFailure);
Exit(ExitCodes.NonRecoverableFailure, startupArgs);
}
catch (SocketException ex)
{
System.Console.WriteLine("");
System.Console.WriteLine("");
Logger.Fatal(ex.Message + ". This can happen if another instance of Sonarr is already running another application is using the same port (default: 8989) or the user has insufficient permissions");
Exit(ExitCodes.RecoverableFailure);
Exit(ExitCodes.RecoverableFailure, startupArgs);
}
catch (RemoteAccessException ex)
{
System.Console.WriteLine("");
System.Console.WriteLine("");
Logger.Fatal(ex, "EPIC FAIL!");
Exit(ExitCodes.Normal);
Exit(ExitCodes.Normal, startupArgs);
}
catch (Exception ex)
{
@@ -67,15 +68,15 @@ namespace NzbDrone.Console
System.Console.WriteLine("");
Logger.Fatal(ex, "EPIC FAIL!");
System.Console.WriteLine("EPIC FAIL! " + ex.ToString());
Exit(ExitCodes.UnknownFailure);
Exit(ExitCodes.UnknownFailure, startupArgs);
}
Logger.Info("Exiting main.");
Exit(ExitCodes.Normal);
Exit(ExitCodes.Normal, startupArgs);
}
private static void Exit(ExitCodes exitCode)
private static void Exit(ExitCodes exitCode, StartupContext startupArgs)
{
LogManager.Shutdown();
@@ -87,6 +88,15 @@ namespace NzbDrone.Console
if (exitCode == ExitCodes.NonRecoverableFailure)
{
if (startupArgs?.ExitImmediately == true)
{
System.Console.WriteLine("Non-recoverable failure, but set to exit immediately");
Environment.Exit((int)exitCode);
}
System.Console.WriteLine("Non-recoverable failure, waiting for user intervention...");
for (int i = 0; i < 3600; i++)
{

View File

@@ -124,7 +124,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests.RssSync
}
[Test]
public void should_be_true_when_quality_and_language_is_last_allowed_in_profile()
public void should_be_false_when_quality_and_language_is_last_allowed_in_profile_and_bypass_disabled()
{
_remoteEpisode.ParsedEpisodeInfo.Quality = new QualityModel(Quality.Bluray720p);
_remoteEpisode.ParsedEpisodeInfo.Language = Language.French;
@@ -132,6 +132,17 @@ namespace NzbDrone.Core.Test.DecisionEngineTests.RssSync
Subject.IsSatisfiedBy(_remoteEpisode, null).Accepted.Should().BeTrue();
}
[Test]
public void should_be_true_when_quality_and_language_is_last_allowed_in_profile_and_bypass_enabled()
{
_delayProfile.BypassIfHighestQuality = true;
_remoteEpisode.ParsedEpisodeInfo.Quality = new QualityModel(Quality.Bluray720p);
_remoteEpisode.ParsedEpisodeInfo.Language = Language.French;
Subject.IsSatisfiedBy(_remoteEpisode, null).Accepted.Should().BeTrue();
}
[Test]
public void should_be_true_when_release_is_older_than_delay()
{

View File

@@ -11,6 +11,7 @@ using NzbDrone.Core.Test.Framework;
using NzbDrone.Core.Tv;
using NzbDrone.Core.Indexers;
using System.Linq;
using NzbDrone.Core.Tv.Events;
namespace NzbDrone.Core.Test.Download.TrackedDownloads
{
@@ -144,5 +145,185 @@ namespace NzbDrone.Core.Test.Download.TrackedDownloads
trackedDownload.RemoteEpisode.ParsedEpisodeInfo.SeasonNumber.Should().Be(0);
trackedDownload.RemoteEpisode.MappedSeasonNumber.Should().Be(0);
}
[Test]
public void should_unmap_tracked_download_if_episode_deleted()
{
GivenDownloadHistory();
var remoteEpisode = new RemoteEpisode
{
Series = new Series() { Id = 5 },
Episodes = new List<Episode> { new Episode { Id = 4 } },
ParsedEpisodeInfo = new ParsedEpisodeInfo()
{
SeriesTitle = "TV Series",
SeasonNumber = 1,
EpisodeNumbers = new[] { 1 }
},
MappedSeasonNumber = 0
};
Mocker.GetMock<IParsingService>()
.Setup(s => s.Map(It.IsAny<ParsedEpisodeInfo>(), It.IsAny<int>(), It.IsAny<int>(), null))
.Returns(remoteEpisode);
Mocker.GetMock<IHistoryService>()
.Setup(s => s.FindByDownloadId(It.IsAny<string>()))
.Returns(new List<EpisodeHistory>());
var client = new DownloadClientDefinition()
{
Id = 1,
Protocol = DownloadProtocol.Torrent
};
var item = new DownloadClientItem()
{
Title = "TV Series - S01E01",
DownloadId = "12345",
DownloadClientInfo = new DownloadClientItemClientInfo
{
Id = 1,
Type = "Blackhole",
Name = "Blackhole Client",
Protocol = DownloadProtocol.Torrent
}
};
Subject.TrackDownload(client, item);
Subject.GetTrackedDownloads().Should().HaveCount(1);
Mocker.GetMock<IParsingService>()
.Setup(s => s.Map(It.IsAny<ParsedEpisodeInfo>(), It.IsAny<int>(), It.IsAny<int>(), null))
.Returns(default(RemoteEpisode));
Subject.Handle(new EpisodeInfoRefreshedEvent(remoteEpisode.Series, new List<Episode>(), new List<Episode>(), remoteEpisode.Episodes));
var trackedDownloads = Subject.GetTrackedDownloads();
trackedDownloads.Should().HaveCount(1);
trackedDownloads.First().RemoteEpisode.Should().BeNull();
}
[Test]
public void should_not_throw_when_processing_deleted_episodes()
{
GivenDownloadHistory();
var remoteEpisode = new RemoteEpisode
{
Series = new Series() { Id = 5 },
Episodes = new List<Episode> { new Episode { Id = 4 } },
ParsedEpisodeInfo = new ParsedEpisodeInfo()
{
SeriesTitle = "TV Series",
SeasonNumber = 1,
EpisodeNumbers = new[] { 1 }
},
MappedSeasonNumber = 0
};
Mocker.GetMock<IParsingService>()
.Setup(s => s.Map(It.IsAny<ParsedEpisodeInfo>(), It.IsAny<int>(), It.IsAny<int>(), null))
.Returns(default(RemoteEpisode));
Mocker.GetMock<IHistoryService>()
.Setup(s => s.FindByDownloadId(It.IsAny<string>()))
.Returns(new List<EpisodeHistory>());
var client = new DownloadClientDefinition()
{
Id = 1,
Protocol = DownloadProtocol.Torrent
};
var item = new DownloadClientItem()
{
Title = "TV Series - S01E01",
DownloadId = "12345",
DownloadClientInfo = new DownloadClientItemClientInfo
{
Id = 1,
Type = "Blackhole",
Name = "Blackhole Client",
Protocol = DownloadProtocol.Torrent
}
};
Subject.TrackDownload(client, item);
Subject.GetTrackedDownloads().Should().HaveCount(1);
Mocker.GetMock<IParsingService>()
.Setup(s => s.Map(It.IsAny<ParsedEpisodeInfo>(), It.IsAny<int>(), It.IsAny<int>(), null))
.Returns(default(RemoteEpisode));
Subject.Handle(new EpisodeInfoRefreshedEvent(remoteEpisode.Series, new List<Episode>(), new List<Episode>(), remoteEpisode.Episodes));
var trackedDownloads = Subject.GetTrackedDownloads();
trackedDownloads.Should().HaveCount(1);
trackedDownloads.First().RemoteEpisode.Should().BeNull();
}
[Test]
public void should_not_throw_when_processing_deleted_series()
{
GivenDownloadHistory();
var remoteEpisode = new RemoteEpisode
{
Series = new Series() { Id = 5 },
Episodes = new List<Episode> { new Episode { Id = 4 } },
ParsedEpisodeInfo = new ParsedEpisodeInfo()
{
SeriesTitle = "TV Series",
SeasonNumber = 1,
EpisodeNumbers = new[] { 1 }
},
MappedSeasonNumber = 0
};
Mocker.GetMock<IParsingService>()
.Setup(s => s.Map(It.IsAny<ParsedEpisodeInfo>(), It.IsAny<int>(), It.IsAny<int>(), null))
.Returns(default(RemoteEpisode));
Mocker.GetMock<IHistoryService>()
.Setup(s => s.FindByDownloadId(It.IsAny<string>()))
.Returns(new List<EpisodeHistory>());
var client = new DownloadClientDefinition()
{
Id = 1,
Protocol = DownloadProtocol.Torrent
};
var item = new DownloadClientItem()
{
Title = "TV Series - S01E01",
DownloadId = "12345",
DownloadClientInfo = new DownloadClientItemClientInfo
{
Id = 1,
Type = "Blackhole",
Name = "Blackhole Client",
Protocol = DownloadProtocol.Torrent
}
};
Subject.TrackDownload(client, item);
Subject.GetTrackedDownloads().Should().HaveCount(1);
Mocker.GetMock<IParsingService>()
.Setup(s => s.Map(It.IsAny<ParsedEpisodeInfo>(), It.IsAny<int>(), It.IsAny<int>(), null))
.Returns(default(RemoteEpisode));
Subject.Handle(new SeriesDeletedEvent(remoteEpisode.Series, true, true));
var trackedDownloads = Subject.GetTrackedDownloads();
trackedDownloads.Should().HaveCount(1);
trackedDownloads.First().RemoteEpisode.Should().BeNull();
}
}
}

View File

@@ -1,3 +1,4 @@
using System.IO;
using FizzWare.NBuilder;
using FluentAssertions;
using Moq;
@@ -76,5 +77,37 @@ namespace NzbDrone.Core.Test.MediaFiles
Subject.Calculate(_series, _episodeFile).Should().Be(20);
}
[Test]
public void should_return_score_for_original_path_folder_name_if_highest()
{
var folderName = "folder-name";
var fileName = "file-name";
_episodeFile.OriginalFilePath = Path.Combine(folderName, fileName);
GivenPreferredWordScore(_episodeFile.RelativePath, 20);
GivenPreferredWordScore(_episodeFile.Path, 50);
GivenPreferredWordScore(folderName, 60);
GivenPreferredWordScore(fileName, 50);
Subject.Calculate(_series, _episodeFile).Should().Be(60);
}
[Test]
public void should_return_score_for_original_path_file_name_if_highest()
{
var folderName = "folder-name";
var fileName = "file-name";
_episodeFile.OriginalFilePath = Path.Combine(folderName, fileName);
GivenPreferredWordScore(_episodeFile.RelativePath, 20);
GivenPreferredWordScore(_episodeFile.Path, 50);
GivenPreferredWordScore(folderName, 40);
GivenPreferredWordScore(fileName, 50);
Subject.Calculate(_series, _episodeFile).Should().Be(50);
}
}
}

View File

@@ -44,7 +44,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
Series = _series
};
Subject.Aggregate(localEpisode, null, false);
Subject.Aggregate(localEpisode, null);
Mocker.GetMock<IParsingService>()
.Verify(v => v.GetEpisodes(fileEpisodeInfo, _series, localEpisode.SceneSource, null), Times.Once());
@@ -60,10 +60,11 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
FileEpisodeInfo = fileEpisodeInfo,
FolderEpisodeInfo = folderEpisodeInfo,
Path = @"C:\Test\Unsorted TV\Series.Title.S01\Series.Title.S01E01.mkv".AsOsAgnostic(),
Series = _series
Series = _series,
OtherVideoFiles = true
};
Subject.Aggregate(localEpisode, null, true);
Subject.Aggregate(localEpisode, null);
Mocker.GetMock<IParsingService>()
.Verify(v => v.GetEpisodes(fileEpisodeInfo, _series, localEpisode.SceneSource, null), Times.Once());
@@ -82,7 +83,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
Series = _series
};
Subject.Aggregate(localEpisode, null, false);
Subject.Aggregate(localEpisode, null);
Mocker.GetMock<IParsingService>()
.Verify(v => v.GetEpisodes(fileEpisodeInfo, _series, localEpisode.SceneSource, null), Times.Once());
@@ -101,7 +102,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
Series = _series
};
Subject.Aggregate(localEpisode, null, false);
Subject.Aggregate(localEpisode, null);
Mocker.GetMock<IParsingService>()
.Verify(v => v.GetEpisodes(folderEpisodeInfo, _series, localEpisode.SceneSource, null), Times.Once());
@@ -120,7 +121,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
Series = _series
};
Subject.Aggregate(localEpisode, null, false);
Subject.Aggregate(localEpisode, null);
Mocker.GetMock<IParsingService>()
.Verify(v => v.GetEpisodes(fileEpisodeInfo, _series, localEpisode.SceneSource, null), Times.Once());
@@ -143,7 +144,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
.Setup(s => s.ParseSpecialEpisodeTitle(fileEpisodeInfo, It.IsAny<string>(), _series))
.Returns(specialEpisodeInfo);
Subject.Aggregate(localEpisode, null, false);
Subject.Aggregate(localEpisode, null);
Mocker.GetMock<IParsingService>()
.Verify(v => v.GetEpisodes(specialEpisodeInfo, _series, localEpisode.SceneSource, null), Times.Once());

View File

@@ -44,7 +44,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
{
_localEpisode.FileEpisodeInfo = GetParsedEpisodeInfo(Language.English, _simpleReleaseTitle);
Subject.Aggregate(_localEpisode, null, false).Language.Should().Be(_localEpisode.FileEpisodeInfo.Language);
Subject.Aggregate(_localEpisode, null).Language.Should().Be(_localEpisode.FileEpisodeInfo.Language);
}
[Test]
@@ -53,7 +53,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
_localEpisode.FolderEpisodeInfo = GetParsedEpisodeInfo(Language.English, _simpleReleaseTitle);
_localEpisode.FileEpisodeInfo = GetParsedEpisodeInfo(Language.English, _simpleReleaseTitle);
Subject.Aggregate(_localEpisode, null, false).Language.Should().Be(_localEpisode.FolderEpisodeInfo.Language);
Subject.Aggregate(_localEpisode, null).Language.Should().Be(_localEpisode.FolderEpisodeInfo.Language);
}
[Test]
@@ -63,7 +63,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
_localEpisode.FolderEpisodeInfo = GetParsedEpisodeInfo(Language.English, _simpleReleaseTitle);
_localEpisode.FileEpisodeInfo = GetParsedEpisodeInfo(Language.English, _simpleReleaseTitle);
Subject.Aggregate(_localEpisode, null, false).Language.Should().Be(_localEpisode.DownloadClientEpisodeInfo.Language);
Subject.Aggregate(_localEpisode, null).Language.Should().Be(_localEpisode.DownloadClientEpisodeInfo.Language);
}
@@ -74,7 +74,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
_localEpisode.FolderEpisodeInfo = GetParsedEpisodeInfo(Language.English, _simpleReleaseTitle);
_localEpisode.FileEpisodeInfo = GetParsedEpisodeInfo(Language.French, _simpleReleaseTitle);
Subject.Aggregate(_localEpisode, null, false).Language.Should().Be(_localEpisode.FileEpisodeInfo.Language);
Subject.Aggregate(_localEpisode, null).Language.Should().Be(_localEpisode.FileEpisodeInfo.Language);
}
[Test]
@@ -83,7 +83,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
_localEpisode.Episodes.First().Title = "The Swedish Job";
_localEpisode.FileEpisodeInfo = GetParsedEpisodeInfo(Language.Swedish, "Series.Title.S01E01.The.Swedish.Job.720p.WEB-DL-RlsGrp");
Subject.Aggregate(_localEpisode, null, false).Language.Should().Be(Language.English);
Subject.Aggregate(_localEpisode, null).Language.Should().Be(Language.English);
}
@@ -93,7 +93,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
_localEpisode.Episodes.First().Title = "The Swedish Job";
_localEpisode.FileEpisodeInfo = GetParsedEpisodeInfo(Language.French, "Series.Title.S01E01.The.Swedish.Job.720p.WEB-DL-RlsGrp");
Subject.Aggregate(_localEpisode, null, false).Language.Should().Be(_localEpisode.FileEpisodeInfo.Language);
Subject.Aggregate(_localEpisode, null).Language.Should().Be(_localEpisode.FileEpisodeInfo.Language);
}
}

View File

@@ -60,7 +60,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
GivenAugmenters(_fileExtensionAugmenter, nullMock);
var result = Subject.Aggregate(new LocalEpisode(), null, false);
var result = Subject.Aggregate(new LocalEpisode(), null);
result.Quality.SourceDetectionSource.Should().Be(QualityDetectionSource.Extension);
result.Quality.ResolutionDetectionSource.Should().Be(QualityDetectionSource.Extension);
@@ -72,7 +72,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
{
GivenAugmenters(_fileExtensionAugmenter, _nameAugmenter);
var result = Subject.Aggregate(new LocalEpisode(), null, false);
var result = Subject.Aggregate(new LocalEpisode(), null);
result.Quality.SourceDetectionSource.Should().Be(QualityDetectionSource.Name);
result.Quality.ResolutionDetectionSource.Should().Be(QualityDetectionSource.Name);
@@ -84,7 +84,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
{
GivenAugmenters(_fileExtensionAugmenter, _mediaInfoAugmenter);
var result = Subject.Aggregate(new LocalEpisode(), null, false);
var result = Subject.Aggregate(new LocalEpisode(), null);
result.Quality.SourceDetectionSource.Should().Be(QualityDetectionSource.Extension);
result.Quality.ResolutionDetectionSource.Should().Be(QualityDetectionSource.MediaInfo);
@@ -96,7 +96,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
{
GivenAugmenters(_nameAugmenter, _mediaInfoAugmenter);
var result = Subject.Aggregate(new LocalEpisode(), null, false);
var result = Subject.Aggregate(new LocalEpisode(), null);
result.Quality.SourceDetectionSource.Should().Be(QualityDetectionSource.Name);
result.Quality.ResolutionDetectionSource.Should().Be(QualityDetectionSource.MediaInfo);
@@ -108,7 +108,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
{
GivenAugmenters(_nameAugmenter, _releaseNameAugmenter);
var result = Subject.Aggregate(new LocalEpisode(), new DownloadClientItem(), false);
var result = Subject.Aggregate(new LocalEpisode(), new DownloadClientItem());
result.Quality.SourceDetectionSource.Should().Be(QualityDetectionSource.Name);
result.Quality.ResolutionDetectionSource.Should().Be(QualityDetectionSource.Name);
@@ -120,7 +120,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
{
GivenAugmenters(_nameAugmenter, _releaseNameAugmenter);
var result = Subject.Aggregate(new LocalEpisode(), new DownloadClientItem(), false);
var result = Subject.Aggregate(new LocalEpisode(), new DownloadClientItem());
result.Quality.Revision.Version.Should().Be(1);
result.Quality.RevisionDetectionSource.Should().Be(QualityDetectionSource.Unknown);
@@ -134,7 +134,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
GivenAugmenters(_nameAugmenter, _releaseNameAugmenter);
var result = Subject.Aggregate(new LocalEpisode(), new DownloadClientItem(), false);
var result = Subject.Aggregate(new LocalEpisode(), new DownloadClientItem());
result.Quality.Revision.Version.Should().Be(2);
result.Quality.RevisionDetectionSource.Should().Be(QualityDetectionSource.Name);
@@ -148,7 +148,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
GivenAugmenters(_nameAugmenter, _releaseNameAugmenter);
var result = Subject.Aggregate(new LocalEpisode(), new DownloadClientItem(), false);
var result = Subject.Aggregate(new LocalEpisode(), new DownloadClientItem());
result.Quality.Revision.Version.Should().Be(0);
result.Quality.RevisionDetectionSource.Should().Be(QualityDetectionSource.Name);
@@ -165,7 +165,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
GivenAugmenters(_nameAugmenter, _releaseNameAugmenter);
var result = Subject.Aggregate(new LocalEpisode(), new DownloadClientItem(), false);
var result = Subject.Aggregate(new LocalEpisode(), new DownloadClientItem());
result.Quality.Revision.Version.Should().Be(2);
result.Quality.RevisionDetectionSource.Should().Be(QualityDetectionSource.Name);

View File

@@ -34,7 +34,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
Series = _series
};
Subject.Aggregate(localEpisode, null, false);
Subject.Aggregate(localEpisode, null);
localEpisode.ReleaseGroup.Should().Be("Wizzy");
}
@@ -52,7 +52,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
Series = _series
};
Subject.Aggregate(localEpisode, null, false);
Subject.Aggregate(localEpisode, null);
localEpisode.ReleaseGroup.Should().Be("Wizzy");
}
@@ -72,7 +72,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
Series = _series
};
Subject.Aggregate(localEpisode, null, false);
Subject.Aggregate(localEpisode, null);
localEpisode.ReleaseGroup.Should().Be("Viva");
}
@@ -92,7 +92,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
Series = _series
};
Subject.Aggregate(localEpisode, null, false);
Subject.Aggregate(localEpisode, null);
localEpisode.ReleaseGroup.Should().Be("Drone");
}
@@ -112,7 +112,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
Series = _series
};
Subject.Aggregate(localEpisode, null, false);
Subject.Aggregate(localEpisode, null);
localEpisode.ReleaseGroup.Should().Be("Wizzy");
}

View File

@@ -0,0 +1,199 @@
using System.Collections.Generic;
using System.IO;
using FizzWare.NBuilder;
using FluentAssertions;
using Moq;
using NUnit.Framework;
using NzbDrone.Core.MediaFiles;
using NzbDrone.Core.MediaFiles.EpisodeImport;
using NzbDrone.Core.Parser.Model;
using NzbDrone.Core.Profiles.Qualities;
using NzbDrone.Core.Qualities;
using NzbDrone.Core.Test.Framework;
using NzbDrone.Core.Tv;
using NzbDrone.Test.Common;
using NzbDrone.Core.Languages;
using NzbDrone.Core.Profiles.Languages;
namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport
{
[TestFixture]
public class GetSceneNameFixture : CoreTest
{
private LocalEpisode _localEpisode;
private string _seasonName = "series.title.s02.dvdrip.x264-ingot";
private string _episodeName = "series.title.s02e23.dvdrip.x264-ingot";
[SetUp]
public void Setup()
{
var series = Builder<Series>.CreateNew()
.With(e => e.QualityProfile = new QualityProfile { Items = Qualities.QualityFixture.GetDefaultQualities() })
.With(l => l.LanguageProfile = new LanguageProfile
{
Cutoff = Language.Spanish,
Languages = Languages.LanguageFixture.GetDefaultLanguages()
})
.With(s => s.Path = @"C:\Test\TV\Series Title".AsOsAgnostic())
.Build();
var episode = Builder<Episode>.CreateNew()
.Build();
_localEpisode = new LocalEpisode
{
Series = series,
Episodes = new List<Episode> {episode},
Path = Path.Combine(series.Path, "Series Title - S02E23 - Episode Title.mkv"),
Quality = new QualityModel(Quality.Bluray720p),
ReleaseGroup = "DRONE"
};
}
private void GivenExistingFileOnDisk()
{
Mocker.GetMock<IMediaFileService>()
.Setup(s => s.GetFilesWithRelativePath(It.IsAny<int>(), It.IsAny<string>()))
.Returns(new List<EpisodeFile>());
}
[Test]
public void should_use_download_client_item_title_as_scene_name()
{
_localEpisode.DownloadClientEpisodeInfo = new ParsedEpisodeInfo
{
ReleaseTitle = _episodeName
};
SceneNameCalculator.GetSceneName(_localEpisode).Should()
.Be(_episodeName);
}
[Test]
public void should_not_use_download_client_item_title_as_scene_name_if_full_season()
{
_localEpisode.DownloadClientEpisodeInfo = new ParsedEpisodeInfo
{
ReleaseTitle = _seasonName,
FullSeason = true
};
_localEpisode.Path = Path.Combine(@"C:\Test\Unsorted TV", _seasonName, _episodeName)
.AsOsAgnostic();
SceneNameCalculator.GetSceneName(_localEpisode).Should()
.BeNull();
}
[Test]
public void should_not_use_download_client_item_title_as_scene_name_if_there_are_other_video_files()
{
_localEpisode.OtherVideoFiles = true;
_localEpisode.DownloadClientEpisodeInfo = new ParsedEpisodeInfo
{
ReleaseTitle = _seasonName,
FullSeason = false
};
_localEpisode.Path = Path.Combine(@"C:\Test\Unsorted TV", _seasonName, _episodeName)
.AsOsAgnostic();
SceneNameCalculator.GetSceneName(_localEpisode).Should()
.BeNull();
}
[Test]
public void should_use_file_name_as_scenename_only_if_it_looks_like_scenename()
{
_localEpisode.Path = Path.Combine(@"C:\Test\Unsorted TV", _seasonName, _episodeName + ".mkv")
.AsOsAgnostic();
SceneNameCalculator.GetSceneName(_localEpisode).Should()
.Be(_episodeName);
}
[Test]
public void should_not_use_file_name_as_scenename_if_it_doesnt_look_like_scenename()
{
_localEpisode.Path = Path.Combine(@"C:\Test\Unsorted TV", _episodeName, "aaaaa.mkv")
.AsOsAgnostic();
SceneNameCalculator.GetSceneName(_localEpisode).Should()
.BeNull();
}
[Test]
public void should_use_folder_name_as_scenename_only_if_it_looks_like_scenename()
{
_localEpisode.FolderEpisodeInfo = new ParsedEpisodeInfo
{
ReleaseTitle = _episodeName
};
SceneNameCalculator.GetSceneName(_localEpisode).Should()
.Be(_episodeName);
}
[Test]
public void should_not_use_folder_name_as_scenename_if_it_doesnt_look_like_scenename()
{
_localEpisode.Path = Path.Combine(@"C:\Test\Unsorted TV", _episodeName, "aaaaa.mkv")
.AsOsAgnostic();
_localEpisode.FolderEpisodeInfo = new ParsedEpisodeInfo
{
ReleaseTitle = "aaaaa"
};
SceneNameCalculator.GetSceneName(_localEpisode).Should()
.BeNull();
}
[Test]
public void should_not_use_folder_name_as_scenename_if_it_is_for_a_full_season()
{
_localEpisode.Path = Path.Combine(@"C:\Test\Unsorted TV", _episodeName, "aaaaa.mkv")
.AsOsAgnostic();
_localEpisode.FolderEpisodeInfo = new ParsedEpisodeInfo
{
ReleaseTitle = _seasonName,
FullSeason = true
};
SceneNameCalculator.GetSceneName(_localEpisode).Should()
.BeNull();
}
[Test]
public void should_not_use_folder_name_as_scenename_if_there_are_other_video_files()
{
_localEpisode.OtherVideoFiles = true;
_localEpisode.Path = Path.Combine(@"C:\Test\Unsorted TV", _episodeName, "aaaaa.mkv")
.AsOsAgnostic();
_localEpisode.FolderEpisodeInfo = new ParsedEpisodeInfo
{
ReleaseTitle = _seasonName,
FullSeason = false
};
SceneNameCalculator.GetSceneName(_localEpisode).Should()
.BeNull();
}
[TestCase(".mkv")]
[TestCase(".par2")]
[TestCase(".nzb")]
public void should_remove_extension_from_nzb_title_for_scene_name(string extension)
{
_localEpisode.DownloadClientEpisodeInfo = new ParsedEpisodeInfo
{
ReleaseTitle = _episodeName + extension
};
SceneNameCalculator.GetSceneName(_localEpisode).Should()
.Be(_episodeName);
}
}
}

View File

@@ -21,7 +21,7 @@ using NzbDrone.Test.Common;
using NzbDrone.Core.Languages;
using NzbDrone.Core.Profiles.Languages;
namespace NzbDrone.Core.Test.MediaFiles
namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport
{
[TestFixture]
public class ImportApprovedEpisodesFixture : CoreTest<ImportApprovedEpisodes>
@@ -169,112 +169,6 @@ namespace NzbDrone.Core.Test.MediaFiles
Times.Never());
}
[Test]
public void should_use_nzb_title_as_scene_name()
{
GivenNewDownload();
_downloadClientItem.Title = "malcolm.in.the.middle.s02e05.dvdrip.xvid-ingot";
Subject.Import(new List<ImportDecision> { _approvedDecisions.First() }, true, _downloadClientItem);
Mocker.GetMock<IMediaFileService>().Verify(v => v.Add(It.Is<EpisodeFile>(c => c.SceneName == _downloadClientItem.Title)));
}
[TestCase(".mkv")]
[TestCase(".par2")]
[TestCase(".nzb")]
public void should_remove_extension_from_nzb_title_for_scene_name(string extension)
{
GivenNewDownload();
var title = "malcolm.in.the.middle.s02e05.dvdrip.xvid-ingot";
_downloadClientItem.Title = title + extension;
Subject.Import(new List<ImportDecision> { _approvedDecisions.First() }, true, _downloadClientItem);
Mocker.GetMock<IMediaFileService>().Verify(v => v.Add(It.Is<EpisodeFile>(c => c.SceneName == title)));
}
[Test]
public void should_not_use_nzb_title_as_scene_name_if_full_season()
{
GivenNewDownload();
_approvedDecisions.First().LocalEpisode.Path = Path.Combine(_downloadClientItem.OutputPath.ToString(), "malcolm.in.the.middle.s02e23.dvdrip.xvid-ingot.mkv");
_downloadClientItem.Title = "malcolm.in.the.middle.s02.dvdrip.xvid-ingot";
Subject.Import(new List<ImportDecision> { _approvedDecisions.First() }, true, _downloadClientItem);
Mocker.GetMock<IMediaFileService>().Verify(v => v.Add(It.Is<EpisodeFile>(c => c.SceneName == "malcolm.in.the.middle.s02e23.dvdrip.xvid-ingot")));
}
[Test]
public void should_use_file_name_as_scenename_only_if_it_looks_like_scenename()
{
GivenNewDownload();
_approvedDecisions.First().LocalEpisode.Path = Path.Combine(_downloadClientItem.OutputPath.ToString(), "series.title.s02e23.dvdrip.xvid-ingot.mkv");
Subject.Import(new List<ImportDecision> { _approvedDecisions.First() }, true);
Mocker.GetMock<IMediaFileService>().Verify(v => v.Add(It.Is<EpisodeFile>(c => c.SceneName == "series.title.s02e23.dvdrip.xvid-ingot")));
}
[Test]
public void should_not_use_file_name_as_scenename_if_it_doesnt_looks_like_scenename()
{
GivenNewDownload();
_approvedDecisions.First().LocalEpisode.Path = Path.Combine(_downloadClientItem.OutputPath.ToString(), "aaaaa.mkv");
Subject.Import(new List<ImportDecision> { _approvedDecisions.First() }, true);
Mocker.GetMock<IMediaFileService>().Verify(v => v.Add(It.Is<EpisodeFile>(c => c.SceneName == null)));
}
[Test]
public void should_use_folder_name_as_scenename_only_if_it_looks_like_scenename()
{
GivenNewDownload();
_approvedDecisions.First().LocalEpisode.Path = Path.Combine(_downloadClientItem.OutputPath.ToString(), "aaaaa.mkv");
_approvedDecisions.First().LocalEpisode.FolderEpisodeInfo = new ParsedEpisodeInfo
{
ReleaseTitle = "series.title.s02e23.dvdrip.xvid-ingot"
};
Subject.Import(new List<ImportDecision> { _approvedDecisions.First() }, true);
Mocker.GetMock<IMediaFileService>().Verify(v => v.Add(It.Is<EpisodeFile>(c => c.SceneName == "series.title.s02e23.dvdrip.xvid-ingot")));
}
[Test]
public void should_not_use_folder_name_as_scenename_if_it_doesnt_looks_like_scenename()
{
GivenNewDownload();
_approvedDecisions.First().LocalEpisode.Path = Path.Combine(_downloadClientItem.OutputPath.ToString(), "aaaaa.mkv");
_approvedDecisions.First().LocalEpisode.FolderEpisodeInfo = new ParsedEpisodeInfo
{
ReleaseTitle = "aaaaa.mkv"
};
Subject.Import(new List<ImportDecision> { _approvedDecisions.First() }, true);
Mocker.GetMock<IMediaFileService>().Verify(v => v.Add(It.Is<EpisodeFile>(c => c.SceneName == null)));
}
[Test]
public void should_not_use_folder_name_as_scenename_if_it_is_for_a_full_season()
{
GivenNewDownload();
_approvedDecisions.First().LocalEpisode.Path = Path.Combine(_downloadClientItem.OutputPath.ToString(), "aaaaa.mkv");
_approvedDecisions.First().LocalEpisode.FolderEpisodeInfo = new ParsedEpisodeInfo
{
ReleaseTitle = "series.title.s02.dvdrip.xvid-ingot.mkv",
FullSeason = true
};
Subject.Import(new List<ImportDecision> { _approvedDecisions.First() }, true);
Mocker.GetMock<IMediaFileService>().Verify(v => v.Add(It.Is<EpisodeFile>(c => c.SceneName == null)));
}
[Test]
public void should_import_larger_files_first()
{
@@ -483,5 +377,18 @@ namespace NzbDrone.Core.Test.MediaFiles
Mocker.GetMock<IMediaFileService>().Verify(v => v.Add(It.Is<EpisodeFile>(c => c.OriginalFilePath == $"{name}\\subfolder\\{name}.mkv".AsOsAgnostic())));
}
[Test]
public void should_include_scene_name_with_new_downloads()
{
var firstDecision = _approvedDecisions.First();
firstDecision.LocalEpisode.SceneName = "Series.Title.S01E01.dvdrip-DRONE";
Subject.Import(new List<ImportDecision> { _approvedDecisions.First() }, true);
Mocker.GetMock<IUpgradeMediaFiles>()
.Verify(v => v.UpgradeEpisodeFile(It.Is<EpisodeFile>(e => e.SceneName == firstDecision.LocalEpisode.SceneName), _approvedDecisions.First().LocalEpisode, false),
Times.Once());
}
}
}

View File

@@ -93,8 +93,8 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport
private void GivenAugmentationSuccess()
{
Mocker.GetMock<IAggregationService>()
.Setup(s => s.Augment(It.IsAny<LocalEpisode>(), It.IsAny<DownloadClientItem>(), It.IsAny<bool>()))
.Callback<LocalEpisode, DownloadClientItem, bool>((localEpisode, downloadClientItem, otherFiles) =>
.Setup(s => s.Augment(It.IsAny<LocalEpisode>(), It.IsAny<DownloadClientItem>()))
.Callback<LocalEpisode, DownloadClientItem>((localEpisode, downloadClientItem) =>
{
localEpisode.Episodes = _localEpisode.Episodes;
});
@@ -164,7 +164,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport
GivenSpecifications(_pass1);
Mocker.GetMock<IAggregationService>()
.Setup(c => c.Augment(It.IsAny<LocalEpisode>(), It.IsAny<DownloadClientItem>(), It.IsAny<bool>()))
.Setup(c => c.Augment(It.IsAny<LocalEpisode>(), It.IsAny<DownloadClientItem>()))
.Throws<TestException>();
_videoFiles = new List<string>
@@ -179,7 +179,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport
Subject.GetImportDecisions(_videoFiles, _series);
Mocker.GetMock<IAggregationService>()
.Verify(c => c.Augment(It.IsAny<LocalEpisode>(), It.IsAny<DownloadClientItem>(), It.IsAny<bool>()), Times.Exactly(_videoFiles.Count));
.Verify(c => c.Augment(It.IsAny<LocalEpisode>(), It.IsAny<DownloadClientItem>()), Times.Exactly(_videoFiles.Count));
ExceptionVerification.ExpectedErrors(3);
}
@@ -200,7 +200,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport
var decisions = Subject.GetImportDecisions(_videoFiles, _series);
Mocker.GetMock<IAggregationService>()
.Verify(c => c.Augment(It.IsAny<LocalEpisode>(), It.IsAny<DownloadClientItem>(), It.IsAny<bool>()), Times.Exactly(_videoFiles.Count));
.Verify(c => c.Augment(It.IsAny<LocalEpisode>(), It.IsAny<DownloadClientItem>()), Times.Exactly(_videoFiles.Count));
decisions.Should().HaveCount(3);
decisions.First().Rejections.Should().NotBeEmpty();
@@ -210,7 +210,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport
public void should_return_a_decision_when_exception_is_caught()
{
Mocker.GetMock<IAggregationService>()
.Setup(c => c.Augment(It.IsAny<LocalEpisode>(), It.IsAny<DownloadClientItem>(), It.IsAny<bool>()))
.Setup(c => c.Augment(It.IsAny<LocalEpisode>(), It.IsAny<DownloadClientItem>()))
.Throws<TestException>();
_videoFiles = new List<string>

View File

@@ -1,3 +1,4 @@
using System.Linq;
using FizzWare.NBuilder;
using FluentAssertions;
using Moq;
@@ -6,6 +7,7 @@ using NzbDrone.Core.MediaFiles.EpisodeImport.Specifications;
using NzbDrone.Core.Parser;
using NzbDrone.Core.Parser.Model;
using NzbDrone.Core.Test.Framework;
using NzbDrone.Core.Tv;
using NzbDrone.Test.Common;
namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
@@ -33,6 +35,24 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
.With(p => p.FullSeason = false)
.Build())
.Build();
}
private void GivenEpisodes(ParsedEpisodeInfo parsedEpisodeInfo, int[] episodeNumbers)
{
var seasonNumber = parsedEpisodeInfo.SeasonNumber;
var episodes = episodeNumbers.Select(n =>
Builder<Episode>.CreateNew()
.With(e => e.Id = seasonNumber * 10 + n)
.With(e => e.SeasonNumber = seasonNumber)
.With(e => e.EpisodeNumber = n)
.Build()
).ToList();
Mocker.GetMock<IParsingService>()
.Setup(s => s.GetEpisodes(parsedEpisodeInfo, It.IsAny<Series>(), true, null))
.Returns(episodes);
}
[Test]
@@ -68,6 +88,9 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
_localEpisode.FolderEpisodeInfo.EpisodeNumbers = new int[0];
_localEpisode.FolderEpisodeInfo.FullSeason = true;
GivenEpisodes(_localEpisode.FileEpisodeInfo, _localEpisode.FileEpisodeInfo.EpisodeNumbers);
GivenEpisodes(_localEpisode.FolderEpisodeInfo, new []{ 1, 2, 3, 4, 5 });
Subject.IsSatisfiedBy(_localEpisode, null).Accepted.Should().BeTrue();
}
@@ -78,6 +101,9 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
_localEpisode.FolderEpisodeInfo.EpisodeNumbers = new[] { 1 };
_localEpisode.Path = @"C:\Test\Unsorted\Series.Title.S01E01.720p.HDTV-Sonarr\S01E01.mkv".AsOsAgnostic();
GivenEpisodes(_localEpisode.FileEpisodeInfo, _localEpisode.FileEpisodeInfo.EpisodeNumbers);
GivenEpisodes(_localEpisode.FolderEpisodeInfo, _localEpisode.FolderEpisodeInfo.EpisodeNumbers);
Subject.IsSatisfiedBy(_localEpisode, null).Accepted.Should().BeTrue();
}
@@ -88,16 +114,22 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
_localEpisode.FolderEpisodeInfo.EpisodeNumbers = new[] { 1 };
_localEpisode.Path = @"C:\Test\Unsorted\Series.Title.S01E01E02.720p.HDTV-Sonarr\S01E01.mkv".AsOsAgnostic();
GivenEpisodes(_localEpisode.FileEpisodeInfo, _localEpisode.FileEpisodeInfo.EpisodeNumbers);
GivenEpisodes(_localEpisode.FolderEpisodeInfo, _localEpisode.FolderEpisodeInfo.EpisodeNumbers);
Subject.IsSatisfiedBy(_localEpisode, null).Accepted.Should().BeTrue();
}
[Test]
public void should_be_disregard_subfolder()
public void should_disregard_subfolder()
{
_localEpisode.FileEpisodeInfo.EpisodeNumbers = new[] { 5, 6 };
_localEpisode.FolderEpisodeInfo.EpisodeNumbers = new[] { 1, 2 };
_localEpisode.Path = @"C:\Test\Unsorted\Series.Title.S01E01E02.720p.HDTV-Sonarr\S01E05E06.mkv".AsOsAgnostic();
GivenEpisodes(_localEpisode.FileEpisodeInfo, _localEpisode.FileEpisodeInfo.EpisodeNumbers);
GivenEpisodes(_localEpisode.FolderEpisodeInfo, _localEpisode.FolderEpisodeInfo.EpisodeNumbers);
Subject.IsSatisfiedBy(_localEpisode, null).Accepted.Should().BeFalse();
}
@@ -106,6 +138,9 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
{
_localEpisode.Path = @"C:\Test\Unsorted\Series.Title.S01E01.720p.HDTV-Sonarr\S01E05.mkv".AsOsAgnostic();
GivenEpisodes(_localEpisode.FileEpisodeInfo, _localEpisode.FileEpisodeInfo.EpisodeNumbers);
GivenEpisodes(_localEpisode.FolderEpisodeInfo, _localEpisode.FolderEpisodeInfo.EpisodeNumbers);
Subject.IsSatisfiedBy(_localEpisode, null).Accepted.Should().BeFalse();
}
@@ -116,6 +151,9 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
_localEpisode.FolderEpisodeInfo.EpisodeNumbers = new[] { 1, 2 };
_localEpisode.Path = @"C:\Test\Unsorted\Series.Title.S01E01E02.720p.HDTV-Sonarr\S01E05E06.mkv".AsOsAgnostic();
GivenEpisodes(_localEpisode.FileEpisodeInfo, _localEpisode.FileEpisodeInfo.EpisodeNumbers);
GivenEpisodes(_localEpisode.FolderEpisodeInfo, _localEpisode.FolderEpisodeInfo.EpisodeNumbers);
Subject.IsSatisfiedBy(_localEpisode, null).Accepted.Should().BeFalse();
}
@@ -129,6 +167,9 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
_localEpisode.FolderEpisodeInfo.SeasonNumber = 1;
_localEpisode.FolderEpisodeInfo.EpisodeNumbers = new[] { 1, 2 };
GivenEpisodes(_localEpisode.FileEpisodeInfo, _localEpisode.FileEpisodeInfo.EpisodeNumbers);
GivenEpisodes(_localEpisode.FolderEpisodeInfo, _localEpisode.FolderEpisodeInfo.EpisodeNumbers);
_localEpisode.Path = @"C:\Test\Unsorted\Series.Title.S01.720p.HDTV-Sonarr\S02E01.mkv".AsOsAgnostic();
Subject.IsSatisfiedBy(_localEpisode, null).Accepted.Should().BeFalse();
@@ -143,6 +184,9 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
_localEpisode.FolderEpisodeInfo.SeasonNumber = 1;
_localEpisode.FolderEpisodeInfo.EpisodeNumbers = new[] { 1, 2 };
GivenEpisodes(_localEpisode.FileEpisodeInfo, _localEpisode.FileEpisodeInfo.EpisodeNumbers);
GivenEpisodes(_localEpisode.FolderEpisodeInfo, _localEpisode.FolderEpisodeInfo.EpisodeNumbers);
_localEpisode.Path = @"C:\Test\Unsorted\Series.Title.S01.720p.HDTV-Sonarr\S02E01.mkv".AsOsAgnostic();
Subject.IsSatisfiedBy(_localEpisode, null).Accepted.Should().BeFalse();
@@ -158,6 +202,9 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
_localEpisode.FolderEpisodeInfo.SeasonNumber = 1;
_localEpisode.FolderEpisodeInfo.EpisodeNumbers = new[] { 1, 2 };
GivenEpisodes(_localEpisode.FileEpisodeInfo, _localEpisode.FileEpisodeInfo.EpisodeNumbers);
GivenEpisodes(_localEpisode.FolderEpisodeInfo, _localEpisode.FolderEpisodeInfo.EpisodeNumbers);
_localEpisode.Path = @"C:\Test\Unsorted\Series.Title.S01.720p.HDTV-Sonarr\S01E01.mkv".AsOsAgnostic();
Subject.IsSatisfiedBy(_localEpisode, null).Accepted.Should().BeTrue();
@@ -182,6 +229,8 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
}
};
GivenEpisodes(actualInfo, actualInfo.EpisodeNumbers);
Mocker.GetMock<IParsingService>()
.Setup(v => v.ParseSpecialEpisodeTitle(fileInfo, It.IsAny<string>(), 0, 0, null))
.Returns(actualInfo);
@@ -196,12 +245,15 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
[Test]
public void should_be_accepted_if_file_has_absolute_episode_number_and_folder_uses_standard()
{
_localEpisode.FileEpisodeInfo.SeasonNumber = 0;
_localEpisode.FileEpisodeInfo.SeasonNumber = 1;
_localEpisode.FileEpisodeInfo.AbsoluteEpisodeNumbers = new[] { 1 };
_localEpisode.FolderEpisodeInfo.SeasonNumber = 1;
_localEpisode.FolderEpisodeInfo.EpisodeNumbers = new[] { 1, 2 };
GivenEpisodes(_localEpisode.FileEpisodeInfo, new []{ 1 });
GivenEpisodes(_localEpisode.FolderEpisodeInfo, _localEpisode.FolderEpisodeInfo.EpisodeNumbers);
_localEpisode.Path = @"C:\Test\Unsorted\Series.Title.S01.720p.HDTV-Sonarr\S02E01.mkv".AsOsAgnostic();
Subject.IsSatisfiedBy(_localEpisode, null).Accepted.Should().BeTrue();

View File

@@ -287,14 +287,11 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
.Setup(s => s.DownloadPropersAndRepacks)
.Returns(ProperDownloadTypes.DoNotPrefer);
Mocker.GetMock<IPreferredWordService>()
.Setup(s => s.Calculate(It.IsAny<Series>(), It.IsAny<string>(), 0))
.Returns(5);
Mocker.GetMock<IEpisodeFilePreferredWordCalculator>()
.Setup(s => s.Calculate(It.IsAny<Series>(), It.IsAny<EpisodeFile>()))
.Returns(10);
_localEpisode.PreferredWordScore = 5;
_localEpisode.Quality = new QualityModel(Quality.Bluray1080p);
_localEpisode.Episodes = Builder<Episode>.CreateListOfSize(1)
@@ -364,14 +361,11 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
.Setup(s => s.DownloadPropersAndRepacks)
.Returns(ProperDownloadTypes.DoNotPrefer);
Mocker.GetMock<IPreferredWordService>()
.Setup(s => s.Calculate(It.IsAny<Series>(), It.IsAny<string>(), 0))
.Returns(5);
Mocker.GetMock<IEpisodeFilePreferredWordCalculator>()
.Setup(s => s.Calculate(It.IsAny<Series>(), It.IsAny<EpisodeFile>()))
.Returns(1);
_localEpisode.PreferredWordScore = 5;
_localEpisode.Quality = new QualityModel(Quality.Bluray1080p);
_localEpisode.Episodes = Builder<Episode>.CreateListOfSize(1)
@@ -397,14 +391,11 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
.Setup(s => s.DownloadPropersAndRepacks)
.Returns(ProperDownloadTypes.DoNotPrefer);
Mocker.GetMock<IPreferredWordService>()
.Setup(s => s.Calculate(It.IsAny<Series>(), It.IsAny<string>(), 0))
.Returns(5);
Mocker.GetMock<IEpisodeFilePreferredWordCalculator>()
.Setup(s => s.Calculate(It.IsAny<Series>(), It.IsAny<EpisodeFile>()))
.Returns(5);
_localEpisode.PreferredWordScore = 5;
_localEpisode.Quality = new QualityModel(Quality.Bluray1080p);
_localEpisode.Episodes = Builder<Episode>.CreateListOfSize(1)

View File

@@ -8,20 +8,28 @@ namespace NzbDrone.Core.Test.MediaFiles.MediaInfo.MediaInfoFormatterTests
[TestFixture]
public class FormatVideoDynamicRangeFixture : TestBase
{
[TestCase(8, "BT.601 NTSC", "BT.709", "")]
[TestCase(10, "BT.2020", "PQ", "HDR")]
[TestCase(8, "BT.2020", "PQ", "")]
[TestCase(10, "BT.601 NTSC", "PQ", "")]
[TestCase(10, "BT.2020", "BT.709", "")]
[TestCase(10, "BT.2020", "HLG", "HDR")]
public void should_format_video_dynamic_range(int bitDepth, string colourPrimaries, string transferCharacteristics, string expectedVideoDynamicRange)
[TestCase(8, "", "", "", "", "")]
[TestCase(8, "BT.601 NTSC", "BT.709", "", "", "")]
[TestCase(10, "BT.2020", "PQ", "", "", "HDR")]
[TestCase(8, "BT.2020", "PQ", "", "", "")]
[TestCase(10, "BT.601 NTSC", "PQ", "", "", "")]
[TestCase(10, "BT.2020", "BT.709", "", "", "")]
[TestCase(10, "BT.2020", "HLG", "", "", "HDR")]
[TestCase(10, "", "", "Dolby Vision", "", "HDR")]
[TestCase(10, "", "", "SMPTE ST 2086", "HDR10", "HDR")]
[TestCase(8, "", "", "Dolby Vision", "", "HDR")]
[TestCase(8, "", "", "SMPTE ST 2086", "HDR10", "HDR")]
[TestCase(10, "BT.2020", "PQ", "Dolby Vision / SMPTE ST 2086", "Blu-ray / HDR10", "HDR")]
public void should_format_video_dynamic_range(int bitDepth, string colourPrimaries, string transferCharacteristics, string hdrFormat, string hdrFormatCompatibility, string expectedVideoDynamicRange)
{
var mediaInfo = new MediaInfoModel
{
VideoBitDepth = bitDepth,
VideoColourPrimaries = colourPrimaries,
VideoTransferCharacteristics = transferCharacteristics,
SchemaRevision = 5
VideoHdrFormat = hdrFormat,
VideoHdrFormatCompatibility = hdrFormatCompatibility,
SchemaRevision = 7
};
MediaInfoFormatter.FormatVideoDynamicRange(mediaInfo).Should().Be(expectedVideoDynamicRange);

View File

@@ -65,6 +65,8 @@ namespace NzbDrone.Core.Test.MediaFiles.MediaInfo
info.VideoColourPrimaries.Should().Be("BT.601 NTSC");
info.VideoTransferCharacteristics.Should().Be("BT.709");
info.AudioAdditionalFeatures.Should().BeOneOf("", "LC");
info.VideoHdrFormat.Should().BeEmpty();
info.VideoHdrFormatCompatibility.Should().BeEmpty();
}
@@ -107,6 +109,8 @@ namespace NzbDrone.Core.Test.MediaFiles.MediaInfo
info.VideoColourPrimaries.Should().Be("BT.601 NTSC");
info.VideoTransferCharacteristics.Should().Be("BT.709");
info.AudioAdditionalFeatures.Should().BeOneOf("", "LC");
info.VideoHdrFormat.Should().BeEmpty();
info.VideoHdrFormatCompatibility.Should().BeEmpty();
}
[Test]

View File

@@ -1,7 +1,9 @@
using System;
using System.Collections.Generic;
using FluentAssertions;
using FluentValidation.Results;
using NUnit.Framework;
using NzbDrone.Core.MediaFiles;
using NzbDrone.Core.Notifications;
using NzbDrone.Core.ThingiProvider;
using NzbDrone.Core.Tv;
@@ -60,7 +62,7 @@ namespace NzbDrone.Core.Test.NotificationTests
TestLogger.Info("OnDownload was called");
}
public override void OnRename(Series series)
public override void OnRename(Series series, List<RenamedEpisodeFile> renamedFiles)
{
TestLogger.Info("OnRename was called");
}

View File

@@ -60,7 +60,7 @@ namespace NzbDrone.Core.Test.NotificationTests
{
(Subject.Definition.Settings as SynologyIndexerSettings).UpdateLibrary = false;
Subject.OnRename(_series);
Subject.OnRename(_series, new List<RenamedEpisodeFile>());
Mocker.GetMock<ISynologyIndexerProxy>()
.Verify(v => v.UpdateFolder(_series.Path), Times.Never());
@@ -90,7 +90,7 @@ namespace NzbDrone.Core.Test.NotificationTests
[Test]
public void should_update_entire_series_folder_on_rename()
{
Subject.OnRename(_series);
Subject.OnRename(_series, new List<RenamedEpisodeFile>());
Mocker.GetMock<ISynologyIndexerProxy>()
.Verify(v => v.UpdateFolder(@"C:\Test\".AsOsAgnostic()), Times.Once());

View File

@@ -9,100 +9,97 @@ namespace NzbDrone.Core.Test.ParserTests
[TestFixture]
public class AbsoluteEpisodeNumberParserFixture : CoreTest
{
[TestCase("[SubDESU]_High_School_DxD_07_(1280x720_x264-AAC)_[6B7FD717]", "High School DxD", 7, 0, 0)]
[TestCase("[Chihiro]_Working!!_-_06_[848x480_H.264_AAC][859EEAFA]", "Working!!", 6, 0, 0)]
[TestCase("[Commie]_Senki_Zesshou_Symphogear_-_11_[65F220B4]", "Senki Zesshou Symphogear", 11, 0, 0)]
[TestCase("[Underwater]_Rinne_no_Lagrange_-_12_(720p)_[5C7BC4F9]", "Rinne no Lagrange", 12, 0, 0)]
[TestCase("[Commie]_Rinne_no_Lagrange_-_15_[E76552EA]", "Rinne no Lagrange", 15, 0, 0)]
[TestCase("[HorribleSubs]_Hunter_X_Hunter_-_33_[720p]", "Hunter X Hunter", 33, 0, 0)]
[TestCase("[HorribleSubs]_Fairy_Tail_-_145_[720p]", "Fairy Tail", 145, 0, 0)]
[TestCase("[HorribleSubs] Tonari no Kaibutsu-kun - 13 [1080p].mkv", "Tonari no Kaibutsu-kun", 13, 0, 0)]
[TestCase("[Doremi].Yes.Pretty.Cure.5.Go.Go!.31.[1280x720].[C65D4B1F].mkv", "Yes Pretty Cure 5 Go Go!", 31, 0, 0)]
[TestCase("[K-F] One Piece 214", "One Piece", 214, 0, 0)]
[TestCase("[K-F] One Piece S10E14 214", "One Piece", 214, 10, 14)]
[TestCase("[K-F] One Piece 10x14 214", "One Piece", 214, 10, 14)]
[TestCase("[K-F] One Piece 214 10x14", "One Piece", 214, 10, 14)]
// [TestCase("One Piece S10E14 214", "One Piece", 214, 10, 14)]
// [TestCase("One Piece 10x14 214", "One Piece", 214, 10, 14)]
// [TestCase("One Piece 214 10x14", "One Piece", 214, 10, 14)]
// [TestCase("214 One Piece 10x14", "One Piece", 214, 10, 14)]
[TestCase("Bleach - 031 - The Resolution to Kill [Lunar].avi", "Bleach", 31, 0, 0)]
[TestCase("Bleach - 031 - The Resolution to Kill [Lunar]", "Bleach", 31, 0, 0)]
[TestCase("[ACX]Hack Sign 01 Role Play [Kosaka] [9C57891E].mkv", "Hack Sign", 1, 0, 0)]
[TestCase("[SFW-sage] Bakuman S3 - 12 [720p][D07C91FC]", "Bakuman S3", 12, 0, 0)]
[TestCase("ducktales_e66_time_is_money_part_one_marking_time", "ducktales", 66, 0, 0)]
[TestCase("[Underwater-FFF] No Game No Life - 01 (720p) [27AAA0A0].mkv", "No Game No Life", 1, 0, 0)]
[TestCase("[FroZen] Miyuki - 23 [DVD][7F6170E6]", "Miyuki", 23, 0, 0)]
[TestCase("[Commie] Yowamushi Pedal - 32 [0BA19D5B]", "Yowamushi Pedal", 32, 0, 0)]
[TestCase("[Doki] Mahouka Koukou no Rettousei - 07 (1280x720 Hi10P AAC) [80AF7DDE]", "Mahouka Koukou no Rettousei", 7, 0, 0)]
[TestCase("[HorribleSubs] Yowamushi Pedal - 32 [480p]", "Yowamushi Pedal", 32, 0, 0)]
[TestCase("[CR] Sailor Moon - 004 [480p][48CE2D0F]", "Sailor Moon", 4, 0, 0)]
[TestCase("[Chibiki] Puchimas!! - 42 [360p][7A4FC77B]", "Puchimas!!", 42, 0, 0)]
[TestCase("[HorribleSubs] Yowamushi Pedal - 32 [1080p]", "Yowamushi Pedal", 32, 0, 0)]
[TestCase("[HorribleSubs] Love Live! S2 - 07 [720p]", "Love Live! S2", 7, 0, 0)]
[TestCase("[DeadFish] Onee-chan ga Kita - 09v2 [720p][AAC]", "Onee-chan ga Kita", 9, 0, 0)]
[TestCase("[Underwater-FFF] No Game No Life - 01 (720p) [27AAA0A0]", "No Game No Life", 1, 0, 0)]
[TestCase("[S-T-D] Soul Eater Not! - 06 (1280x720 10bit AAC) [59B3F2EA].mkv", "Soul Eater Not!", 6, 0, 0)]
[TestCase("No Game No Life - 010 (720p) [27AAA0A0].mkv", "No Game No Life", 10, 0, 0)]
[TestCase("Initial D Fifth Stage - 01 DVD - Central Anime", "Initial D Fifth Stage", 1, 0, 0)]
[TestCase("Initial_D_Fifth_Stage_-_01(DVD)_-_(Central_Anime)[5AF6F1E4].mkv", "Initial D Fifth Stage", 1, 0, 0)]
[TestCase("Initial_D_Fifth_Stage_-_02(DVD)_-_(Central_Anime)[0CA65F00].mkv", "Initial D Fifth Stage", 2, 0, 0)]
[TestCase("Initial D Fifth Stage - 03 DVD - Central Anime", "Initial D Fifth Stage", 3, 0, 0)]
[TestCase("Initial_D_Fifth_Stage_-_03(DVD)_-_(Central_Anime)[629BD592].mkv", "Initial D Fifth Stage", 3, 0, 0)]
[TestCase("Initial D Fifth Stage - 14 DVD - Central Anime", "Initial D Fifth Stage", 14, 0, 0)]
[TestCase("Initial_D_Fifth_Stage_-_14(DVD)_-_(Central_Anime)[0183D922].mkv", "Initial D Fifth Stage", 14, 0, 0)]
[TestCase("[SubDESU]_Show_One_07_(1280x720_x264-AAC)_[6B7FD717]", "Show One", 7, 0, 0)]
[TestCase("[Chihiro]_Show!!_-_06_[848x480_H.264_AAC][859EEAFA]", "Show!!", 6, 0, 0)]
[TestCase("[Commie]_Some_Anime_Show_-_11_[65F220B4]", "Some Anime Show", 11, 0, 0)]
[TestCase("[Underwater]_Some_Anime_Show_-_12_(720p)_[5C7BC4F9]", "Some Anime Show", 12, 0, 0)]
[TestCase("[Commie]_Some_Anime_Show_-_15_[E76552EA]", "Some Anime Show", 15, 0, 0)]
[TestCase("[HorribleSubs]_Some_Anime_Show_-_33_[720p]", "Some Anime Show", 33, 0, 0)]
[TestCase("[HorribleSubs]_Some_Anime_Show_-_145_[720p]", "Some Anime Show", 145, 0, 0)]
[TestCase("[HorribleSubs] Some Anime Show - 13 [1080p].mkv", "Some Anime Show", 13, 0, 0)]
[TestCase("[Doremi].Some.Anime.Show.8.Go!.31.[1280x720].[C65D4B1F].mkv", "Some Anime Show 8 Go!", 31, 0, 0)]
[TestCase("[K-F] Some Anime Show 214", "Some Anime Show", 214, 0, 0)]
[TestCase("[K-F] Some Anime Show S10E14 214", "Some Anime Show", 214, 10, 14)]
[TestCase("[K-F] Some Anime Show 10x14 214", "Some Anime Show", 214, 10, 14)]
[TestCase("[K-F] Some Anime Show 214 10x14", "Some Anime Show", 214, 10, 14)]
[TestCase("Some Anime Show - 031 - The Resolution to Kill [Lunar].avi", "Some Anime Show", 31, 0, 0)]
[TestCase("Some Anime Show - 031 - The Resolution to Kill [Lunar]", "Some Anime Show", 31, 0, 0)]
[TestCase("[ACX]Some Anime Show 01 Role Play [Kosaka] [9C57891E].mkv", "Some Anime Show", 1, 0, 0)]
[TestCase("[SFW-sage] Some Anime Show S3 - 12 [720p][D07C91FC]", "Some Anime Show S3", 12, 0, 0)]
[TestCase("Some_Anime_Show_e66_time_is_money_part_one_marking_time", "Some Anime Show", 66, 0, 0)]
[TestCase("[Underwater-FFF] No Series Title No Life - 01 (720p) [27AAA0A0].mkv", "No Series Title No Life", 1, 0, 0)]
[TestCase("[FroZen] Series Title - 23 [DVD][7F6170E6]", "Series Title", 23, 0, 0)]
[TestCase("[Commie] Series Title - 32 [0BA19D5B]", "Series Title", 32, 0, 0)]
[TestCase("[Doki]Series Title - 07 (1280x720 Hi10P AAC) [80AF7DDE]", "Series Title", 7, 0, 0)]
[TestCase("[HorribleSubs] Series Title - 32 [480p]", "Series Title", 32, 0, 0)]
[TestCase("[CR] Series Title - 004 [480p][48CE2D0F]", "Series Title", 4, 0, 0)]
[TestCase("[Chibiki] Series Title!! - 42 [360p][7A4FC77B]", "Series Title!!", 42, 0, 0)]
[TestCase("[HorribleSubs] Series Title - 32 [1080p]", "Series Title", 32, 0, 0)]
[TestCase("[HorribleSubs] Series Title! S2 - 07 [720p]", "Series Title! S2", 7, 0, 0)]
[TestCase("[DeadFish] Series Title - 09v2 [720p][AAC]", "Series Title", 9, 0, 0)]
[TestCase("[Underwater-FFF] Series Title - 01 (720p) [27AAA0A0]", "Series Title", 1, 0, 0)]
[TestCase("[S-T-D] Series Title! - 06 (1280x720 10bit AAC) [59B3F2EA].mkv", "Series Title!", 6, 0, 0)]
[TestCase("Series Title - 010 (720p) [27AAA0A0].mkv", "Series Title", 10, 0, 0)]
[TestCase("Initial_Series_Title - 01 DVD - Central Anime", "Initial Series Title", 1, 0, 0)]
[TestCase("Initial_Series_Title_-_01(DVD)_-_(Central_Anime)[5AF6F1E4].mkv", "Initial Series Title", 1, 0, 0)]
[TestCase("Initial_Series_Title_-_02(DVD)_-_(Central_Anime)[0CA65F00].mkv", "Initial Series Title", 2, 0, 0)]
[TestCase("Initial_Series_Title - 03 DVD - Central Anime", "Initial Series Title", 3, 0, 0)]
[TestCase("Initial_Series_Title_-_03(DVD)_-_(Central_Anime)[629BD592].mkv", "Initial Series Title", 3, 0, 0)]
[TestCase("Initial_Series_Title - 14 DVD - Central Anime", "Initial Series Title", 14, 0, 0)]
[TestCase("Initial_Series_Title_-_14(DVD)_-_(Central_Anime)[0183D922].mkv", "Initial Series Title", 14, 0, 0)]
// [TestCase("Initial D - 4th Stage Ep 01.mkv", "Initial D - 4th Stage", 1, 0, 0)]
[TestCase("[ChihiroDesuYo].No.Game.No.Life.-.09.1280x720.10bit.AAC.[24CCE81D]", "No Game No Life", 9, 0, 0)]
[TestCase("Fairy Tail - 001 - Fairy Tail", "Fairy Tail", 001, 0, 0)]
[TestCase("Fairy Tail - 049 - The Day of Fated Meeting", "Fairy Tail", 049, 0, 0)]
[TestCase("Fairy Tail - 050 - Special Request Watch Out for the Guy You Like!", "Fairy Tail", 050, 0, 0)]
[TestCase("Fairy Tail - 099 - Natsu vs. Gildarts", "Fairy Tail", 099, 0, 0)]
[TestCase("Fairy Tail - 100 - Mest", "Fairy Tail", 100, 0, 0)]
[TestCase("[ChihiroDesuYo].Series.Title.-.09.1280x720.10bit.AAC.[24CCE81D]", "Series Title", 9, 0, 0)]
[TestCase("Series Title - 001 - Fairy Tail", "Series Title", 001, 0, 0)]
[TestCase("Series Title - 049 - The Day of Fated Meeting", "Series Title", 049, 0, 0)]
[TestCase("Series Title - 050 - Special Request Watch Out for the Guy You Like!", "Series Title", 050, 0, 0)]
[TestCase("Series Title - 099 - Natsu vs. Gildarts", "Series Title", 099, 0, 0)]
[TestCase("Series Title - 100 - Mest", "Series Title", 100, 0, 0)]
// [TestCase("Fairy Tail - 101 - Mest", "Fairy Tail", 101, 0, 0)] //This gets caught up in the 'see' numbering
[TestCase("[Exiled-Destiny] Angel Beats Ep01 (D2201EC5).mkv", "Angel Beats", 1, 0, 0)]
[TestCase("[Commie] Nobunaga the Fool - 23 [5396CA24].mkv", "Nobunaga the Fool", 23, 0, 0)]
[TestCase("[FFF] Seikoku no Dragonar - 01 [1FB538B5].mkv", "Seikoku no Dragonar", 1, 0, 0)]
[TestCase("[Hatsuyuki]Fate_Zero-01[1280x720][122E6EF8]", "Fate Zero", 1, 0, 0)]
[TestCase("[CBM]_Monster_-_11_-_511_Kinderheim_[6C70C4E4].mkv", "Monster", 11, 0, 0)]
[TestCase("[HorribleSubs] Log Horizon 2 - 05 [720p].mkv", "Log Horizon 2", 5, 0, 0)]
[TestCase("[Commie] Log Horizon 2 - 05 [FCE4D070].mkv", "Log Horizon 2", 5, 0, 0)]
[TestCase("[Exiled-Destiny] Series Title Ep01 (D2201EC5).mkv", "Series Title", 1, 0, 0)]
[TestCase("[Commie] Series Title - 23 [5396CA24].mkv", "Series Title", 23, 0, 0)]
[TestCase("[FFF] Series Title - 01 [1FB538B5].mkv", "Series Title", 1, 0, 0)]
[TestCase("[Hatsuyuki]Series_Title-01[1280x720][122E6EF8]", "Series Title", 1, 0, 0)]
[TestCase("[CBM]_Series_Title_-_11_-_511_Kinderheim_[6C70C4E4].mkv", "Series Title", 11, 0, 0)]
[TestCase("[HorribleSubs] Series Title 2 - 05 [720p].mkv", "Series Title 2", 5, 0, 0)]
[TestCase("[Commie] Series Title 2 - 05 [FCE4D070].mkv", "Series Title 2", 5, 0, 0)]
[TestCase("[DRONE]Series.Title.100", "Series Title", 100, 0, 0)]
[TestCase("[RlsGrp]Series.Title.2010.S01E01.001.HDTV-720p.x264-DTS", "Series Title 2010", 1, 1, 1)]
[TestCase("Dragon Ball Kai - 130 - Found You, Gohan! Harsh Training in the Kaioshin Realm! [Baaro][720p][5A1AD35B].mkv", "Dragon Ball Kai", 130, 0, 0)]
[TestCase("Dragon Ball Kai - 131 - A Merged Super-Warrior Is Born, His Name Is Gotenks!! [Baaro][720p][32E03F96].mkv", "Dragon Ball Kai", 131, 0, 0)]
[TestCase("[HorribleSubs] Magic Kaito 1412 - 01 [1080p]", "Magic Kaito 1412", 1, 0, 0)]
[TestCase("[Jumonji-Giri]_[F-B]_Kagihime_Monogatari_Eikyuu_Alice_Rondo_Ep04_(0b0e2c10).mkv", "Kagihime Monogatari Eikyuu Alice Rondo", 4, 0, 0)]
[TestCase("[Jumonji-Giri]_[F-B]_Kagihime_Monogatari_Eikyuu_Alice_Rondo_Ep08_(8246e542).mkv", "Kagihime Monogatari Eikyuu Alice Rondo", 8, 0, 0)]
[TestCase("Knights of Sidonia - 01 [1080p 10b DTSHD-MA eng sub].mkv", "Knights of Sidonia", 1, 0, 0)]
[TestCase("Series Title - 130 - Found You, Gohan! Harsh Training in the Kaioshin Realm! [Baaro][720p][5A1AD35B].mkv", "Series Title", 130, 0, 0)]
[TestCase("Series Title - 131 - A Merged Super-Warrior Is Born, His Name Is Gotenks!! [Baaro][720p][32E03F96].mkv", "Series Title", 131, 0, 0)]
[TestCase("[HorribleSubs] Series Title - 01 [1080p]", "Series Title", 1, 0, 0)]
[TestCase("[Jumonji-Giri]_[F-B]_Series_Title_Ep04_(0b0e2c10).mkv", "Series Title", 4, 0, 0)]
[TestCase("[Jumonji-Giri]_[F-B]_Series_Title_Ep08_(8246e542).mkv", "Series Title", 8, 0, 0)]
[TestCase("Knights Series Title - 01 [1080p 10b DTSHD-MA eng sub].mkv", "Knights Series Title", 1, 0, 0)]
[TestCase("Series Title (2010) {01} Episode Title (1).hdtv-720p", "Series Title (2010)", 1, 0, 0)]
[TestCase("[HorribleSubs] Shirobako - 20 [720p].mkv", "Shirobako", 20, 0, 0)]
[TestCase("[Hatsuyuki] Dragon Ball Kai (2014) - 017 (115) [1280x720][B2CFBC0F]", "Dragon Ball Kai (2014)", 17, 0, 0)]
[TestCase("[Hatsuyuki] Dragon Ball Kai (2014) - 018 (116) [1280x720][C4A3B16E]", "Dragon Ball Kai (2014)", 18, 0, 0)]
[TestCase("Dragon Ball Kai (2014) - 39 (137) [v2][720p.HDTV][Unison Fansub]", "Dragon Ball Kai (2014)", 39, 0, 0)]
[TestCase("[HorribleSubs] Eyeshield 21 - 101 [480p].mkv", "Eyeshield 21", 101, 0, 0)]
[TestCase("[Cthuyuu].Taimadou.Gakuen.35.Shiken.Shoutai.-.03.[720p.H264.AAC][8AD82C3A]", "Taimadou Gakuen 35 Shiken Shoutai", 3, 0, 0)]
//[TestCase("Taimadou.Gakuen.35.Shiken.Shoutai.-.03.(1280x720.HEVC.AAC)", "Taimadou Gakuen 35 Shiken Shoutai", 3, 0, 0)]
[TestCase("[Cthuyuu] Taimadou Gakuen 35 Shiken Shoutai - 03 [720p H264 AAC][8AD82C3A]", "Taimadou Gakuen 35 Shiken Shoutai", 3, 0, 0)]
[TestCase("Dragon Ball Super Episode 56 [VOSTFR V2][720p][AAC]-Mystic Z-Team", "Dragon Ball Super", 56, 0, 0)]
[TestCase("[Mystic Z-Team] Dragon Ball Super Episode 69 [VOSTFR_Finale][1080p][AAC].mp4", "Dragon Ball Super", 69, 0, 0)]
[TestCase("[Shark-Raws] Crayon Shin-chan #957 (NBN 1280x720 x264 AAC).mp4", "Crayon Shin-chan", 957, 0, 0)]
[TestCase("Love Rerun EP06 720p x265 AOZ.mp4", "Love Rerun", 6, 0, 0)]
[TestCase("Love Rerun 2018 EP06 720p x265 AOZ.mp4", "Love Rerun 2018", 6, 0, 0)]
[TestCase("Love Rerun 2018 06 720p x265 AOZ.mp4", "Love Rerun 2018", 6, 0, 0)]
[TestCase("Boku No Hero Academia S03 - EP14 VOSTFR [1080p] [HardSub] Yass'Kun", "Boku No Hero Academia S03", 14, 0, 0)]
[TestCase("Boku No Hero Academia S3 - 15 VOSTFR [720p]", "Boku No Hero Academia S3", 15, 0, 0)]
[TestCase("Tokyo Ghoul: RE S2 - Episode 4 VOSTFR (1080p)", "Tokyo Ghoul RE S2", 4, 0, 0)]
[TestCase("To Aru Majutsu no Index III - Episode 5 VOSTFR (1080p)", "To Aru Majutsu no Index III", 5, 0, 0)]
[TestCase("[Prout] Steins;Gate 0 - Episode 5 VOSTFR (BDRip 1920x1080 x264 FLAC)", "Steins;Gate 0", 5, 0, 0)]
[TestCase("[BakedFish] Nakanohito Genome [Jikkyouchuu] - 01 [720p][AAC].mp4", "Nakanohito Genome [Jikkyouchuu]", 1, 0, 0)]
[TestCase("[HorribleSubs] Series Title - 20 [720p].mkv", "Series Title", 20, 0, 0)]
[TestCase("[Hatsuyuki] Series Title (2014) - 017 (115) [1280x720][B2CFBC0F]", "Series Title (2014)", 17, 0, 0)]
[TestCase("[Hatsuyuki] Series Title (2014) - 018 (116) [1280x720][C4A3B16E]", "Series Title (2014)", 18, 0, 0)]
[TestCase("Series Title (2014) - 39 (137) [v2][720p.HDTV][Unison Fansub]", "Series Title (2014)", 39, 0, 0)]
[TestCase("[HorribleSubs] Series Title 21 - 101 [480p].mkv", "Series Title 21", 101, 0, 0)]
[TestCase("[Cthuyuu].Series.Title.-.03.[720p.H264.AAC][8AD82C3A]", "Series Title", 3, 0, 0)]
//[TestCase("Series.Title.-.03.(1280x720.HEVC.AAC)", "Series Title", 3, 0, 0)]
[TestCase("[Cthuyuu] Series Title - 03 [720p H264 AAC][8AD82C3A]", "Series Title", 3, 0, 0)]
[TestCase("Series Title Episode 56 [VOSTFR V2][720p][AAC]-Mystic Z-Team", "Series Title", 56, 0, 0)]
[TestCase("[Mystic Z-Team] Series Title Episode 69 [VOSTFR_Finale][1080p][AAC].mp4", "Series Title", 69, 0, 0)]
[TestCase("[Shark-Raws] Series Title #957 (NBN 1280x720 x264 AAC).mp4", "Series Title", 957, 0, 0)]
[TestCase("Series Title EP06 720p x265 AOZ.mp4", "Series Title", 6, 0, 0)]
[TestCase("Series Title 2018 EP06 720p x265 AOZ.mp4", "Series Title 2018", 6, 0, 0)]
[TestCase("Series Title 2018 06 720p x265 AOZ.mp4", "Series Title 2018", 6, 0, 0)]
[TestCase("Series Title S03 - EP14 VOSTFR [1080p] [HardSub] Yass'Kun", "Series Title S03", 14, 0, 0)]
[TestCase("Series Title S3 - 15 VOSTFR [720p]", "Series Title S3", 15, 0, 0)]
[TestCase("A Series: RE S2 - Episode 4 VOSTFR (1080p)", "A Series: RE S2", 4, 0, 0)]
[TestCase("To Another Series III - Episode 5 VOSTFR (1080p)", "To Another Series III", 5, 0, 0)]
[TestCase("[Prout] Show;Title 0 - Episode 5 VOSTFR (BDRip 1920x1080 x264 FLAC)", "Show;Title 0", 5, 0, 0)]
[TestCase("[BakedFish] Some Show [Anime] - 01 [720p][AAC].mp4", "Some Show [Anime]", 1, 0, 0)]
[TestCase("Abc x Abc (2011) - 141 - Magician [KaiDubs] [1080p]", "Abc x Abc (2011)", 141, 0, 0)]
[TestCase("Abc Abc 484 VOSTFR par Abc-Abc (1280*720) - version MQ", "Abc Abc", 484, 0, 0)]
[TestCase("Abc - Abc Abc Abc - 107 VOSTFR par Fansub-Miracle Sharingan (1920x1080) - HQ_Draft", "Abc - Abc Abc Abc", 107, 0, 0)]
[TestCase("Abc Abc Abc Abc Episode 10 VOSTFR (1920x1080) Miracle Sharingan Fansub.MKV - Team - (À suivre)", "Abc Abc Abc Abc", 10, 0, 0)]
[TestCase("[Glenn] Ani ni Tsukeru Kusuri wa Nai! 3 - 11 (1080p AAC)[C34B2B3B].mkv", "Ani ni Tsukeru Kusuri wa Nai! 3", 11, 0, 0)]
[TestCase("Tatort.E1135.Lasst.den.Mond.am.Himmel.stehen.GERMAN.1080p.WEBRip.x264-Group", "Tatort", 1135, 0, 0)]
[TestCase("[HorribleSubs] Abc 100 - 07 [1080p].mkv", "Abc 100", 7, 0, 0)]
[TestCase("[HorribleSubs] Abc 100 S2 - 07 [1080p].mkv", "Abc 100 S2", 7, 0, 0)]
[TestCase("[Glenn] Series! 3 - 11 (1080p AAC)[C34B2B3B].mkv", "Series! 3", 11, 0, 0)]
[TestCase("SeriesTitle.E1135.Lasst.den.Mond.am.Himmel.stehen.GERMAN.1080p.WEBRip.x264-Group", "SeriesTitle", 1135, 0, 0)]
[TestCase("[HorribleSubs] Series 100 - 07 [1080p].mkv", "Series 100", 7, 0, 0)]
[TestCase("[HorribleSubs] Series 100 S2 - 07 [1080p].mkv", "Series 100 S2", 7, 0, 0)]
[TestCase("[abc] Adventure Series: 30 [Web][MKV][h264][720p][AAC 2.0][abc]", "Adventure Series:", 30, 0, 0)]
//[TestCase("", "", 0, 0, 0)]
public void should_parse_absolute_numbers(string postTitle, string title, int absoluteEpisodeNumber, int seasonNumber, int episodeNumber)
{
@@ -115,9 +112,9 @@ namespace NzbDrone.Core.Test.ParserTests
result.FullSeason.Should().BeFalse();
}
[TestCase("[DeadFish] Kenzen Robo Daimidaler - 01 - Special [BD][720p][AAC]", "Kenzen Robo Daimidaler", 1)]
[TestCase("[DeadFish] Kenzen Robo Daimidaler - 01 - OVA [BD][720p][AAC]", "Kenzen Robo Daimidaler", 1)]
[TestCase("[DeadFish] Kenzen Robo Daimidaler - 01 - OVD [BD][720p][AAC]", "Kenzen Robo Daimidaler", 1)]
[TestCase("[DeadFish] Another Anime Show - 01 - Special [BD][720p][AAC]", "Another Anime Show", 1)]
[TestCase("[DeadFish] Another Anime Show - 01 - OVA [BD][720p][AAC]", "Another Anime Show", 1)]
[TestCase("[DeadFish] Another Anime Show - 01 - OVD [BD][720p][AAC]", "Another Anime Show", 1)]
public void should_parse_absolute_specials(string postTitle, string title, int absoluteEpisodeNumber)
{
var result = Parser.Parser.ParseTitle(postTitle);
@@ -130,19 +127,19 @@ namespace NzbDrone.Core.Test.ParserTests
result.Special.Should().BeTrue();
}
[TestCase("[ANBU-AonE]_Naruto_26-27_[F224EF26].avi", "Naruto", 26, 27)]
[TestCase("[Doutei] Recently, My Sister is Unusual - 01-12 [BD][720p-AAC]", "Recently, My Sister is Unusual", 1, 12)]
[TestCase("[ANBU-AonE]_SeriesTitle_26-27_[F224EF26].avi", "SeriesTitle", 26, 27)]
[TestCase("[Doutei] Some Good, Anime Show - 01-12 [BD][720p-AAC]", "Some Good, Anime Show", 1, 12)]
[TestCase("Series Title (2010) - 01-02-03 - Episode Title (1) HDTV-720p", "Series Title (2010)", 1, 3)]
[TestCase("[RlsGrp] Series Title (2010) - S01E01-02-03 - 001-002-003 - Episode Title HDTV-720p v2", "Series Title (2010)", 1, 3)]
[TestCase("[RlsGrp] Series Title (2010) - S01E01-02 - 001-002 - Episode Title HDTV-720p v2", "Series Title (2010)", 1, 2)]
[TestCase("Series Title (2010) - S01E01-02 (001-002) - Episode Title (1) HDTV-720p v2 [RlsGrp]", "Series Title (2010)", 1, 2)]
[TestCase("[HorribleSubs] Haikyuu!! (01-25) [1080p] (Batch)", "Haikyuu!!", 1, 25)]
[TestCase("Hunter X Hunter (2011) Episode 99-100 [1080p] [Dual.Audio] [x265]", "Hunter X Hunter (2011)", 99, 100)]
[TestCase("Twin Star Exorcists 1-13 (English Dub) [720p]", "Twin Star Exorcists", 1, 13)]
[TestCase("[HorribleSubs] Some Anime Show!! (01-25) [1080p] (Batch)", "Some Anime Show!!", 1, 25)]
[TestCase("Some Anime Show (2011) Episode 99-100 [1080p] [Dual.Audio] [x265]", "Some Anime Show (2011)", 99, 100)]
[TestCase("Some Anime Show 1-13 (English Dub) [720p]", "Some Anime Show", 1, 13)]
[TestCase("Series.Title.Ep01-12.Complete.English.AC3.DL.1080p.BluRay.x264", "Series Title", 1, 12)]
[TestCase("[Judas] Black Clover 091-123 [1080p][HEVC x265 10bit][Dual-Audio][Multi-Subs]", "Black Clover", 91, 123 )]
[TestCase("[Judas] Black Clover - 091-123 [1080p][HEVC x265 10bit][Dual-Audio][Multi-Subs]", "Black Clover", 91, 123)]
[TestCase("[HorribleSubs] Black Clover 01 - 119 [1080p] [Batch]", "Black Clover", 1, 119)]
[TestCase("[Judas] Some Anime Show 091-123 [1080p][HEVC x265 10bit][Dual-Audio][Multi-Subs]", "Some Anime Show", 91, 123 )]
[TestCase("[Judas] Some Anime Show - 091-123 [1080p][HEVC x265 10bit][Dual-Audio][Multi-Subs]", "Some Anime Show", 91, 123)]
[TestCase("[HorribleSubs] Some Anime Show 01 - 119 [1080p] [Batch]", "Some Anime Show", 1, 119)]
// [TestCase("", "", 1, 2)]
public void should_parse_multi_episode_absolute_numbers(string postTitle, string title, int firstAbsoluteEpisodeNumber, int lastAbsoluteEpisodeNumber)
{
@@ -155,7 +152,7 @@ namespace NzbDrone.Core.Test.ParserTests
result.FullSeason.Should().BeFalse();
}
[TestCase("[Vivid] Living Sky Saga S01 [Web][MKV][h264 10-bit][1080p][AAC 2.0]", "Living Sky Saga", 1)]
[TestCase("[Vivid] Some Anime Show S01 [Web][MKV][h264 10-bit][1080p][AAC 2.0]", "Some Anime Show", 1)]
public void should_parse_anime_season_packs(string postTitle, string title, int seasonNumber)
{
var result = Parser.Parser.ParseTitle(postTitle);
@@ -166,7 +163,7 @@ namespace NzbDrone.Core.Test.ParserTests
result.SeasonNumber.Should().Be(seasonNumber);
}
[TestCase("[HorribleSubs] Goblin Slayer - 10.5 [1080p].mkv", "Goblin Slayer", 10.5)]
[TestCase("[HorribleSubs] Show Slayer - 10.5 [1080p].mkv", "Show Slayer", 10.5)]
public void should_handle_anime_recap_numbering(string postTitle, string title, double specialEpisodeNumber)
{
var result = Parser.Parser.ParseTitle(postTitle);

View File

@@ -8,21 +8,21 @@ namespace NzbDrone.Core.Test.ParserTests
[TestFixture]
public class AnimeMetadataParserFixture : CoreTest
{
[TestCase("[SubDESU]_High_School_DxD_07_(1280x720_x264-AAC)_[6B7FD717]", "SubDESU", "6B7FD717")]
[TestCase("[Chihiro]_Working!!_-_06_[848x480_H.264_AAC][859EEAFA]", "Chihiro", "859EEAFA")]
[TestCase("[Underwater]_Rinne_no_Lagrange_-_12_(720p)_[5C7BC4F9]", "Underwater", "5C7BC4F9")]
[TestCase("[HorribleSubs]_Hunter_X_Hunter_-_33_[720p]", "HorribleSubs", "")]
[TestCase("[HorribleSubs] Tonari no Kaibutsu-kun - 13 [1080p].mkv", "HorribleSubs", "")]
[TestCase("[Doremi].Yes.Pretty.Cure.5.Go.Go!.31.[1280x720].[C65D4B1F].mkv", "Doremi", "C65D4B1F")]
[TestCase("[Doremi].Yes.Pretty.Cure.5.Go.Go!.31.[1280x720].[C65D4B1F]", "Doremi", "C65D4B1F")]
[TestCase("[Doremi].Yes.Pretty.Cure.5.Go.Go!.31.[1280x720].mkv", "Doremi", "")]
[TestCase("[K-F] One Piece 214", "K-F", "")]
[TestCase("[K-F] One Piece S10E14 214", "K-F", "")]
[TestCase("[K-F] One Piece 10x14 214", "K-F", "")]
[TestCase("[K-F] One Piece 214 10x14", "K-F", "")]
[TestCase("Bleach - 031 - The Resolution to Kill [Lunar].avi", "Lunar", "")]
[TestCase("[ACX]Hack Sign 01 Role Play [Kosaka] [9C57891E].mkv", "ACX", "9C57891E")]
[TestCase("[S-T-D] Soul Eater Not! - 06 (1280x720 10bit AAC) [59B3F2EA].mkv", "S-T-D", "59B3F2EA")]
[TestCase("[SubDESU]_Show_Title_DxD_07_(1280x720_x264-AAC)_[6B7FD717]", "SubDESU", "6B7FD717")]
[TestCase("[Chihiro]_Show_Title!!_-_06_[848x480_H.264_AAC][859EEAFA]", "Chihiro", "859EEAFA")]
[TestCase("[Underwater]_Show_Title_-_12_(720p)_[5C7BC4F9]", "Underwater", "5C7BC4F9")]
[TestCase("[HorribleSubs]_Show_Title_-_33_[720p]", "HorribleSubs", "")]
[TestCase("[HorribleSubs] Show-Title - 13 [1080p].mkv", "HorribleSubs", "")]
[TestCase("[Doremi].Show.Title.5.Go.Go!.31.[1280x720].[C65D4B1F].mkv", "Doremi", "C65D4B1F")]
[TestCase("[Doremi].Show.Title.5.Go.Go!.31[1280x720].[C65D4B1F]", "Doremi", "C65D4B1F")]
[TestCase("[Doremi].Show.Title.5.Go.Go!.31.[1280x720].mkv", "Doremi", "")]
[TestCase("[K-F] Series Title 214", "K-F", "")]
[TestCase("[K-F] Series Title S10E14 214", "K-F", "")]
[TestCase("[K-F] Series Title 10x14 214", "K-F", "")]
[TestCase("[K-F] Series Title 214 10x14", "K-F", "")]
[TestCase("Series Title - 031 - The Resolution to Kill [Lunar].avi", "Lunar", "")]
[TestCase("[ACX]Series Title 01 Episode Name [Kosaka] [9C57891E].mkv", "ACX", "9C57891E")]
[TestCase("[S-T-D] Series Title! - 06 (1280x720 10bit AAC) [59B3F2EA].mkv", "S-T-D", "59B3F2EA")]
public void should_parse_absolute_numbers(string postTitle, string subGroup, string hash)
{
var result = Parser.Parser.ParseTitle(postTitle);

View File

@@ -86,13 +86,13 @@ namespace NzbDrone.Core.Test.ParserTests
success.Should().Be(repetitions);
}
[TestCase("thebiggestloser1618finale")]
[TestCase("theseriestitle1618finale")]
public void should_not_parse_file_name_without_proper_spacing(string fileName)
{
Parser.Parser.ParseTitle(fileName).Should().BeNull();
}
[TestCase("Big Forest (2018) Complete 360p HDTV AAC H.264-NEXT")]
[TestCase("Series Title (2018) Complete 360p HDTV AAC H.264-NEXT")]
public void should_not_parse_invalid_release_name(string fileName)
{
Parser.Parser.ParseTitle(fileName).Should().BeNull();

View File

@@ -11,27 +11,27 @@ namespace NzbDrone.Core.Test.ParserTests
[TestFixture]
public class DailyEpisodeParserFixture : CoreTest
{
[TestCase("Conan 2011 04 18 Emma Roberts HDTV XviD BFF", "Conan", 2011, 04, 18)]
[TestCase("The Tonight Show With Jay Leno 2011 04 15 1080i HDTV DD5 1 MPEG2 TrollHD", "The Tonight Show With Jay Leno", 2011, 04, 15)]
[TestCase("The.Daily.Show.2010.10.11.Johnny.Knoxville.iTouch-MW", "The Daily Show", 2010, 10, 11)]
[TestCase("The Daily Show - 2011-04-12 - Gov. Deval Patrick", "The Daily Show", 2011, 04, 12)]
[TestCase("2011.01.10 - Denis Leary - HD TV.mkv", "", 2011, 1, 10)]
[TestCase("2011.03.13 - Denis Leary - HD TV.mkv", "", 2011, 3, 13)]
[TestCase("The Tonight Show with Jay Leno - 2011-06-16 - Larry David, \"Bachelorette\" Ashley Hebert, Pitbull with Ne-Yo", "The Tonight Show with Jay Leno", 2011, 6, 16)]
[TestCase("2020.NZ.2012.16.02.PDTV.XviD-C4TV", "2020 NZ", 2012, 2, 16)]
[TestCase("2020.NZ.2012.13.02.PDTV.XviD-C4TV", "2020 NZ", 2012, 2, 13)]
[TestCase("2020.NZ.2011.12.02.PDTV.XviD-C4TV", "2020 NZ", 2011, 12, 2)]
[TestCase("Series Title 2011 04 18 Emma Roberts HDTV XviD BFF", "Series Title", 2011, 04, 18)]
[TestCase("A Late Talk Show 2011 04 15 1080i HDTV DD5 1 MPEG2 TrollHD", "A Late Talk Show", 2011, 04, 15)]
[TestCase("A.Late.Talk.Show.2010.10.11.Johnny.Knoxville.iTouch-MW", "A Late Talk Show", 2010, 10, 11)]
[TestCase("A Late Talk Show - 2011-04-12 - Gov. Deval Patrick", "A Late Talk Show", 2011, 04, 12)]
[TestCase("2011.01.10 - A Late Talk Show- HD TV.mkv", "", 2011, 1, 10)]
[TestCase("2011.03.13 - A Late Talk Show - HD TV.mkv", "", 2011, 3, 13)]
[TestCase("A Late Talk Show - 2011-06-16 - Larry David, \"Bachelorette\" Ashley Hebert, Pitbull with Ne-Yo", "A Late Talk Show", 2011, 6, 16)]
[TestCase("2020.A.Late.Talk.Show.2012.16.02.PDTV.XviD-C4TV", "2020 A Late Talk Show", 2012, 2, 16)]
[TestCase("2020.A.Late.Talk.Show.2012.13.02.PDTV.XviD-C4TV", "2020 A Late Talk Show", 2012, 2, 13)]
[TestCase("2020.A.Late.Talk.Show.2011.12.02.PDTV.XviD-C4TV", "2020 A Late Talk Show", 2011, 12, 2)]
[TestCase("Series Title - 2013-10-30 - Episode Title (1) [HDTV-720p]", "Series Title", 2013, 10, 30)]
[TestCase("The_Voice_US_04.28.2014_hdtv.x264.Poke.mp4", "The Voice US", 2014, 4, 28)]
[TestCase("At.Midnight.140722.720p.HDTV.x264-YesTV", "At Midnight", 2014, 07, 22)]
[TestCase("At_Midnight_140722_720p_HDTV_x264-YesTV", "At Midnight", 2014, 07, 22)]
[TestCase("The_Series_US_04.28.2014_hdtv.x264.Poke.mp4", "The Series US", 2014, 4, 28)]
[TestCase("A.Late.Talk.Show.140722.720p.HDTV.x264-YesTV", "A Late Talk Show", 2014, 07, 22)]
[TestCase("A_Late_Talk_Show_140722_720p_HDTV_x264-YesTV", "A Late Talk Show", 2014, 07, 22)]
//[TestCase("Corrie.07.01.15", "Corrie", 2015, 1, 7)]
[TestCase("The Nightly Show with Larry Wilmore 2015 02 09 WEBRIP s01e13", "The Nightly Show with Larry Wilmore", 2015, 2, 9)]
[TestCase("Jimmy_Fallon_2018_06_22_Seth_Meyers_720p_HEVC_x265-MeGusta", "Jimmy Fallon", 2018, 6, 22)]
[TestCase("The Show Series 2015 02 09 WEBRIP s01e13", "The Show Series", 2015, 2, 9)]
[TestCase("Tree_Series_2018_06_22_Seth_Meyers_720p_HEVC_x265-MeGusta", "Tree Series", 2018, 6, 22)]
[TestCase("20161024- Exotic Payback.21x41_720.mkv", "", 2016, 10, 24)]
[TestCase("2018-11-14.1080.all.mp4", "", 2018, 11, 14)]
[TestCase("2019_08_20_1080_all.mp4", "", 2019, 8, 20)]
[TestCase("Home and Away 20201013 Ep7432 [720p WebRip (x264)] [SUBS]", "Home and Away", 2020, 10, 13)]
[TestCase("Series and Title 20201013 Ep7432 [720p WebRip (x264)] [SUBS]", "Series and Title", 2020, 10, 13)]
//[TestCase("", "", 0, 0, 0)]
public void should_parse_daily_episode(string postTitle, string title, int year, int month, int day)
{
@@ -62,12 +62,12 @@ namespace NzbDrone.Core.Test.ParserTests
result.DailyPart.Should().Be(part);
}
[TestCase("Conan {year} {month} {day} Emma Roberts HDTV XviD BFF")]
[TestCase("The Tonight Show With Jay Leno {year} {month} {day} 1080i HDTV DD5 1 MPEG2 TrollHD")]
[TestCase("The.Daily.Show.{year}.{month}.{day}.Johnny.Knoxville.iTouch-MW")]
[TestCase("The Daily Show - {year}-{month}-{day} - Gov. Deval Patrick")]
[TestCase("{year}.{month}.{day} - Denis Leary - HD TV.mkv")]
[TestCase("The Tonight Show with Jay Leno - {year}-{month}-{day} - Larry David, \"Bachelorette\" Ashley Hebert, Pitbull with Ne-Yo")]
[TestCase("A Late Talk Show {year} {month} {day} Emma Roberts HDTV XviD BFF")]
[TestCase("A Late Talk Show {year} {month} {day} 1080i HDTV DD5 1 MPEG2 TrollHD")]
[TestCase("A.Late.Talk.Show.{year}.{month}.{day}.Johnny.Knoxville.iTouch-MW")]
[TestCase("A Late Talk Show - {year}-{month}-{day} - Gov. Deval Patrick")]
[TestCase("{year}.{month}.{day} - A Late Talk Show - HD TV.mkv")]
[TestCase("A Late Talk Show - {year}-{month}-{day} - Larry David, \"Bachelorette\" Ashley Hebert, Pitbull with Ne-Yo")]
[TestCase("2020.NZ.{year}.{month}.{day}.PDTV.XviD-C4TV")]
public void should_not_accept_ancient_daily_series(string title)
{
@@ -75,12 +75,12 @@ namespace NzbDrone.Core.Test.ParserTests
Parser.Parser.ParseTitle(yearTooLow).Should().BeNull();
}
[TestCase("Conan {year} {month} {day} Emma Roberts HDTV XviD BFF")]
[TestCase("The Tonight Show With Jay Leno {year} {month} {day} 1080i HDTV DD5 1 MPEG2 TrollHD")]
[TestCase("The.Daily.Show.{year}.{month}.{day}.Johnny.Knoxville.iTouch-MW")]
[TestCase("The Daily Show - {year}-{month}-{day} - Gov. Deval Patrick")]
[TestCase("{year}.{month}.{day} - Denis Leary - HD TV.mkv")]
[TestCase("The Tonight Show with Jay Leno - {year}-{month}-{day} - Larry David, \"Bachelorette\" Ashley Hebert, Pitbull with Ne-Yo")]
[TestCase("A Late Talk Show {year} {month} {day} Emma Roberts HDTV XviD BFF")]
[TestCase("A Late Talk Show {year} {month} {day} 1080i HDTV DD5 1 MPEG2 TrollHD")]
[TestCase("A.Late.Talk.Show.{year}.{month}.{day}.Johnny.Knoxville.iTouch-MW")]
[TestCase("A Late Talk Show - {year}-{month}-{day} - Gov. Deval Patrick")]
[TestCase("{year}.{month}.{day} - A Late Talk Show - HD TV.mkv")]
[TestCase("A Late Talk Show - {year}-{month}-{day} - Larry David, \"Bachelorette\" Ashley Hebert, Pitbull with Ne-Yo")]
[TestCase("2020.NZ.{year}.{month}.{day}.PDTV.XviD-C4TV")]
public void should_not_accept_future_dates(string title)
{
@@ -94,7 +94,7 @@ namespace NzbDrone.Core.Test.ParserTests
[Test]
public void should_fail_if_episode_is_far_in_future()
{
var title = string.Format("{0:yyyy.MM.dd} - Denis Leary - HD TV.mkv", DateTime.Now.AddDays(2));
var title = string.Format("{0:yyyy.MM.dd} - A Talk Show - HD TV.mkv", DateTime.Now.AddDays(2));
Parser.Parser.ParseTitle(title).Should().BeNull();
}

View File

@@ -8,41 +8,41 @@ namespace NzbDrone.Core.Test.ParserTests
[TestFixture]
public class ExtendedQualityParserRegex : CoreTest
{
[TestCase("Chuck.S04E05.HDTV.XviD-LOL", 0)]
[TestCase("Gold.Rush.S04E05.Garnets.or.Gold.REAL.REAL.PROPER.HDTV.x264-W4F", 2)]
[TestCase("Chuck.S03E17.REAL.PROPER.720p.HDTV.x264-ORENJI-RP", 1)]
[TestCase("Covert.Affairs.S05E09.REAL.PROPER.HDTV.x264-KILLERS", 1)]
[TestCase("Mythbusters.S14E01.REAL.PROPER.720p.HDTV.x264-KILLERS", 1)]
[TestCase("Orange.Is.the.New.Black.s02e06.real.proper.720p.webrip.x264-2hd", 0)]
[TestCase("Top.Gear.S21E07.Super.Duper.Real.Proper.HDTV.x264-FTP", 0)]
[TestCase("Top.Gear.S21E07.PROPER.HDTV.x264-RiVER-RP", 0)]
[TestCase("House.S07E11.PROPER.REAL.RERIP.1080p.BluRay.x264-TENEIGHTY", 1)]
[TestCase("[MGS] - Kuragehime - Episode 02v2 - [D8B6C90D]", 0)]
[TestCase("[Hatsuyuki] Tokyo Ghoul - 07 [v2][848x480][23D8F455].avi", 0)]
[TestCase("[DeadFish] Barakamon - 01v3 [720p][AAC]", 0)]
[TestCase("[DeadFish] Momo Kyun Sword - 01v4 [720p][AAC]", 0)]
[TestCase("Series.Title.S04E05.HDTV.XviD-LOL", 0)]
[TestCase("Series.Title.S04E05.Garnets.or.Gold.REAL.REAL.PROPER.HDTV.x264-W4F", 2)]
[TestCase("Series.Title.S03E17.REAL.PROPER.720p.HDTV.x264-ORENJI-RP", 1)]
[TestCase("Series.Title.S05E09.REAL.PROPER.HDTV.x264-KILLERS", 1)]
[TestCase("Series.Title.S14E01.REAL.PROPER.720p.HDTV.x264-KILLERS", 1)]
[TestCase("Series.Title.s02e06.real.proper.720p.webrip.x264-2hd", 0)]
[TestCase("Series.Title.S21E07.Super.Duper.Real.Proper.HDTV.x264-FTP", 0)]
[TestCase("Series.Title.S21E07.PROPER.HDTV.x264-RiVER-RP", 0)]
[TestCase("Series.Title.S07E11.PROPER.REAL.RERIP.1080p.BluRay.x264-TENEIGHTY", 1)]
[TestCase("[MGS] - Series Title - Episode 02v2 - [D8B6C90D]", 0)]
[TestCase("[Hatsuyuki] Series Title - 07 [v2][848x480][23D8F455].avi", 0)]
[TestCase("[DeadFish] Series Title - 01v3 [720p][AAC]", 0)]
[TestCase("[DeadFish] Series Title - 01v4 [720p][AAC]", 0)]
[TestCase("The Real Housewives of Some Place - S01E01 - Why are we doing this?", 0)]
public void should_parse_reality_from_title(string title, int reality)
{
QualityParser.ParseQuality(title).Revision.Real.Should().Be(reality);
}
[TestCase("Chuck.S04E05.HDTV.XviD-LOL", 1)]
[TestCase("Gold.Rush.S04E05.Garnets.or.Gold.REAL.REAL.PROPER.HDTV.x264-W4F", 2)]
[TestCase("Chuck.S03E17.REAL.PROPER.720p.HDTV.x264-ORENJI-RP", 2)]
[TestCase("Covert.Affairs.S05E09.REAL.PROPER.HDTV.x264-KILLERS", 2)]
[TestCase("Mythbusters.S14E01.REAL.PROPER.720p.HDTV.x264-KILLERS", 2)]
[TestCase("Orange.Is.the.New.Black.s02e06.real.proper.720p.webrip.x264-2hd", 2)]
[TestCase("Top.Gear.S21E07.Super.Duper.Real.Proper.HDTV.x264-FTP", 2)]
[TestCase("Top.Gear.S21E07.PROPER.HDTV.x264-RiVER-RP", 2)]
[TestCase("House.S07E11.PROPER.REAL.RERIP.1080p.BluRay.x264-TENEIGHTY", 2)]
[TestCase("[MGS] - Kuragehime - Episode 02v2 - [D8B6C90D]", 2)]
[TestCase("[Hatsuyuki] Tokyo Ghoul - 07 [v2][848x480][23D8F455].avi", 2)]
[TestCase("[DeadFish] Barakamon - 01v3 [720p][AAC]", 3)]
[TestCase("[DeadFish] Momo Kyun Sword - 01v4 [720p][AAC]", 4)]
[TestCase("[Vivid-Asenshi] Akame ga Kill - 04v2 [266EE983]", 2)]
[TestCase("[Vivid-Asenshi] Akame ga Kill - 03v2 [66A05817]", 2)]
[TestCase("[Vivid-Asenshi] Akame ga Kill - 02v2 [1F67AB55]", 2)]
[TestCase("Series.Title.S04E05.HDTV.XviD-LOL", 1)]
[TestCase("Series.Title.S04E05.Garnets.or.Gold.REAL.REAL.PROPER.HDTV.x264-W4F", 2)]
[TestCase("Series.Title.S03E17.REAL.PROPER.720p.HDTV.x264-ORENJI-RP", 2)]
[TestCase("Series.Title.S05E09.REAL.PROPER.HDTV.x264-KILLERS", 2)]
[TestCase("Series.Title.S14E01.REAL.PROPER.720p.HDTV.x264-KILLERS", 2)]
[TestCase("Series.Title.Is.the.New.Black.s02e06.real.proper.720p.webrip.x264-2hd", 2)]
[TestCase("Series.Title.S21E07.Super.Duper.Real.Proper.HDTV.x264-FTP", 2)]
[TestCase("Series.Title.S21E07.PROPER.HDTV.x264-RiVER-RP", 2)]
[TestCase("Series.Title.S07E11.PROPER.REAL.RERIP.1080p.BluRay.x264-TENEIGHTY", 2)]
[TestCase("[MGS] - Series Title - Episode 02v2 - [D8B6C90D]", 2)]
[TestCase("[Hatsuyuki] Series Title - 07 [v2][848x480][23D8F455].avi", 2)]
[TestCase("[DeadFish] Series Title - 01v3 [720p][AAC]", 3)]
[TestCase("[DeadFish]Series Title - 01v4 [720p][AAC]", 4)]
[TestCase("[Vivid-Asenshi] Series Title - 04v2 [266EE983]", 2)]
[TestCase("[Vivid-Asenshi] Series Title - 03v2 [66A05817]", 2)]
[TestCase("[Vivid-Asenshi] Series Title - 02v2 [1F67AB55]", 2)]
public void should_parse_version_from_title(string title, int version)
{
QualityParser.ParseQuality(title).Revision.Version.Should().Be(version);

View File

@@ -32,16 +32,16 @@ namespace NzbDrone.Core.Test.ParserTests
parsedEpisodeInfo.IsPossibleSpecialEpisode.Should().BeTrue();
}
[TestCase("Under.the.Dome.S02.Special-Inside.Chesters.Mill.HDTV.x264-BAJSKORV")]
[TestCase("Under.the.Dome.S02.Special-Inside.Chesters.Mill.720p.HDTV.x264-BAJSKORV")]
[TestCase("Rookie.Blue.Behind.the.Badge.S05.Special.HDTV.x264-2HD")]
[TestCase("Title.the.Series.S02.Special-Inside.Chesters.Mill.HDTV.x264-BAJSKORV")]
[TestCase("Title.the.Series.S02.Special-Inside.Chesters.Mill.720p.HDTV.x264-BAJSKORV")]
[TestCase("Title.the.Series.S05.Special.HDTV.x264-2HD")]
public void IsPossibleSpecialEpisode_should_be_true(string title)
{
Parser.Parser.ParseTitle(title).IsPossibleSpecialEpisode.Should().BeTrue();
}
[TestCase("Dr.S11E00.A.Christmas.Carol.Special.720p.HDTV-FieldOfView")]
[TestCase("Title.the.Series.S11E00.A.Christmas.Carol.Special.720p.HDTV-FieldOfView")]
public void IsPossibleSpecialEpisode_should_be_true_if_e00_special(string title)
{
Parser.Parser.ParseTitle(title).IsPossibleSpecialEpisode.Should().BeTrue();

View File

@@ -10,95 +10,95 @@ namespace NzbDrone.Core.Test.ParserTests
[TestFixture]
public class LanguageParserFixture : CoreTest
{
[TestCase("Castle.2009.S01E14.English.HDTV.XviD-LOL")]
[TestCase("Castle.2009.S01E14.Germany.HDTV.XviD-LOL")]
[TestCase("Castle.2009.S01E14.HDTV.XviD-LOL")]
[TestCase("Two.Greedy.Italians.S01E01.The.Family.720p.HDTV.x264-FTP")]
[TestCase("The.Trip.To.Italy.S02E01.720p.HDTV.x264-TLA")]
[TestCase("2 Broke Girls - S01E01 - Pilot.en.sub")]
[TestCase("2 Broke Girls - S01E01 - Pilot.eng.sub")]
[TestCase("2 Broke Girls - S01E01 - Pilot.English.sub")]
[TestCase("2 Broke Girls - S01E01 - Pilot.english.sub")]
[TestCase("The Spanish Princess S02E02 Flodden 720p AMZN WEB-DL DDP5 1 H 264-NTb")]
[TestCase("The.Spanish.Princess.S02E02.1080p.WEB.H264-CAKES")]
[TestCase("The.Spanish.Princess.S02E06.Field.of.Cloth.of.Gold.1080p.AMZN.WEBRip.DDP5.1.x264-NTb")]
[TestCase("Title.the.Series.2009.S01E14.English.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.Germany.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.HDTV.XviD-LOL")]
[TestCase("Title.the.Italian.Series.S01E01.The.Family.720p.HDTV.x264-FTP")]
[TestCase("Title.the.Italy.Series.S02E01.720p.HDTV.x264-TLA")]
[TestCase("Series Title - S01E01 - Pilot.en.sub")]
[TestCase("Series Title - S01E01 - Pilot.eng.sub")]
[TestCase("Series Title - S01E01 - Pilot.English.sub")]
[TestCase("Series Title - S01E01 - Pilot.english.sub")]
[TestCase("Spanish Killroy was Here S02E02 Flodden 720p AMZN WEB-DL DDP5 1 H 264-NTb")]
[TestCase("Title.the.Spanish.Series.S02E02.1080p.WEB.H264-CAKES")]
[TestCase("Title.the.Spanish.Series.S02E06.Field.of.Cloth.of.Gold.1080p.AMZN.WEBRip.DDP5.1.x264-NTb")]
public void should_parse_language_english(string postTitle)
{
var result = LanguageParser.ParseLanguage(postTitle);
result.Should().Be(Language.English);
}
[TestCase("2 Broke Girls - S01E01 - Pilot.sub")]
[TestCase("Series Title - S01E01 - Pilot.sub")]
public void should_parse_subtitle_language_unknown(string fileName)
{
var result = LanguageParser.ParseSubtitleLanguage(fileName);
result.Should().Be(Language.Unknown);
}
[TestCase("Castle.2009.S01E14.French.HDTV.XviD-LOL")]
[TestCase("Shield,.The.1x13.Tueurs.De.Flics.FR.DVDRip.XviD")]
[TestCase("Title.the.Series.2009.S01E14.French.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.The.1x13.Tueurs.De.Flics.FR.DVDRip.XviD")]
public void should_parse_language_french(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.French.Id);
}
[TestCase("Castle.2009.S01E14.Spanish.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.Spanish.HDTV.XviD-LOL")]
public void should_parse_language_spanish(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Spanish.Id);
}
[TestCase("Castle.2009.S01E14.German.HDTV.XviD-LOL")]
[TestCase("Burn.Notice.S04E15.Brotherly.Love.GERMAN.DUBBED.WS.WEBRiP.XviD.REPACK-TVP")]
[TestCase("Elementary - S02E16 - Kampfhaehne - mkv - by Videomann")]
[TestCase("Title.the.Series.2009.S01E14.German.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.S04E15.Brotherly.Love.GERMAN.DUBBED.WS.WEBRiP.XviD.REPACK-TVP")]
[TestCase("The Series Title - S02E16 - Kampfhaehne - mkv - by Videomann")]
public void should_parse_language_german(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.German.Id);
}
[TestCase("Castle.2009.S01E14.Italian.HDTV.XviD-LOL")]
[TestCase("person.of.interest.1x19.ita.720p.bdmux.x264-novarip")]
[TestCase("Title.the.Series.2009.S01E14.Italian.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.1x19.ita.720p.bdmux.x264-novarip")]
public void should_parse_language_italian(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Italian.Id);
}
[TestCase("Castle.2009.S01E14.Danish.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.Danish.HDTV.XviD-LOL")]
public void should_parse_language_danish(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Danish.Id);
}
[TestCase("Castle.2009.S01E14.Dutch.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.Dutch.HDTV.XviD-LOL")]
public void should_parse_language_dutch(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Dutch.Id);
}
[TestCase("Castle.2009.S01E14.Japanese.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.Japanese.HDTV.XviD-LOL")]
public void should_parse_language_japanese(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Japanese.Id);
}
[TestCase("Castle.2009.S01E14.Icelandic.HDTV.XviD-LOL")]
[TestCase("S.B.S01E03.1080p.WEB-DL.DD5.1.H.264-SbR Icelandic")]
[TestCase("Title.the.Series.2009.S01E14.Icelandic.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.S01E03.1080p.WEB-DL.DD5.1.H.264-SbR Icelandic")]
public void should_parse_language_icelandic(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Icelandic.Id);
}
[TestCase("Castle.2009.S01E14.Chinese.HDTV.XviD-LOL")]
[TestCase("Castle.2009.S01E14.Cantonese.HDTV.XviD-LOL")]
[TestCase("Castle.2009.S01E14.Mandarin.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.Chinese.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.Cantonese.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.Mandarin.HDTV.XviD-LOL")]
[TestCase("[abc] My Series - 01 [CHS]")]
[TestCase("[abc] My Series - 01 [CHT]")]
[TestCase("[abc] My Series - 01 [BIG5]")]
@@ -115,128 +115,143 @@ namespace NzbDrone.Core.Test.ParserTests
result.Language.Id.Should().Be(Language.Chinese.Id);
}
[TestCase("Castle.2009.S01E14.Korean.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.Korean.HDTV.XviD-LOL")]
public void should_parse_language_korean(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Korean.Id);
}
[TestCase("Castle.2009.S01E14.Russian.HDTV.XviD-LOL")]
[TestCase("True.Detective.S01E01.1080p.WEB-DL.Rus.Eng.TVKlondike")]
[TestCase("Title.the.Series.2009.S01E14.Russian.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.S01E01.1080p.WEB-DL.Rus.Eng.TVKlondike")]
public void should_parse_language_russian(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Russian.Id);
}
[TestCase("Castle.2009.S01E14.Polish.HDTV.XviD-LOL")]
[TestCase("Castle.2009.S01E14.PL.HDTV.XviD-LOL")]
[TestCase("Castle.2009.S01E14.PLLEK.HDTV.XviD-LOL")]
[TestCase("Castle.2009.S01E14.PL-LEK.HDTV.XviD-LOL")]
[TestCase("Castle.2009.S01E14.LEKPL.HDTV.XviD-LOL")]
[TestCase("Castle.2009.S01E14.LEK-PL.HDTV.XviD-LOL")]
[TestCase("Castle.2009.S01E14.PLDUB.HDTV.XviD-LOL")]
[TestCase("Castle.2009.S01E14.PL-DUB.HDTV.XviD-LOL")]
[TestCase("Castle.2009.S01E14.DUBPL.HDTV.XviD-LOL")]
[TestCase("Castle.2009.S01E14.DUB-PL.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.Polish.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.PL.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.PLLEK.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.PL-LEK.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.LEKPL.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.LEK-PL.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.PLDUB.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.PL-DUB.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.DUBPL.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.DUB-PL.HDTV.XviD-LOL")]
public void should_parse_language_polish(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Polish.Id);
}
[TestCase("Castle.2009.S01E14.Vietnamese.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.Vietnamese.HDTV.XviD-LOL")]
public void should_parse_language_vietnamese(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Vietnamese.Id);
}
[TestCase("Castle.2009.S01E14.Swedish.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.Swedish.HDTV.XviD-LOL")]
public void should_parse_language_swedish(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Swedish.Id);
}
[TestCase("Castle.2009.S01E14.Norwegian.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.Norwegian.HDTV.XviD-LOL")]
public void should_parse_language_norwegian(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Norwegian.Id);
}
[TestCase("Castle.2009.S01E14.Finnish.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.Finnish.HDTV.XviD-LOL")]
public void should_parse_language_finnish(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Finnish.Id);
}
[TestCase("Castle.2009.S01E14.Turkish.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.Turkish.HDTV.XviD-LOL")]
public void should_parse_language_turkish(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Turkish.Id);
}
[TestCase("Castle.2009.S01E14.Portuguese.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.2009.S01E14.Portuguese.HDTV.XviD-LOL")]
public void should_parse_language_portuguese(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Portuguese.Id);
}
[TestCase("Salamander.S01E01.FLEMISH.HDTV.x264-BRiGAND")]
[TestCase("Title.the.Series.S01E01.FLEMISH.HDTV.x264-BRiGAND")]
public void should_parse_language_flemish(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Flemish.Id);
}
[TestCase("H.Polukatoikia.S03E13.Greek.PDTV.XviD-Ouzo")]
[TestCase("Title.the.Series.S03E13.Greek.PDTV.XviD-Ouzo")]
public void should_parse_language_greek(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Greek.Id);
}
[TestCase("Castle.2009.S01E14.HDTV.XviD.HUNDUB-LOL")]
[TestCase("Castle.2009.S01E14.HDTV.XviD.ENG.HUN-LOL")]
[TestCase("Castle.2009.S01E14.HDTV.XviD.HUN-LOL")]
[TestCase("Title.the.Series.2009.S01E14.HDTV.XviD.HUNDUB-LOL")]
[TestCase("Title.the.Series.2009.S01E14.HDTV.XviD.ENG.HUN-LOL")]
[TestCase("Title.the.Series.2009.S01E14.HDTV.XviD.HUN-LOL")]
public void should_parse_language_hungarian(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Hungarian.Id);
}
[TestCase("Avatar.The.Last.Airbender.S01-03.DVDRip.HebDub")]
[TestCase("Title.the.Series.S01-03.DVDRip.HebDub")]
public void should_parse_language_hebrew(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Hebrew.Id);
}
[TestCase("Prison.Break.S05E01.WEBRip.x264.AC3.LT.EN-CNN")]
[TestCase("Title.the.Series.S05E01.WEBRip.x264.AC3.LT.EN-CNN")]
public void should_parse_language_lithuanian(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Lithuanian.Id);
}
[TestCase("The.Walking.Dead.S07E11.WEB Rip.XviD.Louige-CZ.EN.5.1")]
[TestCase("Title.the.Series.S07E11.WEB Rip.XviD.Louige-CZ.EN.5.1")]
public void should_parse_language_czech(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Czech.Id);
}
[TestCase("Russian.Puppets.S01E07.Cold.Action.HDTV.XviD-Droned")]
[TestCase("Russian.Puppets.S01E07E08.Cold.Action.HDTV.XviD-Droned")]
[TestCase("Russian.Puppets.S01.1080p.WEBRip.DDP5.1.x264-Drone")]
[TestCase("The.Spanish.Princess.S02E08.Peace.1080p.AMZN.WEBRip.DDP5.1.x264-NTb")]
[TestCase("The Spanish Princess S02E02 Flodden 720p AMZN WEB-DL DDP5 1 H 264-NTb")]
[TestCase("Series Title.S01.ARABIC.COMPLETE.720p.NF.WEBRip.x264-PTV")]
public void should_parse_language_arabic(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Arabic.Id);
}
[TestCase("The Shadow Series S01 E01-08 WebRip Dual Audio [Hindi 5.1 + English 5.1] 720p x264 AAC ESub")]
[TestCase("The Final Sonarr (2020) S04 Complete 720p NF WEBRip [Hindi+English] Dual audio")]
public void should_parse_language_hindi(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Hindi.Id);
}
[TestCase("Title.the.Russian.Series.S01E07.Cold.Action.HDTV.XviD-Droned")]
[TestCase("Title.the.Russian.Series.S01E07E08.Cold.Action.HDTV.XviD-Droned")]
[TestCase("Title.the.Russian.Series.S01.1080p.WEBRip.DDP5.1.x264-Drone")]
[TestCase("Title.the.Spanish.Series.S02E08.Peace.1080p.AMZN.WEBRip.DDP5.1.x264-NTb")]
[TestCase("Title The Spanish S02E02 Flodden 720p AMZN WEB-DL DDP5 1 H 264-NTb")]
public void should_not_parse_series_or_episode_title(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);

View File

@@ -9,11 +9,11 @@ namespace NzbDrone.Core.Test.ParserTests
[TestFixture]
public class MiniSeriesEpisodeParserFixture : CoreTest
{
[TestCase("The.Kennedys.Part.2.DSR.XviD-SYS", "The Kennedys", 2)]
[TestCase("the-pacific-e07-720p", "the-pacific", 7)]
[TestCase("Hatfields and McCoys 2012 Part 1 REPACK 720p HDTV x264 2HD", "Hatfields and McCoys 2012", 1)]
[TestCase("Mars.2016.E04.Power.720p.WEB-DL.DD5.1.H.264-MARS", "Mars 2016", 4)]
//[TestCase("Band.Of.Brothers.EP02.Day.Of.Days.DVDRiP.XviD-DEiTY", "Band.Of.Brothers", 2)]
[TestCase("The.Big.Series.Leader.Part.2.DSR.XviD-SYS", "The Big Series Leader", 2)]
[TestCase("kill-roy-was-here-e07-720p", "kill-roy-was-here", 7)]
[TestCase("Series and Show 2012 Part 1 REPACK 720p HDTV x264 2HD", "Series and Show 2012", 1)]
[TestCase("Series Show.2016.E04.Power.720p.WEB-DL.DD5.1.H.264-MARS", "Series Show 2016", 4)]
//[TestCase("Killroy.Jumped.And.Was.Here.EP02.Episode.Title.DVDRiP.XviD-DEiTY", "Killroy.Jumped.And.Was.Here", 2)]
//[TestCase("", "", 0)]
public void should_parse_mini_series_episode(string postTitle, string title, int episodeNumber)
{
@@ -27,10 +27,10 @@ namespace NzbDrone.Core.Test.ParserTests
result.FullSeason.Should().BeFalse();
}
[TestCase("It's My Life.E56.190121.720p-NEXT.mp4", "It's My Life", 56, "2019-01-21")]
[TestCase("My Only One.E37.190120.1080p-NEXT.mp4", "My Only One", 37, "2019-01-20")]
[TestCase("Man.E191.190121.720p-NEXT.mp4", "Man",191, "2019-01-21")]
[TestCase("The Golden Bell Challenge.E932.190120.720p-NEXT.mp4", "The Golden Bell Challenge", 932, "2019-01-20")]
[TestCase("It's a Series Title.E56.190121.720p-NEXT.mp4", "It's a Series Title", 56, "2019-01-21")]
[TestCase("My Only Series Title.E37.190120.1080p-NEXT.mp4", "My Only Series Title", 37, "2019-01-20")]
[TestCase("Series.E191.190121.720p-NEXT.mp4", "Series",191, "2019-01-21")]
[TestCase("The Series Title Challenge.E932.190120.720p-NEXT.mp4", "The Series Title Challenge", 932, "2019-01-20")]
//[TestCase("", "", 0, "")]
public void should_parse_korean_series_episode(string postTitle, string title, int episodeNumber, string airdate)
{

View File

@@ -8,41 +8,41 @@ namespace NzbDrone.Core.Test.ParserTests
[TestFixture]
public class MultiEpisodeParserFixture : CoreTest
{
[TestCase("WEEDS.S03E01-06.DUAL.BDRip.XviD.AC3.-HELLYWOOD", "WEEDS", 3, new[] { 1, 2, 3, 4, 5, 6 })]
[TestCase("Two.and.a.Half.Men.103.104.720p.HDTV.X264-DIMENSION", "Two and a Half Men", 1, new[] { 3, 4 })]
[TestCase("Weeds.S03E01.S03E02.720p.HDTV.X264-DIMENSION", "Weeds", 3, new[] { 1, 2 })]
[TestCase("The Borgias S01e01 e02 ShoHD On Demand 1080i DD5 1 ALANiS", "The Borgias", 1, new[] { 1, 2 })]
[TestCase("White.Collar.2x04.2x05.720p.BluRay-FUTV", "White Collar", 2, new[] { 4, 5 })]
[TestCase("Desperate.Housewives.S07E22E23.720p.HDTV.X264-DIMENSION", "Desperate Housewives", 7, new[] { 22, 23 })]
[TestCase("Desparate Housewives - S07E22 - S07E23 - And Lots of Security.. [HDTV-720p].mkv", "Desparate Housewives", 7, new[] { 22, 23 })]
[TestCase("Series.S03E01-06.DUAL.BDRip.XviD.AC3.-HELLYWOOD", "Series", 3, new[] { 1, 2, 3, 4, 5, 6 })]
[TestCase("Series.Title.103.104.720p.HDTV.X264-DIMENSION", "Series Title", 1, new[] { 3, 4 })]
[TestCase("Series.S03E01.S03E02.720p.HDTV.X264-DIMENSION", "Series", 3, new[] { 1, 2 })]
[TestCase("The Series S01e01 e02 ShoHD On Demand 1080i DD5 1 ALANiS", "The Series", 1, new[] { 1, 2 })]
[TestCase("Series.Title.2x04.2x05.720p.BluRay-FUTV", "Series Title", 2, new[] { 4, 5 })]
[TestCase("Series.Title.S07E22E23.720p.HDTV.X264-DIMENSION", "Series Title", 7, new[] { 22, 23 })]
[TestCase("Series Title - S07E22 - S07E23 - And Lots of Security.. [HDTV-720p].mkv", "Series Title", 7, new[] { 22, 23 })]
[TestCase("S03E01.S03E02.720p.HDTV.X264-DIMENSION", "", 3, new[] { 1, 2 })]
[TestCase("Desparate Housewives - S07E22 - 7x23 - And Lots of Security.. [HDTV-720p].mkv", "Desparate Housewives", 7, new[] { 22, 23 })]
[TestCase("S07E22 - 7x23 - And Lots of Security.. [HDTV-720p].mkv", "", 7, new[] { 22, 23 })]
[TestCase("Series Title - S07E22 - 7x23 - And Lots of Development.. [HDTV-720p].mkv", "Series Title", 7, new[] { 22, 23 })]
[TestCase("S07E22 - 7x23 - And Lots of Development.. [HDTV-720p].mkv", "", 7, new[] { 22, 23 })]
[TestCase("2x04x05.720p.BluRay-FUTV", "", 2, new[] { 4, 5 })]
[TestCase("S02E04E05.720p.BluRay-FUTV", "", 2, new[] { 4, 5 })]
[TestCase("S02E03-04-05.720p.BluRay-FUTV", "", 2, new[] { 3, 4, 5 })]
[TestCase("Breakout.Kings.S02E09-E10.HDTV.x264-ASAP", "Breakout Kings", 2, new[] { 9, 10 })]
[TestCase("Breakout Kings - 2x9-2x10 - Served Cold [SDTV] ", "Breakout Kings", 2, new[] { 9, 10 })]
[TestCase("Breakout Kings - 2x09-2x10 - Served Cold [SDTV] ", "Breakout Kings", 2, new[] { 9, 10 })]
[TestCase("Hell on Wheels S02E09 E10 HDTV x264 EVOLVE", "Hell on Wheels", 2, new[] { 9, 10 })]
[TestCase("Hell.on.Wheels.S02E09-E10.720p.HDTV.x264-EVOLVE", "Hell on Wheels", 2, new[] { 9, 10 })]
[TestCase("Grey's Anatomy - 8x01_02 - Free Falling", "Grey's Anatomy", 8, new [] { 1,2 })]
[TestCase("Series.Kings.S02E09-E10.HDTV.x264-ASAP", "Series Kings", 2, new[] { 9, 10 })]
[TestCase("Series Kings - 2x9-2x10 - Served Code [SDTV] ", "Series Kings", 2, new[] { 9, 10 })]
[TestCase("Series Kings - 2x09-2x10 - Served Code [SDTV] ", "Series Kings", 2, new[] { 9, 10 })]
[TestCase("Hell on Series S02E09 E10 HDTV x264 EVOLVE", "Hell on Series", 2, new[] { 9, 10 })]
[TestCase("Hell.on.Series.S02E09-E10.720p.HDTV.x264-EVOLVE", "Hell on Series", 2, new[] { 9, 10 })]
[TestCase("Series's Sonarr - 8x01_02 - Free Falling", "Series's Sonarr", 8, new [] { 1,2 })]
[TestCase("8x01_02 - Free Falling", "", 8, new[] { 1, 2 })]
[TestCase("Kaamelott.S01E91-E100", "Kaamelott", 1, new[] { 91, 92, 93, 94, 95, 96, 97, 98, 99, 100 })]
[TestCase("Neighbours.S29E161-E165.PDTV.x264-FQM", "Neighbours", 29, new[] { 161, 162, 163, 164, 165 })]
[TestCase("Shortland.Street.S22E5363-E5366.HDTV.x264-FiHTV", "Shortland Street", 22, new[] { 5363, 5364, 5365, 5366 })]
[TestCase("the.office.101.102.hdtv-lol", "the office", 1, new[] { 1, 2 })]
[TestCase("extant.10708.hdtv-lol.mp4", "extant", 1, new[] { 7, 8 })]
[TestCase("extant.10910.hdtv-lol.mp4", "extant", 1, new[] { 9, 10 })]
[TestCase("Series.S01E91-E100", "Series", 1, new[] { 91, 92, 93, 94, 95, 96, 97, 98, 99, 100 })]
[TestCase("Series.S29E161-E165.PDTV.x264-FQM", "Series", 29, new[] { 161, 162, 163, 164, 165 })]
[TestCase("Shortland.Series.S22E5363-E5366.HDTV.x264-FiHTV", "Shortland Series", 22, new[] { 5363, 5364, 5365, 5366 })]
[TestCase("the.Series.101.102.hdtv-lol", "the Series", 1, new[] { 1, 2 })]
[TestCase("Series.10708.hdtv-lol.mp4", "Series", 1, new[] { 7, 8 })]
[TestCase("Series.10910.hdtv-lol.mp4", "Series", 1, new[] { 9, 10 })]
[TestCase("E.010910.HDTVx264REPACKLOL.mp4", "E", 1, new[] { 9, 10 })]
[TestCase("World Series of Poker - 2013x15 - 2013x16 - HD TV.mkv", "World Series of Poker", 2013, new[] { 15, 16 })]
[TestCase("The Librarians US S01E01-E02 720p HDTV x264", "The Librarians US", 1, new [] { 1, 2 })]
[TestCase("World Series of Sonarr - 2010x15 - 2010x16 - HD TV.mkv", "World Series of Sonarr", 2010, new[] { 15, 16 })]
[TestCase("The Series US S01E01-E02 720p HDTV x264", "The Series US", 1, new [] { 1, 2 })]
[TestCase("Series Title Season 01 Episode 05-06 720p", "Series Title", 1,new [] { 5, 6 })]
//[TestCase("My Name Is Earl - S03E01-E02 - My Name Is Inmate 28301-016 [SDTV]", "My Name Is Earl", 3, new[] { 1, 2 })]
//[TestCase("Adventure Time - 5x01 - x02 - Finn the Human (2) & Jake the Dog (3)", "Adventure Time", 5, new [] { 1, 2 })]
[TestCase("The Young And The Restless - S42 Ep10718 - Ep10722", "The Young And The Restless", 42, new[] { 10718, 10719, 10720, 10721, 10722 })]
[TestCase("The Young And The Restless - S42 Ep10688 - Ep10692", "The Young And The Restless", 42, new[] { 10688, 10689, 10690, 10691, 10692 })]
[TestCase("RWBY.S01E02E03.1080p.BluRay.x264-DeBTViD", "RWBY", 1, new [] { 2, 3 })]
//[TestCase("My Name Is Sonarr - S03E01-E02 - My Name Is Code 28301-016 [SDTV]", "My Name Is Sonarr", 3, new[] { 1, 2 })]
//[TestCase("Adventure Series - 5x01 - x02 - Dev the Human (2) & Sonarr the Robot (3)", "Adventure Series", 5, new [] { 1, 2 })]
[TestCase("The Series And The Code - S42 Ep10718 - Ep10722", "The Series And The Code", 42, new[] { 10718, 10719, 10720, 10721, 10722 })]
[TestCase("The Series And The Code - S42 Ep10688 - Ep10692", "The Series And The Code", 42, new[] { 10688, 10689, 10690, 10691, 10692 })]
[TestCase("Series.S01E02E03.1080p.BluRay.x264-DeBTViD", "Series", 1, new [] { 2, 3 })]
[TestCase("grp-zoos01e11e12-1080p", "grp-zoo", 1, new [] { 11, 12 })]
[TestCase("grp-zoo-s01e11e12-1080p", "grp-zoo", 1, new [] { 11, 12 })]
[TestCase("Series Title.S6.E1.E2.Episode Name.1080p.WEB-DL", "Series Title", 6, new [] { 1, 2 })]
@@ -55,16 +55,16 @@ namespace NzbDrone.Core.Test.ParserTests
[TestCase("Series Title.S6.E1-S6E2.Episode Name.1080p.WEB-DL", "Series Title", 6, new[] { 1, 2 })]
[TestCase("Series Title.S6.E1E2.Episode Name.1080p.WEB-DL", "Series Title", 6, new[] { 1, 2 })]
[TestCase("Series Title.S6.E1-E2-E3.Episode Name.1080p.WEB-DL", "Series Title", 6, new[] { 1, 2, 3 })]
[TestCase("Mad.Men.S05E01-E02.720p.5.1Ch.BluRay", "Mad Men", 5, new[] { 1, 2 })]
[TestCase("Mad.Men.S05E01-02.720p.5.1Ch.BluRay", "Mad Men", 5, new[] { 1, 2 })]
[TestCase("Series.Title.S05E01-E02.720p.5.1Ch.BluRay", "Series Title", 5, new[] { 1, 2 })]
[TestCase("Series.Title.S05E01-02.720p.5.1Ch.BluRay", "Series Title", 5, new[] { 1, 2 })]
[TestCase("S01E01-E03 - Episode Title.HDTV-720p", "", 1, new [] { 1, 2, 3 })]
[TestCase("1x01-x03 - Episode Title.HDTV-720p", "", 1, new [] { 1, 2, 3 })]
[TestCase("Are.You.Human.Too.E07-E08.180612.1080p-NEXT", "Are You Human Too", 1, new[] { 7, 8 })]
[TestCase("Are You Human Too? E11-E12 1080p HDTV AAC H.264-NEXT", "Are You Human Too", 1, new[] { 11, 12 })]
[TestCase("Series.Title.E07-E08.180612.1080p-NEXT", "Series Title", 1, new[] { 7, 8 })]
[TestCase("Series Title? E11-E12 1080p HDTV AAC H.264-NEXT", "Series Title", 1, new[] { 11, 12 })]
[TestCase("The Series Title (2010) - [S01E01-02-03] - Episode Title", "The Series Title (2010)", 1, new [] { 1, 2, 3 })]
[TestCase("[AqusiQ-TorrentS.pl]The.Name.of.the.Rose.S01E05-06.PL.2160p-Ralf[shogho]", "The Name of the Rose", 1, new[] { 5, 6 })]
[TestCase("[AgusiQ-TorrentS.pl] The.Name.of.the.Rose.S01E05-E06.PL.1080i.Ralf [jans12]", "The Name of the Rose", 1, new[] { 5, 6 })]
[TestCase("The.Name.of.the.Rose.S01E05-6.PL.1080p.WEBRip.x264-666", "The Name of the Rose", 1, new[] { 5, 6 })]
[TestCase("[AqusiQ-TorrentS.pl]The.Name.of.the.Series.S01E05-06.PL.2160p-Ralf[shogho]", "The Name of the Series", 1, new[] { 5, 6 })]
[TestCase("[AgusiQ-TorrentS.pl] The.Name.of.the.Series.S01E05-E06.PL.1080i.Ralf [jans12]", "The Name of the Series", 1, new[] { 5, 6 })]
[TestCase("The.Name.of.the.Series.S01E05-6.PL.1080p.WEBRip.x264-666", "The Name of the Series", 1, new[] { 5, 6 })]
[TestCase("Series Title - S15E06-07 - City Sushi HDTV-720p", "Series Title", 15, new[] { 6, 7 })]
[TestCase("Series Title - S01E01-02-03 - Episode Title HDTV-720p", "Series Title", 1, new[] { 1, 2, 3 })]
[TestCase("Series Title - [02x01x02] - Episode 1", "Series Title", 2, new [] { 1, 2})]

View File

@@ -9,10 +9,10 @@ namespace NzbDrone.Core.Test.ParserTests
[TestFixture]
public class NormalizeTitleFixture : CoreTest
{
[TestCase("Conan", "conan")]
[TestCase("Castle (2009)", "castle2009")]
[TestCase("Parenthood.2010", "parenthood2010")]
[TestCase("Law_and_Order_SVU", "lawordersvu")]
[TestCase("Series", "series")]
[TestCase("Series (2009)", "series2009")]
[TestCase("Series.2010", "series2010")]
[TestCase("Series_and_Title_Sonarr", "seriestitlesonarr")]
public void should_normalize_series_title(string parsedSeriesName, string seriesName)
{
var result = parsedSeriesName.CleanSeriesTitle();
@@ -98,9 +98,9 @@ namespace NzbDrone.Core.Test.ParserTests
}
[TestCase("The Office", "theoffice")]
[TestCase("The Tonight Show With Jay Leno", "thetonightshowwithjayleno")]
[TestCase("The.Daily.Show", "thedailyshow")]
[TestCase("The Series", "theseries")]
[TestCase("The Series Show With Sonarr Dev", "theseriesshowwithsonarrdev")]
[TestCase("The.Series.Show", "theseriesshow")]
public void should_not_remove_from_the_beginning_of_the_title(string parsedSeriesName, string seriesName)
{
var result = parsedSeriesName.CleanSeriesTitle();
@@ -132,12 +132,12 @@ namespace NzbDrone.Core.Test.ParserTests
[Test]
public void should_not_clean_trailing_a()
{
"Tokyo Ghoul A".CleanSeriesTitle().Should().Be("tokyoghoula");
"Series Title A".CleanSeriesTitle().Should().Be("seriestitlea");
}
[TestCase("3%", "3percent")]
[TestCase("Teen Top & 100% Outing Brothers", "teentop100percentoutingbrothers")]
[TestCase("Big Jay Oakerson's What's Your F@%king Deal?!", "bigjayoakersonswhatsyourfkingdeal")]
[TestCase("Series Top & 100% Coding Developers", "seriestop100percentcodingdevelopers")]
[TestCase("Series Title What's Your F@%king Deal?!", "seriestitlewhatsyourfkingdeal")]
public void should_replace_percent_sign_with_percent_following_numbers(string input, string expected)
{
input.CleanSeriesTitle().Should().Be(expected);

View File

@@ -11,37 +11,24 @@ namespace NzbDrone.Core.Test.ParserTests
[TestFixture]
public class ParserFixture : CoreTest
{
/*Fucked-up hall of shame,
* WWE.Wrestlemania.27.PPV.HDTV.XviD-KYR
* Unreported.World.Chinas.Lost.Sons.WS.PDTV.XviD-FTP
* [TestCase("Big Time Rush 1x01 to 10 480i DD2 0 Sianto", "Big Time Rush", 1, new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }, 10)]
* [TestCase("Desparate Housewives - S07E22 - 7x23 - And Lots of Security.. [HDTV-720p].mkv", "Desparate Housewives", 7, new[] { 22, 23 }, 2)]
* [TestCase("S07E22 - 7x23 - And Lots of Security.. [HDTV-720p].mkv", "", 7, new[] { 22, 23 }, 2)]
* (Game of Thrones s03 e - "Game of Thrones Season 3 Episode 10"
* The.Man.of.Steel.1994-05.33.hybrid.DreamGirl-Novus-HD
* Superman.-.The.Man.of.Steel.1994-06.34.hybrid.DreamGirl-Novus-HD
* Superman.-.The.Man.of.Steel.1994-05.33.hybrid.DreamGirl-Novus-HD
* Constantine S1-E1-WEB-DL-1080p-NZBgeek
* rwbys01e02e031080-debt.mkv
*/
[TestCase("Chuck - 4x05 - Title", "Chuck")]
[TestCase("Law & Order - 4x05 - Title", "laworder")]
[TestCase("Series Title - 4x05 - Title", "seriestitle")]
[TestCase("Series & Title - 4x05 - Title", "seriestitle")]
[TestCase("Bad Format", "badformat")]
[TestCase("Mad Men - Season 1 [Bluray720p]", "madmen")]
[TestCase("Mad Men - Season 1 [Bluray1080p]", "madmen")]
[TestCase("The Daily Show With Jon Stewart -", "thedailyshowwithjonstewart")]
[TestCase("The Venture Bros. (2004)", "theventurebros2004")]
[TestCase("Castle (2011)", "castle2011")]
[TestCase("Adventure Time S02 720p HDTV x264 CRON", "adventuretime")]
[TestCase("Hawaii Five 0", "hawaiifive0")]
[TestCase("Match of the Day", "matchday")]
[TestCase("Match of the Day 2", "matchday2")]
[TestCase("[ www.Torrenting.com ] - Revenge.S03E14.720p.HDTV.X264-DIMENSION", "Revenge")]
[TestCase("www.Torrenting.com - Revenge.S03E14.720p.HDTV.X264-DIMENSION", "Revenge")]
[TestCase("Seed S02E09 HDTV x264-2HD [eztv]-[rarbg.com]", "Seed")]
[TestCase("Reno.911.S01.DVDRip.DD2.0.x264-DEEP", "Reno 911")]
[TestCase("www.Torrenting.org - Revenge.S03E14.720p.HDTV.X264-DIMENSION", "Revenge")]
[TestCase("Mad Series - Season 1 [Bluray720p]", "madseries")]
[TestCase("Mad Series - Season 1 [Bluray1080p]", "madseries")]
[TestCase("The Daily Series -", "thedailyseries")]
[TestCase("The Series Bros. (2006)", "theseriesbros2006")]
[TestCase("Series (2011)", "series2011")]
[TestCase("Series Time S02 720p HDTV x264 CRON", "seriestime")]
[TestCase("Series Title 0", "seriestitle0")]
[TestCase("Series of the Day", "seriesday")]
[TestCase("Series of the Day 2", "seriesday2")]
[TestCase("[ www.Torrenting.com ] - Series.S03E14.720p.HDTV.X264-DIMENSION", "series")]
[TestCase("www.Torrenting.com - Series.S03E14.720p.HDTV.X264-DIMENSION", "series")]
[TestCase("Series S02E09 HDTV x264-2HD [eztv]-[rarbg.com]", "series")]
[TestCase("Series.911.S01.DVDRip.DD2.0.x264-DEEP", "series 911")]
[TestCase("www.Torrenting.org - Series.S03E14.720p.HDTV.X264-DIMENSION", "series")]
public void should_parse_series_name(string postTitle, string title)
{
var result = Parser.Parser.ParseSeriesName(postTitle).CleanSeriesTitle();
@@ -51,25 +38,25 @@ namespace NzbDrone.Core.Test.ParserTests
[Test]
public void should_remove_accents_from_title()
{
const string title = "Carniv\u00E0le";
const string title = "Seri\u00E0es";
title.CleanSeriesTitle().Should().Be("carnivale");
title.CleanSeriesTitle().Should().Be("seriaes");
}
[TestCase("Discovery TV - Gold Rush : 02 Road From Hell [S04].mp4")]
[TestCase("Sonar TV - Series Title : 02 Road From Code [S04].mp4")]
public void should_clean_up_invalid_path_characters(string postTitle)
{
Parser.Parser.ParseTitle(postTitle);
}
[TestCase("[scnzbefnet][509103] 2.Broke.Girls.S03E18.720p.HDTV.X264-DIMENSION", "2 Broke Girls")]
[TestCase("[scnzbefnet][509103] 2.Developers.Series.S03E18.720p.HDTV.X264-DIMENSION", "2 Developers Series")]
public void should_remove_request_info_from_title(string postTitle, string title)
{
Parser.Parser.ParseTitle(postTitle).SeriesTitle.Should().Be(title);
}
[TestCase("Revolution.S01E02.Chained.Heat.mkv")]
[TestCase("Dexter - S01E01 - Title.avi")]
[TestCase("Series.S01E02.Chained.Title.mkv")]
[TestCase("Show - S01E01 - Title.avi")]
public void should_parse_quality_from_extension(string title)
{
Parser.Parser.ParseTitle(title).Quality.Quality.Should().NotBe(Quality.Unknown);
@@ -79,7 +66,7 @@ namespace NzbDrone.Core.Test.ParserTests
}
[TestCase("Revolution.S01E02.Chained.Heat.mkv", "Revolution.S01E02.Chained.Heat")]
[TestCase("Series.S01E02.Chained.Title.mkv", "Series.S01E02.Chained.Title")]
public void should_parse_releasetitle(string path, string releaseTitle)
{
var result = Parser.Parser.ParseTitle(path);

View File

@@ -26,8 +26,8 @@ namespace NzbDrone.Core.Test.ParserTests.ParsingServiceTests
public void Setup()
{
_series = Builder<Series>.CreateNew()
.With(s => s.Title = "30 Rock")
.With(s => s.CleanTitle = "rock")
.With(s => s.Title = "30 Stone")
.With(s => s.CleanTitle = "stone")
.Build();
_episodes = Builder<Episode>.CreateListOfSize(1)

View File

@@ -14,7 +14,7 @@ namespace NzbDrone.Core.Test.ParserTests.ParsingServiceTests
[Test]
public void should_use_passed_in_title_when_it_cannot_be_parsed()
{
const string title = "30 Rock";
const string title = "30 Stone";
Subject.GetSeries(title);
@@ -25,7 +25,7 @@ namespace NzbDrone.Core.Test.ParserTests.ParsingServiceTests
[Test]
public void should_use_parsed_series_title()
{
const string title = "30.Rock.S01E01.720p.hdtv";
const string title = "30.Stone.S01E01.720p.hdtv";
Subject.GetSeries(title);
@@ -36,7 +36,7 @@ namespace NzbDrone.Core.Test.ParserTests.ParsingServiceTests
[Test]
public void should_fallback_to_title_without_year_and_year_when_title_lookup_fails()
{
const string title = "House.2004.S01E01.720p.hdtv";
const string title = "Show.2004.S01E01.720p.hdtv";
var parsedEpisodeInfo = Parser.Parser.ParseTitle(title);
Subject.GetSeries(title);

View File

@@ -26,8 +26,8 @@ namespace NzbDrone.Core.Test.ParserTests.ParsingServiceTests
public void Setup()
{
_series = Builder<Series>.CreateNew()
.With(s => s.Title = "30 Rock")
.With(s => s.CleanTitle = "rock")
.With(s => s.Title = "30 Stone")
.With(s => s.CleanTitle = "stone")
.Build();
_episodes = Builder<Episode>.CreateListOfSize(1)

View File

@@ -9,28 +9,28 @@ namespace NzbDrone.Core.Test.ParserTests
[TestFixture]
public class PathParserFixture : CoreTest
{
[TestCase(@"z:\tv shows\battlestar galactica (2003)\Season 3\S03E05 - Collaborators.mkv", 3, 5)]
[TestCase(@"z:\tv shows\modern marvels\Season 16\S16E03 - The Potato.mkv", 16, 3)]
[TestCase(@"z:\tv shows\robot chicken\Specials\S00E16 - Dear Consumer - SD TV.avi", 0, 16)]
[TestCase(@"D:\shares\TV Shows\Parks And Recreation\Season 2\S02E21 - 94 Meetings - 720p TV.mkv", 2, 21)]
[TestCase(@"D:\shares\TV Shows\Battlestar Galactica (2003)\Season 2\S02E21.avi", 2, 21)]
[TestCase("C:/Test/TV/Chuck.4x05.HDTV.XviD-LOL", 4, 5)]
[TestCase(@"P:\TV Shows\House\Season 6\S06E13 - 5 to 9 - 720p BluRay.mkv", 6, 13)]
[TestCase(@"S:\TV Drop\House - 10x11 - Title [SDTV]\1011 - Title.avi", 10, 11)]
[TestCase(@"/TV Drop/House - 10x11 - Title [SDTV]/1011 - Title.avi", 10, 11)]
[TestCase(@"S:\TV Drop\King of the Hill - 10x12 - 24 Hour Propane People [SDTV]\1012 - 24 Hour Propane People.avi", 10, 12)]
[TestCase(@"/TV Drop/King of the Hill - 10x12 - 24 Hour Propane People [SDTV]/1012 - 24 Hour Propane People.avi", 10, 12)]
[TestCase(@"S:\TV Drop\King of the Hill - 10x12 - 24 Hour Propane People [SDTV]\Hour Propane People.avi", 10, 12)]
[TestCase(@"/TV Drop/King of the Hill - 10x12 - 24 Hour Propane People [SDTV]/Hour Propane People.avi", 10, 12)]
[TestCase(@"E:\Downloads\tv\The.Big.Bang.Theory.S01E01.720p.HDTV\ajifajjjeaeaeqwer_eppj.avi", 1, 1)]
[TestCase(@"C:\Test\Unsorted\The.Big.Bang.Theory.S01E01.720p.HDTV\tbbt101.avi", 1, 1)]
[TestCase(@"C:\Test\Unsorted\Terminator.The.Sarah.Connor.Chronicles.S02E19.720p.BluRay.x264-SiNNERS-RP\ba27283b17c00d01193eacc02a8ba98eeb523a76.mkv", 2, 19)]
[TestCase(@"C:\Test\Unsorted\Terminator.The.Sarah.Connor.Chronicles.S02E18.720p.BluRay.x264-SiNNERS-RP\45a55debe3856da318cc35882ad07e43cd32fd15.mkv", 2, 18)]
[TestCase(@"z:\tv shows\series title (2003)\Season 3\S03E05 - Title.mkv", 3, 5)]
[TestCase(@"z:\tv showsseries title\Season 16\S16E03 - The Title.mkv", 16, 3)]
[TestCase(@"z:\tv shows\series title\Specials\S00E16 - Dear Title - SD TV.avi", 0, 16)]
[TestCase(@"D:\shares\TV Shows\series title\Season 2\S02E21 - 94 Title - 720p TV.mkv", 2, 21)]
[TestCase(@"D:\shares\TV Shows\Series (2003)\Season 2\S02E21.avi", 2, 21)]
[TestCase("C:/Test/TV/Series.4x05.HDTV.XviD-LOL", 4, 5)]
[TestCase(@"P:\TV Shows\Series\Season 6\S06E13 - 5 to 9 - 720p BluRay.mkv", 6, 13)]
[TestCase(@"S:\TV Drop\Series - 10x11 - Title [SDTV]\1011 - Title.avi", 10, 11)]
[TestCase(@"/TV Drop/Series - 10x11 - Title [SDTV]/1011 - Title.avi", 10, 11)]
[TestCase(@"S:\TV Drop\Series Title - 10x12 - 24 Hours of Development [SDTV]\1012 - 24 Hours of Development.avi", 10, 12)]
[TestCase(@"/TV Drop/Series Title - 10x12 - 24 Hours of Development [SDTV]/1012 - 24 Hours of Development.avi", 10, 12)]
[TestCase(@"S:\TV Drop\Series Title - 10x12 - 24 Hours of Development [SDTV]\Hours of Development.avi", 10, 12)]
[TestCase(@"/TV Drop/Series Title - 10x12 - 24 Hours of Development [SDTV]/Hours of Development.avi", 10, 12)]
[TestCase(@"E:\Downloads\tv\Series.Title.S01E01.720p.HDTV\ajifajjjeaeaeqwer_eppj.avi", 1, 1)]
[TestCase(@"C:\Test\Unsorted\Series.Title.S01E01.720p.HDTV\tbbt101.avi", 1, 1)]
[TestCase(@"C:\Test\Unsorted\Series.Title.S02E19.720p.BluRay.x264-SiNNERS-RP\ba27283b17c00d01193eacc02a8ba98eeb523a76.mkv", 2, 19)]
[TestCase(@"C:\Test\Unsorted\Series.Title.S02E18.720p.BluRay.x264-SiNNERS-RP\45a55debe3856da318cc35882ad07e43cd32fd15.mkv", 2, 18)]
[TestCase(@"C:\Test\Series\Season 01\01 Pilot (1080p HD).mkv", 1, 1)]
[TestCase(@"C:\Test\Series\Season 01\1 Pilot (1080p HD).mkv", 1, 1)]
[TestCase(@"C:\Test\Series\Season 1\02 Honor Thy Father (1080p HD).m4v", 1, 2)]
[TestCase(@"C:\Test\Series\Season 1\2 Honor Thy Father (1080p HD).m4v", 1, 2)]
// [TestCase(@"C:\CSI.NY.S02E04.720p.WEB-DL.DD5.1.H.264\73696S02-04.mkv", 2, 4)] //Gets treated as S01E04 (because it gets parsed as anime)
[TestCase(@"C:\Test\Series\Season 1\2 Honor Thy Developer (1080p HD).m4v", 1, 2)]
//[TestCase(@"C:\series.state.S02E04.720p.WEB-DL.DD5.1.H.264\73696S02-04.mkv", 2, 4)] //Gets treated as S01E04 (because it gets parsed as anime); 2020-01 broken test case: Expected result.EpisodeNumbers to contain 1 item(s), but found 0
public void should_parse_from_path(string path, int season, int episode)
{
var result = Parser.Parser.ParsePath(path.AsOsAgnostic());

View File

@@ -44,120 +44,120 @@ namespace NzbDrone.Core.Test.ParserTests
};
[TestCase("S07E23 .avi ", false)]
[TestCase("The.Shield.S01E13.x264-CtrlSD", false)]
[TestCase("Nikita S02E01 HDTV XviD 2HD", false)]
[TestCase("Gossip Girl S05E11 PROPER HDTV XviD 2HD", true)]
[TestCase("The Jonathan Ross Show S02E08 HDTV x264 FTP", false)]
[TestCase("White.Van.Man.2011.S02E01.WS.PDTV.x264-TLA", false)]
[TestCase("White.Van.Man.2011.S02E01.WS.PDTV.x264-REPACK-TLA", true)]
[TestCase("The Real Housewives of Vancouver S01E04 DSR x264 2HD", false)]
[TestCase("Vanguard S01E04 Mexicos Death Train DSR x264 MiNDTHEGAP", false)]
[TestCase("Chuck S11E03 has no periods or extension HDTV", false)]
[TestCase("Chuck.S04E05.HDTV.XviD-LOL", false)]
[TestCase("Sonny.With.a.Chance.S02E15.avi", false)]
[TestCase("Sonny.With.a.Chance.S02E15.xvid", false)]
[TestCase("Sonny.With.a.Chance.S02E15.divx", false)]
[TestCase("The.Girls.Next.Door.S03E06.HDTV-WiDE", false)]
[TestCase("Degrassi.S10E27.WS.DSR.XviD-2HD", false)]
[TestCase("[HorribleSubs] Yowamushi Pedal - 32 [480p]", false)]
[TestCase("[CR] Sailor Moon - 004 [480p][48CE2D0F]", false)]
[TestCase("[Hatsuyuki] Naruto Shippuuden - 363 [848x480][ADE35E38]", false)]
[TestCase("Muppet.Babies.S03.TVRip.XviD-NOGRP", false)]
[TestCase("[HorribleSubs] ID INVADED - 03 [360p].mkv", false)]
[TestCase("The.Series.S01E13.x264-CtrlSD", false)]
[TestCase("The Series S02E01 HDTV XviD 2HD", false)]
[TestCase("The Series S05E11 PROPER HDTV XviD 2HD", true)]
[TestCase("The Series Show S02E08 HDTV x264 FTP", false)]
[TestCase("The.Series.2011.S02E01.WS.PDTV.x264-TLA", false)]
[TestCase("The.Series.2011.S02E01.WS.PDTV.x264-REPACK-TLA", true)]
[TestCase("The Series S01E04 DSR x264 2HD", false)]
[TestCase("The Series S01E04 Series Death Train DSR x264 MiNDTHEGAP", false)]
[TestCase("The Series S11E03 has no periods or extension HDTV", false)]
[TestCase("The.Series.S04E05.HDTV.XviD-LOL", false)]
[TestCase("The.Series.S02E15.avi", false)]
[TestCase("The.Series.S02E15.xvid", false)]
[TestCase("The.Series.S02E15.divx", false)]
[TestCase("The.Series.S03E06.HDTV-WiDE", false)]
[TestCase("Series.S10E27.WS.DSR.XviD-2HD", false)]
[TestCase("[HorribleSubs] The Series - 32 [480p]", false)]
[TestCase("[CR] The Series - 004 [480p][48CE2D0F]", false)]
[TestCase("[Hatsuyuki] The Series - 363 [848x480][ADE35E38]", false)]
[TestCase("The.Series.S03.TVRip.XviD-NOGRP", false)]
[TestCase("[HorribleSubs] The Series - 03 [360p].mkv", false)]
public void should_parse_sdtv_quality(string title, bool proper)
{
ParseAndVerifyQuality(title, Quality.SDTV, proper);
}
[TestCase("The.Shield.S01E13.NTSC.x264-CtrlSD", false)]
[TestCase("The.Girls.Next.Door.S03E06.DVDRip.XviD-WiDE", false)]
[TestCase("The.Girls.Next.Door.S03E06.DVD.Rip.XviD-WiDE", false)]
[TestCase("the.shield.1x13.circles.ws.xvidvd-tns", false)]
[TestCase("the_x-files.9x18.sunshine_days.ac3.ws_dvdrip_xvid-fov.avi", false)]
[TestCase("[FroZen] Miyuki - 23 [DVD][7F6170E6]", false)]
[TestCase("[AniDL] Vandread - 26 -[360p][DVD][D - A][Exiled - Destiny]", false)]
[TestCase("The.Series.S01E13.NTSC.x264-CtrlSD", false)]
[TestCase("The.Series.S03E06.DVDRip.XviD-WiDE", false)]
[TestCase("The.Series.S03E06.DVD.Rip.XviD-WiDE", false)]
[TestCase("the.Series.1x13.circles.ws.xvidvd-tns", false)]
[TestCase("the_Series.9x18.sunshine_days.ac3.ws_dvdrip_xvid-fov.avi", false)]
[TestCase("[FroZen] Series - 23 [DVD][7F6170E6]", false)]
[TestCase("[AniDL] Series - 26 -[360p][DVD][D - A][Exiled - Destiny]", false)]
public void should_parse_dvd_quality(string title, bool proper)
{
ParseAndVerifyQuality(title, Quality.DVD, proper);
}
[TestCase("Elementary.S01E10.The.Leviathan.480p.WEB-DL.x264-mSD", false)]
[TestCase("Glee.S04E10.Glee.Actually.480p.WEB-DL.x264-mSD", false)]
[TestCase("The.Big.Bang.Theory.S06E11.The.Santa.Simulation.480p.WEB-DL.x264-mSD", false)]
[TestCase("Da.Vincis.Demons.S02E04.480p.WEB.DL.nSD.x264-NhaNc3", false)]
[TestCase("Incorporated.S01E08.Das.geloeschte.Ich.German.Dubbed.DL.AmazonHD.x264-TVS", false)]
[TestCase("Haters.Back.Off.S01E04.Rod.Trip.mit.meinem.Onkel.German.DL.NetflixUHD.x264", false)]
[TestCase("The.Series.S01E10.The.Leviathan.480p.WEB-DL.x264-mSD", false)]
[TestCase("The.Series.S04E10.Glee.Actually.480p.WEB-DL.x264-mSD", false)]
[TestCase("The.SeriesS06E11.The.Santa.Simulation.480p.WEB-DL.x264-mSD", false)]
[TestCase("The.Series.S02E04.480p.WEB.DL.nSD.x264-NhaNc3", false)]
[TestCase("The.Series.S01E08.Das.geloeschte.Ich.German.Dubbed.DL.AmazonHD.x264-TVS", false)]
[TestCase("The.Series.S01E04.Rod.Trip.mit.meinem.Onkel.German.DL.NetflixUHD.x264", false)]
[TestCase("[HorribleSubs] Series Title! S01 [Web][MKV][h264][480p][AAC 2.0][Softsubs (HorribleSubs)]", false)]
public void should_parse_webdl480p_quality(string title, bool proper)
{
ParseAndVerifyQuality(title, Quality.WEBDL480p, proper);
}
[TestCase("WEEDS.S03E01-06.DUAL.XviD.Bluray.AC3-REPACK.-HELLYWOOD.avi", true)]
[TestCase("WEEDS.S03E01-06.DUAL.BDRip.XviD.AC3.-HELLYWOOD", false)]
[TestCase("WEEDS.S03E01-06.DUAL.BDRip.X-viD.AC3.-HELLYWOOD", false)]
[TestCase("WEEDS.S03E01-06.DUAL.BDRip.AC3.-HELLYWOOD", false)]
[TestCase("WEEDS.S03E01-06.DUAL.BDRip.XviD.AC3.-HELLYWOOD.avi", false)]
[TestCase("WEEDS.S03E01-06.DUAL.XviD.Bluray.AC3.-HELLYWOOD.avi", false)]
[TestCase("Hannibal.S01E05.576p.BluRay.DD5.1.x264-HiSD", false)]
[TestCase("Hannibal.S01E05.480p.BluRay.DD5.1.x264-HiSD", false)]
[TestCase("Heidi Girl of the Alps (BD)(640x480(RAW) (BATCH 1) (1-13)", false)]
[TestCase("[Doki] Clannad - 02 (848x480 XviD BD MP3) [95360783]", false)]
[TestCase("SERIES.S03E01-06.DUAL.XviD.Bluray.AC3-REPACK.-HELLYWOOD.avi", true)]
[TestCase("SERIES.S03E01-06.DUAL.BDRip.XviD.AC3.-HELLYWOOD", false)]
[TestCase("SERIES.S03E01-06.DUAL.BDRip.X-viD.AC3.-HELLYWOOD", false)]
[TestCase("SERIES.S03E01-06.DUAL.BDRip.AC3.-HELLYWOOD", false)]
[TestCase("SERIES.S03E01-06.DUAL.BDRip.XviD.AC3.-HELLYWOOD.avi", false)]
[TestCase("SERIES.S03E01-06.DUAL.XviD.Bluray.AC3.-HELLYWOOD.avi", false)]
[TestCase("The.Series.S01E05.576p.BluRay.DD5.1.x264-HiSD", false)]
[TestCase("The.Series.S01E05.480p.BluRay.DD5.1.x264-HiSD", false)]
[TestCase("The Series (BD)(640x480(RAW) (BATCH 1) (1-13)", false)]
[TestCase("[Doki] Series - 02 (848x480 XviD BD MP3) [95360783]", false)]
public void should_parse_bluray480p_quality(string title, bool proper)
{
ParseAndVerifyQuality(title, Quality.Bluray480p, proper);
}
[TestCase("Clarissa.Explains.It.All.S02E10.480p.HULU.WEBRip.x264-Puffin", false)]
[TestCase("Duck.Dynasty.S10E14.Techs.And.Balances.480p.AE.WEBRip.AAC2.0.x264-SEA", false)]
[TestCase("The.Series.S02E10.480p.HULU.WEBRip.x264-Puffin", false)]
[TestCase("The.Series.S10E14.Techs.And.Balances.480p.AE.WEBRip.AAC2.0.x264-SEA", false)]
[TestCase("Series.Title.1x04.ITA.WEBMux.x264-NovaRip", false)]
public void should_parse_webrip480p_quality(string title, bool proper)
{
ParseAndVerifyQuality(title, Quality.WEBRip480p, proper);
}
[TestCase("Dexter - S01E01 - Title [HDTV]", false)]
[TestCase("Dexter - S01E01 - Title [HDTV-720p]", false)]
[TestCase("Pawn Stars S04E87 REPACK 720p HDTV x264 aAF", true)]
[TestCase("Sonny.With.a.Chance.S02E15.720p", false)]
[TestCase("Series - S01E01 - Title [HDTV]", false)]
[TestCase("Series - S01E01 - Title [HDTV-720p]", false)]
[TestCase("The Series S04E87 REPACK 720p HDTV x264 aAF", true)]
[TestCase("The.Series.S02E15.720p", false)]
[TestCase("S07E23 - [HDTV-720p].mkv ", false)]
[TestCase("Chuck - S22E03 - MoneyBART - HD TV.mkv", false)]
[TestCase("Series - S22E03 - MoneyBART - HD TV.mkv", false)]
[TestCase("S07E23.mkv ", false)]
[TestCase("Two.and.a.Half.Men.S08E05.720p.HDTV.X264-DIMENSION", false)]
[TestCase("Sonny.With.a.Chance.S02E15.mkv", false)]
[TestCase(@"E:\Downloads\tv\The.Big.Bang.Theory.S01E01.720p.HDTV\ajifajjjeaeaeqwer_eppj.avi", false)]
[TestCase("Gem.Hunt.S01E08.Tourmaline.Nepal.720p.HDTV.x264-DHD", false)]
[TestCase("[Underwater-FFF] No Game No Life - 01 (720p) [27AAA0A0]", false)]
[TestCase("[Doki] Mahouka Koukou no Rettousei - 07 (1280x720 Hi10P AAC) [80AF7DDE]", false)]
[TestCase("[Doremi].Yes.Pretty.Cure.5.Go.Go!.31.[1280x720].[C65D4B1F].mkv", false)]
[TestCase("[HorribleSubs]_Fairy_Tail_-_145_[720p]", false)]
[TestCase("[Eveyuu] No Game No Life - 10 [Hi10P 1280x720 H264][10B23BD8]", false)]
[TestCase("Hells.Kitchen.US.S12E17.HR.WS.PDTV.X264-DIMENSION", false)]
[TestCase("Survivorman.The.Lost.Pilots.Summer.HR.WS.PDTV.x264-DHD", false)]
[TestCase("Victoria S01E07 - Motor zmen (CZ)[TvRip][HEVC][720p]", false)]
[TestCase("flashpoint.S05E06.720p.HDTV.x264-FHD", false)]
[TestCase("The.Series.S08E05.720p.HDTV.X264-DIMENSION", false)]
[TestCase("The.Series.S02E15.mkv", false)]
[TestCase(@"E:\Downloads\tv\The.Series.S01E01.720p.HDTV\ajifajjjeaeaeqwer_eppj.avi", false)]
[TestCase("The.Series.S01E08.Tourmaline.Nepal.720p.HDTV.x264-DHD", false)]
[TestCase("[Underwater-FFF] The Series - 01 (720p) [27AAA0A0]", false)]
[TestCase("[Doki] The Series - 07 (1280x720 Hi10P AAC) [80AF7DDE]", false)]
[TestCase("[Doremi].The.Series.5.Go.Go!.31.[1280x720].[C65D4B1F].mkv", false)]
[TestCase("[HorribleSubs]_Series_Title_-_145_[720p]", false)]
[TestCase("[Eveyuu] Series Title - 10 [Hi10P 1280x720 H264][10B23BD8]", false)]
[TestCase("The.Series.US.S12E17.HR.WS.PDTV.X264-DIMENSION", false)]
[TestCase("The.Series.The.Lost.Sonarr.Summer.HR.WS.PDTV.x264-DHD", false)]
[TestCase("The Series S01E07 - Motor zmen (CZ)[TvRip][HEVC][720p]", false)]
[TestCase("The.Series.S05E06.720p.HDTV.x264-FHD", false)]
[TestCase("Series.Title.1x01.ITA.720p.x264-RlsGrp [01/54] - \"series.title.1x01.ita.720p.x264-rlsgrp.nfo\"", false)]
public void should_parse_hdtv720p_quality(string title, bool proper)
{
ParseAndVerifyQuality(title, Quality.HDTV720p, proper);
}
[TestCase("Under the Dome S01E10 Let the Games Begin 1080p", false)]
[TestCase("DEXTER.S07E01.ARE.YOU.1080P.HDTV.X264-QCF", false)]
[TestCase("DEXTER.S07E01.ARE.YOU.1080P.HDTV.x264-QCF", false)]
[TestCase("DEXTER.S07E01.ARE.YOU.1080P.HDTV.proper.X264-QCF", true)]
[TestCase("Dexter - S01E01 - Title [HDTV-1080p]", false)]
[TestCase("[HorribleSubs] Yowamushi Pedal - 32 [1080p]", false)]
[TestCase("Victoria S01E07 - Motor zmen (CZ)[TvRip][HEVC][1080p]", false)]
[TestCase("Sword Art Online Alicization 04 vostfr FHD", false)]
[TestCase("Goblin Slayer 04 vostfr FHD.mkv", false)]
[TestCase("[Onii-ChanSub] SSSS.Gridman - 02 vostfr (FHD 1080p 10bits).mkv", false)]
[TestCase("[Miaou] Akanesasu Shoujo 02 VOSTFR FHD 10 bits", false)]
[TestCase("Under the Series S01E10 Let the Sonarr Begin 1080p", false)]
[TestCase("Series.S07E01.ARE.YOU.1080P.HDTV.X264-QCF", false)]
[TestCase("Series.S07E01.ARE.YOU.1080P.HDTV.x264-QCF", false)]
[TestCase("Series.S07E01.ARE.YOU.1080P.HDTV.proper.X264-QCF", true)]
[TestCase("Series - S01E01 - Title [HDTV-1080p]", false)]
[TestCase("[HorribleSubs] Series Title - 32 [1080p]", false)]
[TestCase("Series S01E07 - Sonarr zmen (CZ)[TvRip][HEVC][1080p]", false)]
[TestCase("The Online Series Alicization 04 vostfr FHD", false)]
[TestCase("Series Slayer 04 vostfr FHD.mkv", false)]
[TestCase("[Onii-ChanSub] The.Series - 02 vostfr (FHD 1080p 10bits).mkv", false)]
[TestCase("[Miaou] Series Title 02 VOSTFR FHD 10 bits", false)]
[TestCase("[mhastream.com]_Episode_05_FHD.mp4", false)]
[TestCase("[Kousei]_One_Piece_ - _609_[FHD][648A87C7].mp4", false)]
[TestCase("Presunto culpable 1x02 Culpabilidad [HDTV 1080i AVC MP2 2.0 Sub][GrupoHDS]", false)]
[TestCase("Cuéntame cómo pasó - 19x15 [344] Cuarenta años de baile [HDTV 1080i AVC MP2 2.0 Sub][GrupoHDS]", false)]
[TestCase("Super.Robot.Monkey.Team.Hyperforce.Go.S01E02.Depths.of.Fear.1080i.HDTV.DD5.1.H.264-NOGRP", false)]
[TestCase("[Kousei]_One_Series_ - _609_[FHD][648A87C7].mp4", false)]
[TestCase("Series culpable 1x02 Culpabilidad [HDTV 1080i AVC MP2 2.0 Sub][GrupoHDS]", false)]
[TestCase("Series cómo pasó - 19x15 [344] Cuarenta años de baile [HDTV 1080i AVC MP2 2.0 Sub][GrupoHDS]", false)]
[TestCase("Super.Seires.Go.S01E02.Depths.of.Sonarr.1080i.HDTV.DD5.1.H.264-NOGRP", false)]
public void should_parse_hdtv1080p_quality(string title, bool proper)
{
ParseAndVerifyQuality(title, Quality.HDTV1080p, proper);
@@ -171,28 +171,28 @@ namespace NzbDrone.Core.Test.ParserTests
ParseAndVerifyQuality(title, Quality.HDTV2160p, proper);
}
[TestCase("Vanguard S01E04 Mexicos Death Train 720p WEB DL", false)]
[TestCase("Hawaii Five 0 S02E21 720p WEB DL DD5 1 H 264", false)]
[TestCase("Castle S04E22 720p WEB DL DD5 1 H 264 NFHD", false)]
[TestCase("Chuck - S11E06 - D-Yikes! - 720p WEB-DL.mkv", false)]
[TestCase("Sonny.With.a.Chance.S02E15.720p.WEB-DL.DD5.1.H.264-SURFER", false)]
[TestCase("Series S01E04 Mexicos Death Train 720p WEB DL", false)]
[TestCase("Series Five 0 S02E21 720p WEB DL DD5 1 H 264", false)]
[TestCase("Series S04E22 720p WEB DL DD5 1 H 264 NFHD", false)]
[TestCase("Series - S11E06 - D-Yikes! - 720p WEB-DL.mkv", false)]
[TestCase("The.Series.S02E15.720p.WEB-DL.DD5.1.H.264-SURFER", false)]
[TestCase("S07E23 - [WEBDL].mkv ", false)]
[TestCase("Fringe S04E22 720p WEB-DL DD5.1 H264-EbP.mkv", false)]
[TestCase("House.S04.720p.Web-Dl.Dd5.1.h264-P2PACK", false)]
[TestCase("Da.Vincis.Demons.S02E04.720p.WEB.DL.nSD.x264-NhaNc3", false)]
[TestCase("CSI.Miami.S04E25.720p.iTunesHD.AVC-TVS", false)]
[TestCase("Castle.S06E23.720p.WebHD.h264-euHD", false)]
[TestCase("The.Nightly.Show.2016.03.14.720p.WEB.x264-spamTV", false)]
[TestCase("The.Nightly.Show.2016.03.14.720p.WEB.h264-spamTV", false)]
[TestCase("Incorporated.S01E08.Das.geloeschte.Ich.German.DD51.Dubbed.DL.720p.AmazonHD.x264-TVS", false)]
[TestCase("Marco.Polo.S01E11.One.Hundred.Eyes.2015.German.DD51.DL.720p.NetflixUHD.x264.NewUp.by.Wunschtante", false)]
[TestCase("Hush 2016 German DD51 DL 720p NetflixHD x264-TVS", false)]
[TestCase("Community.6x10.Basic.RV.Repair.and.Palmistry.ITA.ENG.720p.WEB-DLMux.H.264-GiuseppeTnT", false)]
[TestCase("Community.6x11.Modern.Espionage.ITA.ENG.720p.WEB.DLMux.H.264-GiuseppeTnT", false)]
[TestCase("The Walking Dead 2010 S09E13 [MKV / H.264 / AC3/AAC / WEB / Dual Áudio / Inglês / 720p]", false)]
[TestCase("into.the.badlands.s03e16.h264.720p-web-handbrake.mkv", false)]
[TestCase("BrainDead.S01E01.The.Insanity.Principle.720p.WEB-DL.DD5.1.H.264-BD", false)]
[TestCase("Jerks.S03E05.Griebnitzsee.German.720p.MaxdomeHD.AVC-TVS", false)]
[TestCase("Series S04E22 720p WEB-DL DD5.1 H264-EbP.mkv", false)]
[TestCase("Series.S04.720p.Web-Dl.Dd5.1.h264-P2PACK", false)]
[TestCase("Da.Series.Shows.S02E04.720p.WEB.DL.nSD.x264-NhaNc3", false)]
[TestCase("Series.Miami.S04E25.720p.iTunesHD.AVC-TVS", false)]
[TestCase("Series.S06E23.720p.WebHD.h264-euHD", false)]
[TestCase("Series.Title.2016.03.14.720p.WEB.x264-spamTV", false)]
[TestCase("Series.Title.2016.03.14.720p.WEB.h264-spamTV", false)]
[TestCase("Series.S01E08.Das.geloeschte.Ich.German.DD51.Dubbed.DL.720p.AmazonHD.x264-TVS", false)]
[TestCase("Series.Polo.S01E11.One.Hundred.Sonarrs.2015.German.DD51.DL.720p.NetflixUHD.x264.NewUp.by.Wunschtante", false)]
[TestCase("Series 2016 German DD51 DL 720p NetflixHD x264-TVS", false)]
[TestCase("Series.6x10.Basic.Sonarr.Repair.and.Replace.ITA.ENG.720p.WEB-DLMux.H.264-GiuseppeTnT", false)]
[TestCase("Series.6x11.Modern.Spy.ITA.ENG.720p.WEB.DLMux.H.264-GiuseppeTnT", false)]
[TestCase("The Series Was Dead 2010 S09E13 [MKV / H.264 / AC3/AAC / WEB / Dual Áudio / Inglês / 720p]", false)]
[TestCase("into.the.Series.s03e16.h264.720p-web-handbrake.mkv", false)]
[TestCase("Series.S01E01.The.Sonarr.Principle.720p.WEB-DL.DD5.1.H.264-BD", false)]
[TestCase("Series.S03E05.Griebnitzsee.German.720p.MaxdomeHD.AVC-TVS", false)]
[TestCase("[HorribleSubs] Series Title! S01 [Web][MKV][h264][720p][AAC 2.0][Softsubs (HorribleSubs)]", false)]
[TestCase("[HorribleSubs] Series Title! S01 [Web][MKV][h264][AAC 2.0][Softsubs (HorribleSubs)]", false)]
public void should_parse_webdl720p_quality(string title, bool proper)
@@ -200,37 +200,37 @@ namespace NzbDrone.Core.Test.ParserTests
ParseAndVerifyQuality(title, Quality.WEBDL720p, proper);
}
[TestCase("Arrested.Development.S04E01.720p.WEBRip.AAC2.0.x264-NFRiP", false)]
[TestCase("American.Gods.S01E07.A.Prayer.For.Mad.Sweeney.720p.AMZN.WEBRip.DD5.1.x264-NTb", false)]
[TestCase("LEGO.Star.Wars.The.Freemaker.Adventures.S07E01.A.New.Home.720p.DSNY.WEBRip.AAC2.0.x264-TVSmash", false)]
[TestCase("Series.Title.S04E01.720p.WEBRip.AAC2.0.x264-NFRiP", false)]
[TestCase("Series.Title.S01E07.A.Prayer.For.Mad.Sweeney.720p.AMZN.WEBRip.DD5.1.x264-NTb", false)]
[TestCase("Series.Title.S07E01.A.New.Home.720p.DSNY.WEBRip.AAC2.0.x264-TVSmash", false)]
[TestCase("Series.Title.1x04.ITA.720p.WEBMux.x264-NovaRip", false)]
public void should_parse_webrip720p_quality(string title, bool proper)
{
ParseAndVerifyQuality(title, Quality.WEBRip720p, proper);
}
[TestCase("CSI NY S09E03 1080p WEB DL DD5 1 H264 NFHD", false)]
[TestCase("Two and a Half Men S10E03 1080p WEB DL DD5 1 H 264 NFHD", false)]
[TestCase("Criminal.Minds.S08E01.1080p.WEB-DL.DD5.1.H264-NFHD", false)]
[TestCase("Its.Always.Sunny.in.Philadelphia.S08E01.1080p.WEB-DL.proper.AAC2.0.H.264", true)]
[TestCase("Two and a Half Men S10E03 1080p WEB DL DD5 1 H 264 REPACK NFHD", true)]
[TestCase("Glee.S04E09.Swan.Song.1080p.WEB-DL.DD5.1.H.264-ECI", false)]
[TestCase("The.Big.Bang.Theory.S06E11.The.Santa.Simulation.1080p.WEB-DL.DD5.1.H.264", false)]
[TestCase("Rosemary's.Baby.S01E02.Night.2.[WEBDL-1080p].mkv", false)]
[TestCase("The.Nightly.Show.2016.03.14.1080p.WEB.x264-spamTV", false)]
[TestCase("The.Nightly.Show.2016.03.14.1080p.WEB.h264-spamTV", false)]
[TestCase("Psych.S01.1080p.WEB-DL.AAC2.0.AVC-TrollHD", false)]
[TestCase("Series S09E03 1080p WEB DL DD5 1 H264 NFHD", false)]
[TestCase("Two and a Half Developers of the Series S10E03 1080p WEB DL DD5 1 H 264 NFHD", false)]
[TestCase("Series.S08E01.1080p.WEB-DL.DD5.1.H264-NFHD", false)]
[TestCase("Its.Always.Sonarrs.Fault.S08E01.1080p.WEB-DL.proper.AAC2.0.H.264", true)]
[TestCase("This is an Easter Egg S10E03 1080p WEB DL DD5 1 H 264 REPACK NFHD", true)]
[TestCase("Series.S04E09.Swan.Song.1080p.WEB-DL.DD5.1.H.264-ECI", false)]
[TestCase("The.Big.Easter.Theory.S06E11.The.Sonarr.Simulation.1080p.WEB-DL.DD5.1.H.264", false)]
[TestCase("Sonarr's.Baby.S01E02.Night.2.[WEBDL-1080p].mkv", false)]
[TestCase("Series.Title.2016.03.14.1080p.WEB.x264-spamTV", false)]
[TestCase("Series.Title.2016.03.14.1080p.WEB.h264-spamTV", false)]
[TestCase("Series.S01.1080p.WEB-DL.AAC2.0.AVC-TrollHD", false)]
[TestCase("Series Title S06E08 1080p WEB h264-EXCLUSIVE", false)]
[TestCase("Series Title S06E08 No One PROPER 1080p WEB DD5 1 H 264-EXCLUSIVE", true)]
[TestCase("Series Title S06E08 No One PROPER 1080p WEB H 264-EXCLUSIVE", true)]
[TestCase("The.Simpsons.S25E21.Pay.Pal.1080p.WEB-DL.DD5.1.H.264-NTb", false)]
[TestCase("Incorporated.S01E08.Das.geloeschte.Ich.German.DD51.Dubbed.DL.1080p.AmazonHD.x264-TVS", false)]
[TestCase("Death.Note.2017.German.DD51.DL.1080p.NetflixHD.x264-TVS", false)]
[TestCase("Played.S01E08.Pro.Gamer.1440p.BKPL.WEB-DL.H.264-LiGHT", false)]
[TestCase("Good.Luck.Charlie.S04E11.Teddy's.Choice.FHD.1080p.Web-DL", false)]
[TestCase("Outlander.S04E03.The.False.Bride.1080p.NF.WEB.DDP5.1.x264-NTb[rartv]", false)]
[TestCase("Legacies.S02E02.This.Year.Will.Be.Different.1080p.AMZN.WEB...", false)]
[TestCase("Legacies.S02E02.This.Year.Will.Be.Different.1080p.AMZN.WEB.", false)]
[TestCase("The.Series.S25E21.Pay.No1.1080p.WEB-DL.DD5.1.H.264-NTb", false)]
[TestCase("Series.S01E08.Das.geloeschte.Ich.German.DD51.Dubbed.DL.1080p.AmazonHD.x264-TVS", false)]
[TestCase("Death.Series.2017.German.DD51.DL.1080p.NetflixHD.x264-TVS", false)]
[TestCase("Series.S01E08.Pro.Gamer.1440p.BKPL.WEB-DL.H.264-LiGHT", false)]
[TestCase("Series.Title.S04E11.Teddy's.Choice.FHD.1080p.Web-DL", false)]
[TestCase("Series.S04E03.The.False.Bride.1080p.NF.WEB.DDP5.1.x264-NTb[rartv]", false)]
[TestCase("Series.Title.S02E02.This.Year.Will.Be.Different.1080p.AMZN.WEB...", false)]
[TestCase("Series.Title.S02E02.This.Year.Will.Be.Different.1080p.AMZN.WEB.", false)]
[TestCase("Series Title - S01E11 2020 1080p Viva MKV WEB", false)]
[TestCase("[HorribleSubs] Series Title! S01 [Web][MKV][h264][1080p][AAC 2.0][Softsubs (HorribleSubs)]", false)]
public void should_parse_webdl1080p_quality(string title, bool proper)
@@ -238,10 +238,10 @@ namespace NzbDrone.Core.Test.ParserTests
ParseAndVerifyQuality(title, Quality.WEBDL1080p, proper);
}
[TestCase("Arrested.Development.S04E01.iNTERNAL.1080p.WEBRip.x264-QRUS", false)]
[TestCase("Blue.Bloods.S07E20.1080p.AMZN.WEBRip.DDP5.1.x264-ViSUM ac3.(NLsub)", false)]
[TestCase("Better.Call.Saul.S03E09.1080p.NF.WEBRip.DD5.1.x264-ViSUM", false)]
[TestCase("The Walking Dead S09E13 1.54 GB WEB-RIP 1080p Dual-Audio 2019 MKV", false)]
[TestCase("Series.Title.S04E01.iNTERNAL.1080p.WEBRip.x264-QRUS", false)]
[TestCase("Series.Title.S07E20.1080p.AMZN.WEBRip.DDP5.1.x264-ViSUM ac3.(NLsub)", false)]
[TestCase("Series.Title.S03E09.1080p.NF.WEBRip.DD5.1.x264-ViSUM", false)]
[TestCase("The Series 42 S09E13 1.54 GB WEB-RIP 1080p Dual-Audio 2019 MKV", false)]
[TestCase("Series.Title.1x04.ITA.1080p.WEBMux.x264-NovaRip", false)]
[TestCase("Series.Title.2019.S02E07.Chapter.15.The.Believer.4Kto1080p.DSNYP.Webrip.x265.10bit.EAC3.5.1.Atmos.GokiTAoE", false)]
public void should_parse_webrip1080p_quality(string title, bool proper)
@@ -249,113 +249,113 @@ namespace NzbDrone.Core.Test.ParserTests
ParseAndVerifyQuality(title, Quality.WEBRip1080p, proper);
}
[TestCase("The.Nightly.Show.2016.03.14.2160p.WEB.x264-spamTV", false)]
[TestCase("The.Nightly.Show.2016.03.14.2160p.WEB.h264-spamTV", false)]
[TestCase("The.Nightly.Show.2016.03.14.2160p.WEB.PROPER.h264-spamTV", true)]
[TestCase("House.of.Cards.US.s05e13.4K.UHD.WEB.DL", false)]
[TestCase("House.of.Cards.US.s05e13.UHD.4K.WEB.DL", false)]
[TestCase("Series.Title.2016.03.14.2160p.WEB.x264-spamTV", false)]
[TestCase("Series.Title.2016.03.14.2160p.WEB.h264-spamTV", false)]
[TestCase("Series.Title.2016.03.14.2160p.WEB.PROPER.h264-spamTV", true)]
[TestCase("House.of.Sonarr.AK.s05e13.4K.UHD.WEB.DL", false)]
[TestCase("House.of.Sonarr.AK.s05e13.UHD.4K.WEB.DL", false)]
[TestCase("[HorribleSubs] Series Title! S01 [Web][MKV][h264][2160p][AAC 2.0][Softsubs (HorribleSubs)]", false)]
public void should_parse_webdl2160p_quality(string title, bool proper)
{
ParseAndVerifyQuality(title, Quality.WEBDL2160p, proper);
}
[TestCase("CASANOVA S01E01.2160P AMZN WEBRIP DD2.0 HI10P X264-TROLLUHD", false)]
[TestCase("JUST ADD MAGIC S01E01.2160P AMZN WEBRIP DD2.0 X264-TROLLUHD", false)]
[TestCase("The.Man.In.The.High.Castle.S01E01.2160p.AMZN.WEBRip.DD2.0.Hi10p.X264-TrollUHD", false)]
[TestCase("The Man In the High Castle S01E01 2160p AMZN WEBRip DD2.0 Hi10P x264-TrollUHD", false)]
[TestCase("House.of.Cards.US.S05E08.Chapter.60.2160p.NF.WEBRip.DD5.1.x264-NTb.NLsubs", false)]
[TestCase("Bill Nye Saves the World S01 2160p Netflix WEBRip DD5.1 x264-TrollUHD", false)]
[TestCase("Series S01E01.2160P AMZN WEBRIP DD2.0 HI10P X264-TROLLUHD", false)]
[TestCase("JUST ADD SONARR S01E01.2160P AMZN WEBRIP DD2.0 X264-TROLLUHD", false)]
[TestCase("The.Man.In.The.Series.S01E01.2160p.AMZN.WEBRip.DD2.0.Hi10p.X264-TrollUHD", false)]
[TestCase("The Man In the Series S01E01 2160p AMZN WEBRip DD2.0 Hi10P x264-TrollUHD", false)]
[TestCase("House.of.Sonarr.AK.S05E08.Chapter.60.2160p.NF.WEBRip.DD5.1.x264-NTb.NLsubs", false)]
[TestCase("Sonarr Saves the World S01 2160p Netflix WEBRip DD5.1 x264-TrollUHD", false)]
public void should_parse_webrip2160p_quality(string title, bool proper)
{
ParseAndVerifyQuality(title, Quality.WEBRip2160p, proper);
}
[TestCase("WEEDS.S03E01-06.DUAL.Bluray.AC3.-HELLYWOOD.avi", false)]
[TestCase("Chuck - S01E03 - Come Fly With Me - 720p BluRay.mkv", false)]
[TestCase("The Big Bang Theory.S03E01.The Electric Can Opener Fluctuation.m2ts", false)]
[TestCase("Revolution.S01E02.Chained.Heat.[Bluray720p].mkv", false)]
[TestCase("[FFF] DATE A LIVE - 01 [BD][720p-AAC][0601BED4]", false)]
[TestCase("[coldhell] Pupa v3 [BD720p][03192D4C]", false)]
[TestCase("[RandomRemux] Nobunagun - 01 [720p BD][043EA407].mkv", false)]
[TestCase("[Kaylith] Isshuukan Friends Specials - 01 [BD 720p AAC][B7EEE164].mkv", false)]
[TestCase("WEEDS.S03E01-06.DUAL.Blu-ray.AC3.-HELLYWOOD.avi", false)]
[TestCase("WEEDS.S03E01-06.DUAL.720p.Blu-ray.AC3.-HELLYWOOD.avi", false)]
[TestCase("[Elysium]Lucky.Star.01(BD.720p.AAC.DA)[0BB96AD8].mkv", false)]
[TestCase("Battlestar.Galactica.S01E01.33.720p.HDDVD.x264-SiNNERS.mkv", false)]
[TestCase("The.Expanse.S01E07.RERIP.720p.BluRay.x264-DEMAND", true)]
[TestCase("Sans.Laisser.De.Traces.FRENCH.720p.BluRay.x264-FHD", false)]
[TestCase("Orphan.Black.1x01.Selezione.Naturale.ITA.720p.BDMux.x264-NovaRip", false)]
[TestCase("SERIES.S03E01-06.DUAL.Bluray.AC3.-HELLYWOOD.avi", false)]
[TestCase("Series - S01E03 - Come Fly With Me - 720p BluRay.mkv", false)]
[TestCase("The Big Series.S03E01.The Sonarr Can Opener.m2ts", false)]
[TestCase("Series.S01E02.Chained.Sonarr.[Bluray720p].mkv", false)]
[TestCase("[FFF] DATE A Sonarr Dev - 01 [BD][720p-AAC][0601BED4]", false)]
[TestCase("[coldhell] Series v3 [BD720p][03192D4C]", false)]
[TestCase("[RandomRemux] Series - 01 [720p BD][043EA407].mkv", false)]
[TestCase("[Kaylith] Series Friends Specials - 01 [BD 720p AAC][B7EEE164].mkv", false)]
[TestCase("SERIES.S03E01-06.DUAL.Blu-ray.AC3.-HELLYWOOD.avi", false)]
[TestCase("SERIES.S03E01-06.DUAL.720p.Blu-ray.AC3.-HELLYWOOD.avi", false)]
[TestCase("[Elysium]Lucky.Series.01(BD.720p.AAC.DA)[0BB96AD8].mkv", false)]
[TestCase("Series.Galaxy.S01E01.33.720p.HDDVD.x264-SiNNERS.mkv", false)]
[TestCase("The.Series.S01E07.RERIP.720p.BluRay.x264-DEMAND", true)]
[TestCase("Sans.Series.De.Traces.FRENCH.720p.BluRay.x264-FHD", false)]
[TestCase("Series.Black.1x01.Selezione.Naturale.ITA.720p.BDMux.x264-NovaRip", false)]
public void should_parse_bluray720p_quality(string title, bool proper)
{
ParseAndVerifyQuality(title, Quality.Bluray720p, proper);
}
[TestCase("Chuck - S01E03 - Come Fly With Me - 1080p BluRay.mkv", false)]
[TestCase("Sons.Of.Anarchy.S02E13.1080p.BluRay.x264-AVCDVD", false)]
[TestCase("Revolution.S01E02.Chained.Heat.[Bluray1080p].mkv", false)]
[TestCase("[FFF] Namiuchigiwa no Muromi-san - 10 [BD][1080p-FLAC][0C4091AF]", false)]
[TestCase("[coldhell] Pupa v2 [BD1080p][5A45EABE].mkv", false)]
[TestCase("[Kaylith] Isshuukan Friends Specials - 01 [BD 1080p FLAC][429FD8C7].mkv", false)]
[TestCase("[Zurako] Log Horizon - 01 - The Apocalypse (BD 1080p AAC) [7AE12174].mkv", false)]
[TestCase("WEEDS.S03E01-06.DUAL.1080p.Blu-ray.AC3.-HELLYWOOD.avi", false)]
[TestCase("[Coalgirls]_Durarara!!_01_(1920x1080_Blu-ray_FLAC)_[8370CB8F].mkv", false)]
[TestCase("Planet.Earth.S01E11.Ocean.Deep.1080p.HD-DVD.DD.VC1-TRB", false)]
[TestCase("Spirited Away(2001) Bluray FHD Hi10P.mkv", false)]
[TestCase("V for Vendetta 2005 1080p UHD BluRay DD+7.1 x264-LoRD.mkv", false)]
[TestCase("Rise.Of.The.Planet.Of.The.Apes.2011.1080p.UHD.BluRay.DD5.1.HDR.x265-CtrlHD.mkv", false)]
[TestCase("Rise.Of.The.Planet.Of.The.Apes.2011.UHD.BluRay.DD5.1.HDR.x265-CtrlHD/ctrlhd-rotpota-1080p.mkv", false)]
[TestCase("Series - S01E03 - Come Fly With Me - 1080p BluRay.mkv", false)]
[TestCase("Sonarr.Of.Series.S02E13.1080p.BluRay.x264-AVCDVD", false)]
[TestCase("Series.S01E02.Chained.Heat.[Bluray1080p].mkv", false)]
[TestCase("[FFF] Series no Muromi-san - 10 [BD][1080p-FLAC][0C4091AF]", false)]
[TestCase("[coldhell] Series v2 [BD1080p][5A45EABE].mkv", false)]
[TestCase("[Kaylith] Series Friends Specials - 01 [BD 1080p FLAC][429FD8C7].mkv", false)]
[TestCase("[Zurako] Log Series - 01 - The Sonarr (BD 1080p AAC) [7AE12174].mkv", false)]
[TestCase("SERIES.S03E01-06.DUAL.1080p.Blu-ray.AC3.-HELLYWOOD.avi", false)]
[TestCase("[Coalgirls]_Series!!_01_(1920x1080_Blu-ray_FLAC)_[8370CB8F].mkv", false)]
[TestCase("Planet.Series.S01E11.Code.Deep.1080p.HD-DVD.DD.VC1-TRB", false)]
[TestCase("Series Away(2001) Bluray FHD Hi10P.mkv", false)]
[TestCase("S for Series 2005 1080p UHD BluRay DD+7.1 x264-LoRD.mkv", false)]
[TestCase("Series.Title.2011.1080p.UHD.BluRay.DD5.1.HDR.x265-CtrlHD.mkv", false)]
[TestCase("Series.Title.2011.UHD.BluRay.DD5.1.HDR.x265-CtrlHD/ctrlhd-rotpota-1080p.mkv", false)]
public void should_parse_bluray1080p_quality(string title, bool proper)
{
ParseAndVerifyQuality(title, Quality.Bluray1080p, proper);
}
[TestCase("Yuri!!! on ICE - S01E12[JP BD Remux][ENG subs]", false)]
[TestCase("Agents.of.S.H.I.E.L.D.S01E08.The.Well.BluRay.1080p.AVC.DTS-HD.MA.5.1.REMUX-FraMeSToR", false)]
[TestCase("Miami.Vice.2x11.Nato.Per.La.Truffa.Bluray.Remux.AVC.1080p.AC3.ITA", false)]
[TestCase("Miami.Vice.2x11.Nato.Per.La.Truffa.Bluray.Remux.AVC.AC3.ITA", false)]
[TestCase("Arrow.S03E01.The.Calm.1080p.DTS-HD.MA.5.1.AVC.REMUX-FraMeSToR", false)]
[TestCase("Series!!! on ICE - S01E12[JP BD Remux][ENG subs]", false)]
[TestCase("Series.Title.S01E08.The.Well.BluRay.1080p.AVC.DTS-HD.MA.5.1.REMUX-FraMeSToR", false)]
[TestCase("Series.Title.2x11.Nato.Per.La.Truffa.Bluray.Remux.AVC.1080p.AC3.ITA", false)]
[TestCase("Series.Title.2x11.Nato.Per.La.Truffa.Bluray.Remux.AVC.AC3.ITA", false)]
[TestCase("Series.Title.S03E01.The.Calm.1080p.DTS-HD.MA.5.1.AVC.REMUX-FraMeSToR", false)]
public void should_parse_bluray1080p_remux_quality(string title, bool proper)
{
ParseAndVerifyQuality(title, Quality.Bluray1080pRemux, proper);
}
[TestCase("House.of.Cards.US.s05e13.4K.UHD.Bluray", false)]
[TestCase("House.of.Cards.US.s05e13.UHD.4K.Bluray", false)]
[TestCase("[DameDesuYo] Backlog Bundle - Part 1 (BD 4K 8bit FLAC)", false)]
[TestCase("X-Men.Days.of.Future.Past.2014.2160p.UHD.BluRay.X265-IAMABLE.mkv", false)]
[TestCase("Series.Title.US.s05e13.4K.UHD.Bluray", false)]
[TestCase("Series.Title.US.s05e13.UHD.4K.Bluray", false)]
[TestCase("[DameDesuYo] Series Bundle - Part 1 (BD 4K 8bit FLAC)", false)]
[TestCase("Series.Title.2014.2160p.UHD.BluRay.X265-IAMABLE.mkv", false)]
public void should_parse_bluray2160p_quality(string title, bool proper)
{
ParseAndVerifyQuality(title, Quality.Bluray2160p, proper);
}
[TestCase("Yuri!!! on ICE - S01E12[JP BD 2160p Remux][ENG subs]", false)]
[TestCase("Agents.of.S.H.I.E.L.D.S01E08.The.Well.BluRay.2160p.AVC.DTS-HD.MA.5.1.REMUX-FraMeSToR", false)]
[TestCase("Miami.Vice.2x11.Nato.Per.La.Truffa.Bluray.Remux.AVC.2160p.AC3.ITA", false)]
[TestCase("[Dolby Vision] Game.of.Thrones.S07.MULTi.UHD.BLURAY.REMUX.DV-NoTag", false)]
[TestCase("Series!!! on ICE - S01E12[JP BD 2160p Remux][ENG subs]", false)]
[TestCase("Series.Title.S01E08.The.Sonarr.BluRay.2160p.AVC.DTS-HD.MA.5.1.REMUX-FraMeSToR", false)]
[TestCase("Series.Title.2x11.Nato.Per.The.Sonarr.Bluray.Remux.AVC.2160p.AC3.ITA", false)]
[TestCase("[Dolby Vision] Sonarr.of.Series.S07.MULTi.UHD.BLURAY.REMUX.DV-NoTag", false)]
public void should_parse_bluray2160p_remux_quality(string title, bool proper)
{
ParseAndVerifyQuality(title, Quality.Bluray2160pRemux, proper);
}
[TestCase("POI S02E11 1080i HDTV DD5.1 MPEG2-TrollHD", false)]
[TestCase("How I Met Your Mother S01E18 Nothing Good Happens After 2 A.M. 720p HDTV DD5.1 MPEG2-TrollHD", false)]
[TestCase("The Voice S01E11 The Finals 1080i HDTV DD5.1 MPEG2-TrollHD", false)]
[TestCase("Californication.S07E11.1080i.HDTV.DD5.1.MPEG2-NTb.ts", false)]
[TestCase("Game of Thrones S04E10 1080i HDTV MPEG2 DD5.1-CtrlHD.ts", false)]
[TestCase("VICE.S02E05.1080i.HDTV.DD2.0.MPEG2-NTb.ts", false)]
[TestCase("How I Met Your Developer S01E18 Nothing Good Happens After Sonarr 720p HDTV DD5.1 MPEG2-TrollHD", false)]
[TestCase("The Series S01E11 The Finals 1080i HDTV DD5.1 MPEG2-TrollHD", false)]
[TestCase("Series.Title.S07E11.1080i.HDTV.DD5.1.MPEG2-NTb.ts", false)]
[TestCase("Game of Series S04E10 1080i HDTV MPEG2 DD5.1-CtrlHD.ts", false)]
[TestCase("Series.Title.S02E05.1080i.HDTV.DD2.0.MPEG2-NTb.ts", false)]
[TestCase("Show - S03E01 - Episode Title Raw-HD.ts", false)]
[TestCase("Saturday.Night.Live.Vintage.S10E09.Eddie.Murphy.The.Honeydrippers.1080i.UPSCALE.HDTV.DD5.1.MPEG2-zebra", false)]
[TestCase("The.Colbert.Report.2011-08-04.1080i.HDTV.MPEG-2-CtrlHD", false)]
[TestCase("Series.Title.S10E09.Title.1080i.UPSCALE.HDTV.DD5.1.MPEG2-zebra", false)]
[TestCase("Series.Title.2011-08-04.1080i.HDTV.MPEG-2-CtrlHD", false)]
public void should_parse_raw_quality(string title, bool proper)
{
ParseAndVerifyQuality(title, Quality.RAWHD, proper);
}
[TestCase("Sonny.With.a.Chance.S02E15", false)]
[TestCase("Law & Order: Special Victims Unit - 11x11 - Quickie", false)]
[TestCase("The.Series.S02E15", false)]
[TestCase("Series.Title - 11x11 - Title", false)]
[TestCase("Series.Title.S01E01.webm", false)]
[TestCase("Droned.S01E01.The.Web.MT-dd", false)]
[TestCase("Series.Title.S01E01.The.Web.MT-dd", false)]
public void quality_parse(string title, bool proper)
{
ParseAndVerifyQuality(title, Quality.Unknown, proper);
@@ -380,8 +380,8 @@ namespace NzbDrone.Core.Test.ParserTests
}
}
[TestCase("Dexter - S01E01 - Title [HDTV-1080p]")]
[TestCase("Saturday.Night.Live.Vintage.S10E09.Eddie.Murphy.The.Honeydrippers.1080i.UPSCALE.HDTV.DD5.1.MPEG2-zebra")]
[TestCase("Series - S01E01 - Title [HDTV-1080p]")]
[TestCase("Series.Title.S10E09.Episode.Title.1080i.UPSCALE.HDTV.DD5.1.MPEG2-zebra")]
[TestCase("Series.Title.S01E01.Bluray720p")]
[TestCase("Series.Title.S01E01.Bluray1080p")]
[TestCase("Series.Title.S01E01.Bluray2160p")]
@@ -397,7 +397,7 @@ namespace NzbDrone.Core.Test.ParserTests
result.ResolutionDetectionSource.Should().Be(QualityDetectionSource.Name);
}
[TestCase("[CR] Sailor Moon - 004 [480p][48CE2D0F]")]
[TestCase("[CR] Series Title - 004 [480p][48CE2D0F]")]
[TestCase("Series.Title.S01E01.848x480")]
[TestCase("Series.Title.S01E01.1280x720")]
[TestCase("Series.Title.S01E01.1920x1080")]
@@ -409,7 +409,7 @@ namespace NzbDrone.Core.Test.ParserTests
result.ResolutionDetectionSource.Should().Be(QualityDetectionSource.Name);
}
[TestCase("White.Van.Man.2011.S02E01.WS.PDTV.x264-REPACK-TLA")]
[TestCase("Series.Title.2011.S02E01.WS.PDTV.x264-REPACK-TLA")]
[TestCase("Series.Title.S01E01.Bluray")]
[TestCase("Series.Title.S01E01.HD.TV")]
[TestCase("Series.Title.S01E01.SD.TV")]
@@ -421,10 +421,10 @@ namespace NzbDrone.Core.Test.ParserTests
result.ResolutionDetectionSource.Should().Be(QualityDetectionSource.Unknown);
}
[TestCase("Revolution.S01E02.Chained.Heat.mkv")]
[TestCase("Dexter - S01E01 - Title.avi")]
[TestCase("the_x-files.9x18.sunshine_days.avi")]
[TestCase("[CR] Sailor Moon - 004 [48CE2D0F].avi")]
[TestCase("Series.Title.S01E02.Chained.Heat.mkv")]
[TestCase("Series - S01E01 - Title.avi")]
[TestCase("Series.Title.9x18.sunshine_days.avi")]
[TestCase("[CR] Series Title - 004 [48CE2D0F].avi")]
public void should_parse_quality_from_extension(string title)
{
var result = QualityParser.ParseQuality(title);
@@ -433,8 +433,8 @@ namespace NzbDrone.Core.Test.ParserTests
result.ResolutionDetectionSource.Should().Be(QualityDetectionSource.Extension);
}
[TestCase("Revolution.S01E02.Chained.Heat.1080p.mkv")]
[TestCase("Dexter - S01E01 - Title.720p.avi")]
[TestCase("Series.Title.S01E02.Chained.Heat.1080p.mkv")]
[TestCase("Series - S01E01 - Title.720p.avi")]
public void should_parse_resolution_from_name_and_source_from_extension(string title)
{
var result = QualityParser.ParseQuality(title);
@@ -446,7 +446,7 @@ namespace NzbDrone.Core.Test.ParserTests
[TestCase("Series Title S04E87 REPACK 720p HDTV x264 aAF", true)]
[TestCase("Series.Title.S04E87.REPACK.720p.HDTV.x264-aAF", true)]
[TestCase("Series.Title.S04E87.PROPER.720p.HDTV.x264-aAF", false)]
[TestCase("The.Expanse.S01E07.RERIP.720p.BluRay.x264-DEMAND", true)]
[TestCase("Series.Title.S01E07.RERIP.720p.BluRay.x264-DEMAND", true)]
public void should_be_able_to_parse_repack(string title, bool isRepack)
{
var result = QualityParser.ParseQuality(title);

View File

@@ -7,32 +7,32 @@ namespace NzbDrone.Core.Test.ParserTests
[TestFixture]
public class ReleaseGroupParserFixture : CoreTest
{
[TestCase("Castle.2009.S01E14.English.HDTV.XviD-LOL", "LOL")]
[TestCase("Castle 2009 S01E14 English HDTV XviD LOL", null)]
[TestCase("Acropolis Now S05 EXTRAS DVDRip XviD RUNNER", null)]
[TestCase("Punky.Brewster.S01.EXTRAS.DVDRip.XviD-RUNNER", "RUNNER")]
[TestCase("2020.NZ.2011.12.02.PDTV.XviD-C4TV", "C4TV")]
[TestCase("The.Office.S03E115.DVDRip.XviD-OSiTV", "OSiTV")]
[TestCase("The Office - S01E01 - Pilot [HTDV-480p]", null)]
[TestCase("The Office - S01E01 - Pilot [HTDV-720p]", null)]
[TestCase("The Office - S01E01 - Pilot [HTDV-1080p]", null)]
[TestCase("The.Walking.Dead.S04E13.720p.WEB-DL.AAC2.0.H.264-Cyphanix", "Cyphanix")]
[TestCase("Arrow.S02E01.720p.WEB-DL.DD5.1.H.264.mkv", null)]
[TestCase("Series.2009.S01E14.English.HDTV.XviD-LOL", "LOL")]
[TestCase("Series 2009 S01E14 English HDTV XviD LOL", null)]
[TestCase("Series Now S05 EXTRAS DVDRip XviD RUNNER", null)]
[TestCase("Series.Title.S01.EXTRAS.DVDRip.XviD-RUNNER", "RUNNER")]
[TestCase("2020.Series.2011.12.02.PDTV.XviD-C4TV", "C4TV")]
[TestCase("The.Series.S03E115.DVDRip.XviD-OSiTV", "OSiTV")]
[TestCase("Series Title - S01E01 - Pilot [HTDV-480p]", null)]
[TestCase("Series Title - S01E01 - Pilot [HTDV-720p]", null)]
[TestCase("Series Title - S01E01 - Pilot [HTDV-1080p]", null)]
[TestCase("The.Series.Title.S04E13.720p.WEB-DL.AAC2.0.H.264-Cyphanix", "Cyphanix")]
[TestCase("Series.S02E01.720p.WEB-DL.DD5.1.H.264.mkv", null)]
[TestCase("Series Title S01E01 Episode Title", null)]
[TestCase("The Colbert Report - 2014-06-02 - Thomas Piketty.mkv", null)]
[TestCase("Real Time with Bill Maher S12E17 May 23, 2014.mp4", null)]
[TestCase("The Series Title - 2014-06-02 - Thomas Piketty.mkv", null)]
[TestCase("The Series Title S12E17 May 23, 2014.mp4", null)]
[TestCase("Reizen Waes - S01E08 - Transistri\u00EB, Zuid-Osseti\u00EB en Abchazi\u00EB SDTV.avi", null)]
[TestCase("Simpsons 10x11 - Wild Barts Cant Be Broken [rl].avi", "rl")]
[TestCase("[ www.Torrenting.com ] - Revenge.S03E14.720p.HDTV.X264-DIMENSION", "DIMENSION")]
[TestCase("Seed S02E09 HDTV x264-2HD [eztv]-[rarbg.com]", "2HD")]
[TestCase("7s-atlantis-s02e01-720p.mkv", null)]
[TestCase("The.Middle.S09E13.720p.HEVC.x265-MeGusta-Pre", "MeGusta")]
[TestCase("The Series Title 10x11 - Wild Devs Cant Be Broken [rl].avi", "rl")]
[TestCase("[ www.Torrenting.com ] - Series.S03E14.720p.HDTV.X264-DIMENSION", "DIMENSION")]
[TestCase("Series S02E09 HDTV x264-2HD [eztv]-[rarbg.com]", "2HD")]
[TestCase("7s-Series-s02e01-720p.mkv", null)]
[TestCase("The.Series.S09E13.720p.HEVC.x265-MeGusta-Pre", "MeGusta")]
[TestCase("Series Title - S01E01 - Episode Title [RlsGroup]", "RlsGroup")]
[TestCase("Black Monday S01 E01-E02 1080p AMZN WEBRip DDP5.1 x264 monkee", null)]
[TestCase("Red Series S01 E01-E02 1080p AMZN WEBRip DDP5.1 x264 monkee", null)]
[TestCase("Series.Title.S01E05.The-Aniversary.WEBDL-1080p.mkv", null)]
[TestCase("Series.Title.S01E05.The-Aniversary.HDTV-1080p.mkv", null)]
[TestCase("Shameless US (2010) S04 (1080p BDRip x265 10bit DTS-HD MA 5 1 - WEM)[TAoE]",null)]
[TestCase("The.Expanse.S03E04.2160p.Amazon.WEBRip.DTS-HD.MA.5.1.x264",null)]
[TestCase("Series US (2010) S04 (1080p BDRip x265 10bit DTS-HD MA 5 1 - WEM)[TAoE]", null)]
[TestCase("The.Series.S03E04.2160p.Amazon.WEBRip.DTS-HD.MA.5.1.x264", null)]
[TestCase("SomeShow.S20E13.1080p.BluRay.DTS-X.MA.5.1.x264",null)]
[TestCase("SomeShow.S20E13.1080p.BluRay.DTS-MA.5.1.x264",null)]
[TestCase("SomeShow.S20E13.1080p.BluRay.DTS-ES.5.1.x264",null)]
@@ -46,55 +46,55 @@ namespace NzbDrone.Core.Test.ParserTests
[Test]
public void should_not_include_extension_in_release_group()
{
const string path = @"C:\Test\Doctor.Who.2005.s01e01.internal.bdrip.x264-archivist.mkv";
const string path = @"C:\Test\Doctor.Series.2005.s01e01.internal.bdrip.x264-archivist.mkv";
Parser.Parser.ParsePath(path).ReleaseGroup.Should().Be("archivist");
}
[TestCase("Marvels.Daredevil.S02E04.720p.WEBRip.x264-SKGTV English", "SKGTV")]
[TestCase("Marvels.Daredevil.S02E04.720p.WEBRip.x264-SKGTV_English", "SKGTV")]
[TestCase("Marvels.Daredevil.S02E04.720p.WEBRip.x264-SKGTV.English", "SKGTV")]
[TestCase("Series.Title.S02E04.720p.WEBRip.x264-SKGTV English", "SKGTV")]
[TestCase("Series.Title.S02E04.720p.WEBRip.x264-SKGTV_English", "SKGTV")]
[TestCase("Series.Title.S02E04.720p.WEBRip.x264-SKGTV.English", "SKGTV")]
//[TestCase("", "")]
public void should_not_include_language_in_release_group(string title, string expected)
{
Parser.Parser.ParseReleaseGroup(title).Should().Be(expected);
}
[TestCase("The.Longest.Mystery.S02E04.720p.WEB-DL.AAC2.0.H.264-EVL-RP", "EVL")]
[TestCase("The.Longest.Mystery.S02E04.720p.WEB-DL.AAC2.0.H.264-EVL-RP-RP", "EVL")]
[TestCase("The.Longest.Mystery.S02E04.720p.WEB-DL.AAC2.0.H.264-EVL-Obfuscated", "EVL")]
[TestCase("Lost.S04E04.720p.BluRay.x264-xHD-NZBgeek", "xHD")]
[TestCase("Blue.Bloods.S05E11.720p.HDTV.X264-DIMENSION-NZBgeek", "DIMENSION")]
[TestCase("Lost.S04E04.720p.BluRay.x264-xHD-1", "xHD")]
[TestCase("Blue.Bloods.S05E11.720p.HDTV.X264-DIMENSION-1", "DIMENSION")]
[TestCase("saturday.night.live.s40e11.kevin.hart_sia.720p.hdtv.x264-w4f-sample.mkv", "w4f")]
[TestCase("The.Sequel.2017.S05E02.1080p.WEB-DL.DD5.1.H264-EVL-Scrambled", "EVL")]
[TestCase("Ghosted.S01E08.Haunted.Hayride.720p.AMZN.WEBRip.DDP5.1.x264-NTb-postbot", "NTb")]
[TestCase("Ghosted.S01E08.Haunted.Hayride.720p.AMZN.WEBRip.DDP5.1.x264-NTb-xpost", "NTb")]
[TestCase("Blue.Bloods.S08E05.The.Forgotten.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTb-Rakuv", "NTb")]
[TestCase("The.Simpsons.S30E01.Barts.Not.Dead.1080p.AMZN.WEB-DL.DDP5.1.H264-QOQ-Rakuv02", "QOQ")]
[TestCase("Lie.To.Me.S01E13.720p.BluRay.x264-SiNNERS-Rakuvfinhel", "SiNNERS")]
[TestCase("Who.is.America.S01E01.INTERNAL.720p.HDTV.x264-aAF-RakuvUS-Obfuscated", "aAF")]
[TestCase("Deadly.Class.S01E10.Sink.With.California.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTG-WhiteRev", "NTG")]
[TestCase("The.Walking.Dead.S09E12.Guardians.REPACK.1080p.AMZN.WEB-DL.DD.5.1.H.264-CasStudio-BUYMORE", "CasStudio")]
[TestCase("2.Broke.Girls.S02E24.1080p.AMZN.WEBRip.DD5.1.x264-CasStudio-AsRequested", "CasStudio")]
[TestCase("Billions.S04E11.Lamster.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTb-AlternativeToRequested", "NTb")]
[TestCase("NCIS.S16E04.Third.Wheel.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTb-GEROV", "NTb")]
[TestCase("Will.and.Grace.S10E06.Kid.n.Play.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTb-Z0iDS3N", "NTb")]
[TestCase("Absolute.Power.S02E06.The.House.of.Lords.DVDRip.x264-MaG-Chamele0n", "MaG")]
[TestCase("The.Walking.Dead.S08E08.1080p.BluRay.x264-ROVERS-4P", "ROVERS")]
[TestCase("Stranger.Things.S01E02.720p.BluRay.X264-REWARD-4Planet", "REWARD")]
[TestCase("Vikings.S01E01.Rites.of.Passage.1080p.BluRay.x264-DON-AlteZachen", "DON")]
[TestCase("Series.Title.S02E04.720p.WEB-DL.AAC2.0.H.264-EVL-RP", "EVL")]
[TestCase("Series.Title.S02E04.720p.WEB-DL.AAC2.0.H.264-EVL-RP-RP", "EVL")]
[TestCase("Series.Title.S02E04.720p.WEB-DL.AAC2.0.H.264-EVL-Obfuscated", "EVL")]
[TestCase("Series.Title.S04E04.720p.BluRay.x264-xHD-NZBgeek", "xHD")]
[TestCase("Series.Title.S05E11.720p.HDTV.X264-DIMENSION-NZBgeek", "DIMENSION")]
[TestCase("Series.Title.S04E04.720p.BluRay.x264-xHD-1", "xHD")]
[TestCase("Series.Title.S05E11.720p.HDTV.X264-DIMENSION-1", "DIMENSION")]
[TestCase("series.title.s40e11.kevin.hart_sia.720p.hdtv.x264-w4f-sample.mkv", "w4f")]
[TestCase("The.Series.2017.S05E02.1080p.WEB-DL.DD5.1.H264-EVL-Scrambled", "EVL")]
[TestCase("Series.S01E08.Haunted.Hayride.720p.AMZN.WEBRip.DDP5.1.x264-NTb-postbot", "NTb")]
[TestCase("Series.S01E08.Haunted.Hayride.720p.AMZN.WEBRip.DDP5.1.x264-NTb-xpost", "NTb")]
[TestCase("Series.Title.S08E05.The.Forgotten.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTb-Rakuv", "NTb")]
[TestCase("The.Series.S30E01.Devs.Not.Dead.1080p.AMZN.WEB-DL.DDP5.1.H264-QOQ-Rakuv02", "QOQ")]
[TestCase("Lie.To.Developers.S01E13.720p.BluRay.x264-SiNNERS-Rakuvfinhel", "SiNNERS")]
[TestCase("Who.is.Sonarr.S01E01.INTERNAL.720p.HDTV.x264-aAF-RakuvUS-Obfuscated", "aAF")]
[TestCase("Deadly.Development.S01E10.Sink.With.Code.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTG-WhiteRev", "NTG")]
[TestCase("The.Sonarr.Series.S09E12.Developers.REPACK.1080p.AMZN.WEB-DL.DD.5.1.H.264-CasStudio-BUYMORE", "CasStudio")]
[TestCase("2.Tired.Developers.S02E24.1080p.AMZN.WEBRip.DD5.1.x264-CasStudio-AsRequested", "CasStudio")]
[TestCase("Series.S04E11.Lines.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTb-AlternativeToRequested", "NTb")]
[TestCase("Series.S16E04.Third.Wheel.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTb-GEROV", "NTb")]
[TestCase("Series.and.Title.S10E06.Dev.n.Play.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTb-Z0iDS3N", "NTb")]
[TestCase("Absolute.Series.S02E06.The.House.of.Sonarr.DVDRip.x264-MaG-Chamele0n", "MaG")]
[TestCase("The.Series.Title.S08E08.1080p.BluRay.x264-ROVERS-4P", "ROVERS")]
[TestCase("Series.Title.S01E02.720p.BluRay.X264-REWARD-4Planet", "REWARD")]
[TestCase("Series.S01E01.Rites.of.Passage.1080p.BluRay.x264-DON-AlteZachen", "DON")]
public void should_not_include_repost_in_release_group(string title, string expected)
{
Parser.Parser.ParseReleaseGroup(title).Should().Be(expected);
}
[TestCase("[FFF] Invaders of the Rokujouma!! - S01E11 - Someday, With Them", "FFF")]
[TestCase("[HorribleSubs] Invaders of the Rokujouma!! - S01E12 - Invasion Going Well!!", "HorribleSubs")]
[TestCase("[Anime-Koi] Barakamon - S01E06 - Guys From Tokyo", "Anime-Koi")]
[TestCase("[Anime-Koi] Barakamon - S01E07 - A High-Grade Fish", "Anime-Koi")]
[TestCase("[Anime-Koi] Kami-sama Hajimemashita 2 - 01 [h264-720p][28D54E2C]", "Anime-Koi")]
[TestCase("[FFF] Series Title!! - S01E11 - Someday, With Sonarr", "FFF")]
[TestCase("[HorribleSubs] Series Title!! - S01E12 - Sonarr Going Well!!", "HorribleSubs")]
[TestCase("[Anime-Koi] Series Title - S01E06 - Guys From Sonarr", "Anime-Koi")]
[TestCase("[Anime-Koi] Series Title - S01E07 - A High-Grade Sonarr", "Anime-Koi")]
[TestCase("[Anime-Koi] Series Title 2 - 01 [h264-720p][28D54E2C]", "Anime-Koi")]
//[TestCase("Tokyo.Ghoul.02x01.013.HDTV-720p-Anime-Koi", "Anime-Koi")]
//[TestCase("", "")]
public void should_parse_anime_release_groups(string title, string expected)

View File

@@ -7,11 +7,11 @@ namespace NzbDrone.Core.Test.ParserTests
[TestFixture]
public class SceneCheckerFixture
{
[TestCase("South.Park.S04E13.Helen.Keller.The.Musical.720p.WEBRip.AAC2.0.H.264-GC")]
[TestCase("Robot.Chicken.S07E02.720p.WEB-DL.DD5.1.H.264-pcsyndicate")]
[TestCase("Archer.2009.S05E06.Baby.Shower.720p.WEB-DL.DD5.1.H.264-iT00NZ")]
[TestCase("30.Rock.S04E17.720p.HDTV.X264-DIMENSION")]
[TestCase("30.Rock.S04.720p.HDTV.X264-DIMENSION")]
[TestCase("Series.Title.S04E13.Helen.Keller.The.Musical.720p.WEBRip.AAC2.0.H.264-GC")]
[TestCase("Series.Title.S07E02.720p.WEB-DL.DD5.1.H.264-pcsyndicate")]
[TestCase("Series.Title.2009.S05E06.Baby.Shower.720p.WEB-DL.DD5.1.H.264-iT00NZ")]
[TestCase("Series.Title.S04E17.720p.HDTV.X264-DIMENSION")]
[TestCase("Series.Title.S04.720p.HDTV.X264-DIMENSION")]
public void should_return_true_for_scene_names(string title)
{
SceneChecker.IsSceneTitle(title).Should().BeTrue();
@@ -22,10 +22,10 @@ namespace NzbDrone.Core.Test.ParserTests
[TestCase("S08E05 - Virtual In-Stanity.With.Dots [WEBDL-720p]")]
[TestCase("Something")]
[TestCase("86de66b7ef385e2fa56a3e41b98481ea1658bfab")]
[TestCase("30.Rock.S04E17.720p.HDTV.X264", Description = "no group")]
[TestCase("Series.Title.S04E17.720p.HDTV.X264", Description = "no group")]
[TestCase("S04E17.720p.HDTV.X264-DIMENSION", Description = "no series title")]
[TestCase("30.Rock.S04E17-DIMENSION", Description = "no quality")]
[TestCase("30.Rock.720p.HDTV.X264-DIMENSION", Description = "no episode")]
[TestCase("Series.Title.S04E17-DIMENSION", Description = "no quality")]
[TestCase("Series.Title.720p.HDTV.X264-DIMENSION", Description = "no episode")]
public void should_return_false_for_non_scene_names(string title)
{
SceneChecker.IsSceneTitle(title).Should().BeFalse();

View File

@@ -8,24 +8,24 @@ namespace NzbDrone.Core.Test.ParserTests
[TestFixture]
public class SeasonParserFixture : CoreTest
{
[TestCase("30.Rock.Season.04.HDTV.XviD-DIMENSION", "30 Rock", 4)]
[TestCase("Parks.and.Recreation.S02.720p.x264-DIMENSION", "Parks and Recreation", 2)]
[TestCase("The.Office.US.S03.720p.x264-DIMENSION", "The Office US", 3)]
[TestCase(@"Sons.of.Anarchy.S03.720p.BluRay-CLUE\REWARD", "Sons of Anarchy", 3)]
[TestCase("Adventure Time S02 720p HDTV x264 CRON", "Adventure Time", 2)]
[TestCase("Sealab.2021.S04.iNTERNAL.DVDRip.XviD-VCDVaULT", "Sealab 2021", 4)]
[TestCase("Hawaii Five 0 S01 720p WEB DL DD5 1 H 264 NT", "Hawaii Five 0", 1)]
[TestCase("30 Rock S03 WS PDTV XviD FUtV", "30 Rock", 3)]
[TestCase("The Office Season 4 WS PDTV XviD FUtV", "The Office", 4)]
[TestCase("Eureka Season 1 720p WEB DL DD 5 1 h264 TjHD", "Eureka", 1)]
[TestCase("The Office Season4 WS PDTV XviD FUtV", "The Office", 4)]
[TestCase("Eureka S 01 720p WEB DL DD 5 1 h264 TjHD", "Eureka", 1)]
[TestCase("Doctor Who Confidential Season 3", "Doctor Who Confidential", 3)]
[TestCase("Fleming.S01.720p.WEBDL.DD5.1.H.264-NTb", "Fleming", 1)]
[TestCase("Holmes.Makes.It.Right.S02.720p.HDTV.AAC5.1.x265-NOGRP", "Holmes Makes It Right", 2)]
[TestCase("30.Series.Season.04.HDTV.XviD-DIMENSION", "30 Series", 4)]
[TestCase("Sonarr.and.Series.S02.720p.x264-DIMENSION", "Sonarr and Series", 2)]
[TestCase("The.Series.US.S03.720p.x264-DIMENSION", "The Series US", 3)]
[TestCase(@"Series.of.Sonarr.S03.720p.BluRay-CLUE\REWARD", "Series of Sonarr", 3)]
[TestCase("Series Time S02 720p HDTV x264 CRON", "Series Time", 2)]
[TestCase("Series.2021.S04.iNTERNAL.DVDRip.XviD-VCDVaULT", "Series 2021", 4)]
[TestCase("Series Five 0 S01 720p WEB DL DD5 1 H 264 NT", "Series Five 0", 1)]
[TestCase("30 Series S03 WS PDTV XviD FUtV", "30 Series", 3)]
[TestCase("The Series Season 4 WS PDTV XviD FUtV", "The Series", 4)]
[TestCase("Series Season 1 720p WEB DL DD 5 1 h264 TjHD", "Series", 1)]
[TestCase("The Series Season4 WS PDTV XviD FUtV", "The Series", 4)]
[TestCase("Series S 01 720p WEB DL DD 5 1 h264 TjHD", "Series", 1)]
[TestCase("Series Confidential Season 3", "Series Confidential", 3)]
[TestCase("Series.S01.720p.WEBDL.DD5.1.H.264-NTb", "Series", 1)]
[TestCase("Series.Makes.It.Right.S02.720p.HDTV.AAC5.1.x265-NOGRP", "Series Makes It Right", 2)]
[TestCase("My.Series.S2014.720p.HDTV.x264-ME", "My Series", 2014)]
[TestCase("Velvet.Saison3.VOSTFR.HDTV.XviD-NOTAG", "Velvet", 3)]
[TestCase("Watatatov.SAISON.1.VFQ.PDTV.H264-ACC-ROLLED", "Watatatov", 1)]
[TestCase("Series.Saison3.VOSTFR.HDTV.XviD-NOTAG", "Series", 3)]
[TestCase("Series.SAISON.1.VFQ.PDTV.H264-ACC-ROLLED", "Series", 1)]
public void should_parse_full_season_release(string postTitle, string title, int season)
{
var result = Parser.Parser.ParseTitle(postTitle);
@@ -36,11 +36,11 @@ namespace NzbDrone.Core.Test.ParserTests
result.FullSeason.Should().BeTrue();
}
[TestCase("Acropolis Now S05 EXTRAS DVDRip XviD RUNNER", "Acropolis Now", 5)]
[TestCase("Punky Brewster S01 EXTRAS DVDRip XviD RUNNER", "Punky Brewster", 1)]
[TestCase("Instant Star S03 EXTRAS DVDRip XviD OSiTV", "Instant Star", 3)]
[TestCase("The.Flash.S03.Extras.01.Deleted.Scenes.720p", "The Flash", 3)]
[TestCase("The.Flash.S03.Extras.02.720p", "The Flash", 3)]
[TestCase("Acropolis Series S05 EXTRAS DVDRip XviD RUNNER", "Acropolis Series", 5)]
[TestCase("Punky Series S01 EXTRAS DVDRip XviD RUNNER", "Punky Series", 1)]
[TestCase("Instant Series S03 EXTRAS DVDRip XviD OSiTV", "Instant Series", 3)]
[TestCase("The.Series.S03.Extras.01.Deleted.Scenes.720p", "The Series", 3)]
[TestCase("The.Series.S03.Extras.02.720p", "The Series", 3)]
public void should_parse_season_extras(string postTitle, string title, int season)
{
var result = Parser.Parser.ParseTitle(postTitle);
@@ -52,9 +52,9 @@ namespace NzbDrone.Core.Test.ParserTests
result.IsSeasonExtra.Should().BeTrue();
}
[TestCase("Lie.to.Me.S03.SUBPACK.DVDRip.XviD-REWARD", "Lie to Me", 3)]
[TestCase("The.Middle.S02.SUBPACK.DVDRip.XviD-REWARD", "The Middle", 2)]
[TestCase("CSI.S11.SUBPACK.DVDRip.XviD-REWARD", "CSI", 11)]
[TestCase("Series.to.Me.S03.SUBPACK.DVDRip.XviD-REWARD", "Series to Me", 3)]
[TestCase("The.Series.S02.SUBPACK.DVDRip.XviD-REWARD", "The Series", 2)]
[TestCase("Series.S11.SUBPACK.DVDRip.XviD-REWARD", "Series", 11)]
public void should_parse_season_subpack(string postTitle, string title, int season)
{
var result = Parser.Parser.ParseTitle(postTitle);
@@ -66,7 +66,7 @@ namespace NzbDrone.Core.Test.ParserTests
result.IsSeasonExtra.Should().BeTrue();
}
[TestCase("The.Ranch.2016.S02.Part.1.1080p.NF.WEBRip.DD5.1.x264-NTb", "The Ranch 2016", 2, 1)]
[TestCase("The.Series.2016.S02.Part.1.1080p.NF.WEBRip.DD5.1.x264-NTb", "The Series 2016", 2, 1)]
public void should_parse_partial_season_release(string postTitle, string title, int season, int seasonPart)
{
var result = Parser.Parser.ParseTitle(postTitle);
@@ -79,7 +79,7 @@ namespace NzbDrone.Core.Test.ParserTests
result.SeasonPart.Should().Be(seasonPart);
}
[TestCase("The Wire S01-05 WS BDRip X264-REWARD-No Rars", "The Wire", 1)]
[TestCase("The Series S01-05 WS BDRip X264-REWARD-No Rars", "The Series", 1)]
[TestCase("Seinfault.S01-S09.1080p.AMZN.WEB-DL.DDP2.0.H.264-NTb", "Seinfault", 1)]
public void should_parse_multi_season_release(string postTitle, string title, int firstSeason)
{

View File

@@ -10,7 +10,7 @@ namespace NzbDrone.Core.Test.ParserTests
[Test]
public void should_have_year_zero_when_title_doesnt_have_a_year()
{
const string title = "House.S01E01.pilot.720p.hdtv";
const string title = "Series.Title.S01E01.pilot.720p.hdtv";
var result = Parser.Parser.ParseTitle(title).SeriesTitleInfo;
@@ -20,7 +20,7 @@ namespace NzbDrone.Core.Test.ParserTests
[Test]
public void should_have_same_title_for_title_and_title_without_year_when_title_doesnt_have_a_year()
{
const string title = "House.S01E01.pilot.720p.hdtv";
const string title = "Series.Title.S01E01.pilot.720p.hdtv";
var result = Parser.Parser.ParseTitle(title).SeriesTitleInfo;
@@ -30,7 +30,7 @@ namespace NzbDrone.Core.Test.ParserTests
[Test]
public void should_have_year_when_title_has_a_year()
{
const string title = "House.2004.S01E01.pilot.720p.hdtv";
const string title = "Series.Title.2004.S01E01.pilot.720p.hdtv";
var result = Parser.Parser.ParseTitle(title).SeriesTitleInfo;
@@ -40,21 +40,21 @@ namespace NzbDrone.Core.Test.ParserTests
[Test]
public void should_have_year_in_title_when_title_has_a_year()
{
const string title = "House.2004.S01E01.pilot.720p.hdtv";
const string title = "Series.Title.2004.S01E01.pilot.720p.hdtv";
var result = Parser.Parser.ParseTitle(title).SeriesTitleInfo;
result.Title.Should().Be("House 2004");
result.Title.Should().Be("Series Title 2004");
}
[Test]
public void should_title_without_year_should_not_contain_year()
{
const string title = "House.2004.S01E01.pilot.720p.hdtv";
const string title = "Series.Title.2004.S01E01.pilot.720p.hdtv";
var result = Parser.Parser.ParseTitle(title).SeriesTitleInfo;
result.TitleWithoutYear.Should().Be("House");
result.TitleWithoutYear.Should().Be("Series Title");
}
}
}

View File

@@ -9,130 +9,130 @@ namespace NzbDrone.Core.Test.ParserTests
[TestFixture]
public class SingleEpisodeParserFixture : CoreTest
{
[TestCase("Sonny.With.a.Chance.S02E15", "Sonny With a Chance", 2, 15)]
[TestCase("Two.and.a.Half.Me.103.720p.HDTV.X264-DIMENSION", "Two and a Half Me", 1, 3)]
[TestCase("Two.and.a.Half.Me.113.720p.HDTV.X264-DIMENSION", "Two and a Half Me", 1, 13)]
[TestCase("Two.and.a.Half.Me.1013.720p.HDTV.X264-DIMENSION", "Two and a Half Me", 10, 13)]
[TestCase("Chuck.4x05.HDTV.XviD-LOL", "Chuck", 4, 5)]
[TestCase("The.Girls.Next.Door.S03E06.DVDRip.XviD-WiDE", "The Girls Next Door", 3, 6)]
[TestCase("Degrassi.S10E27.WS.DSR.XviD-2HD", "Degrassi", 10, 27)]
[TestCase("Parenthood.2010.S02E14.HDTV.XviD-LOL", "Parenthood 2010", 2, 14)]
[TestCase("Hawaii Five 0 S01E19 720p WEB DL DD5 1 H 264 NT", "Hawaii Five 0", 1, 19)]
[TestCase("The Event S01E14 A Message Back 720p WEB DL DD5 1 H264 SURFER", "The Event", 1, 14)]
[TestCase("Adam Hills In Gordon St Tonight S01E07 WS PDTV XviD FUtV", "Adam Hills In Gordon St Tonight", 1, 7)]
[TestCase("Adventure.Inc.S03E19.DVDRip.XviD-OSiTV", "Adventure Inc", 3, 19)]
[TestCase("Series.With.Title.S02E15", "Series With Title", 2, 15)]
[TestCase("Series.and.a.Title.103.720p.HDTV.X264-DIMENSION", "Series and a Title", 1, 3)]
[TestCase("Series.and.a.Title.113.720p.HDTV.X264-DIMENSION", "Series and a Title", 1, 13)]
[TestCase("Series.and.a.Title.1013.720p.HDTV.X264-DIMENSION", "Series and a Title", 10, 13)]
[TestCase("Series.Title.4x05.HDTV.XviD-LOL", "Series Title", 4, 5)]
[TestCase("Series.Title.S03E06.DVDRip.XviD-WiDE", "Series Title", 3, 6)]
[TestCase("Series.Title.S10E27.WS.DSR.XviD-2HD", "Series Title", 10, 27)]
[TestCase("Series.Title.2010.S02E14.HDTV.XviD-LOL", "Series Title 2010", 2, 14)]
[TestCase("Series Title 0 S01E19 720p WEB DL DD5 1 H 264 NT", "Series Title 0", 1, 19)]
[TestCase("The Series Title S01E14 A Message Back 720p WEB DL DD5 1 H264 SURFER", "The Series Title", 1, 14)]
[TestCase("Series Title S01E07 WS PDTV XviD FUtV", "Series Title", 1, 7)]
[TestCase("Series.Title.S03E19.DVDRip.XviD-OSiTV", "Series Title", 3, 19)]
[TestCase("S03E09 WS PDTV XviD FUtV", "", 3, 9)]
[TestCase("5x10 WS PDTV XviD FUtV", "", 5, 10)]
[TestCase("Castle.2009.S01E14.HDTV.XviD-LOL", "Castle 2009", 1, 14)]
[TestCase("Pride.and.Prejudice.1995.S03E20.HDTV.XviD-LOL", "Pride and Prejudice 1995", 3, 20)]
[TestCase("The.Office.S03E115.DVDRip.XviD-OSiTV", "The Office", 3, 115)]
[TestCase(@"Parks and Recreation - S02E21 - 94 Meetings - 720p TV.mkv", "Parks and Recreation", 2, 21)]
[TestCase(@"24-7 Penguins-Capitals- Road to the NHL Winter Classic - S01E03 - Episode 3.mkv", "24-7 Penguins-Capitals- Road to the NHL Winter Classic", 1, 3)]
[TestCase("Adventure.Inc.S03E19.DVDRip.\"XviD\"-OSiTV", "Adventure Inc", 3, 19)]
[TestCase("Hawaii Five-0 (2010) - 1x05 - Nalowale (Forgotten/Missing)", "Hawaii Five-0 (2010)", 1, 5)]
[TestCase("Hawaii Five-0 (2010) - 1x05 - Title", "Hawaii Five-0 (2010)", 1, 5)]
[TestCase("House - S06E13 - 5 to 9 [DVD]", "House", 6, 13)]
[TestCase("The Mentalist - S02E21 - 18-5-4", "The Mentalist", 2, 21)]
[TestCase("Breaking.In.S01E07.21.0.Jump.Street.720p.WEB-DL.DD5.1.h.264-KiNGS", "Breaking In", 1, 7)]
[TestCase("CSI.525", "CSI", 5, 25)]
[TestCase("King of the Hill - 10x12 - 24 Hour Propane People [SDTV]", "King of the Hill", 10, 12)]
[TestCase("Brew Masters S01E06 3 Beers For Batali DVDRip XviD SPRiNTER", "Brew Masters", 1, 6)]
[TestCase("24 7 Flyers Rangers Road to the NHL Winter Classic Part01 720p HDTV x264 ORENJI", "24 7 Flyers Rangers Road to the NHL Winter Classic", 1, 1)]
[TestCase("24 7 Flyers Rangers Road to the NHL Winter Classic Part 02 720p HDTV x264 ORENJI", "24 7 Flyers Rangers Road to the NHL Winter Classic", 1, 2)]
[TestCase("24-7 Flyers-Rangers- Road to the NHL Winter Classic - S01E01 - Part 1", "24-7 Flyers-Rangers- Road to the NHL Winter Classic", 1, 1)]
[TestCase("Series.Title.2009.S01E14.HDTV.XviD-LOL", "Series Title 2009", 1, 14)]
[TestCase("Series.Title.1995.S03E20.HDTV.XviD-LOL", "Series Title 1995", 3, 20)]
[TestCase("Series.Title.S03E115.DVDRip.XviD-OSiTV", "Series Title", 3, 115)]
[TestCase(@"Series Title - S02E21 - 94 Meetings - 720p TV.mkv", "Series Title", 2, 21)]
[TestCase(@"24-7 Series - Title - Road to the Sonarr - S01E03 - Episode 3.mkv", "24-7 Series - Title - Road to the Sonarr", 1, 3)]
[TestCase("Series.Title.Inc.S03E19.DVDRip.\"XviD\"-OSiTV", "Series Title Inc", 3, 19)]
[TestCase("Series Title-0 (2010) - 1x05 - Missing Title", "Series Title-0 (2010)", 1, 5)]
[TestCase("Series Title-0 (2010) - 1x05 - Title", "Series Title-0 (2010)", 1, 5)]
[TestCase("Series Title - S06E13 - 5 to 9 [DVD]", "Series Title", 6, 13)]
[TestCase("Series Title - S02E21 - 18-5-4", "Series Title", 2, 21)]
[TestCase("Series.Title.S01E07.21.0.Jump.Street.720p.WEB-DL.DD5.1.h.264-KiNGS", "Series Title", 1, 7)]
[TestCase("Series.Title.525", "Series Title", 5, 25)]
[TestCase("Series Title - 10x12 - 24 Hour Propane People [SDTV]", "Series Title", 10, 12)]
[TestCase("Series Title S01E06 3 Beers For Batali DVDRip XviD SPRiNTER", "Series Title", 1, 6)]
[TestCase("24 7 Series-Title - Road to the Sonarr Part01 720p HDTV x264 ORENJI", "24 7 Series-Title - Road to the Sonarr", 1, 1)]
[TestCase("24 7 Series-Title - Road to the Sonarr Part 02 720p HDTV x264 ORENJI", "24 7 Series-Title - Road to the Sonarr", 1, 2)]
[TestCase("24-7 Series-Title - Road to the Sonarr - S01E01 - Part 1", "24-7 Series-Title - Road to the Sonarr", 1, 1)]
[TestCase("S6E02-Unwrapped-(Playing With Food) - [DarkData]", "", 6, 2)]
[TestCase("S06E03-Unwrapped-(Number Ones Unwrapped) - [DarkData]", "", 6, 3)]
[TestCase("The Mentalist S02E21 18 5 4 720p WEB DL DD5 1 h 264 EbP", "The Mentalist", 2, 21)]
[TestCase("Series Title S02E21 18 5 4 720p WEB DL DD5 1 h 264 EbP", "Series Title", 2, 21)]
[TestCase("01x04 - Halloween, Part 1 - 720p WEB-DL", "", 1, 4)]
[TestCase("extras.s03.e05.ws.dvdrip.xvid-m00tv", "extras", 3, 5)]
[TestCase("castle.2009.416.hdtv-lol", "castle 2009", 4, 16)]
[TestCase("hawaii.five-0.2010.217.hdtv-lol", "hawaii five-0 2010", 2, 17)]
[TestCase("Looney Tunes - S1936E18 - I Love to Singa", "Looney Tunes", 1936, 18)]
[TestCase("American_Dad!_-_7x6_-_The_Scarlett_Getter_[SDTV]", "American Dad!", 7, 6)]
[TestCase("Falling_Skies_-_1x1_-_Live_and_Learn_[HDTV-720p]", "Falling Skies", 1, 1)]
[TestCase("Top Gear - 07x03 - 2005.11.70", "Top Gear", 7, 3)]
[TestCase("Glee.S04E09.Swan.Song.1080p.WEB-DL.DD5.1.H.264-ECI", "Glee", 4, 9)]
[TestCase("series.s03.e05.ws.dvdrip.xvid-m00tv", "series", 3, 5)]
[TestCase("series.2009.416.hdtv-lol", "series 2009", 4, 16)]
[TestCase("series.six-0.2010.217.hdtv-lol", "series six-0 2010", 2, 17)]
[TestCase("Series Title - S1936E18 - I Love to Singa", "Series Title", 1936, 18)]
[TestCase("Series_Title!_-_7x6_-_The_Scarlett_Getter_[SDTV]", "Series Title!", 7, 6)]
[TestCase("Series_Title_-_1x1_-_Live_and_Learn_[HDTV-720p]", "Series Title", 1, 1)]
[TestCase("Top Series - 07x03 - 2005.11.70", "Top Series", 7, 3)]
[TestCase("Series.S04E09.Swan.Song.1080p.WEB-DL.DD5.1.H.264-ECI", "Series", 4, 9)]
[TestCase("S08E20 50-50 Carla [DVD]", "", 8, 20)]
[TestCase("Cheers S08E20 50-50 Carla [DVD]", "Cheers", 8, 20)]
[TestCase("Series S08E20 50-50 Carla [DVD]", "Series", 8, 20)]
[TestCase("S02E10 6-50 to SLC [SDTV]", "", 2, 10)]
[TestCase("Franklin & Bash S02E10 6-50 to SLC [SDTV]", "Franklin & Bash", 2, 10)]
[TestCase("The_Big_Bang_Theory_-_6x12_-_The_Egg_Salad_Equivalency_[HDTV-720p]", "The Big Bang Theory", 6, 12)]
[TestCase("Top_Gear.19x06.720p_HDTV_x264-FoV", "Top Gear", 19, 6)]
[TestCase("Portlandia.S03E10.Alexandra.720p.WEB-DL.AAC2.0.H.264-CROM.mkv", "Portlandia", 3, 10)]
[TestCase("(Game of Thrones s03 e - \"Game of Thrones Season 3 Episode 10\"", "Game of Thrones", 3, 10)]
[TestCase("House.Hunters.International.S05E607.720p.hdtv.x264", "House Hunters International", 5, 607)]
[TestCase("Adventure.Time.With.Finn.And.Jake.S01E20.720p.BluRay.x264-DEiMOS", "Adventure Time With Finn And Jake", 1, 20)]
[TestCase("Hostages.S01E04.2-45.PM.[HDTV-720p].mkv", "Hostages", 1, 4)]
[TestCase("Developers & Coders S02E10 6-50 to SLC [SDTV]", "Developers & Coders", 2, 10)]
[TestCase("The_Big_Series_Title_-_6x12_-_The_Code_Review_Equivalency_[HDTV-720p]", "The Big Series Title", 6, 12)]
[TestCase("Series_Title.19x06.720p_HDTV_x264-FoV", "Series Title", 19, 6)]
[TestCase("Series.S03E10.Alexandra.720p.WEB-DL.AAC2.0.H.264-CROM.mkv", "Series", 3, 10)]
[TestCase("(Series of Title s03 e - \"Series of Title Season 3 Episode 10\"", "Series of Title", 3, 10)]
[TestCase("Series.Hunters.Galatic.S05E607.720p.hdtv.x264", "Series Hunters Galatic", 5, 607)]
[TestCase("Series.Time.With.Dev1.And.Dev2.S01E20.720p.BluRay.x264-DEiMOS", "Series Time With Dev1 And Dev2", 1, 20)]
[TestCase("Series.S01E04.2-45.PM.[HDTV-720p].mkv", "Series", 1, 4)]
[TestCase("S01E04", "", 1, 4)]
[TestCase("1x04", "", 1, 4)]
[TestCase("10.Things.You.Dont.Know.About.S02E04.Prohibition.HDTV.XviD-AFG", "10 Things You Dont Know About", 2, 4)]
[TestCase("30 Rock - S01E01 - Pilot.avi", "30 Rock", 1, 1)]
[TestCase("666 Park Avenue - S01E01", "666 Park Avenue", 1, 1)]
[TestCase("Warehouse 13 - S01E01", "Warehouse 13", 1, 1)]
[TestCase("Don't Trust The B---- in Apartment 23.S01E01", "Don't Trust The B---- in Apartment 23", 1, 1)]
[TestCase("10.Lines.You.Know.About.Code.S02E04.Prohibition.HDTV.XviD-AFG", "10 Lines You Know About Code", 2, 4)]
[TestCase("30 Series - S01E01 - Pilot.avi", "30 Series", 1, 1)]
[TestCase("666 Series Title - S01E01", "666 Series Title", 1, 1)]
[TestCase("Series 13 - S01E01", "Series 13", 1, 1)]
[TestCase("Don't Ever Trust The B---- in Code 23.S01E01", "Don't Ever Trust The B---- in Code 23", 1, 1)]
[TestCase("Warehouse.13.S01E01", "Warehouse 13", 1, 1)]
[TestCase("Dont.Trust.The.B----.in.Apartment.23.S01E01", "Dont Trust The B---- in Apartment 23", 1, 1)]
[TestCase("24 S01E01", "24", 1, 1)]
[TestCase("24.S01E01", "24", 1, 1)]
[TestCase("Homeland - 2x12 - The Choice [HDTV-1080p].mkv", "Homeland", 2, 12)]
[TestCase("Homeland - 2x4 - New Car Smell [HDTV-1080p].mkv", "Homeland", 2, 4)]
[TestCase("Top Gear - 06x11 - 2005.08.07", "Top Gear", 6, 11)]
[TestCase("The_Voice_US_s06e19_04.28.2014_hdtv.x264.Poke.mp4", "The Voice US", 6, 19)]
[TestCase("the.100.110.hdtv-lol", "the 100", 1, 10)]
[TestCase("Never.Trust.The.B----.in.Code.23.S01E01", "Never Trust The B---- in Code 23", 1, 1)]
[TestCase("42 S01E01", "42", 1, 1)]
[TestCase("69.S01E01", "69", 1, 1)]
[TestCase("Series - 2x12 - The Choice [HDTV-1080p].mkv", "Series", 2, 12)]
[TestCase("Series - 2x4 - New Car Smell [HDTV-1080p].mkv", "Series", 2, 4)]
[TestCase("Top Series - 06x11 - 2005.08.07", "Top Series", 6, 11)]
[TestCase("The_Series_US_s06e19_04.28.2014_hdtv.x264.Poke.mp4", "The Series US", 6, 19)]
[TestCase("the.Series.110.hdtv-lol", "the Series", 1, 10)]
[TestCase("2009x09 [SDTV].avi", "", 2009, 9)]
[TestCase("S2009E09 [SDTV].avi", "", 2009, 9)]
[TestCase("Shark Week S2009E09 [SDTV].avi", "Shark Week", 2009, 9)]
[TestCase("St_Elsewhere_209_Aids_And_Comfort", "St Elsewhere", 2, 9)]
[TestCase("[Impatience] Locodol - 0x01 [720p][34073169].mkv", "Locodol", 0, 1)]
[TestCase("South.Park.S15.E06.City.Sushi", "South Park", 15, 6)]
[TestCase("South Park - S15 E06 - City Sushi", "South Park", 15, 6)]
[TestCase("Constantine S1-E1-WEB-DL-1080p-NZBgeek", "Constantine", 1, 1)]
[TestCase("Constantine S1E1-WEB-DL-1080p-NZBgeek", "Constantine", 1, 1)]
[TestCase("NCIS.S010E16.720p.HDTV.X264-DIMENSION", "NCIS", 10, 16)]
[TestCase("[ www.Torrenting.com ] - Revolution.2012.S02E17.720p.HDTV.X264-DIMENSION", "Revolution 2012", 2, 17)]
[TestCase("Revolution.2012.S02E18.720p.HDTV.X264-DIMENSION.mkv", "Revolution 2012", 2, 18)]
[TestCase("Series Week S2009E09 [SDTV].avi", "Series Week", 2009, 9)]
[TestCase("St_Series_209_Aids_And_Comfort", "St Series", 2, 9)]
[TestCase("[Impatience] Series - 0x01 [720p][34073169].mkv", "Series", 0, 1)]
[TestCase("Series.Title.S15.E06.City.Sushi", "Series Title", 15, 6)]
[TestCase("Series Title - S15 E06 - City Code", "Series Title", 15, 6)]
[TestCase("Series S1-E1-WEB-DL-1080p-NZBgeek", "Series", 1, 1)]
[TestCase("Series S1E1-WEB-DL-1080p-NZBgeek", "Series", 1, 1)]
[TestCase("Series.S010E16.720p.HDTV.X264-DIMENSION", "Series", 10, 16)]
[TestCase("[ www.Torrenting.com ] - Series.2012.S02E17.720p.HDTV.X264-DIMENSION", "Series 2012", 2, 17)]
[TestCase("Series.2012.S02E18.720p.HDTV.X264-DIMENSION.mkv", "Series 2012", 2, 18)]
[TestCase("Series - Season 1 - Episode 01 (Resolution).avi", "Series", 1, 1)]
[TestCase("5x09 - 100 [720p WEB-DL].mkv", "", 5, 9)]
[TestCase("1x03 - 274 [1080p BluRay].mkv", "", 1, 3)]
[TestCase("1x03 - The 112th Congress [1080p BluRay].mkv", "", 1, 3)]
[TestCase("Revolution.2012.S02E14.720p.HDTV.X264-DIMENSION [PublicHD].mkv", "Revolution 2012", 2, 14)]
[TestCase("Series.2012.S02E14.720p.HDTV.X264-DIMENSION [PublicHD].mkv", "Series 2012", 2, 14)]
//[TestCase("Sex And The City S6E15 - Catch-38 [RavyDavy].avi", "Sex And The City", 6, 15)] // -38 is getting treated as abs number
[TestCase("Castle.2009.S06E03.720p.HDTV.X264-DIMENSION [PublicHD].mkv", "Castle 2009", 6, 3)]
[TestCase("19-2.2014.S02E01.720p.HDTV.x264-CROOKS", "19-2 2014", 2, 1)]
[TestCase("Community - S01E09 - Debate 109", "Community", 1, 9)]
[TestCase("Entourage - S02E02 - My Maserati Does 185", "Entourage", 2, 2)]
[TestCase("6x13 - The Family Guy 100th Episode Special", "", 6, 13)]
//[TestCase("Heroes - S01E01 - Genesis 101 [HDTV-720p]", "Heroes", 1, 1)]
//[TestCase("The 100 S02E01 HDTV x264-KILLERS [eztv]", "The 100", 2, 1)]
[TestCase("The Young And The Restless - S41 E10478 - 2014-08-15", "The Young And The Restless", 41, 10478)]
[TestCase("The Young And The Restless - S42 E10591 - 2015-01-27", "The Young And The Restless", 42, 10591)]
[TestCase("Series.2009.S06E03.720p.HDTV.X264-DIMENSION [PublicHD].mkv", "Series 2009", 6, 3)]
[TestCase("20-1.2014.S02E01.720p.HDTV.x264-CROOKS", "20-1 2014", 2, 1)]
[TestCase("Series - S01E09 - Debate 109", "Series", 1, 9)]
[TestCase("Series - S02E02 - My Maserati Does 185", "Series", 2, 2)]
[TestCase("6x13 - The Series Show 100th Episode Special", "", 6, 13)]
//[TestCase("Series - S01E01 - Genesis 101 [HDTV-720p]", "Series", 1, 1)]
//[TestCase("The Series S02E01 HDTV x264-KILLERS [eztv]", "The Series", 2, 1)]
[TestCase("The Series And the Show - S41 E10478 - 2014-08-15", "The Series And the Show", 41, 10478)]
[TestCase("The Series And the Show - S42 E10591 - 2015-01-27", "The Series And the Show", 42, 10591)]
[TestCase("Series Title [1x05] Episode Title", "Series Title", 1, 5)]
[TestCase("Series Title [S01E05] Episode Title", "Series Title", 1, 5)]
[TestCase("Series Title Season 01 Episode 05 720p", "Series Title", 1, 5)]
//[TestCase("Off the Air - 101 - Animals (460p.x264.vorbis-2.0) [449].mkv", "Off the Air", 1, 1)]
[TestCase("The Young And the Restless - S42 E10713 - 2015-07-20.mp4", "The Young And the Restless", 42, 10713)]
[TestCase("quantico.103.hdtv-lol[ettv].mp4", "quantico", 1, 3)]
[TestCase("Fargo - 01x02 - The Rooster Prince - [itz_theo]", "Fargo", 1, 2)]
[TestCase("Castle (2009) - [06x16] - Room 147.mp4", "Castle (2009)", 6, 16)]
//[TestCase("Off the Series - 101 - Developers (460p.x264.vorbis-2.0) [449].mkv", "Off the Series", 1, 1)]
[TestCase("The Series And the Show - S42 E10713 - 2015-07-20.mp4", "The Series And the Show", 42, 10713)]
[TestCase("Series.103.hdtv-lol[ettv].mp4", "Series", 1, 3)]
[TestCase("Series - 01x02 - The Rooster Prince - [itz_theo]", "Series", 1, 2)]
[TestCase("Series (2009) - [06x16] - Room 147.mp4", "Series (2009)", 6, 16)]
[TestCase("grp-zoos01e11-1080p", "grp-zoo", 1, 11)]
[TestCase("grp-zoo-s01e11-1080p", "grp-zoo", 1, 11)]
[TestCase("Jeopardy!.S2016E14.2016-01-20.avi", "Jeopardy!", 2016, 14)]
[TestCase("Ken.Burns.The.Civil.War.5of9.The.Universe.Of.Battle.1990.DVDRip.x264-HANDJOB", "Ken Burns The Civil War", 1, 5)]
[TestCase("Judge Judy 2016 02 25 S20E142", "Judge Judy", 20, 142)]
[TestCase("Judge Judy 2016 02 25 S20E143", "Judge Judy", 20, 143)]
[TestCase("Red Dwarf - S02 - E06 - Parallel Universe", "Red Dwarf", 2, 6)]
[TestCase("O.J.Simpson.Made.in.America.Part.Two.720p.HDTV.x264-2HD", "O J Simpson Made in America", 1, 2)]
[TestCase("The.100000.Dollar.Pyramid.2016.S01E05.720p.HDTV.x264-W4F", "The 100000 Dollar Pyramid 2016", 1, 5)]
[TestCase("Class S01E02 (22 October 2016) HDTV 720p [Webrip]", "Class", 1, 2)]
[TestCase("this.is.not.happening.2015.0308-yestv", "this is not happening 2015", 3, 8)]
[TestCase("Jeopardy - S2016E231", "Jeopardy", 2016, 231)]
[TestCase("Jeopardy - 2016x231", "Jeopardy", 2016, 231)]
[TestCase("Shortland.Street.S26E022.HDTV.x264-FiHTV", "Shortland Street", 26, 22)]
[TestCase("Super.Potatoes.S01.Ep06.1080p.BluRay.DTS.x264-MiR", "Super Potatoes", 1, 6)]
[TestCase("Room 104 - S01E07 The Missionaries [SDTV]", "Room 104", 1, 7)]
[TestCase("11-02 The Retraction Reaction (HD).m4v", "", 11, 2)]
[TestCase("Plus belle la vie - S14E3533 FRENCH WEBRIP H.264 AAC (09.05.2018)", "Plus belle la vie", 14, 3533)]
[TestCase("The 100 - S01E02 - Earth Skills HDTV-1080p AVC DTS [EN+FR+ES+PT+DA+FI+NB+SV]", "The 100", 1, 2)]
[TestCase("Series!.S2016E14.2016-01-20.avi", "Series!", 2016, 14)]
[TestCase("John.Smith.The.Series.Title.5of9.The.Universe.Of.Development.1990.DVDRip.x264-HANDJOB", "John Smith The Series Title", 1, 5)]
[TestCase("Judge Developer 2016 02 25 S20E142", "Judge Developer", 20, 142)]
[TestCase("Judge Developer 2016 02 25 S20E143", "Judge Developer", 20, 143)]
[TestCase("Red Show - S02 - E06 - Parallel Series", "Red Show", 2, 6)]
[TestCase("App.Sonarr.Made.in.Canada.Part.Two.720p.HDTV.x264-2HD", "App Sonarr Made in Canada", 1, 2)]
[TestCase("The.100000.Series.Title.2016.S01E05.720p.HDTV.x264-W4F", "The 100000 Series Title 2016", 1, 5)]
[TestCase("Series S01E02 (22 October 2016) HDTV 720p [Webrip]", "Series", 1, 2)]
[TestCase("this.is.a.show.2015.0308-yestv", "this is a show 2015", 3, 8)]
[TestCase("Series - S2016E231", "Series", 2016, 231)]
[TestCase("Series - 2016x231", "Series", 2016, 231)]
[TestCase("Short.Series.S26E022.HDTV.x264-FiHTV", "Short Series", 26, 22)]
[TestCase("Super.Series.S01.Ep06.1080p.BluRay.DTS.x264-MiR", "Super Series", 1, 6)]
[TestCase("Series 104 - S01E07 The Developers [SDTV]", "Series 104", 1, 7)]
[TestCase("11-02 The Series Reaction (HD).m4v", "", 11, 2)]
[TestCase("Plus Series la title - S14E3533 FRENCH WEBRIP H.264 AAC (09.05.2018)", "Plus Series la title", 14, 3533)]
[TestCase("The Series - S01E02 - Earth Skills HDTV-1080p AVC DTS [EN+FR+ES+PT+DA+FI+NB+SV]", "The Series", 1, 2)]
[TestCase("Series Title - S01E01 - Day 100 [SDTV]", "Series Title", 1, 1)]
[TestCase("Series.Title.S01.Ep.01.English.AC3.DL.1080p.BluRay-Sonarr", "Series Title", 1, 1)]
[TestCase("Series.Title.S01.E.01.English.AC3.DL.1080p.BluRay-Sonarr", "Series Title", 1, 1)]

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