1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-03-05 13:20:20 -05:00

Compare commits

...

291 Commits

Author SHA1 Message Date
Taloth Saldono
4c460f6836 WIP: Added testcases for a bunch of Parsed titles. Added support for At & Percent conversion. 2017-07-02 21:29:01 +02:00
Taloth Saldono
b03f434329 Disable Nyaa forcibly. 2017-07-02 21:27:59 +02:00
Chris Dyson
68290b0385 New: Added 'Series Title, The' renaming option
Closes #371
2017-07-02 21:21:46 +02:00
Taloth Saldono
773274f3cc Update Nyaa Pantsu apiPath to the actual /feed/torznab url. 2017-07-01 12:43:30 +02:00
Taloth Saldono
a33d8968ed New: Added Nyaa Pantsu as Torznab preset for Anime. 2017-07-01 00:08:01 +02:00
Taloth Saldono
e41baccd02 New: Added AnimeTosho as Newznab and Torznab presets. 2017-06-30 23:40:16 +02:00
Taloth Saldono
fef3423019 Fixed error in NzbGet KeepHistory check and updated tests. 2017-06-30 22:01:31 +02:00
Taloth Saldono
11926d8b2d Fixed: Support for Mono 5.x with the newer BoringTLS provider. 2017-06-30 21:33:41 +02:00
Mark McDowall
4189bc6f76 Webhook improvements
New: Include Path/Relative Path for on download Webhooks
New: IsUpgrade flag for on download Webhooks
2017-06-28 16:11:05 -07:00
Mark McDowall
601b54c244 Reorder HttpMethods to match RestSharp 2017-06-28 16:11:05 -07:00
Taloth Saldono
905ab18336 Fixed: Subtitle extensions should be case-insensitive. 2017-06-27 16:22:07 +02:00
Taloth Saldono
f46a576df5 Check if NzbGet KeepHistory value is set too high instead of only checking for 0. 2017-06-27 16:22:07 +02:00
Mark McDowall
60231fbcae Fixed: Show rounded age in minimum age rejection message
Fixes #2003
2017-06-26 22:41:22 -07:00
Mark McDowall
63860e783e Fixed: Background logo when URL base is used
Fixes #2002
2017-06-26 22:29:52 -07:00
Mark McDowall
cf8b9df5ad Fixed: Ignore case when importing extra files 2017-06-26 22:25:10 -07:00
Taloth Saldono
ff6841e410 Fixed: Added permanent Health Check warning to ensure Drone Factory is no longer used. 2017-06-21 19:35:32 +02:00
Taloth Saldono
ab49afe116 Don't log error on the shutdown the command execution pipeline.
closes #1961
2017-06-20 17:35:37 +02:00
Taloth Saldono
afcf136c4f Fixed regression in pending icon. 2017-06-20 17:23:01 +02:00
Taloth Saldono
d1b85444d0 Fixed DetectSampleFixture. 2017-06-19 23:48:47 +02:00
Taloth Saldono
63e0eba02f Fixed: releases with unknown seeders show on the UI as - instead of 0 to be easier to distinguish. 2017-06-19 23:30:43 +02:00
Taloth Saldono
475c99d492 Tweaked Newznab/Torznab handling of attr without value. 2017-06-19 23:30:43 +02:00
Taloth Saldono
23552c3267 Tweaked SingleInstancePolicy not to cancel startup if AppData is overridden is set. 2017-06-19 23:30:43 +02:00
Mark McDowall
a49e37239e Log responses from qbit 2017-06-18 22:21:33 -07:00
Mark McDowall
65b936ed94 Fixed: Time left cell for pending items in queue 2017-06-18 22:15:44 -07:00
Mark McDowall
359ef04861 Fixed: Grab/Delete buttons for pending releases in queue 2017-06-18 22:10:52 -07:00
Mark McDowall
8cf028e071 Fixed: Improve sample rejection message when MediaInfo is not available
Closes #1967
2017-06-18 21:26:18 -07:00
Mark McDowall
eea3419849 New: Download client and ID for custom scripts 2017-06-18 21:17:33 -07:00
Taloth Saldono
62bc63312d Fixed: Changed Authentication cookie to prevent conflicts with other apps. (invalidates existing logins)
Closes #1962
2017-06-18 00:18:23 +02:00
Taloth Saldono
6a6d415625 Fixed: Pending releases from blocked indexers should not be grabbed.
ref #1961
2017-06-18 00:07:16 +02:00
Taloth Saldono
1fbe82ae47 Prevent back-off escalation during grace period. 2017-06-17 23:42:04 +02:00
Taloth Saldono
87f3cc9014 Fixed: Regression prevented indexers from being re-enabled after a successful Test.
ref #1961
2017-06-17 23:41:38 +02:00
Taloth Saldono
ab07a40931 New: Added Omgwtfnzbs UHD category.
closes #1977
2017-06-17 20:55:18 +02:00
Taloth Saldono
10f292b225 Removed superfluous try catches so that DownloadClient backoff logic gets triggered. 2017-06-17 20:53:26 +02:00
Mark McDowall
de5ce23989 Fixed: Redirect calls missing URL Base 2017-06-10 16:47:12 -07:00
Mark McDowall
d0e226e269 Fixed: Logging full error message to database 2017-06-10 16:25:14 -07:00
Mark McDowall
d7cb5090fc Fixed: Twitter oAuth callback URL 2017-06-05 20:22:37 -07:00
Mark McDowall
416e9abca5 Fixed: Error message when adding a Plex server without a TV library 2017-06-04 21:10:56 -07:00
Mark McDowall
6dcb7768a9 Fixed broken test and add a couple more for ProcessDownloadDecisions 2017-06-04 00:52:34 -07:00
Mark McDowall
baf83b4c71 Fixed: Error when processing manual import decisions
Fixes #1590
2017-06-03 21:10:56 -07:00
Mark McDowall
285288db1a Additional logging when an import decision cannot be made 2017-06-03 21:10:56 -07:00
Jeremy Ryan
ec3dd982f6 Update EpisodeFileEditorLayoutTemplate.hbs 2017-06-03 21:10:20 -07:00
Drew Freyling
410aa467b8 include css files in minification 2017-06-03 21:08:35 -07:00
Mark McDowall
0c89a4ae8f Store releases when download client is unavailable
New: Retry releases when download client was unavailable
Closes #949
2017-06-03 20:41:32 -07:00
Taloth Saldono
a1edbafa8a Removed ugly UUID= VolumeLabel from mounts. 2017-05-27 22:26:41 +02:00
Taloth Saldono
ef5a400c68 Added missing ACC audio format. 2017-05-27 22:19:55 +02:00
Taloth Saldono
8cc02a9d9c Fixed: Minimum seeding check causing exception when release was pushed via api instead of by indexer. 2017-05-27 22:02:30 +02:00
Taloth Saldono
e83e852e0d Added ability for HealthChecks to run on specific events. 2017-05-27 20:45:01 +02:00
Taloth Saldono
4e10d30cf6 Added Status refreshes to Download Monitoring Service and allow DownloadService to report success (but not failure). 2017-05-27 20:44:58 +02:00
Taloth Saldono
f335cc1af8 Fixed: Prevent Download Client from being queried every minute if it failed repeatedly similar to Indexer temporarily disabled logic. 2017-05-27 20:44:55 +02:00
Taloth Saldono
f4bea5512c Refactored IndexerStatusService into Thingy Provider architecture. 2017-05-27 14:59:37 +02:00
Taloth Saldono
9f8091e4d7 Fixed: Added wildcard to BTN season searches to pick up 'Season x - Episodes 1-10' formats.
Closes #1946
2017-05-26 15:50:34 +02:00
Mark McDowall
5aa02eb15c Cleanup/fix EpisodeMonitoredService
Fixed: Unmonitor episodes when the season is unmonitored when adding the series
Fixes #1852
2017-05-23 22:04:56 -07:00
Mark McDowall
6bbe4ce066 Fixed: Ensure an API Key is set when starting Sonarr
Closes #1514
2017-05-22 21:54:18 -07:00
Mark McDowall
563b5ef017 Fixed: Don't use invalid scene mappings. Fixes #1627 2017-05-22 21:39:13 -07:00
Mark McDowall
b9df5634bf New: Link to more information on RSS sync interval
Closes #1918
2017-05-22 20:55:30 -07:00
Mark McDowall
755575d107 Fixed: Follow 301 redirects when fetching torrents
Closes #1929
2017-05-22 18:09:59 -07:00
Taloth Saldono
8eaab46488 Fixed up some errors and do the guid cache fix on the module instead of backend coz that would cause other issues. 2017-05-21 22:01:03 +02:00
Taloth Saldono
4fbc481780 Fixed: Processing of mixed newznab/torznab api such as the experimental animetosho api.
Ref #1384
2017-05-21 21:10:54 +02:00
Mark McDowall
a41b5723d4 New: Ability to set minimum seeders on a per indexer basis 2017-05-19 12:08:30 -07:00
Mark McDowall
c2b66cf524 Fixed: Deleting an episode file from the UI that was already deleted from disk
Fixes #1782
2017-05-19 12:07:57 -07:00
Mark McDowall
0d782e1cac Consistent formatting for MediaInfo in various locations
Fixed: Stream details for MP3 and EAC3 in Kodi metadata
Closes #1534
2017-05-19 11:18:50 -07:00
Mark McDowall
edf549d0fd Fixed: Improved message when a conflicting slug is added 2017-05-17 21:42:57 -07:00
Mark McDowall
cf7ce9804f Fixed: Ignore file quality matching release quality for unknown quality releases 2017-05-17 21:15:21 -07:00
Mark McDowall
e8d01daf03 Fixed: Ignore file quality matching release quality for season packs 2017-05-15 23:58:07 -07:00
Taloth Saldono
766520b851 Renamed DownloadClientStatus to DownloadClientInfo to avoid conflict. 2017-05-13 00:16:53 +02:00
Taloth Saldono
14144bd4d9 Renamed IndexerStatus.IndexerId to ProviderId. 2017-05-13 00:16:53 +02:00
Taloth Saldono
7b0e40d5d0 Replaced Url with BaseUrl in most indexers. 2017-05-13 00:16:53 +02:00
Taloth Saldono
2dbf095fd5 Fixed: Regression in Quality fallback by extension. 2017-05-13 00:13:12 +02:00
Taloth Saldono
2a86f8c241 Fixed: UI Series lookup autocomplete with diacritics.
Closes #1915
2017-05-11 20:37:07 +02:00
Taloth Saldono
c184e7ddcc Fixed: Multiple Scene Mapping exception even when the mappings pointed to the same tvdbid.
Closes #1917
2017-05-11 06:32:09 +02:00
Taloth Saldono
95c81f8905 Fixed exception in MountCheck if RootDirectory cannot be found. 2017-05-10 23:08:17 +02:00
Mark McDowall
db15949704 Fixed: Better error message when searching for episode without an absolute episode number 2017-05-09 20:00:21 -07:00
Mark McDowall
a63248401e Fixed: Width in Kodi Metadata 2017-05-09 20:00:21 -07:00
Kyse
1b32411219 New: Health Check warning if series folder is mounted with 'ro' option on linux
Closes #1867
2017-05-09 21:07:24 +02:00
Taloth Saldono
cd7368512d Fixed Scene Mapping error message. 2017-05-09 17:26:45 +02:00
Taloth Saldono
a5bc4a8f11 Added ability to filter scene mappings by regex via services. 2017-05-06 14:05:49 +02:00
Drew Freyling
2ae41a3404 remove redundant IE meta tag as we use http header instead 2017-05-05 22:26:28 -07:00
Drew Freyling
312136a57c use cleancss for minification 2017-05-05 22:26:10 -07:00
Mark McDowall
53e51af9c7 Fixed: Don't import the same file again
Closes #929
2017-05-02 22:52:59 -07:00
Mark McDowall
f852ca91c0 Clean up GrabbedReleaseQualityFixture 2017-05-02 22:52:11 -07:00
Mark McDowall
413dd51db1 Fix unit test 2017-05-02 22:06:18 -07:00
Mark McDowall
9d93fc1092 New: Prevent automatic import if file quality differs from grabbed release quality 2017-05-02 18:44:42 -07:00
Lloyd Sparkes
0bbb82c67f Update SocksWebProxy to fix #1641 2017-04-29 17:11:55 +02:00
Mark McDowall
cd8ae0d036 Added test to validate season pack being grabbed when only one episode is monitored
Closes #1862
2017-04-28 17:37:29 -07:00
Taloth Saldono
d726a7acb2 Fixed: Sonarr UI Authentication cookie should be placed on path (UrlBase) instead of domain alone.
fixes #1874
2017-04-27 23:33:04 +02:00
Mark McDowall
c94636e2b3 Placeholders for language profile migrations 2017-04-26 11:45:07 -07:00
Taloth Saldono
3749f3e2e5 Fixed missing icon preventing detailed explanation validation errors explanations from appearing. 2017-04-25 19:16:43 +02:00
Taloth Saldono
1f93bec055 Updated Transmission tests. 2017-04-24 21:53:40 +02:00
Taloth Saldono
a003a89b14 Fixed: Sonarr not importing torrents in Vuze if the torrent already finished seeding and was stopped. 2017-04-24 21:08:50 +02:00
Taloth Saldono
35fca89dad Fixed: Incorrect imports with Vuze when torrent contains a single file.
fixes #1805
2017-04-23 17:24:07 +02:00
Mark McDowall
e97e13e897 Fixed: Smarter application update completed message
Closes #1864
2017-04-21 10:52:31 -07:00
Taloth Saldono
f8d5f1fc94 Added -Scrambled to the ReleaseGroup cleanup list. 2017-04-14 20:47:17 +02:00
Taloth Saldono
46a1ff3e2d Tweaked parser to handle S01.Ep01.
closes #1849
2017-04-14 20:44:14 +02:00
Mark McDowall
f36d5dc881 Moving and Removing of downloads in usenet clients
Fixed: Moving items triggered via post-processing scripts
Fixed: Removing failed downloads fromusenet clients
2017-04-12 17:41:22 -07:00
Taloth Saldono
f8b8fcfb8d Fixed: Handling of priority setting when queueing is disabled in qBittorrent.
fixes #1841
2017-04-12 20:49:28 +02:00
Taloth Saldono
de7f68570e Fixed: Regression causing nzbToMedia imports to be copied instead of moved. 2017-04-12 20:49:28 +02:00
Taloth Saldono
fa006d85fd New: Check whether an existing episode file was deleted before grabbing an upgrade, to avoid timing issues in combination with Ignore Deleted Episodes. 2017-04-12 20:46:36 +02:00
Mark McDowall
413ce1d9a7 Fixed: Double periods in extra file names after rename 2017-04-11 20:32:34 -07:00
Mark McDowall
41f769790d Fix issue adding a series when TitleSlug for another series is null
Fixed: Adding a series when an existing series is has a null slug
Closes #1840
2017-04-11 17:57:29 -07:00
Taloth Saldono
b63bcd16a7 Fixed: Sample check has too little margin for 2 min anime with 1 minute files. Lowered to 15 sec. 2017-04-10 17:46:08 +02:00
Mark McDowall
b485bdaeec Fixed: Unable to execute custom scripts if IMDB ID is null
Fixes #1825
2017-04-08 08:20:57 -07:00
Taloth Saldono
b70d167911 Apply Cleanse to Exception Data as well. 2017-04-08 12:38:39 +02:00
Taloth Saldono
924fe80997 Fixed RssParser test. 2017-04-07 22:36:39 +02:00
Taloth Saldono
cd450a44bf Should not empty install folder, MirrorFolder will take care of it. 2017-04-07 22:09:49 +02:00
Taloth Saldono
35741b9cae Added a few more files to ignore during file copy. 2017-04-07 22:07:42 +02:00
Taloth Saldono
c9d1807670 Sentry should use CleanseLogMessage. 2017-04-07 20:42:39 +02:00
Taloth Saldono
94886e767b Fixed: UnsupportedFeedException should log error for each item 2017-04-07 19:32:12 +02:00
Taloth Saldono
e4c3418987 Fixed: Failing Newznab capabilities request should trigger automatic indexer backoff logic. 2017-04-07 19:10:08 +02:00
Taloth Saldono
5613ab05e0 Fixed: Sabnzbd/NzbGet not processing history items properly after last update. 2017-03-31 18:56:45 +02:00
Taloth Saldono
372442af2c fixed broken tests. 2017-03-30 23:20:49 +02:00
Taloth Saldono
28c45f941b Cleanup of commented out code. 2017-03-30 22:28:00 +02:00
Marcelo Castagna
ea1616586f Fixed: Import from torrent Download Station should move since DS maintains an internal copy for seeding. 2017-03-30 22:26:11 +02:00
Mark McDowall
e48600da42 New: TvMaze and IMDB IDs added to custom script environment variables 2017-03-29 18:22:14 -07:00
Mark McDowall
5d9d2e684e New: Paths for deleted files when upgrading an existing file 2017-03-29 13:22:37 -07:00
Mark McDowall
2e392e0f5e New: Additional variables for custom script on grab events 2017-03-29 13:12:37 -07:00
Mark McDowall
83370ddbbb New: Episode files sent to Recycling Bin are put into subfolders
Closes #401
2017-03-29 06:44:50 -07:00
Mark McDowall
c20b152c28 Fixed spelling in message 2017-03-26 13:21:29 -07:00
Mark McDowall
bf5067466d Guard against a null file showing an exception in release rejections
Fixes #1755
2017-03-26 13:01:59 -07:00
Taloth Saldono
ec7f749541 Tweaked default config for extra files import. 2017-03-26 21:22:58 +02:00
Taloth Saldono
56ecbf4a31 Fixed: Sabnzbd error when tv sorting enabled for all categories. 2017-03-26 17:09:22 +02:00
Mark McDowall
1b39911135 True/False for config settings value 2017-03-25 22:18:57 -07:00
Mark McDowall
6aaefae2d5 New: Explicit toggle for importing extra files 2017-03-25 09:13:28 -07:00
margaale
db9d601115 Revert Session name 2017-03-23 13:46:01 -03:00
Taloth Saldono
e7331539f0 Fixed: Newznab default capabilities erroneously cached if indexer is unavailable. 2017-03-23 17:12:10 +01:00
Taloth Saldono
58bd57bed6 New: Updated MediaInfo to 0.7.93. 2017-03-22 19:17:55 +01:00
Mark McDowall
7a58082cd7 smallicon for Join notifications
New: White icon with transparent background for Join notifications notification bar icon
Closes #1458
2017-03-19 23:31:50 -07:00
Taloth Saldono
2e08f195e4 Fixed: Zero length file causes MediaInfo hanging in 100% cpu load. 2017-03-19 22:02:52 +01:00
Taloth Saldono
a1a5e29c3e fixed sab tests. 2017-03-19 19:00:05 +01:00
margaale
5033886b90 Fixed: DownloadStation api client for DSM 5.x. 2017-03-19 18:50:56 +01:00
Mark McDowall
29419d6575 Update README.md 2017-03-18 23:34:37 -07:00
Mark McDowall
3c22f68f5a Fixed: Parsing releases with year added to the end of the series title
Fixes #1768
2017-03-18 22:45:47 -07:00
Mark McDowall
a0d98951aa Use MaterialisingResponse for static resource responses 2017-03-18 12:22:44 -07:00
Taloth Saldono
70f7404499 Fixed: Sabnzbd 2.0 api compatibility.
closes #1775
2017-03-18 16:32:13 +01:00
Mark McDowall
abd70f5381 New: UHD category for RARBG 2017-03-17 07:16:24 -07:00
Mark McDowall
878e973081 Fixed: Join grab messages
Fixes #1751
2017-03-13 19:43:07 -07:00
Taloth Saldono
2bf3b9e7dd fixed typo setting custom directory for rtorrent. 2017-03-12 11:18:51 +01:00
Taloth Saldono
2326db0dea Fixed: Refactored rtorrent interface to fix reliability issues with adding magnets & torrents.
fixes #1745
2017-03-11 12:15:42 +01:00
Taloth Saldono
3590fedeaf Fixed: Timing issue in rtorrent handling of magnet links.
ref #1745
2017-03-10 21:07:08 +01:00
Taloth Saldono
f4866cae69 fixed broken project file. 2017-03-10 20:43:16 +01:00
Mark McDowall
149d191f62 Remove NCrunch.Framework 2017-03-09 20:30:39 -08:00
Jamie Magee
bb9bd63382 Upgrade CommonServiceLocator
From 1.0 to 1.3
2017-03-09 20:30:39 -08:00
Jamie Magee
34fda24124 Upgrade Microsoft.AspNet.SignalR.Client
From 1.2.1 to 1.2.2
2017-03-09 20:30:39 -08:00
Jamie Magee
c8d10829a0 Upgrade Selenium.*
From 3.0.1 to 3.2.0
2017-03-09 19:49:05 -08:00
Jamie Magee
ae2bdb757a Upgrade NUnit
From 3.5.0 to 3.6.0
2017-03-09 19:49:02 -08:00
Jamie Magee
714ad075fc Upgrade FluentAssertions
From 4.18.0 to 4.19.0
2017-03-09 19:48:11 -08:00
Jamie Magee
87a05df2fd Upgrade TinyTwitter
From 1.1.1 to 1.1.2

NOTE: Sonarr was already using a modified version of TinyTwitter 1.1.2.
This change just modifies the packages.config file to reflect that
2017-03-09 19:48:11 -08:00
Jamie Magee
f3263efa52 Upgrade SharpRaven
From 2.1.0 to 2.2.0
2017-03-09 19:48:11 -08:00
Jamie Magee
1cad11d207 Upgrade Ical.Net
From 2.2.25 to 2.2.32
2017-03-09 19:48:10 -08:00
Jamie Magee
781df8b20a Upgrade NLog
From 4.4.1 to 4.4.3
2017-03-09 19:48:10 -08:00
Mark McDowall
ebcce05588 Fixed: Parsing headers that have a trailing semi-colon
Fixes #1749
2017-03-09 15:40:13 -08:00
Taloth Saldono
bbf2134fe1 Fixed: Deluge 1.3.14 API support due to changed json-rpc checks.
fixes #1738
2017-03-06 20:14:34 +01:00
Mark McDowall
081c5fc332 Broken ExtraFiles migration due to extentionless files
Fixed: Prevent extensionless files from being imported
Fixed: Broken migration due to extensionless extra files
2017-03-06 11:00:38 -08:00
Mark McDowall
47915d5e05 Fixed: Bad extension when importing extra files 2017-03-05 17:45:35 -08:00
Mark McDowall
47e221d9a0 Fixed: Delay profiles are no longer hidden under advanced settings 2017-03-03 21:16:29 -08:00
Mark McDowall
bf485f6f2c Log number of files found when getting video/non-video files 2017-03-03 20:57:05 -08:00
Mark McDowall
b365d8a537 Include language in suffix when importing 2017-03-03 19:44:31 -08:00
Taloth Saldono
fee8da88a6 Accept full language name as suffix. 2017-03-03 19:44:31 -08:00
Mark McDowall
cc0dbf1af4 New: Rename subtitles and extra files when renaming files
Towards #459
2017-03-03 19:44:31 -08:00
Mark McDowall
836131ebb1 New: Import subtitles and extra files when importing media files 2017-03-03 19:44:31 -08:00
Marcelo Castagna
9a870a3709 Fixed: DownloadStation interface stuck in infinite loop in some cases.
* removed empty spaces. changed dcaex => ex

* Changed error message

* changed error message

* Wrong message, ups

* Another message
2017-03-01 18:46:16 +01:00
Taloth Saldono
afe05189da Fixed series scan tests. 2017-02-28 21:06:41 +01:00
Taloth Saldono
2abaef16f1 Fixed Indexer Health Checks and tests. 2017-02-28 20:59:22 +01:00
Daniel Smith
37d5a3f2ad Fixed: Clear EpisodeFile records from database if Series folder is missing, but root folder appears to be mounted. 2017-02-28 17:01:12 +01:00
Mark McDowall
be4d70e3a9 Fixed: Health check failing and preventing others from running 2017-02-28 00:12:34 -08:00
Mark McDowall
79043f2c64 Improve indexer health check messages
Fixed: Improve health check message when all enabled indexers are disabled due to failures
Closes #1551
2017-02-28 00:12:34 -08:00
Mark McDowall
1dab0aee6a Fixed: Reduce parameters required to add a new series
Fixes #1403
2017-02-27 21:37:33 -08:00
Mark McDowall
9b162f2d5e Fixed: Clean RSS feed before detecting type
Fixes #1518
2017-02-27 21:37:00 -08:00
Mark McDowall
5518cf5362 Added Download decision comparator test to confirm quality is preferred over seeders 2017-02-25 16:18:00 -08:00
Taloth Saldono
f7e3d9b4c2 Fixed: DownloadStation regression in queue detection. 2017-02-23 08:58:50 +01:00
Taloth Saldono
6d9a952bd1 Fixed: DownloadStation proxy failing if non-bt/nzb downloads exist. 2017-02-22 19:10:39 +01:00
margaale
3501e33722 turn task type enum into string 2017-02-22 14:10:12 -03:00
margaale
fa89d33900 Fix for key not found, returning a generic error instead 2017-02-22 14:10:12 -03:00
Mark McDowall
0af48fb2e8 Fixed: NZBGet delete:scan treated as failure
Fixes #1394
2017-02-22 00:31:51 -08:00
Mark McDowall
7e9f0d0522 Updated analytics help text 2017-02-21 11:18:29 -08:00
Taloth Saldono
1f8bd8e1e9 Fixed typo in DL station hint text. 2017-02-21 18:19:55 +01:00
Taloth Saldono
2855090005 Fixed: Removed Womble indexer. 2017-02-21 17:03:10 +01:00
Taloth Saldono
060b9f6fd1 Fixed: Updated BTN api url. 2017-02-21 16:40:20 +01:00
margaale
9304547c95 Test if the OutputPath specified by TvDirectory/TvCategory exists. 2017-02-21 16:40:16 +01:00
margaale
c56c83e169 New: Added support for nzb downloads in Synology Download Station. 2017-02-20 18:57:11 +01:00
Mark McDowall
c6fa883662 Fixed: Saving nyaa settings
Fixes #1687
2017-02-16 09:19:28 -08:00
Mark McDowall
4043d07ab1 Verify LimeTorrents parsing 2017-02-15 22:30:03 -08:00
Mark McDowall
8af3348e7f Fixed: Slow loading root folders caused them to never appear 2017-02-15 22:30:03 -08:00
Taloth Saldono
49d0d4c357 Renamed DownloadStation implementation to TorrentDownloadStation. 2017-02-15 21:32:25 +01:00
Taloth Saldono
47b1157b96 Fixed: Permanently removed kickass rss/api implementation. 2017-02-15 21:32:21 +01:00
Taloth Saldono
adc79f0eba Added more sensible error for BTN html response. 2017-02-15 20:40:32 +01:00
Taloth Saldono
6b117427f8 Fixed double question mark in log. 2017-02-15 20:40:32 +01:00
Mark McDowall
7884dd9a39 New: Added omgwtfnzbs Newznab prefix 2017-02-13 22:46:26 -08:00
Marcelo Castagna
45d8b1e2ad Fixed: Delete data when removing torrent from Download Station
fixes #1676
2017-02-13 20:17:52 +01:00
Marcelo Castagna
cf306f4aba Throw exception with error message return by diskstation (#1672) 2017-02-12 20:20:16 +01:00
Mark McDowall
d7aa23388e New: Update Media info for Windows/macOS to 0.7.92.1 2017-02-11 16:29:49 -08:00
margaale
82a99b7f80 New: Added support for Synology Download Station as torrent client. 2017-02-11 21:06:23 +01:00
Taloth Saldono
2f6d9e191e Fixed: Ignore .nfs* files during copy actions since those files are special NFS files that should never be touched.
fixes #1552
2017-02-09 19:33:28 +01:00
Taloth Saldono
0782a15979 Remove backslashes from BTN release titles.
fixes #1075
2017-02-09 19:33:28 +01:00
vertigo235
ddd119a4eb New: Add paused option for NZBGet
Closes #346
2017-02-08 20:36:39 -08:00
Taloth Saldono
d4788b4cae Added tests for edge-case.
closes #1147
2017-02-08 22:10:30 +01:00
Taloth Saldono
812999423b Fixed: Don't try to show diskspace usage non-existing drives.
fixes #1639
2017-02-07 23:06:14 +01:00
Taloth Saldono
657730f4d2 Fixed: /var/lib/docker no longer shows up in DiskSpace. Caused warnings if the user used docker with zfs storage driver.
fixes #1663
2017-02-07 22:44:31 +01:00
Taloth Saldono
0255eb3aca Fixed: Increased timeout when waiting for rtorrent to finish adding torrent.
fixes #1665
2017-02-07 22:36:47 +01:00
Mark McDowall
fc15daa37e New: Improve parsing of audio channels from MediaInfo output 2017-02-04 22:04:12 -08:00
Mark McDowall
10264a5bfb New: Ensure folders are sorted alphabetically when importing
Closes #294
2017-02-04 22:04:12 -08:00
Mark McDowall
ef044f1ff5 Update README.md 2017-01-27 20:56:07 -08:00
Mark McDowall
ef03e9e9a7 Fixed: Proper port validation for download clients and connections
Closes #1642
2017-01-26 22:35:16 -08:00
Mark McDowall
3bd7c09acf Strip 2160p from titles before parsing 2017-01-23 23:53:15 -08:00
Keivan Beigi
fbd2f8dea4 Fixed: Growl download notification title 2017-01-22 13:07:21 -08:00
Keivan Beigi
15e07f72d4 Better Runtime names 2017-01-20 20:54:04 -08:00
Keivan Beigi
f25bfe9d28 don't log migrations during regular DB tests 2017-01-20 20:33:10 -08:00
Keivan Beigi
d5e720c404 include os name, runtime name in version tag for sentry 2017-01-20 20:16:34 -08:00
Keivan Beigi
c9a8ebc2e6 Create anonymous hash to detect issue duplication 2017-01-20 20:15:49 -08:00
Mark McDowall
5e7e816c03 AsOsAgnostic paths for root folder tests 2017-01-20 09:02:36 -08:00
vertigo235
f56076a135 Fixed: Pushover silent priority 2017-01-19 23:51:58 -08:00
Mark McDowall
54dd527f01 Exclude .grab and Plex Version folders 2017-01-19 01:38:37 -08:00
Mark McDowall
c6eb19c04d Exclude .grab and Plex Version folders
New: Ignore .grab folder (Plex DVR)
New: Ignore Plex Versions folder (Media Optimizer)
Closes #1610
2017-01-18 20:15:32 -08:00
Mitchell Cash
38b65ba27d Cleanup README (#1622) 2017-01-18 12:31:20 -08:00
Keivan Beigi
a2a49ce934 Revert "New: Upgraded SQLite binares for macOS"
This reverts commit 8d91f18823.
2017-01-18 10:04:36 -08:00
Keivan Beigi
047d5a4388 Revert "New: Upgraded SQLite binaries for Windows (3.16.0)"
This reverts commit 111e401a2c.
2017-01-18 10:04:26 -08:00
Keivan Beigi
aae69ff49a Revert "Upgraded System.Data.SQLite to 1.0.104.0"
This reverts commit 01e2f4e7e5.
2017-01-18 10:04:07 -08:00
Sander Ploegsma
da451cfe03 Option to convert ical feed items to all-day events 2017-01-17 22:36:48 +01:00
Keivan Beigi
01e2f4e7e5 Upgraded System.Data.SQLite to 1.0.104.0 2017-01-17 11:47:46 -08:00
Keivan Beigi
8aacc61c50 New: Switched nyaa.se to HTTPS 2017-01-17 11:47:46 -08:00
Keivan Beigi
111e401a2c New: Upgraded SQLite binaries for Windows (3.16.0) 2017-01-17 11:47:45 -08:00
Keivan
8d91f18823 New: Upgraded SQLite binares for macOS
Upgraded from 3.8.1 to 3.9.1
2017-01-17 11:47:45 -08:00
Keivan Beigi
cea6469ab8 Use nameof 2017-01-17 11:47:06 -08:00
Mark McDowall
ced7a7dce2 New: Prefer anime batch releases over single episode releases 2017-01-14 12:28:22 -08:00
Mitchell Cash
20a2cfe260 Use DOGnzb name as the default rather than the URL 2017-01-14 08:45:29 -08:00
Drew Freyling
5b0a285b84 New: Reduced image file sizes 2017-01-12 13:10:19 -08:00
Mark McDowall
68ea8a551c Fixed: Parsing of SABnzbd develop version 2017-01-12 00:38:56 -08:00
Keivan Beigi
2e36d35815 Added app.manifest to indicate proper windows 10 support 2017-01-06 16:02:57 -08:00
Keivan Beigi
ed2e4d0f1d Sentry will now back-off if it's API key is revoked. 2017-01-06 11:55:54 -08:00
Keivan Beigi
0bdc137093 Smaller sentry payload, send machine name as user name 2017-01-05 17:43:24 -08:00
Keivan Beigi
cd7e208efa Revert "Use line number instead of message for sentry fingerprint"
This reverts commit 5f339c0a92.

# Conflicts:
#	src/NzbDrone.Common/Instrumentation/Sentry/SentryTarget.cs
2017-01-05 17:43:24 -08:00
Keivan Beigi
73840dcacc The great logger.Error cleanup! 2017-01-05 17:43:24 -08:00
Keivan Beigi
e45d4f60a4 Moved Fatal logging to use nlog patterns 2017-01-05 17:43:24 -08:00
Keivan Beigi
782efcfaf1 Added a one hour debounce of reporting the same errors to sentry 2017-01-05 17:43:24 -08:00
Keivan Beigi
76a7d4f866 Use line number instead of message for sentry fingerprint 2017-01-05 17:43:24 -08:00
Keivan Beigi
d61976251e Apparently RemoveTarget doesn't do what you expect it to do. 2017-01-05 10:46:16 -08:00
Keivan Beigi
2487e8ed49 Don't report errors that don't have exceptions 2017-01-05 10:25:50 -08:00
Keivan Beigi
54bc642476 Fixed: OS Version detection shouldn't break user agents. Fixes #1611 2017-01-05 10:25:05 -08:00
Keivan Beigi
6577b0a721 Don't include null in sentry fingerprint if even has no exception 2017-01-04 23:28:51 -08:00
Keivan Beigi
bcd67dee5e Added fingerprint to sentry events to allow better grouping 2017-01-04 20:01:43 -08:00
Keivan Beigi
e6705db743 Added platform version error handling 2017-01-04 19:15:47 -08:00
Keivan Beigi
dd7fdd8ace Disable Sentry Reporting based on analytics flag 2017-01-04 17:56:29 -08:00
Keivan Beigi
a1f112e62f Added branch name to Assembly Info 2017-01-04 14:20:13 -08:00
Keivan Beigi
053c730799 Added Sentry error reporting 2017-01-04 14:19:53 -08:00
Keivan Beigi
61579cfb7e Consider /buildAgent/ to be a none production startup path 2017-01-04 14:19:50 -08:00
Keivan Beigi
92d706a10d Updated bindingRedirect for Newtonsoft.Json 2017-01-04 14:18:38 -08:00
Keivan Beigi
6ae5829439 Removed duplicated code from ContainerBuilders 2017-01-04 14:18:37 -08:00
Keivan Beigi
8252a2a60f RIP 2017-01-04 00:19:32 -08:00
Keivan Beigi
009dc14805 Added Windows Server detection logic 2017-01-03 18:56:28 -08:00
Keivan Beigi
e0ff25d5be New: switched nyaa to HTTPS 2017-01-03 18:37:46 -08:00
Keivan Beigi
ad7d571b24 New: Better platform detection specifically for Non-Windows Systems 2017-01-03 18:37:23 -08:00
Keivan Beigi
598b5322b7 Fixed linux build 2017-01-03 18:31:48 -08:00
Keivan Beigi
76505bdaa1 Added Rider dir to git ignore. 2017-01-03 18:30:21 -08:00
Keivan Beigi
d64d35361c Revert "Upgraded Moq" (Mono compatibility)
This reverts commit 3140d5d4b0.
2017-01-03 10:25:01 -08:00
Mark McDowall
d5ef451bb4 Fixed: Parsing of 2017x123 episode format 2017-01-02 11:46:25 -08:00
Keivan Beigi
3140d5d4b0 Upgraded Moq 2016-12-28 22:41:48 -08:00
Keivan Beigi
fdb5ccdae1 Updated Newtonsoft.Json from 6.0.6 to 9.0.1 2016-12-28 22:41:47 -08:00
Keivan Beigi
a2ce435239 Upgraded Nlog, NCrunch 2016-12-28 22:41:46 -08:00
Keivan Beigi
a34e69b35b Notification API Cleanup 2016-12-27 23:52:20 -08:00
Keivan
03b83ed226 Rename Metadata Dir to fix build in *nix 2016-12-24 12:13:16 -08:00
Keivan
eafe79450e Rename Metadata Dir Step 1 2016-12-24 12:13:15 -08:00
Keivan
f286dba40a Rename QBittorent Dir to fix building in *nix 2016-12-24 12:13:14 -08:00
Keivan
448f579723 Rename QBittorent Dir Step 1 2016-12-24 12:13:13 -08:00
Keivan Beigi
1562081235 Upgraded MediaInfo from 0.7.74 to 0.7.91 2016-12-23 13:51:01 -08:00
Keivan Beigi
0214c8e0f0 Removed unused using statements 2016-12-23 13:45:24 -08:00
Keivan Beigi
f16dd069b5 Upgraded DDay.iCal to Ical.Net 2016-12-21 20:38:37 -08:00
Keivan Beigi
aba613acd1 Because it's 2016! 2016-12-21 20:38:37 -08:00
Keivan Beigi
2e36538dcd Environment variables sometimes lie! 2016-12-21 20:38:35 -08:00
Keivan Beigi
c42e4d682c more kosher regex group names. 2016-12-21 20:38:35 -08:00
Keivan Beigi
327536b684 Added NoOp Performance Counter Manager 2016-12-21 20:38:35 -08:00
Mark McDowall
7dbacf105d Fixed: Parsing of some anime releases that use Episode after the title 2016-12-21 18:08:02 -08:00
margaale
8d776abb48 Fixed: Handle download clients sending invalid content-type header.
DownloadStation incorrectly surrounds charset with double-quotes. whereas the http standard specifies they must be without quotes.

fixes #1586
2016-12-20 20:54:44 +01:00
Mark McDowall
7f8093de92 Fixed: Use Category from qBittorrent when set instead of Label 2016-12-13 23:32:46 -08:00
Mark McDowall
c1de7f26d1 Added test for 4 digit season number and series title with year 2016-12-13 23:32:46 -08:00
Mark McDowall
4a82d30d3d Fixed: Parsing of mini episodes that contain the year in the title 2016-12-13 23:32:46 -08:00
Keivan Beigi
da52e60f36 Upgraded Nlog/RestSharp/Selenium 2016-12-12 11:17:15 -08:00
Keivan Beigi
cf58e52f40 Upgraded Nancy!!!! 2016-12-12 11:17:15 -08:00
Keivan Beigi
2a7ae96906 upgraded nbuilder/automoq 2016-12-12 11:17:15 -08:00
Keivan Beigi
053f6fcaeb Upgrade fluentmigrator 2016-12-12 11:17:15 -08:00
Keivan Beigi
0c75d0bb03 Upgraded nunit/fluentassertion 2016-12-12 11:17:15 -08:00
Thijs Tijsma
0c9b5dc97e Added Visual Studio folder (.vs) to the ignore file. 2016-12-11 15:33:48 -08:00
Mark McDowall
c99e92e6af New: Validate PMS version before performing a library update 2016-12-08 10:23:53 -08:00
Mark McDowall
3f64c01d5b Fixed: Partial library updates for Plex Media Server 1.3 2016-12-07 12:58:23 -08:00
Mark McDowall
f022dae1fa Fixed: Partial library updates for Plex Media Server 1.3 2016-12-06 17:05:00 -08:00
Mark McDowall
52ad8cf37f Fixed: Error handling of valid, empty responses from Plex Media Server 2016-12-06 09:11:50 -08:00
Mark McDowall
3d20fd8f96 Fixed: Error handling of valid, empty responses from Plex Media Server 2016-12-05 09:34:17 -08:00
Lloyd Sparkes
cf662291d5 Fixed: Lingering Socks5 Proxy sockets when proxy is using dynamic ips 2016-12-04 16:43:18 +01:00
Mark McDowall
43d85bf59d Fixed: Parsing of some Plex server responses before 1.3 2016-12-02 10:39:12 -08:00
ARTbird309
4a149c356b New: Telegram notifications
Closes #1355
2016-11-30 19:08:29 -08:00
Chris Allen
740fc9154f Shorten 'MPEG-2 Video' to 'MPEG2'. 2016-11-30 17:54:22 -08:00
Mark McDowall
0a657302f7 New: Support for Plex Media Server 1.3.0's new JSON responses 2016-11-23 16:38:57 -08:00
Mark McDowall
7b09b259a8 Fixed: Don't delete extra files after unlinking an episode file that still exists on disk 2016-11-23 16:38:40 -08:00
1159 changed files with 16719 additions and 10831 deletions

3
.gitignore vendored
View File

@@ -10,6 +10,7 @@ src/**/[Oo]bj/
*.suo
*.user
*.sln.docstates
.vs/
# Build results
*_i.c
@@ -132,3 +133,5 @@ output/*
_start
_temp_*/**/*
src/.idea/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 707 B

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 34 KiB

BIN
Logo/96-Outline-White.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

52
README.md Normal file
View File

@@ -0,0 +1,52 @@
# Sonarr
Sonarr is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new episodes of your favorite shows and will grab, sort and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available.
## Major Features Include:
* Support for major platforms: Windows, Linux, macOS, Raspberry Pi, etc.
* Automatically detects new episodes
* Can scan your existing library and download any missing episodes
* Can watch for better quality of the episodes you already have and do an automatic upgrade. *eg. from DVD to Blu-Ray*
* Automatic failed download handling will try another release if one fails
* Manual search so you can pick any release or to see why a release was not downloaded automatically
* Fully configurable episode renaming
* Full integration with SABnzbd and NZBGet
* Full integration with Kodi, Plex (notification, library update, metadata)
* Full support for specials and multi-episode releases
* And a beautiful UI
## Configuring Development Environment:
### Requirements
* Visual Studio 2015 (https://www.visualstudio.com/vs/)
* [Git](https://git-scm.com/downloads)
* [NodeJS](https://nodejs.org/en/download/)
### Setup
* Make sure all the required software mentioned above are installed.
* Clone the repository into your development machine. [*info*](https://help.github.com/articles/working-with-repositories)
* Grab the submodules `git submodule init && git submodule update`
* Install the required Node Packages `npm install`
* Start gulp to monitor your dev environment for any changes that need post processing using `npm start` command.
*Please note gulp must be running at all times while you are working with Sonarr client source files.*
### Development
* Open `NzbDrone.sln` in Visual Studio
* Make sure `NzbDrone.Console` is set as the startup project
### License
* [GNU GPL v3](http://www.gnu.org/licenses/gpl.html)
* Copyright 2010-2017
### Sponsors
* [JetBrains](http://www.jetbrains.com/) for providing us with free licenses to their great tools
* [ReSharper](http://www.jetbrains.com/resharper/)
* [WebStorm](http://www.jetbrains.com/webstorm/)
* [TeamCity](http://www.jetbrains.com/teamcity/)

View File

@@ -25,7 +25,7 @@ gulp.task('copyHtml', function () {
});
gulp.task('copyContent', function () {
return gulp.src([paths.src.content + '**/*.*', '!**/*.less'])
return gulp.src([paths.src.content + '**/*.*', '!**/*.less', '!**/*.css'])
.pipe(gulp.dest(paths.dest.content))
.pipe(livereload());
});

View File

@@ -5,7 +5,7 @@ var postcss = require('gulp-postcss');
var sourcemaps = require('gulp-sourcemaps');
var autoprefixer = require('autoprefixer-core');
var livereload = require('gulp-livereload');
var cleancss = require('gulp-clean-css');
var print = require('gulp-print');
var paths = require('./paths');
var errorHandler = require('./errorHandler');
@@ -16,6 +16,10 @@ gulp.task('less', function() {
paths.src.content + 'bootstrap.less',
paths.src.content + 'theme.less',
paths.src.content + 'overrides.less',
paths.src.content + 'bootstrap.toggle-switch.css',
paths.src.content + 'fullcalendar.css',
paths.src.content + 'Messenger/messenger.css',
paths.src.content + 'Messenger/messenger.flat.css',
paths.src.root + 'Series/series.less',
paths.src.root + 'Activity/activity.less',
paths.src.root + 'AddSeries/addSeries.less',
@@ -33,12 +37,13 @@ gulp.task('less', function() {
.pipe(sourcemaps.init())
.pipe(less({
dumpLineNumbers : 'false',
compress : true,
yuicompress : true,
compress : false,
yuicompress : false,
ieCompat : true,
strictImports : true
}))
.pipe(postcss([ autoprefixer({ browsers: ['last 2 versions'] }) ]))
.pipe(cleancss())
.on('error', errorHandler.onError)
.pipe(sourcemaps.write(paths.dest.content))
.pipe(gulp.dest(paths.dest.content))

View File

@@ -20,6 +20,7 @@
"del": "1.2.0",
"gulp": "3.9.0",
"gulp-cached": "1.1.0",
"gulp-clean-css": "^3.0.4",
"gulp-concat": "2.6.0",
"gulp-declare": "0.3.0",
"gulp-handlebars": "3.0.1",

View File

@@ -1,53 +0,0 @@
# Sonarr #
Sonarr is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new episodes of your favorite shows and will grab, sort and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available.
## Major Features Include: ##
* Support for major platforms: Windows, Linux, OSX, Raspberry Pi, etc.
* Automatically detects new episodes
* Can scan your existing library and download any missing episodes
* Can watch for better quality of the episodes you already have and do an automatic upgrade. *eg. from DVD to Blu-Ray*
* Automatic failed download handling will try another release if one fails
* Manual search so you can pick any release or to see why a release was not downloaded automatically
* Fully configurable episode renaming
* Full integration with SABNzbd and NzbGet
* Full integration with XBMC, Plex (notification, library update, metadata)
* Full support for specials and multi-episode releases
* And a beautiful UI
## Configuring Development Environment: ##
### Requirements ###
- Visual Studio 2015 [Free Community Edition](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx)
- [Git](http://git-scm.com/downloads)
- [NodeJS](http://nodejs.org/download/)
### Setup ###
- Make sure all the required software mentioned above are installed.
- Clone the repository into your development machine. [*info*](https://help.github.com/articles/working-with-repositories)
- Grab the submodules `git submodule init && git submodule update`
- install the required Node Packages `npm install`
- start gulp to monitor your dev environment for any changes that need post processing using `npm start` command.
*Please note gulp must be running at all times while you are working with Sonarr client source files.*
### Development ###
- Open `NzbDrone.sln` in Visual Studio
- Make sure `NzbDrone.Console` is set as the startup project
### License ###
* [GNU GPL v3](http://www.gnu.org/licenses/gpl.html)
Copyright 2010-2016
### Sponsors ###
- [JetBrains](http://www.jetbrains.com/) for providing us with free licenses to their great tools
- [ReSharper](http://www.jetbrains.com/resharper/)
- [WebStorm](http://www.jetbrains.com/webstorm/)
- [TeamCity](http://www.jetbrains.com/teamcity/)

View File

@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following

View File

@@ -52,8 +52,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.3.4\lib\net40\NLog.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\NLog.4.4.3\lib\net40\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />

View File

@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NLog" version="4.3.4" targetFramework="net40" />
<package id="NLog" version="4.4.3" targetFramework="net40" />
</packages>

View File

@@ -1,9 +1,6 @@
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq.Expressions;
using System.Reflection;
using System.Threading;
namespace Microsoft.AspNet.SignalR.Infrastructure

View File

@@ -4,7 +4,7 @@ using System.Diagnostics;
namespace Microsoft.AspNet.SignalR.Infrastructure
{
internal class NoOpPerformanceCounter : IPerformanceCounter
public class NoOpPerformanceCounter : IPerformanceCounter
{
public string CounterName
{

View File

@@ -43,9 +43,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.6.0.6\lib\net40\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@@ -281,4 +281,4 @@
<Target Name="BeforeBuild">
</Target>
-->
</Project>
</Project>

View File

@@ -6,7 +6,6 @@ using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNet.SignalR.Configuration;
using Microsoft.AspNet.SignalR.Hosting;

View File

@@ -1,13 +1,9 @@
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNet.SignalR.Infrastructure;

View File

@@ -3,7 +3,6 @@
using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNet.SignalR.Hosting;
using Microsoft.AspNet.SignalR.Infrastructure;

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="6.0.6" targetFramework="net40" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net40" />
</packages>

View File

@@ -5,13 +5,10 @@ using System.Collections.Generic;
using System.Collections.Specialized;
using System.Security.Principal;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNet.SignalR.Owin.Infrastructure;
using Microsoft.AspNet.SignalR.Hosting;
namespace Microsoft.AspNet.SignalR.Owin
{
using WebSocketFunc = Func<IDictionary<string, object>, Task>;
public partial class ServerRequest :
#if NET45
IWebSocketRequest

View File

@@ -38,17 +38,21 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="FluentAssertions, Version=4.2.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net40\FluentAssertions.dll</HintPath>
<Reference Include="FizzWare.NBuilder, Version=4.0.0.115, Culture=neutral, PublicKeyToken=5651b03e12e42c12, processorArchitecture=MSIL">
<HintPath>..\packages\NBuilder.4.0.0\lib\net40\FizzWare.NBuilder.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentAssertions.Core, Version=4.2.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net40\FluentAssertions.Core.dll</HintPath>
<Private>True</Private>
<Reference Include="FluentAssertions, Version=4.19.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=3.2.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.2.0\lib\net40\nunit.framework.dll</HintPath>
<Private>True</Private>
<Reference Include="FluentAssertions.Core, Version=4.19.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.Core.dll</HintPath>
</Reference>
<Reference Include="Moq, Version=4.2.1510.2205, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=3.6.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.6.0\lib\net40\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@@ -57,9 +61,6 @@
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="FizzWare.NBuilder">
<HintPath>..\packages\NBuilder.3.0.1.1\lib\FizzWare.NBuilder.dll</HintPath>
</Reference>
<Reference Include="Moq">
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
</Reference>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="FluentAssertions" version="4.2.1" targetFramework="net40" />
<package id="FluentAssertions" version="4.19.0" targetFramework="net40" />
<package id="Moq" version="4.0.10827" />
<package id="NBuilder" version="3.0.1.1" targetFramework="net40" />
<package id="NUnit" version="3.2.0" targetFramework="net40" />
<package id="NBuilder" version="4.0.0" targetFramework="net40" />
<package id="NUnit" version="3.6.0" targetFramework="net40" />
</packages>

View File

@@ -27,18 +27,18 @@ namespace NzbDrone.Api.Authentication
_configFileProvider = configFileProvider;
}
public int Order { get { return 10; } }
public int Order => 10;
public void Register(IPipelines pipelines)
{
if (_configFileProvider.AuthenticationMethod == AuthenticationType.Forms)
{
RegisterFormsAuth(pipelines);
RegisterFormsAuth(pipelines);
}
else if (_configFileProvider.AuthenticationMethod == AuthenticationType.Basic)
{
pipelines.EnableBasicAuthentication(new BasicAuthenticationConfiguration(_authenticationService, "Sonarr"));
pipelines.EnableBasicAuthentication(new BasicAuthenticationConfiguration(_authenticationService, "Sonarr"));
}
pipelines.BeforeRequest.AddItemToEndOfPipeline((Func<NancyContext, Response>) RequiresAuthentication);
@@ -64,10 +64,13 @@ namespace NzbDrone.Api.Authentication
new DefaultHmacProvider(new PassphraseKeyGenerator(_configService.HmacPassphrase, Encoding.ASCII.GetBytes(_configService.HmacSalt)))
);
FormsAuthentication.FormsAuthenticationCookieName = "_ncfa_sonarr";
FormsAuthentication.Enable(pipelines, new FormsAuthenticationConfiguration
{
RedirectUrl = _configFileProvider.UrlBase + "/login",
UserMapper = _authenticationService,
Path = _configFileProvider.UrlBase,
CryptographyConfiguration = cryptographyConfiguration
});
}

View File

@@ -1,5 +1,4 @@
using System;
using NzbDrone.Core.Blacklisting;
using NzbDrone.Core.Blacklisting;
using NzbDrone.Core.Datastore;
namespace NzbDrone.Api.Blacklist

View File

@@ -2,7 +2,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using DDay.iCal;
using Ical.Net;
using Ical.Net.DataTypes;
using Ical.Net.Interfaces.Serialization;
using Ical.Net.Serialization;
using Ical.Net.Serialization.iCalendar.Factory;
using NzbDrone.Core.Tv;
using Nancy.Responses;
using NzbDrone.Core.Tags;
@@ -22,6 +26,7 @@ namespace NzbDrone.Api.Calendar
_tagService = tagService;
Get["/NzbDrone.ics"] = options => GetCalendarFeed();
Get["/Sonarr.ics"] = options => GetCalendarFeed();
}
private Response GetCalendarFeed()
@@ -32,6 +37,7 @@ namespace NzbDrone.Api.Calendar
var end = DateTime.Today.AddDays(futureDays);
var unmonitored = false;
var premiersOnly = false;
var asAllDay = false;
var tags = new List<int>();
// TODO: Remove start/end parameters in v3, they don't work well for iCal
@@ -41,6 +47,7 @@ namespace NzbDrone.Api.Calendar
var queryFutureDays = Request.Query.FutureDays;
var queryUnmonitored = Request.Query.Unmonitored;
var queryPremiersOnly = Request.Query.PremiersOnly;
var queryAsAllDay = Request.Query.AsAllDay;
var queryTags = Request.Query.Tags;
if (queryStart.HasValue) start = DateTime.Parse(queryStart.Value);
@@ -68,6 +75,11 @@ namespace NzbDrone.Api.Calendar
premiersOnly = bool.Parse(queryPremiersOnly.Value);
}
if (queryAsAllDay.HasValue)
{
asAllDay = bool.Parse(queryAsAllDay.Value);
}
if (queryTags.HasValue)
{
var tagInput = (string)queryTags.Value.ToString();
@@ -75,7 +87,12 @@ namespace NzbDrone.Api.Calendar
}
var episodes = _episodeService.EpisodesBetweenDates(start, end, unmonitored);
var icalCalendar = new iCalendar();
var calendar = new Ical.Net.Calendar
{
ProductId = "-//sonarr.tv//Sonarr//EN"
};
foreach (var episode in episodes.OrderBy(v => v.AirDateUtc.Value))
{
@@ -89,28 +106,35 @@ namespace NzbDrone.Api.Calendar
continue;
}
var occurrence = icalCalendar.Create<Event>();
occurrence.UID = "NzbDrone_episode_" + episode.Id.ToString();
var occurrence = calendar.Create<Event>();
occurrence.Uid = "NzbDrone_episode_" + episode.Id;
occurrence.Status = episode.HasFile ? EventStatus.Confirmed : EventStatus.Tentative;
occurrence.Start = new iCalDateTime(episode.AirDateUtc.Value) { HasTime = true };
occurrence.End = new iCalDateTime(episode.AirDateUtc.Value.AddMinutes(episode.Series.Runtime)) { HasTime = true };
occurrence.Description = episode.Overview;
occurrence.Categories = new List<string>() { episode.Series.Network };
if (asAllDay)
{
occurrence.Start = new CalDateTime(episode.AirDateUtc.Value) { HasTime = false };
}
else
{
occurrence.Start = new CalDateTime(episode.AirDateUtc.Value) { HasTime = true };
occurrence.End = new CalDateTime(episode.AirDateUtc.Value.AddMinutes(episode.Series.Runtime)) { HasTime = true };
}
switch (episode.Series.SeriesType)
{
case SeriesTypes.Daily:
occurrence.Summary = string.Format("{0} - {1}", episode.Series.Title, episode.Title);
occurrence.Summary = $"{episode.Series.Title} - {episode.Title}";
break;
default:
occurrence.Summary = string.Format("{0} - {1}x{2:00} - {3}", episode.Series.Title, episode.SeasonNumber, episode.EpisodeNumber, episode.Title);
occurrence.Summary =$"{episode.Series.Title} - {episode.SeasonNumber}x{episode.EpisodeNumber:00} - {episode.Title}";
break;
}
}
var serializer = new DDay.iCal.Serialization.iCalendar.SerializerFactory().Build(icalCalendar.GetType(), new DDay.iCal.Serialization.SerializationContext()) as DDay.iCal.Serialization.IStringSerializer;
var icalendar = serializer.SerializeToString(icalCalendar);
var serializer = (IStringSerializer) new SerializerFactory().Build(calendar.GetType(), new SerializationContext());
var icalendar = serializer.SerializeToString(calendar);
return new TextResponse(icalendar, "text/calendar");
}

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
namespace NzbDrone.Api.ClientSchema
{

View File

@@ -73,14 +73,14 @@ namespace NzbDrone.Api.ClientSchema
if (propertyInfo.PropertyType == typeof(int))
{
var value = Convert.ToInt32(field.Value);
propertyInfo.SetValue(target, value, null);
var value = field.Value.ToString().ParseInt32();
propertyInfo.SetValue(target, value ?? 0, null);
}
else if (propertyInfo.PropertyType == typeof(long))
{
var value = Convert.ToInt64(field.Value);
propertyInfo.SetValue(target, value, null);
var value = field.Value.ToString().ParseInt64();
propertyInfo.SetValue(target, value ?? 0, null);
}
else if (propertyInfo.PropertyType == typeof(int?))

View File

@@ -1,5 +1,4 @@
using System;
using FluentValidation;
using FluentValidation;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Validation.Paths;

View File

@@ -1,5 +1,4 @@
using System;
using NzbDrone.Api.REST;
using NzbDrone.Api.REST;
using NzbDrone.Core.Configuration;
namespace NzbDrone.Api.Config

View File

@@ -1,5 +1,4 @@
using System;
using NzbDrone.Api.REST;
using NzbDrone.Api.REST;
using NzbDrone.Core.Authentication;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Update;

View File

@@ -1,5 +1,4 @@
using System;
using FluentValidation;
using FluentValidation;
using NzbDrone.Api.Validation;
using NzbDrone.Core.Configuration;

View File

@@ -1,5 +1,4 @@
using System;
using NzbDrone.Api.REST;
using NzbDrone.Api.REST;
using NzbDrone.Core.Configuration;
namespace NzbDrone.Api.Config

View File

@@ -20,6 +20,7 @@ namespace NzbDrone.Api.Config
public bool SkipFreeSpaceCheckWhenImporting { get; set; }
public bool CopyUsingHardlinks { get; set; }
public bool ImportExtraFiles { get; set; }
public string ExtraFileExtensions { get; set; }
public bool EnableMediaInfo { get; set; }
}
@@ -44,6 +45,7 @@ namespace NzbDrone.Api.Config
SkipFreeSpaceCheckWhenImporting = model.SkipFreeSpaceCheckWhenImporting,
CopyUsingHardlinks = model.CopyUsingHardlinks,
ImportExtraFiles = model.ImportExtraFiles,
ExtraFileExtensions = model.ExtraFileExtensions,
EnableMediaInfo = model.EnableMediaInfo
};

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using FluentValidation;
using FluentValidation.Results;

View File

@@ -1,5 +1,4 @@
using System;
using NzbDrone.Api.REST;
using NzbDrone.Api.REST;
using NzbDrone.Core.Organizer;
namespace NzbDrone.Api.Config

View File

@@ -1,7 +1,4 @@
using System;
using System.Linq;
using System.Reflection;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Configuration;
namespace NzbDrone.Api.Config
{

View File

@@ -1,5 +1,4 @@
using System;
using NzbDrone.Api.REST;
using NzbDrone.Api.REST;
using NzbDrone.Core.Configuration;
namespace NzbDrone.Api.Config

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using NzbDrone.Core.DiskSpace;
namespace NzbDrone.Api.DiskSpace

View File

@@ -1,5 +1,4 @@
using System;
using NzbDrone.Api.REST;
using NzbDrone.Api.REST;
namespace NzbDrone.Api.DiskSpace
{

View File

@@ -1,5 +1,4 @@
using System;
using NzbDrone.Core.Download;
using NzbDrone.Core.Download;
namespace NzbDrone.Api.DownloadClient
{

View File

@@ -1,5 +1,4 @@
using System;
using NzbDrone.Core.Indexers;
using NzbDrone.Core.Indexers;
namespace NzbDrone.Api.DownloadClient
{

View File

@@ -1,15 +1,13 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using NLog;
using NzbDrone.Api.REST;
using NzbDrone.Core.Datastore.Events;
using NzbDrone.Core.MediaFiles;
using NzbDrone.Core.MediaFiles.Events;
using NzbDrone.Core.Messaging.Events;
using NzbDrone.Core.Tv;
using NzbDrone.Core.DecisionEngine;
using NzbDrone.Core.Exceptions;
using NzbDrone.SignalR;
using HttpStatusCode = System.Net.HttpStatusCode;
namespace NzbDrone.Api.EpisodeFiles
{
@@ -17,24 +15,21 @@ namespace NzbDrone.Api.EpisodeFiles
IHandle<EpisodeFileAddedEvent>
{
private readonly IMediaFileService _mediaFileService;
private readonly IRecycleBinProvider _recycleBinProvider;
private readonly IDeleteMediaFiles _mediaFileDeletionService;
private readonly ISeriesService _seriesService;
private readonly IQualityUpgradableSpecification _qualityUpgradableSpecification;
private readonly Logger _logger;
public EpisodeFileModule(IBroadcastSignalRMessage signalRBroadcaster,
IMediaFileService mediaFileService,
IRecycleBinProvider recycleBinProvider,
IDeleteMediaFiles mediaFileDeletionService,
ISeriesService seriesService,
IQualityUpgradableSpecification qualityUpgradableSpecification,
Logger logger)
IQualityUpgradableSpecification qualityUpgradableSpecification)
: base(signalRBroadcaster)
{
_mediaFileService = mediaFileService;
_recycleBinProvider = recycleBinProvider;
_mediaFileDeletionService = mediaFileDeletionService;
_seriesService = seriesService;
_qualityUpgradableSpecification = qualityUpgradableSpecification;
_logger = logger;
GetResourceById = GetEpisodeFile;
GetResourceAll = GetEpisodeFiles;
UpdateResource = SetQuality;
@@ -73,12 +68,15 @@ namespace NzbDrone.Api.EpisodeFiles
private void DeleteEpisodeFile(int id)
{
var episodeFile = _mediaFileService.Get(id);
var series = _seriesService.GetSeries(episodeFile.SeriesId);
var fullPath = Path.Combine(series.Path, episodeFile.RelativePath);
_logger.Info("Deleting episode file: {0}", fullPath);
_recycleBinProvider.DeleteFile(fullPath);
_mediaFileService.Delete(episodeFile, DeleteMediaFileReason.Manual);
if (episodeFile == null)
{
throw new NzbDroneClientException(HttpStatusCode.NotFound, "Episode file not found");
}
var series = _seriesService.GetSeries(episodeFile.SeriesId);
_mediaFileDeletionService.DeleteEpisodeFile(series, episodeFile);
}
public void Handle(EpisodeFileAddedEvent message)

View File

@@ -1,10 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using NzbDrone.Common.Extensions;
using NzbDrone.Api.EpisodeFiles;
using NzbDrone.Api.Extensions;
using NzbDrone.Api.Series;
using NzbDrone.Core.Datastore.Events;
using NzbDrone.Core.DecisionEngine;
@@ -18,7 +14,7 @@ namespace NzbDrone.Api.Episodes
{
public abstract class EpisodeModuleWithSignalR : NzbDroneRestModuleWithSignalR<EpisodeResource, Episode>,
IHandle<EpisodeGrabbedEvent>,
IHandle<EpisodeDownloadedEvent>
IHandle<EpisodeImportedEvent>
{
protected readonly IEpisodeService _episodeService;
protected readonly ISeriesService _seriesService;
@@ -119,9 +115,14 @@ namespace NzbDrone.Api.Episodes
}
}
public void Handle(EpisodeDownloadedEvent message)
public void Handle(EpisodeImportedEvent message)
{
foreach (var episode in message.Episode.Episodes)
if (!message.NewDownload)
{
return;
}
foreach (var episode in message.EpisodeInfo.Episodes)
{
BroadcastResourceChange(ModelAction.Updated, episode.Id);
}

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using NzbDrone.Api.REST;

View File

@@ -63,18 +63,16 @@ namespace NzbDrone.Api.ErrorManagement
}.AsResponse(HttpStatusCode.Conflict);
}
var sqlErrorMessage = string.Format("[{0} {1}]", context.Request.Method, context.Request.Path);
_logger.Error(sqLiteException, sqlErrorMessage);
_logger.Error(sqLiteException, "[{0} {1}]", context.Request.Method, context.Request.Path);
}
_logger.Fatal(exception, "Request Failed");
_logger.Fatal(exception, "Request Failed. {0} {1}", context.Request.Method, context.Request.Path);
return new ErrorModel
{
Message = exception.Message,
Description = exception.ToString()
}.AsResponse(HttpStatusCode.InternalServerError);
{
Message = exception.Message,
Description = exception.ToString()
}.AsResponse(HttpStatusCode.InternalServerError);
}
}
}

View File

@@ -14,7 +14,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
_cacheableSpecification = cacheableSpecification;
}
public int Order { get { return 0; } }
public int Order => 0;
public void Register(IPipelines pipelines)
{

View File

@@ -7,7 +7,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
{
public class CorsPipeline : IRegisterNancyPipeline
{
public int Order { get { return 0; } }
public int Order => 0;
public void Register(IPipelines pipelines)
{

View File

@@ -13,7 +13,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
{
private readonly Logger _logger;
public int Order { get { return 0; } }
public int Order => 0;
public GzipCompressionPipeline(Logger logger)
{

View File

@@ -14,7 +14,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
_cacheableSpecification = cacheableSpecification;
}
public int Order { get { return 0; } }
public int Order => 0;
public void Register(IPipelines pipelines)
{

View File

@@ -7,7 +7,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
{
public class NzbDroneVersionPipeline : IRegisterNancyPipeline
{
public int Order { get { return 0; } }
public int Order => 0;
public void Register(IPipelines pipelines)
{

View File

@@ -1,5 +1,4 @@
using System;
using System.Linq;
using System.Threading;
using Nancy;
using Nancy.Bootstrapper;
@@ -23,7 +22,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
_errorPipeline = errorPipeline;
}
public int Order { get { return 100; } }
public int Order => 100;
public void Register(IPipelines pipelines)
{
@@ -40,7 +39,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
context.Items["ApiRequestStartTime"] = DateTime.UtcNow;
var reqPath = GetRequestPathAndQuery(context.Request);
_loggerHttp.Trace("Req: {0} [{1}] {2}", id, context.Request.Method, reqPath);
return null;
@@ -81,7 +80,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
{
if (request.Url.Query.IsNotNullOrWhiteSpace())
{
return string.Concat(request.Url.Path, "?", request.Url.Query);
return string.Concat(request.Url.Path, request.Url.Query);
}
else
{
@@ -89,4 +88,4 @@ namespace NzbDrone.Api.Extensions.Pipelines
}
}
}
}
}

View File

@@ -0,0 +1,46 @@
using System;
using Nancy;
using Nancy.Bootstrapper;
using Nancy.Responses;
using NzbDrone.Common.Extensions;
using NzbDrone.Core.Configuration;
namespace NzbDrone.Api.Extensions.Pipelines
{
public class UrlBasePipeline : IRegisterNancyPipeline
{
private readonly string _urlBase;
public UrlBasePipeline(IConfigFileProvider configFileProvider)
{
_urlBase = configFileProvider.UrlBase;
}
public int Order => 99;
public void Register(IPipelines pipelines)
{
if (_urlBase.IsNotNullOrWhiteSpace())
{
pipelines.BeforeRequest.AddItemToStartOfPipeline((Func<NancyContext, Response>) Handle);
}
}
private Response Handle(NancyContext context)
{
var basePath = context.Request.Url.BasePath;
if (basePath.IsNullOrWhiteSpace())
{
return new RedirectResponse($"{_urlBase}{context.Request.Path}{context.Request.Url.Query}");
}
if (_urlBase != basePath)
{
return new NotFoundResponse();
}
return null;
}
}
}

View File

@@ -14,7 +14,7 @@ namespace NzbDrone.Api.Frontend
{
public bool IsCacheable(NancyContext context)
{
if (!RuntimeInfoBase.IsProduction)
if (!RuntimeInfo.IsProduction)
{
return false;
}

View File

@@ -1,4 +1,3 @@
using System;
using System.IO;
using NLog;
using NzbDrone.Common.Disk;

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.IO;
using System.Text.RegularExpressions;
using Nancy;
@@ -17,7 +17,7 @@ namespace NzbDrone.Api.Frontend.Mappers
private readonly IAnalyticsService _analyticsService;
private readonly Func<ICacheBreakerProvider> _cacheBreakProviderFactory;
private readonly string _indexPath;
private static readonly Regex ReplaceRegex = new Regex(@"(?:(?<attribute>href|src)=\"")(?<path>.*?(?<extension>css|js|png|ico|ics))(?:\"")(?:\s(?<nohash>data-no-hash))?", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static readonly Regex ReplaceRegex = new Regex(@"(?:(?<attribute>href|src)=\"")(?<path>.*?(?<extension>css|js|png|ico|ics|svg))(?:\"")(?:\s(?<nohash>data-no-hash))?", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static string API_KEY;
private static string URL_BASE;
@@ -74,7 +74,7 @@ namespace NzbDrone.Api.Frontend.Mappers
private string GetIndexText()
{
if (RuntimeInfoBase.IsProduction && _generatedContent != null)
if (RuntimeInfo.IsProduction && _generatedContent != null)
{
return _generatedContent;
}
@@ -106,7 +106,7 @@ namespace NzbDrone.Api.Frontend.Mappers
text = text.Replace("APP_BRANCH", _configFileProvider.Branch.ToLower());
text = text.Replace("APP_ANALYTICS", _analyticsService.IsEnabled.ToString().ToLowerInvariant());
text = text.Replace("URL_BASE", URL_BASE);
text = text.Replace("PRODUCTION", RuntimeInfoBase.IsProduction.ToString().ToLowerInvariant());
text = text.Replace("PRODUCTION", RuntimeInfo.IsProduction.ToString().ToLowerInvariant());
_generatedContent = text;

View File

@@ -67,7 +67,7 @@ namespace NzbDrone.Api.Frontend.Mappers
private string GetLoginText()
{
if (RuntimeInfoBase.IsProduction && _generatedContent != null)
if (RuntimeInfo.IsProduction && _generatedContent != null)
{
return _generatedContent;
}

View File

@@ -1,6 +1,5 @@
using System.IO;
using System.Text.RegularExpressions;
using Nancy;
using NLog;
using NzbDrone.Common.Disk;
using NzbDrone.Common.EnvironmentInfo;

View File

@@ -1,5 +1,4 @@
using System;
using System.IO;
using System.IO;
using NLog;
using NzbDrone.Common.Disk;
using NzbDrone.Common.EnvironmentInfo;

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.IO;
using NLog;
using Nancy;
@@ -21,7 +21,7 @@ namespace NzbDrone.Api.Frontend.Mappers
_diskProvider = diskProvider;
_logger = logger;
if (!RuntimeInfoBase.IsProduction)
if (!RuntimeInfo.IsProduction)
{
_caseSensitive = StringComparison.OrdinalIgnoreCase;
}
@@ -38,7 +38,7 @@ namespace NzbDrone.Api.Frontend.Mappers
if (_diskProvider.FileExists(filePath, _caseSensitive))
{
var response = new StreamResponse(() => GetContentStream(filePath), MimeTypes.GetMimeType(filePath));
return response;
return new MaterialisingResponse(response);
}
_logger.Warn("File {0} not found", filePath);

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using Nancy.Responses;
@@ -38,20 +38,6 @@ namespace NzbDrone.Api.Frontend
return new NotFoundResponse();
}
//Redirect to the subfolder if the request went to the base URL
if (path.Equals("/"))
{
var urlBase = _configFileProvider.UrlBase;
if (!string.IsNullOrEmpty(urlBase))
{
if (Request.Url.BasePath != urlBase)
{
return new RedirectResponse(urlBase + "/");
}
}
}
var mapper = _requestMappers.SingleOrDefault(m => m.CanHandle(path));
if (mapper != null)

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using NzbDrone.Api.REST;
using NzbDrone.Common.Http;

View File

@@ -1,5 +1,4 @@
using System;
using NzbDrone.Core.Indexers;
using NzbDrone.Core.Indexers;
namespace NzbDrone.Api.Indexers
{

View File

@@ -1,5 +1,4 @@
using System;
using NzbDrone.Core.Indexers;
using NzbDrone.Core.Indexers;
namespace NzbDrone.Api.Indexers
{

View File

@@ -53,7 +53,7 @@ namespace NzbDrone.Api.Indexers
private Response DownloadRelease(ReleaseResource release)
{
var remoteEpisode = _remoteEpisodeCache.Find(release.Guid);
var remoteEpisode = _remoteEpisodeCache.Find(GetCacheKey(release));
if (remoteEpisode == null)
{
@@ -96,7 +96,7 @@ namespace NzbDrone.Api.Indexers
}
catch (Exception ex)
{
_logger.Error(ex, "Episode search failed: " + ex.Message);
_logger.Error(ex, "Episode search failed");
}
return new List<ReleaseResource>();
@@ -113,8 +113,14 @@ namespace NzbDrone.Api.Indexers
protected override ReleaseResource MapDecision(DownloadDecision decision, int initialWeight)
{
_remoteEpisodeCache.Set(decision.RemoteEpisode.Release.Guid, decision.RemoteEpisode, TimeSpan.FromMinutes(30));
return base.MapDecision(decision, initialWeight);
var resource = base.MapDecision(decision, initialWeight);
_remoteEpisodeCache.Set(GetCacheKey(resource), decision.RemoteEpisode, TimeSpan.FromMinutes(30));
return resource;
}
private string GetCacheKey(ReleaseResource resource)
{
return string.Concat(resource.IndexerId, "_", resource.Guid);
}
}
}

View File

@@ -1,8 +1,5 @@
using System.Collections.Generic;
using NzbDrone.Core.DecisionEngine;
using NzbDrone.Core.Indexers;
using NzbDrone.Core.Parser.Model;
using System.Linq;
namespace NzbDrone.Api.Indexers
{

View File

@@ -8,7 +8,6 @@ using System.Linq;
using NzbDrone.Core.Parser.Model;
using NzbDrone.Api.Extensions;
using NLog;
using NzbDrone.Core.Indexers;
namespace NzbDrone.Api.Indexers
{

View File

@@ -31,13 +31,6 @@ namespace NzbDrone.Api.Logs
return Path.Combine(_appFolderInfo.GetLogFolder(), filename);
}
protected override string DownloadUrlRoot
{
get
{
return "logfile";
}
}
protected override string DownloadUrlRoot => "logfile";
}
}

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using NzbDrone.Common.Disk;

View File

@@ -1,5 +1,4 @@
using NzbDrone.Core.Datastore;
using NzbDrone.Core.Instrumentation;
using NzbDrone.Core.Instrumentation;
namespace NzbDrone.Api.Logs
{

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
@@ -38,12 +37,6 @@ namespace NzbDrone.Api.Logs
return Path.Combine(_appFolderInfo.GetUpdateLogFolder(), filename);
}
protected override string DownloadUrlRoot
{
get
{
return "updatelogfile";
}
}
protected override string DownloadUrlRoot => "updatelogfile";
}
}

View File

@@ -1,5 +1,4 @@
using System;
using NzbDrone.Core.Extras.Metadata;
using NzbDrone.Core.Extras.Metadata;
namespace NzbDrone.Api.Metadata
{

View File

@@ -1,6 +1,4 @@
using System;
namespace NzbDrone.Api.Metadata
namespace NzbDrone.Api.Metadata
{
public class MetadataResource : ProviderResource
{

View File

@@ -1,10 +1,7 @@
using System;
using System.Linq;
using Nancy;
using System.Linq;
using Nancy.Bootstrapper;
using Nancy.Diagnostics;
using NLog;
using NzbDrone.Api.ErrorManagement;
using NzbDrone.Api.Extensions.Pipelines;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Common.Instrumentation;
@@ -27,9 +24,9 @@ namespace NzbDrone.Api
protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines)
{
Logger.Info("Starting NzbDrone API");
Logger.Info("Starting Web Server");
if (RuntimeInfoBase.IsProduction)
if (RuntimeInfo.IsProduction)
{
DiagnosticsHook.Disable(pipelines);
}
@@ -55,17 +52,8 @@ namespace NzbDrone.Api
return _tinyIoCContainer;
}
protected override DiagnosticsConfiguration DiagnosticsConfiguration
{
get { return new DiagnosticsConfiguration { Password = @"password" }; }
}
protected override DiagnosticsConfiguration DiagnosticsConfiguration => new DiagnosticsConfiguration { Password = @"password" };
protected override byte[] FavIcon
{
get
{
return null;
}
}
protected override byte[] FavIcon => null;
}
}

View File

@@ -1,5 +1,4 @@
using System;
using NzbDrone.Core.Notifications;
using NzbDrone.Core.Notifications;
namespace NzbDrone.Api.Notifications
{

View File

@@ -40,36 +40,45 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="antlr.runtime, Version=2.7.6.2, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Ical.Net.2.2.32\lib\net40\antlr.runtime.dll</HintPath>
</Reference>
<Reference Include="FluentValidation, Version=6.2.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\FluentValidation.6.2.1.0\lib\portable-net40+sl50+wp80+win8+wpa81\FluentValidation.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Nancy, Version=0.23.2.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Nancy.0.23.2\lib\net40\Nancy.dll</HintPath>
<Reference Include="Ical.Net, Version=2.1.0.18776, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Ical.Net.2.2.32\lib\net40\Ical.Net.dll</HintPath>
</Reference>
<Reference Include="Nancy.Authentication.Basic, Version=0.23.2.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Nancy.Authentication.Basic.0.23.2\lib\net40\Nancy.Authentication.Basic.dll</HintPath>
<Reference Include="Ical.Net.Collections, Version=2.1.0.18775, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Ical.Net.2.2.32\lib\net40\Ical.Net.Collections.dll</HintPath>
</Reference>
<Reference Include="Nancy.Authentication.Forms">
<HintPath>..\packages\Nancy.Authentication.Forms.0.23.2\lib\net40\Nancy.Authentication.Forms.dll</HintPath>
<Reference Include="Nancy, Version=1.4.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Nancy.1.4.3\lib\net40\Nancy.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.6.0.6\lib\net40\Newtonsoft.Json.dll</HintPath>
<Reference Include="Nancy.Authentication.Basic, Version=1.4.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Nancy.Authentication.Basic.1.4.1\lib\net40\Nancy.Authentication.Basic.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Nancy.Authentication.Forms, Version=1.4.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Nancy.Authentication.Forms.1.4.1\lib\net40\Nancy.Authentication.Forms.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.3.4\lib\net40\NLog.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\NLog.4.4.3\lib\net40\NLog.dll</HintPath>
</Reference>
<Reference Include="NodaTime, Version=1.3.0.0, Culture=neutral, PublicKeyToken=4226afe0d9b296d1, processorArchitecture=MSIL">
<HintPath>..\packages\Ical.Net.2.2.32\lib\net40\NodaTime.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="DDay.iCal">
<HintPath>..\packages\DDay.iCal.1.0.2.575\lib\DDay.iCal.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite, Version=1.0.84.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Libraries\Sqlite\System.Data.SQLite.dll</HintPath>
@@ -97,6 +106,7 @@
<Compile Include="Commands\CommandResource.cs" />
<Compile Include="Extensions\AccessControlHeaders.cs" />
<Compile Include="Extensions\Pipelines\CorsPipeline.cs" />
<Compile Include="Extensions\Pipelines\UrlBasePipeline.cs" />
<Compile Include="Extensions\Pipelines\RequestLoggingPipeline.cs" />
<Compile Include="Frontend\Mappers\LoginHtmlMapper.cs" />
<Compile Include="Frontend\Mappers\RobotsTxtMapper.cs" />

View File

@@ -1,6 +1,4 @@
using System;
using System.Linq;
using System.Collections.Generic;
using NzbDrone.Api.REST;
using NzbDrone.Api.Validation;
using NzbDrone.Core.Datastore;

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using NzbDrone.Api.Episodes;
using NzbDrone.Api.REST;
using NzbDrone.Api.Series;

View File

@@ -1,5 +1,4 @@
using System;
using Newtonsoft.Json;
using Newtonsoft.Json;
using NzbDrone.Api.REST;
namespace NzbDrone.Api.Profiles.Languages
@@ -9,6 +8,6 @@ namespace NzbDrone.Api.Profiles.Languages
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Include)]
public new int Id { get; set; }
public string Name { get; set; }
public string NameLower { get { return Name.ToLowerInvariant(); } }
public string NameLower => Name.ToLowerInvariant();
}
}

View File

@@ -1,5 +1,4 @@
using System;
using System.Text;
using System.Text;
using Nancy;
namespace NzbDrone.Api.Profiles

View File

@@ -1,7 +1,6 @@
using System.Collections.Generic;
using FluentValidation;
using NzbDrone.Core.Profiles;
using NzbDrone.Core.Qualities;
using NzbDrone.Core.Validation;
namespace NzbDrone.Api.Profiles

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using NzbDrone.Api.REST;
using NzbDrone.Core.Parser;

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using FluentValidation;
using FluentValidation.Results;

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using NzbDrone.Api.REST;
using NzbDrone.Core.Qualities;

View File

@@ -8,12 +8,6 @@ namespace NzbDrone.Api.REST
public int Id { get; set; }
[JsonIgnore]
public virtual string ResourceName
{
get
{
return GetType().Name.ToLowerInvariant().Replace("resource", "");
}
}
public virtual string ResourceName => GetType().Name.ToLowerInvariant().Replace("resource", "");
}
}

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using NzbDrone.Api.REST;
using NzbDrone.Core.RemotePathMappings;

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using FluentValidation.Results;
using NzbDrone.Common.Extensions;
using NzbDrone.Core.Restrictions;

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using NzbDrone.Api.REST;
using NzbDrone.Core.Restrictions;

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using NzbDrone.Api.REST;
using NzbDrone.Core.RootFolders;

View File

@@ -1,5 +1,4 @@
using System.Collections.Generic;
using Nancy;
using Nancy;
using NzbDrone.Api.Extensions;
using NzbDrone.Core.Tv;

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