1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-03-13 15:34:28 -04:00

Compare commits

..

583 Commits

Author SHA1 Message Date
Taloth Saldono
a19776553e WIP: Statistics API endpoint. 2016-01-31 15:33:13 +01:00
Taloth Saldono
c20e0667d4 Added additional tier to search for daily series type on BTN to find faux-daily series with SxxExx groups instead of date groups.
fixes #1111
2016-01-30 21:16:45 +01:00
Mark McDowall
4771b1c1b2 New: Parsing of XofY mini series format
Closes #1091
2016-01-30 11:16:59 -08:00
Mark McDowall
8e07a39ec0 Merge pull request #1095 from ta264/fix-build-sh
xbuild doesn't support /m parameter
2016-01-28 14:52:19 -08:00
Mark McDowall
9895b5bc1d Merge pull request #1100 from IvanBrazza/develop
Pushbullet: Source device support
2016-01-28 14:49:47 -08:00
Mark McDowall
e89a1bc0fb Fixed: Delete confirmation message for Restriction
Closes #1102
2016-01-28 14:04:10 -08:00
Ivan Brazza
9b0654c7f2 New: Setting Pushbullet source device 2016-01-28 21:33:11 +00:00
Mark McDowall
56da824e98 AutoComplete and file browser will show files when appropriate
Fixed: File browser for Custom Script shows files
Closes #1084
2016-01-27 19:24:41 -08:00
ta264
f84b7904e6 Fix: xbuild doesn't support /m parameter 2016-01-27 14:11:29 +00:00
Mark McDowall
9f523bb167 New: Prevent automatic update if UI folder is not writable 2016-01-24 19:22:07 -08:00
Taloth Saldono
f38d5de946 Fixed: Regression in parser incorrectly parsing S2015Exx.2015-01-01 notation.
fixes #1080
2016-01-21 22:43:48 +01:00
Taloth Saldono
de379b2e47 Do or do not, there is no try. 2016-01-21 21:10:22 +01:00
Taloth Saldono
64e90f35c8 Ensure rTorrent download is started even if the user doesn't have schedule=...,start_tied= in their rtorrent.rc. 2016-01-21 08:40:10 +01:00
Taloth Saldono
bbfe8c27c6 Fixed: Misleading error message when Kickass/Torrent Rss indexer returned invalid xml.
fixes #1058
2016-01-20 21:58:23 +01:00
Taloth Saldono
2f50074123 Fixed: Incorrect api error when calling /api/episode without seriesId queryparam.
fixes #1070
2016-01-20 21:58:02 +01:00
Taloth Saldono
5cfaed7b26 Fixed: Added support for Sabnzbd 0.8 history category queryparam.
fixes #1077
2016-01-20 21:57:40 +01:00
Taloth Saldono
0d19f645e8 Fixed: Don't apply indexer backoff on DNS and connection issues.
Fixes #751
2016-01-20 21:57:39 +01:00
Taloth Saldono
45d4371328 Fixed: Additional log cleanse Regex to keep even more sensitive information out of the logs.
fixes #1051
2016-01-20 21:57:10 +01:00
Taloth Saldono
889933cb41 New: Set full Download Directory in Transmission instead of just a Category.
fixes #744
2016-01-20 21:26:59 +01:00
Taloth Saldono
958b294152 Updated URL rewriter to handle torcache Referer weirdness. 2016-01-20 21:26:58 +01:00
Taloth Saldono
cf25097cd1 Fixed: Magnet downloads weren't being started on RTorrent. 2016-01-20 21:26:57 +01:00
Taloth Saldono
902e0dd5d6 Updated SharpZipLib to include patches made since the last official release. 2016-01-20 21:16:02 +01:00
Keivan Beigi
d943551a7f fixed build.sh 2016-01-16 16:39:45 -08:00
Keivan Beigi
46304b8a71 use build config to exclude xml doc rather than deleting them later 2016-01-16 16:36:40 -08:00
Keivan Beigi
6e2fc186ca added nuget.exe to tools 2016-01-16 16:19:28 -08:00
Keivan Beigi
845689401d removed msbuild integerated nuget restore 2016-01-16 16:17:36 -08:00
Keivan Beigi
4fb9cc5e8d cleanup app.manifest for Service helpers, upgraded compat to windows 8.1 2016-01-16 15:52:00 -08:00
Keivan Beigi
487581a01a apparently new compilers alraedy embed the app.manifest into the app, no need for mt.exe anymore 2016-01-16 15:51:26 -08:00
Keivan Beigi
2bc771d91e Merge pull request #1066 from pra85/2016
Update year range to 2016
2016-01-16 00:37:43 -08:00
Keivan Beigi
8bd7969328 cleanup 2016-01-16 00:36:43 -08:00
Keivan Beigi
5876ab487c fixed gulp build 2016-01-15 22:13:00 -08:00
Keivan Beigi
9c14ca0f39 Replaced build.ps1 with warning 2016-01-15 22:06:33 -08:00
Keivan Beigi
81ca352b2f smarted mdb generation 2016-01-15 21:50:09 -08:00
Keivan Beigi
0edfed5b95 upgraded pdb2mdb.exe to mono 4.2 Stable (4.2.1.102) 2016-01-15 21:50:09 -08:00
Prayag Verma
0ff053415c Update year range to 2016 2016-01-16 09:40:24 +05:30
Mark McDowall
a0ee607ae6 Remove double slash in NZBVortex add URL 2016-01-15 09:04:18 -08:00
Keivan Beigi
2723e2a7b8 faster test packaging in build.sh 2016-01-15 00:27:59 -08:00
Keivan Beigi
6e105ce2c6 upgraded nuget packages 2016-01-14 23:07:39 -08:00
Keivan Beigi
9fc7fceda4 updated npm packages 2016-01-14 18:56:14 -08:00
Mark McDowall
2b72c0e328 Fixed: Manual Import Series selection
Closes #996
2016-01-09 13:16:34 -08:00
Mark McDowall
536aa350f0 Merge pull request #960 from Sonarr/nzb-vortex
NZBVortex Download Client
2016-01-07 15:53:57 -08:00
Mark McDowall
7c382c0e0c NZBVortex Download Client
New: NZBVortex Download Client
Closes #360
2016-01-07 15:50:52 -08:00
Mark McDowall
dda0d3259f Fixed broken test 2016-01-07 15:49:51 -08:00
Mark McDowall
a96718f7b3 Fixed Twitter notifications
New: Twitter notifications now require a Twitter (see settings for details)

Closes #1049
2016-01-06 22:32:12 -08:00
Mark McDowall
7ca67fe57a New: Special searching on RARBG 2016-01-05 23:07:49 -08:00
Mark McDowall
8373024f9d Fixed: Parsing of queued specials from download client queue 2016-01-05 22:56:34 -08:00
Mark McDowall
b62ef0c40c Fixed: Use folder quality when better than file quality (regression)
Closes #1022
2016-01-04 23:12:14 -08:00
Mark McDowall
376481eda5 Merge pull request #981 from Sonarr/ical-parameters
iCal parameters
2016-01-02 10:31:12 -08:00
Mark McDowall
800fa42982 Selectable range for iCal
New: Support for pastDays and fututeDays query parameters on iCal requests
Closes #974
2016-01-02 10:21:06 -08:00
Taloth Saldono
4e728c3a02 Increased timeout for Deluge to prevent timeout errors when posting large torrent files. 2015-12-30 22:50:17 +01:00
Taloth Saldono
663d254ced Fixed Ospath incorrectly detecting arbitrary colon as windows path. 2015-12-30 21:01:29 +01:00
vawen
8753c232c7 Fix: Paths with colons prevent Sonarr from communicating with Transmission
Issue #954
2015-12-29 13:25:36 +01:00
Taloth Saldono
221f3ef08c Safety net to handle MaxSize=0. Some users still have 0 = unlimited in their db and migration failed for them. 2015-12-28 20:24:24 +01:00
Taloth Saldono
b59175a87c Fixed: Indexer sites returning date as Retry-After header.
fixes #994
2015-12-28 20:24:23 +01:00
Taloth Saldono
37c621dcdb Fixed: Health Check produced warning if Sonarr binaries folder was not writable even when the external script update mechanism was selected.
fixes #964
2015-12-28 20:24:22 +01:00
Taloth Saldono
eaf3228bb7 Fixed Regex mistake in CleanLogMessage. 2015-12-28 20:24:21 +01:00
Jake Pusateri
c8debbf470 New: Better resolution posters on retina screens. 2015-12-28 11:12:12 -08:00
Mark McDowall
8dcd8d17b5 Fixed: Username must not be null or empty when logging in 2015-12-27 00:59:28 -08:00
Mark McDowall
cfe121c777 Don't return series as subtype for /api/episode
Fixed: Sped up loading episodes from server
2015-12-27 00:45:20 -08:00
Mark McDowall
b4f83d8a4e New: Media file extension .webm 2015-12-25 18:35:42 -08:00
Mark McDowall
9039d7e694 Fixed: Show a better error message when no episodes are parsed in a release 2015-12-25 18:32:03 -08:00
Taloth Saldono
7a25717da6 Fixed donate button. 2015-12-24 19:51:36 +01:00
Taloth Saldono
7e1c444c02 Fixed: Curl Fallback should ignore invalid cookies. 2015-12-24 19:30:16 +01:00
Mark McDowall
dc3f7c9bda Fixed: Improved parsing for single digit multi-episode titles
Closes #965
2015-12-20 00:11:41 -08:00
Mark McDowall
de754169fb Fixed: RSS Sync Interval validation 2015-12-19 18:02:38 -08:00
Mark McDowall
2d3c3bbb0c Changed torrent blackhole message 2015-12-19 17:49:54 -08:00
Mark McDowall
15cefe4a43 New: Option to Hardlink or Copy instead of move for Torrent Blackhole
Closes #1011
2015-12-19 17:18:22 -08:00
Mark McDowall
95da301975 A few UI Fixes
Closes #1009
Closes #1010
2015-12-18 23:41:30 -08:00
Mark McDowall
e03906b294 Fixed: Hardlink/Copy files from QBittorrent 2015-12-17 22:16:38 -08:00
Mark McDowall
7921dd3f96 Fixed: Removed Titans of TV tracker
Closes #992
2015-12-17 00:46:02 -08:00
Mark McDowall
9f066f7a6b New: Newznab preset for Usenet Crawler 2015-12-17 00:24:51 -08:00
Mark McDowall
81d131e732 Merge pull request #779 from cbodley/qbittorrent
Download client for qBittorrent
2015-12-15 23:10:20 -08:00
Casey Bodley
0552b56b71 qbittorrent: client plugin based heavily on uTorrent
supports a minimum qBittorrent version of 3.2.4, and uses labels for
v3.3.0 and later

Signed-off-by: Casey Bodley <cbodley@gmail.com>
2015-12-14 00:20:14 -05:00
Keivan Beigi
3952ee402b Update readme.md 2015-12-12 11:24:46 -08:00
Mark McDowall
0b3e27cb44 Don't keep dylibs for WIndows and Linux builds 2015-12-09 23:24:50 -08:00
Mark McDowall
4fa4b3507e Fixed: Force grabbing some delayed releases
Closes #984
2015-12-08 22:50:34 -08:00
Mark McDowall
8c211364e2 Fixed: Improved parsing of some multi-episode filenames 2015-12-08 15:26:52 -08:00
Mark McDowall
2d9917d074 Re-order regex to prefer [1x01] over 101 2015-12-06 11:03:11 -08:00
Mark McDowall
d514699ab7 Fixed: Prevent series from being added with an invalid Profile ID
Closes #977
2015-12-05 02:22:22 -08:00
Mark McDowall
dc176a83b3 Update CONTRIBUTING.md 2015-12-01 08:48:41 -08:00
Mark McDowall
69e3516a89 New: Allow Uppercase in Transmission category
Closes #934
2015-11-29 22:01:20 -08:00
Mark McDowall
c8a0f9fa7a Fixed: Saving settings changes 2015-11-26 12:05:37 -08:00
Mark McDowall
c2b9504b15 Merge pull request #931 from Dahlgren/osx-development
Include mediainfo and sqlite3 libraries for Mac
2015-11-24 18:35:07 -08:00
Mark McDowall
2693a3df2e Merge pull request #959 from roguecode/develop
Fixed: Indexer failure log message with local time
2015-11-24 15:41:57 -08:00
Matt
8062466ab8 Changing Indexer failure log message to local from UTC. 2015-11-24 23:42:20 +02:00
Björn Dahlgren
6cde1dd5ae Include mediainfo and sqlite3 libraries for Mac
Enables usage within MonoDevelop and Xamarin Studio including NUnit
2015-11-24 10:21:42 +01:00
Mark McDowall
b6c4a97675 Merge pull request #889 from Sonarr/quality-source
Folder quality when file quality determined by its extension
2015-11-23 23:01:10 -08:00
Mark McDowall
a9444cef30 Fixed: Folder quality when file quality determined by its extension
Closes #603
2015-11-23 23:00:51 -08:00
Mark McDowall
bf217a7093 Merge pull request #754 from Sonarr/real-releases
Support for REAL releases
2015-11-23 22:59:41 -08:00
Mark McDowall
b6b5355261 New: support for REAL releases
Closes #453

New: Added `Quality Real` naming Token
New: Quality Full will add real to file name when applicable
2015-11-23 22:58:53 -08:00
Mark McDowall
bc37084ec4 Merge pull request #928 from Dahlgren/mono-tests
Fixed tests for Mono
2015-11-23 22:50:34 -08:00
Mark McDowall
0a1a30f2af Merge pull request #953 from zetas/nn_preset_nzbcat
New: Newznab Preset for NZBCat
2015-11-23 22:50:15 -08:00
Keivan Beigi
7e023a7944 ConfigServiceFixture shouldn't be touching the DB. 2015-11-23 21:57:01 -08:00
zetas
91f68de8a7 Adding new newznab preset for NZBCat 2015-11-22 07:09:57 -05:00
Björn Dahlgren
994e2a6c57 Fixed failing tests on Mono
Test case unicode characters in escaped format
2015-11-22 01:11:43 +01:00
Mark McDowall
04da2d845a Merge pull request #941 from uzegonemad/hotfix/calendar-legend-width
Give calendar legend ul max width of 100%. Fixes #922
2015-11-18 22:12:39 -08:00
Benjamin Uzelac
d3b87bc3e8 give legend ul max width of 100%
give legend ul max width of 100%
2015-11-18 22:17:05 -06:00
Mark McDowall
554c81f251 Merge pull request #901 from brgaulin/jquery_upgrade
Update jQuery to 1.11.3
2015-11-16 13:44:42 -08:00
Mark McDowall
6de3f9dd0b Merge pull request #942 from uzegonemad/hotfix/calendar-tooltip
Fixed: Hidden calendar tooltips
2015-11-16 13:38:30 -08:00
Mark McDowall
e9692d5b9c Merge pull request #940 from uzegonemad/hotfix/fix-long-path-label
Fixed: Add wrapping to fix long paths in labels
2015-11-16 13:37:26 -08:00
Benjamin Uzelac
1a74990e9b alter calendar tooltip container. fixes #857 2015-11-15 20:50:17 -06:00
Benjamin Uzelac
3b9ac8699d Add wrapping to fix long paths in labels. Fixes #875 2015-11-15 18:25:30 -06:00
Mark McDowall
ea6ae85f7a Fixed: Logging invalid version when failing to connect to Kodi
Closes #927
2015-11-14 22:35:45 -08:00
Mark McDowall
b02b9f026f Fixed: Failing missing episode search when one search fails
Closes #917
2015-11-14 22:35:28 -08:00
Mark McDowall
c419e7b710 Merge pull request #915 from uzegonemad/hotfix/scroll-up-zindex
Fix z-index on scroll to top button
2015-11-14 21:43:37 -08:00
Benjamin Uzelac
cd9132520d fix z-index on scroll to top button 2015-11-05 19:43:53 -06:00
Mark McDowall
08d19df3f7 Fixed: Manual import when quality was not available after failed parsing
Closes #911
2015-11-03 15:12:56 -08:00
Mark McDowall
b34879b4f6 New: Manual search shows error when download fails 2015-11-02 22:46:06 -08:00
Mark McDowall
6b9c4af591 Fixed: Magnet links with torrent blackhole 2015-11-02 22:21:27 -08:00
Mark McDowall
c00c207517 Prevent regrab for all grabs
Fixed: Prevent incorrectly grabbing a similar or identical release for 12 hours
2015-11-01 21:54:49 -08:00
Mark McDowall
6f7fea3591 PFMonkey Newznab preset 2015-11-01 21:35:44 -08:00
Mark McDowall
83eebfe153 Fixed: Stricter parsing of some release filenames 2015-10-29 23:58:56 -07:00
Gaulin, Brendan
fce3f86be7 UI: Update jQuery to 1.11.3 2015-10-29 08:38:21 -04:00
Mark McDowall
2d42c59d70 Fixed: Log download client name when communication fails 2015-10-27 22:19:24 -07:00
Mark McDowall
f0933b9786 Fixed: Test messaging when indexer API returns an error with a message 2015-10-27 22:04:20 -07:00
Mark McDowall
e4e687c2a4 Fixed: Parsing anime series with number in title
Closes #898
2015-10-26 14:56:28 -07:00
Taloth Saldono
44de353b8b Sanitize dognzb apikey in nzb fetch url. 2015-10-25 23:15:21 +01:00
Taloth Saldono
aac4938598 Fixed handling cookies in different system languages.
fixes #896... hopefully
2015-10-25 22:57:37 +01:00
Mark McDowall
d37b24cd0b Better UI messaging when searching for all specials in a series
Fixed: Specials season search UI messaging
Closes #881
2015-10-25 10:10:57 -07:00
Taloth Saldono
c9a36fe4b2 Fixed sorting on Progress in Queue.
Fixes #882
2015-10-22 23:19:24 +02:00
Taloth Saldono
f01a21ce43 Degraded 101 regex to favour S01 regex to match prevent matching 3 digit series title.
Fixes #885
2015-10-22 23:19:22 +02:00
Taloth Saldono
cc72699b8a Fixed: Added verified file transfer mode that doesn't revert to copy. 2015-10-22 23:19:21 +02:00
Mark McDowall
04de0049fe Don't try to process a download client item with an invalid path for the OS 2015-10-21 15:06:54 -07:00
Taloth Saldono
330554edb0 Fixed: External links again open in new windows. 2015-10-20 20:58:56 +02:00
Taloth Saldono
a06a3fa5d6 Fixed: Removal of common suffixes such as [ettv] while parsing.
Fixes #874
2015-10-20 20:12:35 +02:00
Taloth Saldono
e8d6d62fba Warning message when BTN API throw internal server error 2015-10-20 19:31:40 +02:00
Mark McDowall
9cc8ed545f History Spec handles both blackhole and CDH disabled scenarios
Fixed: History will always be used to determine upgrade eligibility when CDH is disabled
2015-10-19 11:42:05 -07:00
Mark McDowall
8bf969983b Tests passing for the wrong reason 2015-10-18 11:01:26 -07:00
Mark McDowall
4ee7d57b7d lrn2spell 2015-10-18 10:54:16 -07:00
Mark McDowall
6ff754eec0 Extend Blackhole grace period to 12 hours 2015-10-18 10:52:26 -07:00
Mark McDowall
862f8024e3 Debug log when release is accepted 2015-10-16 21:54:36 -07:00
Mark McDowall
d170c9ad07 Fixed: Torrent Blackhole client will not track torrents by hash 2015-10-15 23:11:48 -07:00
Mark McDowall
20df619ddd HistorySpecification checks cutoff as well 2015-10-15 00:23:14 -07:00
Taloth Saldono
f7859c8eb5 Fixed: SeasonPass didn't update Series monitored flag if only those were changed. 2015-10-13 22:51:04 +02:00
Taloth Saldono
97cdcb8b19 Bind SignalR to root SeriesCollection so typeahead gets the newest data. 2015-10-13 22:51:02 +02:00
Taloth Saldono
e3c4070924 Fixed: Don't produce scene mapping warnings if TheXEM only maps the second half of a season. 2015-10-13 22:51:01 +02:00
Taloth Saldono
74403815d9 Fixed torznab searching without any id or q.
Fixes #849
2015-10-11 21:39:02 +02:00
Taloth Saldono
897937a778 Fixed indeterministic test. 2015-10-11 12:56:47 +02:00
Taloth Saldono
b6ddc8756b Fixed typo in nn caps and apikey error message. 2015-10-11 02:18:51 +02:00
Taloth Saldono
25aa3b60b0 Don't be so strict about dupe attr values. 2015-10-11 00:26:00 +02:00
Taloth Saldono
fe76d0f98f Refactored the HttpDispatchers. 2015-10-10 22:20:17 +02:00
Taloth Saldono
e13c89521d Merge branch 'nn-tvdbid' into develop 2015-10-10 20:38:03 +02:00
Taloth Saldono
828071c1a5 Merge branch 'pr/n721_ta264' into develop 2015-10-10 20:37:53 +02:00
Mark McDowall
408d86245e Merge pull request #844 from Sonarr/history-spec-improvements
Improvements to History Specification
2015-10-10 11:25:22 -07:00
Mark McDowall
e67de6aae8 New: Blackhole won't grab another release if release in last hour meets the cutoff
Fixed: Invalid season packs preventing future releases from being grabbed when using SAB as download client

Closes #837
Fixes #625
2015-10-09 21:50:04 -07:00
Taloth Saldono
45cdb98c58 Fixed namespace detection for EZRSS now DOCTYPE is gone. 2015-10-10 00:04:58 +02:00
Taloth Saldono
6585aed0a9 Removed doctype from ezrss test. 2015-10-09 23:16:07 +02:00
Taloth Saldono
ef305b8d25 Updated Selenium to 2.48 2015-10-09 22:52:59 +02:00
Taloth Saldono
84c7f4cd8c Added support for tvmaze. 2015-10-09 22:36:10 +02:00
Taloth Saldono
9162e97dd5 Added support for querying newznab with multiple ids in one query. 2015-10-09 22:22:50 +02:00
Taloth Saldono
1ad1d73c91 Added tiered indexer requests to support fallback to wildcard queries. 2015-10-09 22:22:48 +02:00
Taloth Saldono
88ce0ec487 Missing TvdbId on ReleaseResource. 2015-10-09 22:22:47 +02:00
Taloth Saldono
99f452e299 New: Added support for newznab indexers using tvdbid for searching. 2015-10-09 22:22:46 +02:00
Taloth Saldono
7af7c2003e Show Specials in Wanted. 2015-10-09 00:01:32 +02:00
Taloth Saldono
bb482047b1 Fixed removing partials before trying to copy files. 2015-10-09 00:01:31 +02:00
Mark McDowall
a39b36d157 Fixed rTorrent test 2015-10-07 21:37:13 -07:00
Mark McDowall
0841bf1d2a Merge pull request #824 from larsjohnsen/rtorrent-misc
rTorrent fixes

Fixed: Adding label to torrents in rTorrent
2015-10-07 21:14:44 -07:00
Mark McDowall
97f1761092 Log description for invalid API key response
Closes #838
2015-10-07 00:09:03 -07:00
Mark McDowall
0e90bf5227 Fixed: Don't import single files that start with ._ 2015-10-04 13:47:02 -07:00
Mark McDowall
192d001b61 New: Option to remove illegal characters
Closes #809
2015-10-04 13:13:14 -07:00
Mark McDowall
68cd9ab8c8 Don't error out if PMS returns no ID for a specific series
Closes #813
2015-10-04 12:12:07 -07:00
ta264
4be0fe1b76 Add tests for CurlHttpClient and fix the failures 2015-10-04 11:11:58 +01:00
Mark McDowall
9ffa28f17c New: Show time instead of date if event occurs/occurred today
Closes #808
2015-10-03 13:27:37 -07:00
Taloth Saldono
0b219e1169 Fixed nullables. 2015-10-03 21:19:25 +02:00
Taloth Saldono
ccfa13e383 Replaced built-in valuetypes with language keywords. 2015-10-03 21:14:06 +02:00
Taloth Saldono
d6a135857d Clarified error message when parsed episode doesn't exist in the database. 2015-10-03 21:14:04 +02:00
Lars
6ed7a8b471 rTorrent: Url Path displayed by default, misc 2015-10-03 15:30:46 +02:00
Lars
7426efd423 rTorrent: Fixed label bug 2015-10-03 15:26:16 +02:00
Lars
95017884d7 rTorrent: Fixed race condition 2015-10-03 15:26:16 +02:00
Mark McDowall
db5494e7ac Fixed: Tooltips for series and season searches 2015-10-02 21:11:32 -07:00
Mark McDowall
2d7774c018 Use X-Api-Key header in integration tests 2015-10-01 13:53:55 -07:00
Mark McDowall
986dae590b Terminate Sonarr instance created during integration tests by Process ID 2015-10-01 13:52:33 -07:00
Taloth Saldono
99f6c65b76 Removed Trakt to Tvdb migration workaround, so it actually removes the tvrageid when skyhook says so. 2015-09-27 11:38:39 +02:00
Mark McDowall
0c7d8c2d38 Fixed: TV Directory is not required for local rTorrent 2015-09-24 13:55:45 -07:00
Taloth Saldono
c63b65eba1 Only apply kat peers fix for recent releases. 2015-09-24 22:33:01 +02:00
Taloth Saldono
3fc348d045 Fixed: Removed deferrer from external links, instead relying solely on the rel=noreferrer attribute (supported by Chrome and Firefox, but not all browser)
fixes #811
2015-09-24 21:53:08 +02:00
Mark McDowall
5dae0b24d3 Merge pull request #768 from kmcc049/fix-bug-709
Change to using 1024 over 1000
2015-09-23 11:32:27 -07:00
kmcc049
07b70f9d3f Fixed: Consistent display of sizes
Closes #709
2015-09-24 06:30:49 +12:00
Taloth Saldono
4060a24eec Fixed: Missing Episode Search command wasn't stored properly in the db causing it to search for all series, instead of one. 2015-09-22 23:48:19 +02:00
Taloth Saldono
d637ee1a2d Disable kickass seeds/peers info since they only report 0 on the rss. 2015-09-22 22:46:49 +02:00
Taloth Saldono
30bcc662bc Fixed composition. 2015-09-21 23:22:34 +02:00
Taloth Saldono
57afa668e1 Fixed: Removing torcache url query params to avoid redirect.
fixes #799
Removing query param was cleaner coz it avoids spoofing the referrer.
2015-09-21 22:01:42 +02:00
Mark McDowall
d7eae958b7 Fixed: Parse TVRip releases as SDTV 2015-09-20 11:28:15 -07:00
Mark McDowall
c591a86b02 Fixed: Parsing 4-digit season packs
Closes #805
2015-09-20 11:21:04 -07:00
Mark McDowall
49dea2cd7f Fixed: Log error message when moving file to recycling bin fails 2015-09-20 10:41:50 -07:00
Mark McDowall
fa527d7820 New: Custom Script Download contains SourcePath and SourceFolder
Closes #793
2015-09-10 21:12:48 -07:00
Mark McDowall
81778cb0b0 New: Custom Script environment variables use underscores instead of periods 2015-09-10 20:11:16 -07:00
Mark McDowall
e1afd89aae Extremely long titles
Fixed: Extremely long series titles causing display issues on main page

Fixes: #769
2015-09-10 20:08:14 -07:00
Mark McDowall
a2f62a5dcd Hide completed downloads when CDH is disabled
New: Only show completed downloads in queue when Completed Download Handling is enabled
2015-09-03 18:38:10 -07:00
Mark McDowall
19f09fdb86 Path and Arguments were set to the same number for CustomScript 2015-09-03 14:57:38 -07:00
Mark McDowall
68e12f1c5e Merge pull request #774 from Sonarr/preserve-startup-args
Preserve startup arguments during restart
2015-09-02 23:13:21 -07:00
Mark McDowall
5acaf9d60b Fixed: Preserve startup arguments during restart
Closes #325
2015-09-02 23:12:27 -07:00
Mark McDowall
741dc8f50b Fixed: Only run a complete section update in Plex if all partial updates fail
Closes #773
2015-09-01 23:46:26 -07:00
Mark McDowall
28a70a0cf1 Fixed: Import episodes in ascending numerical order
Closes #772
2015-09-01 23:29:49 -07:00
Mark McDowall
bf10d420ec Show implementationName for metadata
Closes #770
2015-09-01 00:20:17 -07:00
Mark McDowall
7286ccdd56 return early for existing files in UnverifiedSceneNumberingSpecification 2015-09-01 00:15:15 -07:00
Gavin Mogan
c5b25bcfee New: Add Webhook support to sonarr
Add Form type url (type=url input field)
Add isValidUrl input type validation

Only allow absolute urls when checking if a url is valid

String => string as per comments that sonarr is standarizing on the lowercase primative

Remove this before function calls

Refactored everything so OnGrab is supported

Don't double submit the webhook

Wrappers around Series, EpisodeFile, Episode so the entire data structure isn't exposed

Add Braces as per style guide

Series.ID and Series.TvdbId should be integers

Reorder webhook payload as per style guide

Upgrade to use ongrab as json instead of string

Add method selection to webhook settings

include episode directly in download event

QualityVersion should be an int and not a string (don't convert it int=>string)

Remove the list of episodes

Add season number to episode data structure

Code Review Fixes:

* Remove episodefile from payload, move everything to episode
* Change episode to a list

convert to var as per code review / style guide

Down with internals

Everything now uses webhookpayload. None of that payload.Message stuff

{"EventType":"Test","Series":{"Id":1,"Title":"Test Title","Path":"C:\\testpath","TvdbId":1234},"Episodes":[{"Id":123,"EpisodeNumber":1,"SeasonNumber":1,"Title":"Test title","AirDate":null,"AirDateUtc":null,"Quality":null,"QualityVersion":0,"ReleaseGroup":null,"SceneName":null}]}

Remove logger and processProvider

Remove unused constructor
2015-08-29 22:45:14 -07:00
Keivan Beigi
187064101c Phantom: screen less files are defined in sonarr.less 2015-08-29 15:19:45 -07:00
Keivan Beigi
66e829f71e upgraded postcss, webpack 2015-08-26 23:33:08 -07:00
Keivan Beigi
a28dd6269a switched web pack watch to poll mode 2015-08-26 23:32:38 -07:00
Mark McDowall
53985a282d Succeeded instead of completed for testing
Closes #758
2015-08-25 23:34:25 -07:00
Mark McDowall
ffffd8ca69 New: Warning message that Torrent Blackhole will move files, not copy or hard link 2015-08-25 23:33:09 -07:00
Gavin Mogan
d3b9ebf86c Convert onGrab from passing a string to passing an object with series and episode information
Use object initalizer instead of creation of OnGrab/grabmessage
2015-08-25 21:13:08 -07:00
ta264
d41dd05d00 Fix build on linux and add build.sh 2015-08-24 09:57:15 -07:00
Mark McDowall
8f9e076325 Fixed: Don't log all daily episodes parsing as unknown episodes 2015-08-21 17:54:50 -07:00
Mark McDowall
ac587168cd Merge pull request #747 from Sonarr/release-pushing
Release pushing
2015-08-17 22:20:26 -07:00
Mark McDowall
bb144a6df6 New: Ability to push releases to Sonarr via API for processing
Closes #419
2015-08-16 23:09:11 -07:00
bitPhex
4f38454825 Inital work for release pushing 2015-08-16 22:53:57 -07:00
Mark McDowall
3a59b38037 Fix theme less file 2015-08-16 14:25:58 -07:00
Mark McDowall
f032cc8cf6 Support for not adding a hash to some index elements 2015-08-16 01:50:46 -07:00
Keivan Beigi
1a872035e7 external less source maps, autoprefixer 2015-08-15 23:52:45 -07:00
Mark McDowall
026e05dcee Fixed: Better parsing of full season x265 releases 2015-08-15 22:42:15 -07:00
Keivan Beigi
99fd1fd4c1 Added lazy load 2015-08-15 18:07:50 -07:00
Taloth Saldono
d6bfa561ad mono and .net handle Uri escapes differently messing up the tests. 2015-08-16 00:17:55 +02:00
Taloth Saldono
8d0dab6578 Fixed tests after Uri cleanup logic. 2015-08-15 21:35:09 +02:00
Taloth Saldono
1a402a9cf4 MediaInfo should use ParseSpeed > 0.2 for .ts files to get accurate readings.
Fixes #742
2015-08-15 16:55:59 +02:00
Taloth Saldono
211863d55d Fixed: Indexers returning relative urls for grabs. 2015-08-15 13:36:40 +02:00
Mark McDowall
38c57ce73a Fixed: Emby metadata added date will use series added date 2015-08-13 22:33:42 -07:00
Taloth Saldono
372ba13fd2 Fixed SkyHookSearch tests. 2015-08-12 22:53:51 +02:00
Taloth Saldono
9bcb6ff19a New: Sonarr can now update series to use another tvdbid in case when tvdb removes a duplicate and Skyhook detects it. 2015-08-12 22:07:47 +02:00
Taloth Saldono
2627072aab Fixed log message for rss sync gap warning. 2015-08-12 18:53:14 +02:00
Taloth Saldono
7991a3f1c3 Fixed series refresh repeated too often if Sonarr is killed before Scheduled task finishes.
Fixes #735
2015-08-11 22:25:37 +02:00
Taloth Saldono
408991e03c Fixed negative NzbGet DownloadLimit
Fixes #700
2015-08-11 21:52:26 +02:00
Taloth Saldono
5ea954695e Ignore duplicates when using history to identify an existing downloaditem. 2015-08-11 21:46:07 +02:00
Taloth Saldono
648a16c1bb Fixed: Don't check for missing TheXEM numbering when importing existing series. 2015-08-11 21:46:06 +02:00
Keivan Beigi
8090c853ba Added source map to css files 2015-08-11 10:44:21 -07:00
Mark McDowall
809c8a7f37 Log number of episodes, not type 2015-08-10 23:06:19 -07:00
Keivan Beigi
608cb296e6 Fixed phantom build 2015-08-09 12:02:18 -07:00
Mark McDowall
7cf400975e Merge pull request #731 from Mirx/develop
Add Hungarian Language
2015-08-07 23:55:43 -07:00
Mirx
4faf7ed959 New: Hungarian language support
Closes #729
2015-08-08 08:41:22 +02:00
Mark McDowall
25493654ff Removed semi-colon 2015-08-04 16:36:34 -07:00
Mark McDowall
48f70815a3 Fixed: rTorrent category is optional
Fixes: #726
2015-08-04 15:13:57 -07:00
Mark McDowall
a720e5f3b5 Fixed paths for phantom 2015-08-03 15:41:33 -07:00
Taloth Saldono
a84f39bb48 Fixed: Should ignore indexer provided tvrageid when scene naming exception exists. 2015-08-03 23:09:33 +02:00
Keivan Beigi
c56cf8860e Cleaned up project root. 2015-08-02 22:22:22 -07:00
Taloth Saldono
2d968a725c Only list the matching ignored terms in the rejection. 2015-08-02 21:27:19 +02:00
Mark McDowall
b1d0d422e9 New: Support 5-digit multi-episode releases 2015-08-01 23:12:15 -07:00
Mark McDowall
86b748b9eb New: Sonarr logo is optional for Pushalot notifications 2015-08-01 00:51:57 -07:00
Mark McDowall
129d7c9338 Fixed: Series failing to load when there were no seasons 2015-08-01 00:02:52 -07:00
Mark McDowall
7f23d25fcf Merge pull request #644 from Sonarr/twitter-notifications
Twitter notifications
2015-07-31 22:38:29 -07:00
Mark McDowall
b82e830e86 Cleanup and refactoring of Twitter notifications
Closes #301
New: Twitter Notifications
2015-07-31 22:25:05 -07:00
Gavin Mogan
2fbf7a4114 Inital work on Twitter notifications 2015-07-31 22:25:01 -07:00
Taloth Saldono
e05365a669 Added missing property to CommandResource. 2015-08-01 02:41:48 +02:00
Taloth Saldono
44e6c46337 Fixed: Refreshing individual series incorrectly delayed the schedule task.
fixes #720
2015-08-01 01:53:39 +02:00
Taloth Saldono
ecb4835a16 minor pageable code error. 2015-08-01 01:53:37 +02:00
Mark McDowall
8c31af608b Merge pull request #698 from srod/boxcar2
Added Boxcar 2
2015-07-31 11:45:06 -07:00
Rodolphe Stoclin
9b1915a187 New: Boxcar 2 notifications 2015-07-31 20:30:37 +02:00
Mark McDowall
db879426db Fixed backbone.collectionview shim 2015-07-28 23:25:48 -07:00
Taloth Saldono
c274c7d589 Icon now completely hidden if spinner overlay is shown.
Fixed season action margin.
2015-07-28 22:16:22 +02:00
Taloth Saldono
8bd675f9f4 Include indexers name in back-off healthcheck warning. 2015-07-28 22:06:43 +02:00
Taloth Saldono
0a12989a70 Actually added deepmodel shim. 2015-07-28 22:06:41 +02:00
Mark McDowall
5b58bd504d Shim for deepmodel 2015-07-27 22:56:44 -07:00
Keivan Beigi
f4d9e3495a Added shim for _ 2015-07-27 22:34:55 -07:00
Mark McDowall
fcfbfae4c1 Merge pull request #690 from Sonarr/backgrid-pageable-reset
Alter backbone.pageable to stay on same page during fetch
2015-07-27 21:36:12 -07:00
Mark McDowall
3f7ae250c7 AsPageableMixin to make backbone.pageable to stay on same page during fetch
Closes #670
2015-07-27 00:50:20 -07:00
Taloth Saldono
645c9c25d1 Updated spinner visualization. 2015-07-26 22:05:12 +02:00
Taloth Saldono
c8b7446f7c Fixed: Readded series monitoring flag to Season Pass view. 2015-07-26 22:05:11 +02:00
Taloth Saldono
293bc55e58 Added link to existing series in add series view. 2015-07-26 22:05:09 +02:00
Taloth Saldono
7eeabd7ca3 Fixed: Updated libcurl version mappings to use libcurl.4 instead of libcurl.3. 2015-07-26 22:05:08 +02:00
Taloth Saldono
c16d02fc1d Fixed: indexer returning an empty page during the rss sync. 2015-07-26 22:05:06 +02:00
Taloth Saldono
fc75783fbe Rewrote the RequestGenerator to support paging and other refactorings. 2015-07-26 22:04:02 +02:00
Mark McDowall
58b01b91d5 New: Titans of TV tracker 2015-07-24 21:45:09 +02:00
Taloth Saldono
c6c68c0c75 Incorrect number of parameters. 2015-07-23 06:28:20 +02:00
Taloth Saldono
9fe8477a40 Now logging nzb&torrent response sizes. 2015-07-22 20:33:47 +02:00
Taloth Saldono
794a7957ef Show thexem outdated mappings message on the calendar as well. 2015-07-22 19:56:20 +02:00
Taloth Saldono
5c1d683e71 Tooltips are now properly hidden if the element is removed from the dom. 2015-07-22 19:56:19 +02:00
Keivan Beigi
0789ace879 Use IsProduction instead of IsDebug to toggle caching on/off 2015-07-21 20:38:23 -07:00
Keivan Beigi
9b16e3b538 _output folder is considered a non-prodction folder 2015-07-21 19:43:06 -07:00
Keivan Beigi
98acd0d886 Added support for custom UI folder 2015-07-21 19:42:38 -07:00
Keivan Beigi
760469fc5f Added support for live reload 2015-07-21 19:38:46 -07:00
Taloth Saldono
5af12b67be Revert "Fixed: Disabled transactional file transfers since we don't want that feature in master yet."
This reverts commit ada5919136.
2015-07-21 21:26:15 +02:00
Taloth Saldono
a1bfecedcd Removed duplicate test. 2015-07-20 21:29:51 +02:00
Taloth Saldono
f2a70677e4 New: Will now temporarily stop using an indexer if the indexer reported an error. 2015-07-20 21:09:16 +02:00
Taloth Saldono
6d046a8df8 Fixed: Extrapolate scene numbering but won't auto import. 2015-07-20 21:05:48 +02:00
Taloth Saldono
23bd9440b3 Removed duplicate file. 2015-07-20 21:04:55 +02:00
Mark McDowall
0f2bba0615 Custom scripts
New: Run custom scripts (Connection)

Closes #439
2015-07-20 10:49:54 -07:00
Taloth Saldono
492b114510 Added rarbg error code for unknown series. 2015-07-20 18:37:43 +02:00
Taloth Saldono
55412968e0 New: Added auto-detection of indexer capabilities to torznab. 2015-07-20 16:46:40 +02:00
Keivan Beigi
dba359cafe reverted handlebars version 2015-07-18 21:20:32 -07:00
Keivan Beigi
6682266cc9 gulp getSonarr --branch=develop 2015-07-18 18:14:13 -07:00
Keivan Beigi
05dc68d689 Download and start Sonarr using gulp (Can work on UI without VS) 2015-07-18 17:48:59 -07:00
Keivan Beigi
8fede1efc9 updated npm packages 2015-07-18 17:48:10 -07:00
Keivan Beigi
8d85fb15c4 Removed yargs dependency since it fails to install in windows 2015-07-18 12:52:02 -07:00
Keivan Beigi
32d7da91b7 added phantom support in gulp 2015-07-18 11:50:16 -07:00
Taloth Saldono
08ebc8d292 Don't list drives that aren't available. 2015-07-17 23:51:33 +02:00
Taloth Saldono
ada5919136 Fixed: Disabled transactional file transfers since we don't want that feature in master yet. 2015-07-17 20:17:46 +02:00
Taloth Saldono
bfa629f431 Refactored VerifiedFile transfer to have a verified and transactional mode. 2015-07-17 20:16:49 +02:00
Mark McDowall
2a42ad8970 learning to spell 2015-07-17 08:06:41 -07:00
Mark McDowall
08714f79da Renamed Activity to History in episode details modal
Closes #624
2015-07-17 00:15:49 -07:00
Mark McDowall
6983f36f4d New: Show series ratings on series details
Closes #634
2015-07-16 23:41:51 -07:00
Mark McDowall
03cf9a44cf New: Show download client name in GUI notifications
Closes: #642
2015-07-16 23:19:59 -07:00
Mark McDowall
c4fe645c31 Fixes Release restriction validation
Closes #691
2015-07-16 23:08:32 -07:00
Mark McDowall
ea19020015 Fixed: Sorting by timeleft on Activity: Queue 2015-07-16 22:57:10 -07:00
Mark McDowall
346d7f3cf4 Merge pull request #674 from Sonarr/rtorrent-directory
Choose download folder for rTorrent
2015-07-15 22:45:40 -07:00
Mark McDowall
1b65ead75d New: Choose download folder for rTorrent
Closes #626
2015-07-15 22:26:46 -07:00
Mark McDowall
889d3d1207 Formatting 2015-07-13 22:31:20 -07:00
Mark McDowall
3c88f6c452 Double clicking test and save won't retrigger button
Fixed: Double clicking test and save
2015-07-13 21:38:05 -07:00
Mark McDowall
cc6ab0ade1 Fixed: Do not monitor specials when monitoring missing 2015-07-13 18:09:32 -07:00
Taloth Saldono
3ad7673d69 Fixed: Doki rss feed now uses correct url for torrent. 2015-07-13 20:26:00 +02:00
Taloth Saldono
51155ba909 Applied workaround for CurlSharp GC handling. 2015-07-12 23:17:23 +02:00
Taloth Saldono
786e0b825a Fixed curl multithreaded access. 2015-07-12 21:45:22 +02:00
Taloth Saldono
7bc4249ede Fixed regression in QueueService caused by pr650. 2015-07-11 22:49:38 +02:00
Mark McDowall
fd3dda2b16 Fixed: Removing pending releases 2015-07-10 00:18:32 -07:00
Mark McDowall
fa0401fa89 Fixed broken unit test 2015-07-08 23:58:12 -07:00
Mark McDowall
15b215f9c2 Merge pull request #664 from Sonarr/plex-auth-fix
Plex Server Authentication Improvements
2015-07-08 23:41:43 -07:00
Mark McDowall
61de750e05 Update plex token cache when password is changed
Fixed: New plex.tv password not taking effect immediately
Fixed: Prevent an incorrect plex.tv password from locking out account
2015-07-08 23:40:54 -07:00
Keivan Beigi
84ae81efe3 Merge pull request #650 from Kayomani/develop
Allow downloads to be tracked by the source name in addition to the download name
2015-07-08 20:56:23 -07:00
Taloth Saldono
5c6ac2ae8b Removed trello from CONTRIBUTING as well. 2015-07-08 23:23:12 +02:00
Taloth Saldono
265821c9de Removed link to trello. 2015-07-08 22:58:19 +02:00
Taloth Saldono
1eb6629088 Fixed: Updater occasionally killed Sonarr twice before allowing it to be restarted by upstart.
Fixed: Updater killed itself during update on debian jessie.
2015-07-08 20:54:47 +02:00
Taloth Saldono
103de770c3 Fixed thread concurrency issue on http cookie handling. 2015-07-08 20:05:03 +02:00
Taloth Saldono
bf3d0ed2d1 Removed dupe tests. 2015-07-08 20:01:48 +02:00
Mark McDowall
3a84e0fafc Actually commented out now... 2015-07-08 01:21:28 -07:00
Mark McDowall
4b9ec94fcc Broken test that we can use once we have better parsing 2015-07-08 01:19:44 -07:00
Taloth Saldono
067f450486 Fixed: BTN Anime Season search. 2015-07-07 23:06:01 +02:00
Taloth Saldono
dbb3eb0e54 Series is already available in model. 2015-07-07 23:06:00 +02:00
Taloth Saldono
30ab5bc17f New: Added missing absolute episode number warning for anime to calendar view as well.
Fixes #486
2015-07-07 22:51:44 +02:00
Taloth Saldono
8917ea9cc9 Don't log invalid date in rss as Error.
Fixes #635
2015-07-07 22:20:16 +02:00
Taloth Saldono
c5684439f4 Added robots.txt
Fixes #667
2015-07-07 22:13:01 +02:00
Taloth Saldono
d46c170b70 Fixed: Matching anime using full series title instead of cleaned title to be able to detect subtle!! differences`!! in titles!!! 2015-07-07 21:43:34 +02:00
Kayomani
de8deffbd2 New: Downloads can be tracked by the source name in addition to the download name 2015-07-07 00:34:25 +01:00
Taloth Saldono
0578e68a51 Fixed: Sonarr didn't clear scene mappings if a series was removed from TheXEM. 2015-07-04 20:28:46 +02:00
Taloth Saldono
1ac27002e5 Fixed project files. 2015-07-03 22:01:25 +02:00
Taloth Saldono
2f3e444394 Unsaved file. 2015-07-03 21:24:39 +02:00
Taloth Saldono
c02d6c426c Fixed: TorrentRssParser incorrectly detected description element. 2015-07-03 21:21:49 +02:00
Keivan Beigi
102f2e39be Merge pull request #653 from Sonarr/kickass-url-update
Update the kickass url to https://kat.cr
2015-07-02 16:06:17 -07:00
Keivan Beigi
a78381db7d Merge pull request #654 from Sonarr/remove-pending
Fix: When removing pending items from the queue remove all releases for that episode
2015-07-02 11:51:49 -07:00
Keivan Beigi
a143c0b75e Updated migration number to 90 2015-07-01 11:44:43 -07:00
Keivan Beigi
36f97329ff Update the kickass url to https://kat.cr 2015-07-01 11:40:05 -07:00
Keivan Beigi
b5b15b623a Updated FluentAssertion to 3.4.0 2015-07-01 11:39:43 -07:00
Keivan Beigi
724a3eee45 Fix: When removing pending items from the queue remove all releases for that episode 2015-07-01 01:50:55 -07:00
Keivan Beigi
80403a4021 Updated readme.md
Switched from VS Express to community
Added steps for grabbing submodules.
2015-07-01 01:24:54 -07:00
Mark McDowall
14b9a031bb Show warning message for rTorrent that it doesn't support torrent removal 2015-06-28 14:06:03 -07:00
Mark McDowall
873fadbcaa Fix the build 2015-06-28 14:04:51 -07:00
Mark McDowall
370406c3de Use a list for ChannelTags and DeviceIds in Pushbullet settings 2015-06-28 12:45:15 -07:00
Taloth Saldono
461be2b388 Removed eztv migration tests. 2015-06-28 20:15:17 +02:00
Taloth Saldono
dc75c44a50 Removed HDAccess.net torznab preset since the site has stopped. 2015-06-28 18:09:37 +02:00
Taloth Saldono
c9d0bc7148 Fixed: Removed Eztv-like api support entirely since TorrentRss is now available. 2015-06-28 18:09:37 +02:00
Mark McDowall
77e9493ccf Improved PushBullet implementation (v2 API, multiple devices, channels)
New: PushBullet supports multiple devices
New: PushBullet channels

Closes #641
2015-06-28 01:50:19 -07:00
Mark McDowall
120be567d3 Merge pull request #647 from mike-tesch/patch-1
Fix spelling mistake in UpdateApp.cs
2015-06-27 20:21:28 -07:00
Michael Tesch
cce82d38c0 Update UpdateApp.cs
Spelling fix
2015-06-27 19:20:51 -06:00
Taloth Saldono
527122452c New: Fallback to libcurl/libssl on mono for https connections. 2015-06-27 01:44:23 +02:00
Taloth Saldono
c4430ab4de MediaInfo Dispose only when handle was created. 2015-06-27 01:03:08 +02:00
Taloth Saldono
c9f720885e Fixed: Renaming episodes on OSX with case-insensitive filesystem. 2015-06-27 01:03:07 +02:00
Mark McDowall
bd222dbd95 Fixed: Updating empty Kodi library 2015-06-24 20:58:56 -07:00
Mark McDowall
c9ef0951bc Clear scrollbars on window resize 2015-06-21 23:42:55 -07:00
Mark McDowall
6f8cbc22be Upgrade to Bootstrap 3.3.5 2015-06-21 23:19:24 -07:00
Mark McDowall
2b6bac8104 Remove calendar header padding for scrollbar 2015-06-21 23:08:35 -07:00
Mark McDowall
a9ada8fcf1 Cleanup tabs 2015-06-21 22:56:00 -07:00
Mark McDowall
c7f56c1091 Fix ambiguous calls when compiling under mono 2015-06-20 14:58:49 -07:00
Mark McDowall
7d0ba9dd2b Fixed: Series poster controls 2015-06-18 22:52:52 -07:00
Taloth Saldono
f3d31c3ea1 Fixed btn tests. 2015-06-18 09:18:25 +02:00
Taloth Saldono
2c472d6e3e Fixed: BTN will now use http/https for grabbing downloads as specified by the settings instead of by the feed. 2015-06-18 09:09:58 +02:00
Mark McDowall
54a6f7c05b Ignore OS X metadata files in repo 2015-06-17 22:28:02 -07:00
Mark McDowall
754237c57b Remove scrollbar from calendar 2015-06-16 23:40:54 -07:00
Mark McDowall
0c56fddecf Upgrade FullCalendar and MomentJS
Close #469
2015-06-16 19:17:46 -07:00
Mark McDowall
a7523ed462 Upgraded bootstrap to 3.3.4 2015-06-16 18:25:51 -07:00
Taloth
51f705d89a Merge pull request #139 from Sonarr/verified-file-transfer
Verified file transfer
2015-06-16 22:36:18 +02:00
Taloth Saldono
569ef09f39 Updated Rarbg to api v2.
fixes #752
ref rarbg/torrentapi#1
2015-06-16 21:38:52 +02:00
Mark McDowall
71f3435026 Fixed: Downloading progress won't cutoff series title prematurely
Closes #620
2015-06-14 21:15:22 -07:00
Mark McDowall
7e89bcca38 Clean up some warnings 2015-06-14 21:08:30 -07:00
Mark McDowall
92cff8c4cc OS Agnostic Paths 2015-06-13 00:53:34 -07:00
Mark McDowall
4c1e211675 Fixed: Speed up disk rescaning during series refresh 2015-06-13 00:42:16 -07:00
Mark McDowall
3df5d9444b Fixed: Next airing on series list 2015-06-09 00:32:17 -07:00
Mark McDowall
c42e322949 seasonNumber not season 2015-06-07 23:45:37 -07:00
Mark McDowall
963f1a168e Refresh using sort order 2015-06-07 23:33:08 -07:00
Mark McDowall
36629242d1 Fixed: Size on disk display 2015-06-07 23:32:22 -07:00
Mark McDowall
408ff983cf Use protocol agnostic URLs for images on add series
Closes #583
2015-06-07 21:28:21 -07:00
Mark McDowall
92b87b9d21 Fixed: Improved error messaging for manual import 2015-06-07 14:09:49 -07:00
Mark McDowall
c9f1039ab4 Poster x-class 2015-06-07 11:15:54 -07:00
Mark McDowall
3c52a9066c New: Reload fanart and poster on series details after images are downloaded 2015-06-07 09:51:29 -07:00
Mark McDowall
4c3c705517 Fix error when season stats are missing 2015-06-07 02:14:40 -07:00
Mark McDowall
5a2fa41af7 New: Search for newly added past episodes after series is refreshed
Closes #503
2015-06-07 01:15:41 -07:00
Mark McDowall
27980b2cd6 Merge pull request #546 from Sonarr/season-pass
Season pass supports multi-select and new toggling options
2015-06-06 23:58:29 -07:00
Taloth Saldono
fc572500e4 Improved season pass styling 2015-06-06 23:55:32 -07:00
Mark McDowall
155c82c199 Season pass overhaul
New: Season Pass supports multi-select
New: Improved Season Pass toggling

Closes #396
2015-06-06 23:55:21 -07:00
Taloth Saldono
28e2cf97da Fixed typo in UI. 2015-06-06 16:05:41 +02:00
Mark McDowall
acaa07c69d Fixed: Calendar not showing some items on the last day of the week 2015-06-06 00:09:22 -07:00
Mark McDowall
6fd7a64330 GetCurrentProcessId for PidFileProvider 2015-06-05 23:12:41 -07:00
Taloth Saldono
546f4ab577 Disabled verified file transfer on windows. 2015-06-05 22:51:16 +02:00
Taloth Saldono
5effca92b8 New: Now checks the file size of moved episodes to verify if the transfer was completed successfully to be able to detect errors with mounted network storage. 2015-06-05 21:59:41 +02:00
Taloth Saldono
aa4fca7177 Fixed: Torznab advanced setting 'Enable RageID Lookup' had wrong UI type.
fixes #599
2015-06-05 19:05:21 +02:00
Mark McDowall
860d7ed079 New: Support for SSL connections to Plex Media Server 2015-06-04 14:10:38 -07:00
Mark McDowall
eb8af60029 Strict parsing of anime releases that have a number at the end of the episode title 2015-06-04 13:58:25 -07:00
Mark McDowall
225489738d Suppress warnings for free space check on fixed disks 2015-06-04 13:58:24 -07:00
Taloth Saldono
ccff4fe142 Fixed: Size Parsing in TorrentRss was a bit too tolerant.
fixes #590
2015-06-04 21:08:44 +02:00
Taloth Saldono
cd5b00afa8 Disabled unstable CI integration tests. 2015-06-03 22:13:13 +02:00
Taloth Saldono
866f971d41 Prevent ProgressMessageTarget from ever reading the command from the database. 2015-06-03 20:34:33 +02:00
Mark McDowall
6d18b37a94 Fixed: Exiting from tray icon 2015-06-02 22:43:45 -07:00
Mark McDowall
de3ba041f2 Fixed: Editing episode file quality 2015-06-02 22:12:41 -07:00
Mark McDowall
a2d8413b2a Fixed: Early cleanup of completed tasks 2015-06-02 21:37:28 -07:00
Taloth Saldono
1fbbfb3317 Fixed: A bug caused way too much data being read during MediaInfo discovery (often the entire file).
Fixed: Further optimized the MediaInfo discovery to reduce the read data to a couple of dozen kbytes, but less detailed.
2015-06-02 22:03:47 +02:00
Taloth Saldono
724981db57 Fixed: Added x/h265 to renamer. 2015-06-02 21:43:41 +02:00
Mark McDowall
aae3970865 More logging for CommandExecutor 2015-06-02 00:18:34 -07:00
Mark McDowall
49718fbfbe Merge pull request #563 from Sonarr/plex-partial-updates
Support for updating single series in Plex Library
2015-05-31 22:30:47 -07:00
Mark McDowall
587ad5beb5 New: Support for updating single series in Plex Library 2015-05-31 22:29:37 -07:00
Mark McDowall
4de20b09a8 Better validation messaging for Newznab Categories 2015-05-31 00:35:25 -07:00
Mark McDowall
f7adb19474 Ignore more signalr non-errors 2015-05-31 00:10:45 -07:00
Taloth Saldono
a1ff7cbef0 And added a test for it. 2015-05-29 20:55:38 +02:00
Taloth Saldono
1cc6ad0d5f Fixed transmission returning -1 as Eta. 2015-05-29 20:50:35 +02:00
Taloth Saldono
aa78807ee2 Fixed transmission returning -1 as Eta. 2015-05-29 20:48:11 +02:00
Mark McDowall
5fda64de66 Shift select range on Missing/Cutoff Unmet 2015-05-28 16:46:52 -07:00
Taloth Saldono
75a50b83fb Updated Rarbg to use ratelimit service. 2015-05-29 01:10:50 +02:00
Taloth Saldono
78ade3250c Added RateLimit service to globally manager short duration ratelimits. 2015-05-29 01:10:49 +02:00
Mark McDowall
fac6b05bb4 Updated MediaInfo to 0.7.74 (Windows and OS X)
Closes #495
2015-05-27 00:34:46 -07:00
Taloth Saldono
39aef8bed5 Merge branch 'torrentrss' into develop 2015-05-27 08:03:04 +02:00
Taloth Saldono
99e9e4f5fd Merge branch 'rarbg-support' into develop 2015-05-27 08:02:38 +02:00
Taloth Saldono
70544738ed Merge branch 'metadata-creation' into develop 2015-05-27 08:01:01 +02:00
Lars
90469630d1 rTorrent: Fix load commands 2015-05-27 07:09:43 +02:00
Taloth
7a74327761 Merge pull request #565 from larsjohnsen/rtorrent-fixes
rTorrent: Update method names, enable compression on XMLRPC
2015-05-26 19:48:15 +02:00
Taloth Saldono
ba2da07c2f Added tests and refactored TorrentRss code. 2015-05-26 19:42:22 +02:00
Lars
5363a9e8d7 rTorrent: Update method names, enable compression on XMLRPC 2015-05-26 09:32:44 +02:00
Mark McDowall
4010a5336c Version and product for MyPlex Authentication 2015-05-25 22:08:35 -07:00
Michel Zehnder
9d7522cc15 New: Add generic TorrentRssIndexer support.
Add support for generic RSS feeds. Parses the feed and tests if it is
EZTV compatible, or if it has all required fields for the generic
TorrentRssParser
2015-05-25 22:49:58 +02:00
Mark McDowall
a090ed8b5e Support for Season xx Episode yy multi-episode format 2015-05-25 11:25:03 -07:00
Taloth Saldono
6b9c686390 Fixed tests. 2015-05-25 14:31:53 +02:00
Taloth Saldono
6744e0d506 New: Added support for Rarbg as replacement for Eztv. 2015-05-25 14:28:32 +02:00
Mark McDowall
bbcabf0632 Fixed: Don't use folder quality when it is unknown and file quality is
Closes #560
2015-05-24 23:18:57 -07:00
Taloth Saldono
b540307dbd Fixed: Series/season metadata also created on episode import. 2015-05-25 01:36:29 +02:00
Taloth Saldono
4a6778c609 HDBits fixup. 2015-05-25 00:55:30 +02:00
scherzo
3ae2883eb5 New: Add support for the HDBits torrent tracker.
The indexer implementation borrows heavily from the BroadcastTheNet
implementation as HDBits also provides a JSON API that can be used
to query both the recent torrents and the catalog.
2015-05-25 00:00:50 +02:00
Taloth Saldono
dc91fa0206 Fixed: Added /transmission/ part to UrlBase in Transmission settings making it configurable.
fixes #556
2015-05-24 12:54:50 +02:00
Mark McDowall
fb02499823 Fixed: Parsing of season and episode inside square brackets
Closes: #501
2015-05-23 22:12:30 -07:00
Mark McDowall
f4b9d0336d Log signalR errors as trace when they are network connection aborted
Closes #498
2015-05-23 21:38:53 -07:00
Mark McDowall
49acae0fbb Make sure URL base doesn't start with http or https
Closes #532
2015-05-21 17:12:33 -07:00
Mark McDowall
f547cfd0c9 Merge pull request #553 from larsjohnsen/settings-bind-address-fix
Settings: Remove misleading placeholder, fix error-message
2015-05-21 16:47:24 -07:00
Taloth Saldono
1bdc1acddd Fixed tiny cosmetic in rTorrent settings. 2015-05-21 22:10:06 +02:00
Taloth Saldono
267b54fd8b Merge branch 'qualitysize' into develop 2015-05-21 21:57:34 +02:00
Taloth Saldono
527663e27e Merge branch 'upstart-update' into develop 2015-05-21 21:57:30 +02:00
Taloth Saldono
310b788352 Merge branch 'pr/n222_larsjohnsen' into develop 2015-05-21 21:56:19 +02:00
Taloth Saldono
7d23f24854 New: Hand-off update logic to handle upstart/systemd and other auto-restart mechanisms. 2015-05-21 21:54:08 +02:00
Taloth Saldono
ab1e82414b Fixed: Unlimited MaxSize and increased granularity.
fixes #337
2015-05-21 20:44:45 +02:00
Lars
00ba19d683 Settings: Remove misleading placeholder, fix error-message 2015-05-21 04:31:01 +02:00
Taloth Saldono
e5278a0243 Added advanced torznab option to disable rageid lookups for trackers only supporting title queries. 2015-05-19 21:29:57 +02:00
Mark McDowall
7c246abc88 Fix torrent blacklisting when InfoHash is available 2015-05-17 16:20:51 -07:00
Mark McDowall
475f4244c4 Recent folders for add series now show clickable cursor 2015-05-17 16:10:10 -07:00
Mark McDowall
f57dea7f1f New: Store last 5 used folders from manual import 2015-05-17 16:07:27 -07:00
Taloth Saldono
f1a5261e0a Properly dispose filestream after getting mediainfo. 2015-05-17 18:48:00 +02:00
Taloth Saldono
fe5cb9503c Updated kickass url... again 2015-05-16 01:11:39 +02:00
Your Name
4b9664d82a Download clients: New client rTorrent 2015-05-15 21:45:12 +02:00
Taloth
944a775625 Merge pull request #540 from larsjohnsen/source-misc-xbuild-support
Compilation: Misc changes to support XBuild
2015-05-15 19:34:46 +02:00
Lars Johnsen
c8c17bce7e Compilation: Misc changes to support XBuild 2015-05-15 19:07:52 +02:00
Mark McDowall
366e3ed0be Merge pull request #539 from larsjohnsen/source-case-inconistancies
Compilation: Fix case inconsistencies
2015-05-15 09:10:05 -07:00
Taloth
cef6eb7509 Merge pull request #544 from Sonarr/mediainfo-unicode
Integrated MediaInfo wrapper to be able to properly handle Unicode
2015-05-15 10:40:45 +02:00
Mark McDowall
f88e2e2b79 Fix tests 2015-05-14 18:35:13 -07:00
Mark McDowall
57bcc9f4c1 Don't filter excluded files twice 2015-05-14 18:33:44 -07:00
Mark McDowall
69dd1c6ec4 Test to make sure we scan files in root of series folder (no season folders) 2015-05-14 18:23:57 -07:00
Mark McDowall
761a106fa9 Use HTTPS for piwik when loading via HTTPS 2015-05-14 13:24:24 -07:00
Taloth Saldono
5cd2d71e6f Integrated MediaInfo wrapper to be able to properly handle Unicode on Linux. 2015-05-14 13:31:05 +02:00
Mark McDowall
96578ca59b Stricter rejection of series subfolders
Fixed: Exclude .@__thumb folders from series disk scans

Fixes #538
2015-05-13 21:13:13 -07:00
Mark McDowall
213f905767 Only make manual import cells clickable when previous steps have been done 2015-05-13 08:45:40 -07:00
Mark McDowall
9d980a8ac7 Manual Import sends progress messages 2015-05-13 08:05:23 -07:00
Mark McDowall
c4e1a732dd Remove Kodi specific settings from PHT Settings 2015-05-13 08:01:39 -07:00
Mark McDowall
9f73b2b7f0 DotSolutions update 2015-05-12 17:08:10 -07:00
Mark McDowall
149c149094 Select input for select series in manual import 2015-05-12 17:07:56 -07:00
Mark McDowall
ee224cb422 Modal Regions inherit from a common base 2015-05-12 16:57:30 -07:00
Mark McDowall
335be1c85d Interval for RSS is minutes 2015-05-12 14:40:52 -07:00
Lars Johnsen
a79fc94a54 Compilation: Fix case inconsistencies 2015-05-12 23:17:51 +02:00
Mark McDowall
c3acfe34fe Fixed: Exclude OS X Metadata files when scanning for files
Fixes #533
2015-05-12 11:05:11 -07:00
Taloth Saldono
6e7a2af86b Ignore unicode test for now, fails on tc. 2015-05-12 01:42:11 +02:00
Keivan Beigi
cce280d260 HashAlgorithm.ComputerHash isn't thread safe, 2015-05-11 16:07:09 -07:00
Taloth Saldono
852f97012f Fixed broken test. 2015-05-12 01:05:15 +02:00
Taloth Saldono
f221b00795 Kickass Verified Only flag no longer an Advanced option to increase visibility. 2015-05-12 00:30:49 +02:00
Taloth Saldono
429298c68c Fixed manual import of unknown episodes. 2015-05-12 00:30:47 +02:00
Taloth Saldono
af060d73cc Updated MediaInfo code for syno/linux. 2015-05-12 00:30:45 +02:00
Taloth Saldono
e98a174884 Fixed: Fetching multiple pages for kickass to get more releases on the recent/rss feed due to small page size. 2015-05-12 00:30:43 +02:00
Mark McDowall
92a23d0f8b Casing for button text 2015-05-11 10:04:55 -07:00
Mark McDowall
d5ba11bd51 Merge pull request #245 from Sonarr/skyhook-search
Use skyhook for searching
2015-05-10 17:33:22 -07:00
Mark McDowall
a8aac36379 Use skyhook for searching 2015-05-10 17:32:52 -07:00
Thirrian
23c6da4746 Title case for buttons 2015-05-10 11:07:04 +02:00
Taloth Saldono
cf9391a7a3 Updated Container to handle Singleton Implementations instead of Singleton Interfaces. 2015-05-09 21:36:48 +02:00
Taloth Saldono
d0bf539a73 Fixed: A season pack import taking a long time should no longer cause the download to be deleted prematurely. 2015-05-09 10:10:16 +02:00
Mark McDowall
95bd82778f Transform buttons to title case 2015-05-08 07:50:46 -07:00
Mark McDowall
b73413f189 Prefix relative dates with "in" where appropriate 2015-05-07 16:39:48 -07:00
Mark McDowall
df4604057e Releases instead of reports (but no results found) 2015-05-07 10:17:26 -07:00
Taloth Saldono
1e2ba691ed Don't run DownloadCompletedEvent if DownloadItem not Completed. 2015-05-05 21:53:20 +02:00
Taloth Saldono
6abda8adef New: Added HD4Free.xyz to Torznab presets since that site now supports it. 2015-05-05 21:49:16 +02:00
Mark McDowall
84128482f4 Its a good idea to remove testing elements before merging 2015-05-05 12:45:35 -07:00
Mark McDowall
a184021621 Merge pull request #244 from Thirrian/sort-exception-fix
Fix for #242
2015-05-05 09:44:50 -07:00
Thirrian
c4f8e44f55 Fix for #242
Missing comma!
2015-05-05 18:04:44 +02:00
Mark McDowall
b359e1c175 Merge pull request #215 from Sonarr/manual-import
Manual Import
2015-05-05 08:42:24 -07:00
Mark McDowall
6dd22e7dcb New: Manual Import episodes 2015-05-05 08:41:39 -07:00
Mark McDowall
29ca1bc9da Merge pull request #238 from Sonarr/blacklisting-v2
Improved Blacklisting
2015-05-05 08:40:36 -07:00
Mark McDowall
bc03ad2a18 Blacklisting torrents and using more info to evaluate matches
New: Blacklisting torrents manually
New: Details on why a release was blacklisted in the UI
New: Blacklist matching take into account indexer, size, date and name
2015-05-05 08:39:41 -07:00
Mark McDowall
14f49489a7 Merge pull request #243 from Thirrian/tiny-ui-fix
Move error div inside body tag
2015-05-05 08:38:07 -07:00
Mark McDowall
4356da039f Merge pull request #242 from Thirrian/sort-exception
Add sort key for series "A.D. The Bible Continues"
2015-05-05 08:37:49 -07:00
Mark McDowall
587aff602a Fixed: Don't delete downloads unless a file was imported 2015-05-05 08:37:11 -07:00
Mark McDowall
1275d8098d New: Limit grabs to 1 per second to reduce rapid API calls 2015-05-05 08:15:38 -07:00
Mark McDowall
0c6ca6971d Fixed: Do not replace a file unless it contains the same episodes 2015-05-05 07:29:38 -07:00
Thirrian
f5fde97f68 Move error div inside body tag 2015-05-05 14:13:22 +02:00
Thirrian
50dc4c4f3d Add sort key for series "A.D. The Bible Continues" 2015-05-05 13:55:50 +02:00
Taloth Saldono
c08d8252ff Fixed some tests. 2015-05-04 01:30:16 +02:00
Taloth Saldono
2a83088045 Changed the way the Database is registered with TinyIoC to make Logdb and future cachedb more accessible. 2015-05-04 00:50:10 +02:00
Taloth Saldono
4ca8178ca8 Add db name to Vacuum log message. 2015-05-03 20:52:07 +02:00
Mark McDowall
bb48491eb2 Merge pull request #230 from Chao-Man/develop
Fixed scrolling performance issues on Webkit based browsers.
2015-05-02 10:25:51 -07:00
Chao Man
0534fb4330 Fixed scrolling performance issues on Webkit based browsers. (Opera, Chrome, Safari)
Update theme.less

Rebased and added markus101's changes.
2015-05-02 18:40:05 +10:00
Mark McDowall
8b7eedf6f9 Actually make it lower case... 2015-05-02 01:23:04 -07:00
Mark McDowall
6ab629ea98 Partial updates for command updates 2015-05-01 22:03:20 -07:00
Taloth Saldono
97cbdfdc5c Fixed: Nzbget will now properly remove data from original directory if Remove option is enabled. (nzbToMedia transcoding) 2015-05-02 00:28:47 +02:00
Taloth Saldono
25c77711cd Log partial indexer response on parser error. 2015-05-01 23:51:31 +02:00
Mark McDowall
2e6cf2b7f6 Fixed: Parsing some anime releases with multiple absolute episode numbers 2015-04-30 07:08:55 -07:00
Mark McDowall
6592310f2b Permissions can cause OWIN port registration to fail 2015-04-28 07:31:22 -07:00
Mark McDowall
918fcac2aa Fixed: Generic SignalR messages no longer treated as errors 2015-04-28 07:28:05 -07:00
Mark McDowall
4b7ee3cb9e Fixed: Monitoring options not be applied when adding a new series to an empty root folder 2015-04-28 07:13:11 -07:00
Mark McDowall
27246de623 Fixed: Ignore @eaDir inside Series folders 2015-04-27 17:07:22 -07:00
Mark McDowall
b1a0e759ef Fixed: Long sets of required/ignored words would overflow the view in Manual Search 2015-04-27 16:57:38 -07:00
Mark McDowall
f90fdef50d Couple name fixes 2015-04-26 01:21:54 -07:00
Mark McDowall
702b4429ac Order provider based settings by name 2015-04-26 00:25:40 -07:00
Mark McDowall
4eff8d88d1 New: Show age in minutes when less than 2 hours old (manual search/history) 2015-04-26 00:11:23 -07:00
Mark McDowall
235a986679 Display names for Download clients 2015-04-25 09:25:33 -07:00
Mark McDowall
c3e0dbc173 Display names for Indexers 2015-04-25 09:25:18 -07:00
Mark McDowall
e296d94417 Set default Metadata name 2015-04-25 09:10:43 -07:00
Mark McDowall
0e865fff8c No longer titlecases notifications, indexers, etc 2015-04-25 09:03:07 -07:00
Mark McDowall
9a629c2fc6 Display names for Notifications 2015-04-25 09:02:17 -07:00
Mark McDowall
ecd941a6e5 Fixing scene mappings 2015-04-23 06:36:51 -07:00
Mark McDowall
2feb583e45 Show reload when already on updates page 2015-04-22 14:49:34 -07:00
Taloth Saldono
23daae05cc Remove invalid scene mappings. 2015-04-22 20:18:04 +02:00
Taloth Saldono
b4e8a39c2c New: Added Color-Impaired mode to UI settings. 2015-04-22 19:10:07 +02:00
Mark McDowall
2f7e3c1c3c Merge pull request #240 from Royal2000H/develop
Pushbullet settings typo
2015-04-22 09:21:13 -07:00
Mark McDowall
8a0e873eb5 Fixed: URL Base for favicon and Apple Touch icons 2015-04-22 07:52:19 -07:00
Mark McDowall
10214bff42 Cleanse some names 2015-04-22 07:52:07 -07:00
Roy Handelsman
1fc99fd24e Fixed: Pushbullet settings typo 2015-04-22 00:03:42 -04:00
Mark McDowall
e40508e5e9 Fixed: Don't save invalid scene mappings into database 2015-04-21 16:53:32 -07:00
Mark McDowall
65f1dbde00 Fixed: Torznab parsing when enclosure is magent link 2015-04-19 13:13:14 -07:00
Mark McDowall
4c9f13cb26 Fixed: Testing indexers, connections and download clients 2015-04-18 22:56:36 -07:00
Mark McDowall
f831dbd789 Merge pull request #237 from Sonarr/osx-package-execute
Set permissions on Sonarr.app (OS X)
2015-04-18 11:14:55 -07:00
Mark McDowall
f18ad21b48 Fixed: Set permissions on Sonarr.app (OS X) 2015-04-18 11:12:53 -07:00
Mark McDowall
61ae7dc189 Merge pull request #236 from Sonarr/db-locks
DB locking due to Progress Messaging
2015-04-18 11:09:16 -07:00
Mark McDowall
e304a615d0 Fixed: DB locking due to Progress Messaging 2015-04-18 11:08:07 -07:00
Mark McDowall
c12f16b6d3 Mapped Network Drive Validator
New: Prevent adding Mapped Network Drives when Running as a Windows Services
2015-04-15 23:50:19 -07:00
Mark McDowall
c43296ffe9 Merge pull request #231 from Sonarr/unmonitored-calendar
Unmonitored episodes on calendar
2015-04-14 20:37:02 -07:00
Mark McDowall
ab6233dd3f New: Option to show unmonitored episodes on calendar 2015-04-14 20:35:55 -07:00
Mark McDowall
2a4fd2bbde Fixed: Better error messaging when import fails due to inaccessible path 2015-04-14 20:35:07 -07:00
Mark McDowall
c3d15015fe Fixed: Table pagers show correct loading icon 2015-04-14 20:35:06 -07:00
Mark McDowall
f30e7bc701 jshint in WebStorm 10 2015-04-14 20:35:05 -07:00
Taloth Saldono
ee87537848 Response cookies not stored by default. 2015-04-13 23:44:24 +02:00
Taloth Saldono
d4532c3856 Fixed: MediaInfo now also works on linux with unicode filenames. 2015-04-11 13:28:37 +02:00
Taloth Saldono
20e40f73b3 Made optional resource properties nullable. 2015-04-11 09:15:15 +02:00
Taloth Saldono
923488bc02 Hard test on dev nzbget version as requested. 2015-04-11 09:07:35 +02:00
Taloth Saldono
b62d36bdbe Fixed: If Nzbget failed to add an nzb, Sonarr will try another but not blacklist it. 2015-04-11 09:03:35 +02:00
Mark McDowall
62f4fc5e58 Fixed: Some anime season 1 parsing 2015-04-10 07:32:34 -07:00
Mark McDowall
cfefed34fc API endpoint to parse a release title 2015-04-10 07:30:06 -07:00
Mark McDowall
c58d607349 Don't throw error when episode title matching doesn't find a match 2015-04-09 16:48:13 -07:00
Mark McDowall
f13a4b5aa5 New: Sort queue by series, episode and episode title 2015-04-08 16:43:51 -07:00
Mark McDowall
9cf575c096 New: Toggle selected on Wanted: Missing to change monitored status 2015-04-07 16:49:36 -07:00
Mark McDowall
2c52ac1a7b Fixed: Rename preview for Specials 2015-04-07 16:19:06 -07:00
Mark McDowall
7e0c833ad0 New: Show quality in dropdowns with best at top (same as profiles) 2015-04-07 16:18:56 -07:00
Mark McDowall
7f38617d76 Fixed: Wrap long release names in history details 2015-04-07 15:54:40 -07:00
Mark McDowall
8aa6969aee Fixed: Improved special episode parsing for multiple matching titles 2015-04-06 18:43:29 -07:00
Mark McDowall
0adea0ded6 Search all missing fixes
Fixed: Searching for missing episodes excludes unmonitored episodes
Fixed: Searching for missing episodes episodes with files
2015-04-06 17:05:12 -07:00
Taloth Saldono
ccfd66260d Fixed: BitMeTv cookie will now also be used for the fetching the torrent file. 2015-04-02 21:06:05 +02:00
Taloth Saldono
a6d2283be8 New: Added Advanced option to Nyaa to change query parameters for category and filter. 2015-04-02 19:52:38 +02:00
Taloth Saldono
b92cc6fb15 Fixed: No longer possible to add protocol to a Host field (that's what Url fields are for) 2015-04-02 19:52:37 +02:00
Taloth Saldono
f2ec02876b Fixed notification enable logic and test when On Upgrade is disabled. 2015-04-02 19:52:37 +02:00
Mark McDowall
7378a98e07 Fixed icon colours 2015-03-30 00:02:47 -07:00
Taloth
42a3ff2625 Merge pull request #206 from Sonarr/osxfullfsync
Changed sqlite to use full fsync on osx
2015-03-28 12:23:24 +01:00
Taloth Saldono
4448e87e28 Fixed: NzbGet development version no longer fails validation check. 2015-03-26 20:09:03 +01:00
Mark McDowall
90b047f0d4 Fixed: Searching for unmonitored anime episodes during season/all missing searches 2015-03-26 09:06:20 -07:00
Mark McDowall
adfaa00ce1 Toggle cell use spinForPromise 2015-03-26 08:03:31 -07:00
Mark McDowall
755a42ea45 Use cache to check for running or started commands 2015-03-25 16:47:05 -07:00
Mark McDowall
210524b51a Fixed: Scene numbered season searches when some episode weren't monitored 2015-03-25 16:47:04 -07:00
Mark McDowall
a1a91878ad New: Choose the latest season when adding a new series 2015-03-25 16:47:03 -07:00
Mark McDowall
216286db5e Fixed: navbar hover mobile styling 2015-03-25 16:47:01 -07:00
Taloth Saldono
061c40c8f4 It is Not an Error Message 2015-03-25 01:39:40 +01:00
Taloth Saldono
15eeb19cd5 New: Synology Media Indexer support in Connect. 2015-03-24 20:09:12 +01:00
Taloth Saldono
93c6047cd5 Added Nzbget version check for 12.0 or higher. 2015-03-23 20:56:35 +01:00
Taloth Saldono
db4746bef7 Failed DeleteStatus now only a Warning, also added null check to handle older NzbGet version. 2015-03-23 20:56:32 +01:00
Taloth Saldono
971e159fa4 Replaced a couple more NzbDrone with Sonarr. Left a couple that implied process name. 2015-03-23 20:56:28 +01:00
Mark McDowall
a4deea2333 Merge pull request #229 from BrendenCA/fixtypo
Fixed a typo
2015-03-22 21:37:44 -07:00
BrendenCA
6114952012 Fixed a typo 2015-03-23 09:33:53 +05:30
Taloth Saldono
fcc1439754 Ugly indexer release name cleaned up before sending to Sab. 2015-03-21 00:55:30 +01:00
Mark McDowall
06a2cb0de4 New: Restrict ports that Sonarr will allow for its webserver 2015-03-18 23:15:20 -07:00
Taloth Saldono
9dd66879a2 Fixed: Better handling for Remote NAS errors. 2015-03-19 01:17:52 +01:00
Taloth Saldono
5d03c94b26 Fixed typo 2015-03-19 01:17:51 +01:00
Mark McDowall
679455713e Fixed: sorting on episode list when new episodes are added during refresh 2015-03-18 16:14:44 -07:00
Mark McDowall
9aeda7aaba Fixed: Legitimate API redirects 2015-03-18 15:27:36 -07:00
Mark McDowall
ca8e16a5be Merge pull request #227 from c0unt0/develop
Allow startup on case sensitive file systems
2015-03-18 15:00:32 -07:00
Alex
52ec1cf1b1 Allow startup on case sensitive file systems
Fixed EXE_PATH to match NzbDrone.exe’s capitalisation.
2015-03-18 21:03:19 +00:00
Mark McDowall
1efb7446c9 Log full path when moving or copying 2015-03-18 13:51:21 -07:00
Mark McDowall
c5f2c2823e Separate log messages for hardlinking and copying 2015-03-18 13:18:34 -07:00
Mark McDowall
beb4aee4c9 Merge pull request #190 from Sonarr/command-queue
Command queue
2015-03-16 22:20:53 -07:00
Mark McDowall
638e3ca898 Command queue
New: Adding multiple series will queue them instead of running all at once
New: Slower scheduled tasks won't be block others from running
2015-03-16 22:07:02 -07:00
Taloth Saldono
dea58ed663 Fixed: Changed sqlite to use full fsync on osx to reduce the chance of corruption at the cost of some performance. 2015-02-18 19:28:10 +01:00
1391 changed files with 57416 additions and 32992 deletions

15
.gitignore vendored
View File

@@ -97,7 +97,7 @@ App_Data/*.ldf
_NCrunch_*
_TeamCity*
# NzbDrone
# Sonarr
config.xml
nzbdrone.log*txt
UpdateLogs/
@@ -105,7 +105,7 @@ UpdateLogs/
*.test-cache
*.userprefs
*/test-results/*
.idea/*
src/UI/.idea/*
*log.txt
node_modules/
_output*
@@ -113,13 +113,18 @@ _rawPackage/
_dotTrace*
_tests/
*.Result.xml
wix/*.msi
wix/*.wixobj
wix/*.wixpdb
setup/Output/
*.~is
UI.Phantom/
#VS outout folders
bin
obj
output/*
#OS X metadata files
._*
_start

4
.gitmodules vendored Normal file
View File

@@ -0,0 +1,4 @@
[submodule "src/ExternalModules/CurlSharp"]
path = src/ExternalModules/CurlSharp
url = https://github.com/Sonarr/CurlSharp.git
branch = master

1
.idea/.name generated Normal file
View File

@@ -0,0 +1 @@
Sonarr

25
.idea/Sonarr.iml generated Normal file
View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.idea" />
<excludeFolder url="file://$MODULE_DIR$/Logo" />
<excludeFolder url="file://$MODULE_DIR$/_output" />
<excludeFolder url="file://$MODULE_DIR$/_output_mono" />
<excludeFolder url="file://$MODULE_DIR$/_output_osx" />
<excludeFolder url="file://$MODULE_DIR$/_output_osx_app" />
<excludeFolder url="file://$MODULE_DIR$/_start" />
<excludeFolder url="file://$MODULE_DIR$/_tests" />
<excludeFolder url="file://$MODULE_DIR$/debian" />
<excludeFolder url="file://$MODULE_DIR$/node_modules" />
<excludeFolder url="file://$MODULE_DIR$/osx" />
<excludeFolder url="file://$MODULE_DIR$/schemas" />
<excludeFolder url="file://$MODULE_DIR$/setup" />
<excludeFolder url="file://$MODULE_DIR$/src" />
<excludeFolder url="file://$MODULE_DIR$/tools" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Sonarr node_modules" level="project" />
</component>
</module>

59
.idea/codeStyleSettings.xml generated Normal file
View File

@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectCodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value>
<option name="LINE_SEPARATOR" value="&#13;&#10;" />
<option name="RIGHT_MARGIN" value="190" />
<option name="HTML_ATTRIBUTE_WRAP" value="0" />
<option name="HTML_KEEP_LINE_BREAKS" value="false" />
<option name="HTML_KEEP_BLANK_LINES" value="1" />
<option name="HTML_ALIGN_ATTRIBUTES" value="false" />
<option name="HTML_INLINE_ELEMENTS" value="" />
<option name="HTML_DONT_ADD_BREAKS_IF_INLINE_CONTENT" value="" />
<CssCodeStyleSettings>
<option name="HEX_COLOR_LOWER_CASE" value="true" />
<option name="HEX_COLOR_LONG_FORMAT" value="true" />
<option name="VALUE_ALIGNMENT" value="1" />
</CssCodeStyleSettings>
<JSCodeStyleSettings>
<option name="SPACE_BEFORE_PROPERTY_COLON" value="true" />
<option name="ALIGN_OBJECT_PROPERTIES" value="2" />
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
<option name="OBJECT_LITERAL_WRAP" value="2" />
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
</JSCodeStyleSettings>
<XML>
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
</XML>
<codeStyleSettings language="CSS">
<indentOptions>
<option name="SMART_TABS" value="true" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="JavaScript">
<option name="LINE_COMMENT_AT_FIRST_COLUMN" value="true" />
<option name="KEEP_LINE_BREAKS" value="false" />
<option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
<option name="CATCH_ON_NEW_LINE" value="true" />
<option name="FINALLY_ON_NEW_LINE" value="true" />
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
<option name="SPACE_BEFORE_METHOD_PARENTHESES" value="true" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="BINARY_OPERATION_WRAP" value="1" />
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
<option name="ARRAY_INITIALIZER_WRAP" value="2" />
<option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
<option name="ARRAY_INITIALIZER_RBRACE_ON_NEXT_LINE" value="true" />
<option name="IF_BRACE_FORCE" value="3" />
<option name="DOWHILE_BRACE_FORCE" value="3" />
<option name="WHILE_BRACE_FORCE" value="3" />
<option name="FOR_BRACE_FORCE" value="3" />
</codeStyleSettings>
</value>
</option>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</component>
</project>

7
.idea/jsLibraryMappings.xml generated Normal file
View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
<file url="file://$PROJECT_DIR$" libraries="{Sonarr node_modules}" />
<includedPredefinedLibrary name="ECMAScript 6" />
</component>
</project>

14
.idea/libraries/Sonarr_node_modules.xml generated Normal file
View File

@@ -0,0 +1,14 @@
<component name="libraryTable">
<library name="Sonarr node_modules" type="javaScript">
<properties>
<option name="frameworkName" value="node_modules" />
<sourceFilesUrls>
<item url="file://$PROJECT_DIR$/node_modules" />
</sourceFilesUrls>
</properties>
<CLASSES>
<root url="file://$PROJECT_DIR$/node_modules" />
</CLASSES>
<SOURCES />
</library>
</component>

14
.idea/misc.xml generated Normal file
View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" />
</project>

8
.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/Sonarr.iml" filepath="$PROJECT_DIR$/.idea/Sonarr.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

4
CLA.md
View File

@@ -1,6 +1,6 @@
# NzbDrone Individual Contributor License Agreement #
# Sonarr Individual Contributor License Agreement #
Thank you for your interest in contributing to NzbDrone ("We" or "Us").
Thank you for your interest in contributing to Sonarr ("We" or "Us").
This contributor agreement ("Agreement") documents the rights granted by contributors to Us. To make this document effective, please complete the form below. This is a legally binding document, so please read it carefully before agreeing to it. The Agreement may cover more than one software project managed by Us.
## 1. Definitions ##

View File

@@ -1,6 +1,6 @@
# How to Contribute #
We're always looking for people to help make NzbDrone even better, there are a number of ways to contribute. To get started, <a href="http://www.clahub.com/agreements/NzbDrone/NzbDrone">sign the Contributor License Agreement</a>.
We're always looking for people to help make Sonarr even better, there are a number of ways to contribute. To get started, <a href="http://www.clahub.com/agreements/NzbDrone/NzbDrone">sign the Contributor License Agreement</a>.
## Documentation ##
Setup guides, FAQ, the more information we have on the wiki the better.
@@ -15,15 +15,15 @@ Setup guides, FAQ, the more information we have on the wiki the better.
### Getting started ###
1. Fork NzbDrone
2. Clone (develop branch)
1. Fork Sonarr
2. Clone (develop branch) *you may need pull in submodules separately if you client doesn't clone them automatically (CurlSharp)*
3. Run `npm install`
4. Run `gulp watch` - Used to compile the UI components and copy them (leave this window open)
5. Compile in Visual Studio
### Contributing Code ###
- If you're adding a new, already requested feature, please comment on [Trello](https://trello.sonarr.tv "Trello") so work is not duplicated (If you want to add something not already on there, please talk to us first)
- Rebase from NzbDrone's develop branch, don't merge
- If you're adding a new, already requested feature, please comment on [Github Issues](https://github.com/Sonarr/Sonarr/issues "Github Issues") so work is not duplicated (If you want to add something not already on there, please talk to us first)
- Rebase from Sonarr's develop branch, don't merge
- Make meaningful commits, or squash them
- Feel free to make a pull request before work is complete, this will let us see where its at and make comments/suggest improvements
- Reach out to us on the forums or on IRC if you have any questions

View File

@@ -1,720 +0,0 @@
<Config xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:b="http://schemas.datacontract.org/2004/07/System.Drawing" xmlns:d="http://schemas.datacontract.org/2004/07/Prosa.Log4View.Db" xmlns:f="http://schemas.datacontract.org/2004/07/Prosa.Log4View.Receiver.File" xmlns:l="http://schemas.datacontract.org/2004/07/Prosa.Log4View.Level" xmlns:m="http://schemas.datacontract.org/2004/07/Prosa.Log4View.Receiver.Msg" xmlns:n="http://schemas.datacontract.org/2004/07/Prosa.Log4View.Receiver.Net" xmlns:t="http://schemas.datacontract.org/2004/07/Prosa.Log4View.LoggerTree" xmlns:u="http://schemas.datacontract.org/2004/07/Prosa.Log4View.Utils" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" z:Id="1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" xmlns="http://schemas.datacontract.org/2004/07/Prosa.Log4View.Configuration">
<Id>
<u:Value>1</u:Value>
</Id>
<Data z:Id="2">
<Id>
<u:Value>2</u:Value>
</Id>
<Version>17</Version>
<_receivers z:Id="3" z:Size="1">
<ReceiverConfig z:Id="4" i:type="n:NetReceiverConfig">
<Id>
<u:Value>16</u:Value>
</Id>
<BackColor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>2</b:state>
<b:value>4293654015</b:value>
</BackColor>
<BufferSize>500000</BufferSize>
<Encoding z:Id="5">Windows-1252</Encoding>
<LevelFilter z:Id="6" i:type="LogLevelSurrogated">
<LevelName z:Id="7">ALL</LevelName>
</LevelFilter>
<LoggingFrameworkId z:Id="8">Log4net</LoggingFrameworkId>
<Name z:Id="9">NzbDrone</Name>
<ParserType>XML</ParserType>
<ReadAdjacentMessages>0</ReadAdjacentMessages>
<ReadFrom>0001-01-01T00:00:00</ReadFrom>
<ReadUntil>0001-01-01T00:00:00</ReadUntil>
<SourceId>0</SourceId>
<TimeOffset>0</TimeOffset>
<TimeZone z:Id="10">Pacific Standard Time</TimeZone>
<UseFilter>false</UseFilter>
<Window>18</Window>
<n:HostName z:Id="11">localhost</n:HostName>
<n:Port>20480</n:Port>
<n:Protocol>Udp</n:Protocol>
</ReceiverConfig>
</_receivers>
<_sources z:Id="12" z:Size="0" />
</Data>
<Presentation z:Id="13">
<Id>
<u:Value>3</u:Value>
</Id>
<DefaultLogLevel z:Ref="6" i:nil="true" />
<ShowCodeDetails>false</ShowCodeDetails>
<ShowMessageDetails>true</ShowMessageDetails>
<ShowMultiField>true</ShowMultiField>
<ShowOutputOnDebug>true</ShowOutputOnDebug>
<ShowProcessDetails>false</ShowProcessDetails>
<ToolTipLogLevel z:Id="14" i:type="LogLevelSurrogated">
<LevelName z:Id="15">OFF</LevelName>
</ToolTipLogLevel>
<Version>17</Version>
<_charts z:Id="16" z:Size="0" />
<_columns z:Id="17" z:Size="29">
<ColumnConfig z:Id="18">
<Id>
<u:Value>78</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="19">Id</FieldName>
<Name z:Ref="19" i:nil="true" />
<Position>-1</Position>
<Width>45</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="20">
<Id>
<u:Value>79</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="21">OriginalTime</FieldName>
<Name z:Ref="21" i:nil="true" />
<Position>-1</Position>
<Width>120</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="22">
<Id>
<u:Value>80</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="23">Time</FieldName>
<Name z:Ref="23" i:nil="true" />
<Position>1</Position>
<Width>80</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="24">
<Id>
<u:Value>81</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="25">LocalTime</FieldName>
<Name z:Ref="25" i:nil="true" />
<Position>-1</Position>
<Width>120</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="26">
<Id>
<u:Value>82</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="27">UtcTime</FieldName>
<Name z:Ref="27" i:nil="true" />
<Position>-1</Position>
<Width>120</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="28">
<Id>
<u:Value>83</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="29">Date</FieldName>
<Name z:Ref="29" i:nil="true" />
<Position>-1</Position>
<Width>70</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="30">
<Id>
<u:Value>84</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="31">Key</FieldName>
<Name z:Ref="31" i:nil="true" />
<Position>-1</Position>
<Width>120</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="32">
<Id>
<u:Value>85</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="33">Level</FieldName>
<Name z:Ref="33" i:nil="true" />
<Position>-1</Position>
<Width>85</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="34">
<Id>
<u:Value>86</u:Value>
</Id>
<ClipMode>ClipMiddle</ClipMode>
<FieldName z:Id="35">Logger</FieldName>
<Name z:Ref="35" i:nil="true" />
<Position>2</Position>
<Width>120</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="36">
<Id>
<u:Value>87</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="37">Source</FieldName>
<Name z:Ref="37" i:nil="true" />
<Position>-1</Position>
<Width>90</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="38">
<Id>
<u:Value>88</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="39">Message</FieldName>
<Name z:Ref="39" i:nil="true" />
<Position>3</Position>
<Width>874</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="40">
<Id>
<u:Value>89</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="41">Thread</FieldName>
<Name z:Ref="41" i:nil="true" />
<Position>-1</Position>
<Width>95</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="42">
<Id>
<u:Value>90</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="43">Host</FieldName>
<Name z:Ref="43" i:nil="true" />
<Position>-1</Position>
<Width>90</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="44">
<Id>
<u:Value>91</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="45">Exception</FieldName>
<Name z:Ref="45" i:nil="true" />
<Position>-1</Position>
<Width>120</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="46">
<Id>
<u:Value>92</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="47">Domain</FieldName>
<Name z:Ref="47" i:nil="true" />
<Position>-1</Position>
<Width>90</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="48">
<Id>
<u:Value>93</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="49">Identity</FieldName>
<Name z:Ref="49" i:nil="true" />
<Position>-1</Position>
<Width>120</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="50">
<Id>
<u:Value>94</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="51">User</FieldName>
<Name z:Ref="51" i:nil="true" />
<Position>-1</Position>
<Width>90</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="52">
<Id>
<u:Value>95</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="53">Class</FieldName>
<Name z:Ref="53" i:nil="true" />
<Position>-1</Position>
<Width>90</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="54">
<Id>
<u:Value>96</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="55">Method</FieldName>
<Name z:Ref="55" i:nil="true" />
<Position>-1</Position>
<Width>120</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="56">
<Id>
<u:Value>97</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="57">File</FieldName>
<Name z:Ref="57" i:nil="true" />
<Position>-1</Position>
<Width>120</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="58">
<Id>
<u:Value>98</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="59">Line</FieldName>
<Name z:Ref="59" i:nil="true" />
<Position>-1</Position>
<Width>45</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="60">
<Id>
<u:Value>99</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="61">NDC</FieldName>
<Name z:Ref="61" i:nil="true" />
<Position>-1</Position>
<Width>120</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="62">
<Id>
<u:Value>100</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="63">MDC</FieldName>
<Name z:Ref="63" i:nil="true" />
<Position>-1</Position>
<Width>120</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="64">
<Id>
<u:Value>101</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="65">Comment</FieldName>
<Name z:Ref="65" i:nil="true" />
<Position>-1</Position>
<Width>120</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="66">
<Id>
<u:Value>102</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="67">StackTrace</FieldName>
<Name z:Ref="67" i:nil="true" />
<Position>-1</Position>
<Width>120</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="68">
<Id>
<u:Value>103</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="69">ProcessId</FieldName>
<Name z:Ref="69" i:nil="true" />
<Position>-1</Position>
<Width>120</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="70">
<Id>
<u:Value>104</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="71">ThreadId</FieldName>
<Name z:Ref="71" i:nil="true" />
<Position>-1</Position>
<Width>120</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="72">
<Id>
<u:Value>105</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="73">CallStack</FieldName>
<Name z:Ref="73" i:nil="true" />
<Position>-1</Position>
<Width>120</Width>
<WindowId>18</WindowId>
</ColumnConfig>
<ColumnConfig z:Id="74">
<Id>
<u:Value>106</u:Value>
</Id>
<ClipMode>ClipRight</ClipMode>
<FieldName z:Id="75">assembly</FieldName>
<Name z:Ref="75" i:nil="true" />
<Position>-1</Position>
<Width>120</Width>
<WindowId>18</WindowId>
</ColumnConfig>
</_columns>
<_filters z:Id="76" z:Size="0" />
<_formats z:Id="77" z:Size="1">
<FormatConfig z:Id="78">
<Id>
<u:Value>0</u:Value>
</Id>
<ConditionFieldName z:Ref="39" i:nil="true" />
<ConditionRelation z:Id="79"></ConditionRelation>
<ConditionText z:Ref="79" i:nil="true" />
<Formats z:Id="80" z:Size="12">
<a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
<a:Key z:Id="81" i:type="LogLevelSurrogated">
<LevelName z:Id="82">VERBOSE</LevelName>
</a:Key>
<a:Value z:Id="83">
<Id>
<u:Value>4</u:Value>
</Id>
<Backcolor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>0</b:state>
<b:value>0</b:value>
</Backcolor>
<FontName z:Id="84">Tahoma</FontName>
<Forecolor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>2</b:state>
<b:value>4290032820</b:value>
</Forecolor>
<Loglevel z:Ref="81" i:nil="true" />
<Size>8.25</Size>
<Style>Regular</Style>
</a:Value>
</a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
<a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
<a:Key z:Id="85" i:type="LogLevelSurrogated">
<LevelName z:Id="86">TRACE</LevelName>
</a:Key>
<a:Value z:Id="87">
<Id>
<u:Value>5</u:Value>
</Id>
<Backcolor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>0</b:state>
<b:value>0</b:value>
</Backcolor>
<FontName z:Id="88">Tahoma</FontName>
<Forecolor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>2</b:state>
<b:value>4288716960</b:value>
</Forecolor>
<Loglevel z:Ref="85" i:nil="true" />
<Size>8.25</Size>
<Style>Regular</Style>
</a:Value>
</a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
<a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
<a:Key z:Id="89" i:type="LogLevelSurrogated">
<LevelName z:Id="90">DEBUG</LevelName>
</a:Key>
<a:Value z:Id="91">
<Id>
<u:Value>6</u:Value>
</Id>
<Backcolor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>0</b:state>
<b:value>0</b:value>
</Backcolor>
<FontName z:Id="92">Tahoma</FontName>
<Forecolor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>2</b:state>
<b:value>4286743170</b:value>
</Forecolor>
<Loglevel z:Ref="89" i:nil="true" />
<Size>8.25</Size>
<Style>Regular</Style>
</a:Value>
</a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
<a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
<a:Key z:Id="93" i:type="LogLevelSurrogated">
<LevelName z:Id="94">INFO</LevelName>
</a:Key>
<a:Value z:Id="95">
<Id>
<u:Value>7</u:Value>
</Id>
<Backcolor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>0</b:state>
<b:value>0</b:value>
</Backcolor>
<FontName z:Id="96">Tahoma</FontName>
<Forecolor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>2</b:state>
<b:value>4278190080</b:value>
</Forecolor>
<Loglevel z:Ref="93" i:nil="true" />
<Size>8.25</Size>
<Style>Regular</Style>
</a:Value>
</a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
<a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
<a:Key z:Id="97" i:type="LogLevelSurrogated">
<LevelName z:Id="98">NOTICE</LevelName>
</a:Key>
<a:Value z:Id="99">
<Id>
<u:Value>8</u:Value>
</Id>
<Backcolor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>0</b:state>
<b:value>0</b:value>
</Backcolor>
<FontName z:Id="100">Tahoma</FontName>
<Forecolor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>2</b:state>
<b:value>4281957177</b:value>
</Forecolor>
<Loglevel z:Ref="97" i:nil="true" />
<Size>8.25</Size>
<Style>Regular</Style>
</a:Value>
</a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
<a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
<a:Key z:Id="101" i:type="LogLevelSurrogated">
<LevelName z:Id="102">WARN</LevelName>
</a:Key>
<a:Value z:Id="103">
<Id>
<u:Value>9</u:Value>
</Id>
<Backcolor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>0</b:state>
<b:value>0</b:value>
</Backcolor>
<FontName z:Id="104">Tahoma</FontName>
<Forecolor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>2</b:state>
<b:value>4294934528</b:value>
</Forecolor>
<Loglevel z:Ref="101" i:nil="true" />
<Size>8.25</Size>
<Style>Regular</Style>
</a:Value>
</a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
<a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
<a:Key z:Id="105" i:type="LogLevelSurrogated">
<LevelName z:Id="106">ERROR</LevelName>
</a:Key>
<a:Value z:Id="107">
<Id>
<u:Value>10</u:Value>
</Id>
<Backcolor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>0</b:state>
<b:value>0</b:value>
</Backcolor>
<FontName z:Id="108">Tahoma</FontName>
<Forecolor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>2</b:state>
<b:value>4294901760</b:value>
</Forecolor>
<Loglevel z:Ref="105" i:nil="true" />
<Size>8.25</Size>
<Style>Regular</Style>
</a:Value>
</a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
<a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
<a:Key z:Id="109" i:type="LogLevelSurrogated">
<LevelName z:Id="110">SEVERE</LevelName>
</a:Key>
<a:Value z:Id="111">
<Id>
<u:Value>11</u:Value>
</Id>
<Backcolor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>0</b:state>
<b:value>0</b:value>
</Backcolor>
<FontName z:Id="112">Tahoma</FontName>
<Forecolor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>2</b:state>
<b:value>4293067295</b:value>
</Forecolor>
<Loglevel z:Ref="109" i:nil="true" />
<Size>8.25</Size>
<Style>Regular</Style>
</a:Value>
</a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
<a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
<a:Key z:Id="113" i:type="LogLevelSurrogated">
<LevelName z:Id="114">CRITICAL</LevelName>
</a:Key>
<a:Value z:Id="115">
<Id>
<u:Value>12</u:Value>
</Id>
<Backcolor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>0</b:state>
<b:value>0</b:value>
</Backcolor>
<FontName z:Id="116">Tahoma</FontName>
<Forecolor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>2</b:state>
<b:value>4289400377</b:value>
</Forecolor>
<Loglevel z:Ref="113" i:nil="true" />
<Size>8.25</Size>
<Style>Regular</Style>
</a:Value>
</a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
<a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
<a:Key z:Id="117" i:type="LogLevelSurrogated">
<LevelName z:Id="118">ALERT</LevelName>
</a:Key>
<a:Value z:Id="119">
<Id>
<u:Value>13</u:Value>
</Id>
<Backcolor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>0</b:state>
<b:value>0</b:value>
</Backcolor>
<FontName z:Id="120">Tahoma</FontName>
<Forecolor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>2</b:state>
<b:value>4294902015</b:value>
</Forecolor>
<Loglevel z:Ref="117" i:nil="true" />
<Size>8.25</Size>
<Style>Regular</Style>
</a:Value>
</a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
<a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
<a:Key z:Id="121" i:type="LogLevelSurrogated">
<LevelName z:Id="122">FATAL</LevelName>
</a:Key>
<a:Value z:Id="123">
<Id>
<u:Value>14</u:Value>
</Id>
<Backcolor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>0</b:state>
<b:value>0</b:value>
</Backcolor>
<FontName z:Id="124">Tahoma</FontName>
<Forecolor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>2</b:state>
<b:value>4287309977</b:value>
</Forecolor>
<Loglevel z:Ref="121" i:nil="true" />
<Size>8.25</Size>
<Style>Regular</Style>
</a:Value>
</a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
<a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
<a:Key z:Id="125" i:type="LogLevelSurrogated">
<LevelName z:Id="126">EMERGENCY</LevelName>
</a:Key>
<a:Value z:Id="127">
<Id>
<u:Value>15</u:Value>
</Id>
<Backcolor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>0</b:state>
<b:value>0</b:value>
</Backcolor>
<FontName z:Id="128">Tahoma</FontName>
<Forecolor>
<b:knownColor>0</b:knownColor>
<b:name i:nil="true" />
<b:state>2</b:state>
<b:value>4285932413</b:value>
</Forecolor>
<Loglevel z:Ref="125" i:nil="true" />
<Size>8.25</Size>
<Style>Regular</Style>
</a:Value>
</a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
</Formats>
<IgnoreCase>false</IgnoreCase>
<Name z:Id="129">Default Format Settings</Name>
</FormatConfig>
</_formats>
<_logLevels z:Id="130" z:Size="0" />
<_loggers z:Id="131" z:Size="1">
<LoggerConfig z:Id="132">
<Id>
<u:Value>77</u:Value>
</Id>
<LogLevel z:Ref="6" i:nil="true" />
<LoggerPath z:Ref="79" i:nil="true" />
<ReceiverId>16</ReceiverId>
</LoggerConfig>
</_loggers>
</Presentation>
<Version>17</Version>
</Config>

View File

@@ -1,2 +0,0 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/Environment/ExternalSources/Decompiler/DecompileMethodBodies/@EntryValue">True</s:Boolean></wpf:ResourceDictionary>

258
build.ps1
View File

@@ -1,257 +1 @@
$msBuild = 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe'
$outputFolder = '.\_output'
$outputFolderMono = '.\_output_mono'
$outputFolderOsx = '.\_output_osx'
$outputFolderOsxApp = '.\_output_osx_app'
$testPackageFolder = '.\_tests\'
$testSearchPattern = '*.Test\bin\x86\Release'
$sourceFolder = '.\src'
$updateFolder = $outputFolder + '\NzbDrone.Update'
$updateFolderMono = $outputFolderMono + '\NzbDrone.Update'
Function Build()
{
Write-Host "##teamcity[progressStart 'Build']"
$clean = $msbuild + " src\nzbdrone.sln /t:Clean /m"
$build = $msbuild + " src\nzbdrone.sln /p:Configuration=Release /p:Platform=x86 /t:Build /m"
if(Test-Path $outputFolder)
{
Remove-Item -Recurse -Force $outputFolder -ErrorAction Continue
}
Invoke-Expression $clean
CheckExitCode
Invoke-Expression $build
CheckExitCode
CleanFolder $outputFolder
AddJsonNet
Write-Host "Removing Mono.Posix.dll"
Remove-Item "$outputFolder\Mono.Posix.dll"
Write-Host "##teamcity[progressFinish 'Build']"
}
Function CleanFolder($path, $keepConfigFiles)
{
Write-Host Removing XMLDoc files
get-childitem $path -File -Filter *.xml -Recurse | foreach ($_) {
$filename = $_.FullName
$exeFilename = $filename -replace "xml", "exe"
$dllFilename = $filename -replace "xml", "dll"
if (Test-Path $exeFilename) {
remove-item $_.fullname
}
if (Test-Path $dllFilename) {
remove-item $_.fullname
}
}
get-childitem $path -File -Filter *.transform -Recurse | foreach ($_) {remove-item $_.fullname}
if($keepConfigFiles -ne $true)
{
get-childitem $path -File -Filter *.dll.config -Recurse | foreach ($_) {remove-item $_.fullname}
}
Write-Host Removing FluentValidation.Resources files
get-childitem $path -File -Filter FluentValidation.resources.dll -recurse | foreach ($_) {remove-item $_.fullname}
get-childitem $path -File -Filter app.config -Recurse | foreach ($_) {remove-item $_.fullname}
Write-Host Removing .less files
get-childitem $path -File -Filter *.less -Recurse | foreach ($_) {remove-item $_.fullname}
Write-Host Removing vshost files
get-childitem $path -File -Filter *.vshost.exe -Recurse | foreach ($_) {remove-item $_.fullname}
if(Test-Path $$path\NuGet)
{
Write-Host Removing NuGet
Remove-Item -Recurse -Force "$path\NuGet"
}
Write-Host Removing Empty folders
while (Get-ChildItem $path -recurse | where {!@(Get-ChildItem -force $_.fullname)} | Test-Path)
{
Get-ChildItem $path -Directory -recurse | where {!@(Get-ChildItem -force $_.fullname)} | Remove-Item
}
}
Function PackageMono()
{
Write-Host "##teamcity[progressStart 'Creating Mono Package']"
if(Test-Path $outputFolderMono)
{
Remove-Item -Recurse -Force $outputFolderMono -ErrorAction Continue
}
Copy-Item $outputFolder $outputFolderMono -recurse
Write-Host Creating MDBs
get-childitem $outputFolderMono -File -Include @("*.exe", "*.dll") -Exclude @("MediaInfo.dll", "sqlite3.dll") -Recurse | foreach ($_) {
Write-Host "Creating .mdb for $_"
& "tools\pdb2mdb\pdb2mdb.exe" $_.fullname
}
Write-Host Removing PDBs
get-childitem $outputFolderMono -File -Filter *.pdb -Recurse | foreach ($_) {remove-item $_.fullname}
Write-Host Removing Service helpers
get-childitem $outputFolderMono -File -Filter ServiceUninstall.* -Recurse | foreach ($_) {remove-item $_.fullname}
get-childitem $outputFolderMono -File -Filter ServiceInstall.* -Recurse | foreach ($_) {remove-item $_.fullname}
Write-Host Removing native windows binaries Sqlite, MediaInfo
get-childitem $outputFolderMono -File -Filter sqlite3.* -Recurse | foreach ($_) {remove-item $_.fullname}
get-childitem $outputFolderMono -File -Filter MediaInfo.* -Recurse | foreach ($_) {remove-item $_.fullname}
Write-Host "Adding MediaInfoDotNet.dll.config (for dllmap)"
Copy-Item "$sourceFolder\MediaInfoDotNet.dll.config" $outputFolderMono
Write-Host Renaming NzbDrone.Console.exe to NzbDrone.exe
Get-ChildItem $outputFolderMono -File -Filter "NzbDrone.exe*" -Recurse | foreach ($_) {remove-item $_.fullname}
Write-Host Removing NzbDrone.Windows
get-childitem $outputFolderMono -File -Filter NzbDrone.Windows.* -Recurse | foreach ($_) {remove-item $_.fullname}
Get-ChildItem $outputFolderMono -File -Filter "NzbDrone.Console.exe*" -Recurse | foreach ($_) {
$newName = $_.fullname -Replace ".Console",""
Rename-Item $_.fullname $newName
}
Write-Host Adding NzbDrone.Mono to UpdatePackage
Copy-Item $outputFolderMono\* $updateFolderMono -Filter NzbDrone.Mono.*
Write-Host "##teamcity[progressFinish 'Creating Mono Package']"
}
Function PackageOsx()
{
Write-Host "##teamcity[progressStart 'Creating OS X Package']"
if(Test-Path $outputFolderOsx)
{
Remove-Item -Recurse -Force $outputFolderOsx -ErrorAction Continue
}
Copy-Item $outputFolderMono $outputFolderOsx -recurse
Write-Host "Adding sqlite dylibs"
Copy-Item "$sourceFolder\Libraries\sqlite\*.dylib" "$outputFolderOsx"
Write-Host "Adding MediaInfo dylib"
Copy-Item "$sourceFolder\Libraries\MediaInfo\*.dylib" "$outputFolderOsx"
Write-Host "Adding Startup script"
Copy-Item .\osx\Sonarr "$outputFolderOsx"
Write-Host "##teamcity[progressFinish 'Creating OS X Package']"
}
Function PackageOsxApp()
{
Write-Host "##teamcity[progressStart 'Creating OS X App Package']"
if(Test-Path $outputFolderOsxApp)
{
Remove-Item -Recurse -Force $outputFolderOsxApp -ErrorAction Continue
}
Copy-Item .\osx\Sonarr.app $outputFolderOsxApp\Sonarr.app -recurse
Copy-Item $outputFolderOsx $outputFolderOsxApp\Sonarr.app\Contents\MacOS -recurse
Write-Host "##teamcity[progressFinish 'Creating OS X App Package']"
}
Function AddJsonNet()
{
get-childitem $outputFolder -File -Filter Newtonsoft.Json.* -Recurse | foreach ($_) {remove-item $_.fullname}
Copy-Item .\src\packages\Newtonsoft.Json.*.*\lib\net35\*.dll -Destination $outputFolder
Copy-Item .\src\packages\Newtonsoft.Json.*.*\lib\net35\*.dll -Destination $outputFolder\NzbDrone.Update
}
Function PackageTests()
{
Write-Host Packaging Tests
Write-Host "##teamcity[progressStart 'Creating Test Package']"
if(Test-Path $testPackageFolder)
{
Remove-Item -Recurse -Force $testPackageFolder -ErrorAction Continue
}
Get-ChildItem -Recurse -Directory | Where-Object {$_.FullName -like $testSearchPattern} | foreach($_){
Copy-Item -Recurse ($_.FullName + "\*") $testPackageFolder -ErrorAction Ignore
}
.\src\.nuget\NuGet.exe install NUnit.Runners -Version 2.6.1 -Output $testPackageFolder
Copy-Item $outputFolder\*.dll -Destination $testPackageFolder -Force
Copy-Item $outputFolder\*.pdb -Destination $testPackageFolder -Force
Copy-Item .\*.sh -Destination $testPackageFolder -Force
Write-Host Creating MDBs for tests
get-childitem $testPackageFolder -File -Include @("*.exe", "*.dll") -Exclude @("MediaInfo.dll", "sqlite3.dll") -Recurse | foreach ($_) {
Write-Host "Creating .mdb for $_"
& "tools\pdb2mdb\pdb2mdb.exe" $_.fullname
}
get-childitem $testPackageFolder -File -Filter *log.config | foreach ($_) {remove-item $_.fullname}
CleanFolder $testPackageFolder $true
Write-Host "Adding MediaInfoDotNet.dll.config (for dllmap)"
Copy-Item "$sourceFolder\MediaInfoDotNet.dll.config" -Destination $testPackageFolder -Force
Write-Host "##teamcity[progressFinish 'Creating Test Package']"
}
Function RunGulp()
{
Write-Host "##teamcity[progressStart 'Running Gulp']"
Invoke-Expression 'npm install'
CheckExitCode
Invoke-Expression 'gulp build' -ErrorAction Continue -Verbose
CheckExitCode
Write-Host "##teamcity[progressFinish 'Running Gulp']"
}
Function CheckExitCode()
{
if ($lastexitcode -ne 0)
{
Write-Host $errorMessage
exit 1
}
}
Function CleanupWindowsPackage()
{
Write-Host Removing NzbDrone.Mono
get-childitem $outputFolder -File -Filter NzbDrone.Mono.* -Recurse | foreach ($_) {remove-item $_.fullname}
Write-Host Adding NzbDrone.Windows to UpdatePackage
Copy-Item $outputFolder\* $updateFolder -Filter NzbDrone.Windows.*
}
Build
RunGulp
PackageMono
PackageOsx
PackageOsxApp
PackageTests
CleanupWindowsPackage
Write-Warning "DEPRECATED -- Please use build.sh instead."

265
build.sh Executable file
View File

@@ -0,0 +1,265 @@
#! /bin/bash
msBuild='/c/Windows/Microsoft.NET/Framework64/v4.0.30319/'
outputFolder='./_output'
outputFolderMono='./_output_mono'
outputFolderOsx='./_output_osx'
outputFolderOsxApp='./_output_osx_app'
testPackageFolder='./_tests/'
testSearchPattern='*.Test/bin/x86/Release'
sourceFolder='./src'
slnFile=$sourceFolder/NzbDrone.sln
updateFolder=$outputFolder/NzbDrone.Update
updateFolderMono=$outputFolderMono/NzbDrone.Update
nuget='tools/nuget/nuget.exe';
CheckExitCode()
{
"$@"
local status=$?
if [ $status -ne 0 ]; then
echo "error with $1" >&2
exit 1
fi
return $status
}
CleanFolder()
{
local path=$1
local keepConfigFiles=$2
find $path -name "*.transform" -exec rm "{}" \;
if [ $keepConfigFiles != true ] ; then
find $path -name "*.dll.config" -exec rm "{}" \;
fi
echo "Removing FluentValidation.Resources files"
find $path -name "FluentValidation.resources.dll" -exec rm "{}" \;
find $path -name "App.config" -exec rm "{}" \;
echo "Removing .less files"
find $path -name "*.less" -exec rm "{}" \;
echo "Removing vshost files"
find $path -name "*.vshost.exe" -exec rm "{}" \;
echo "Removing dylib files"
find $path -name "*.dylib" -exec rm "{}" \;
echo "Removing Empty folders"
find $path -depth -empty -type d -exec rm -r "{}" \;
}
AddJsonNet()
{
rm $outputFolder/Newtonsoft.Json.*
cp $sourceFolder/packages/Newtonsoft.Json.*/lib/net35/*.dll $outputFolder
cp $sourceFolder/packages/Newtonsoft.Json.*/lib/net35/*.dll $outputFolder/NzbDrone.Update
}
BuildWithMSBuild()
{
export PATH=$msBuild:$PATH
CheckExitCode MSBuild.exe $slnFile //t:Clean //m
$nuget restore $slnFile
CheckExitCode MSBuild.exe $slnFile //p:Configuration=Release //p:Platform=x86 //t:Build //m //p:AllowedReferenceRelatedFileExtensions=.pdb
}
BuildWithXbuild()
{
export MONO_IOMAP=case
CheckExitCode xbuild /t:Clean $slnFile
mono $nuget restore $slnFile
CheckExitCode xbuild /p:Configuration=Release /p:Platform=x86 /t:Build /p:AllowedReferenceRelatedFileExtensions=.pdb $slnFile
}
Build()
{
echo "##teamcity[progressStart 'Build']"
rm -rf $outputFolder
if [ $runtime = "dotnet" ] ; then
BuildWithMSBuild
else
BuildWithXbuild
fi
CleanFolder $outputFolder false
AddJsonNet
echo "Removing Mono.Posix.dll"
rm $outputFolder/Mono.Posix.dll
echo "##teamcity[progressFinish 'Build']"
}
RunGulp()
{
echo "##teamcity[progressStart 'npm install']"
CheckExitCode npm install
echo "##teamcity[progressFinish 'npm install']"
echo "##teamcity[progressStart 'Running Gulp']"
CheckExitCode gulp build
echo "##teamcity[progressFinish 'Running Gulp']"
}
CreateMdbs()
{
local path=$1
if [ $runtime = "dotnet" ] ; then
local pdbFiles=( $(find $path -name "*.pdb") )
for filename in "${pdbFiles[@]}"
do
if [ -e ${filename%.pdb}.dll ] ; then
tools/pdb2mdb/pdb2mdb.exe ${filename%.pdb}.dll
fi
if [ -e ${filename%.pdb}.exe ] ; then
tools/pdb2mdb/pdb2mdb.exe ${filename%.pdb}.exe
fi
done
fi
}
PackageMono()
{
echo "##teamcity[progressStart 'Creating Mono Package']"
rm -rf $outputFolderMono
cp -r $outputFolder $outputFolderMono
echo "Creating MDBs"
CreateMdbs $outputFolderMono
echo "Removing PDBs"
find $outputFolderMono -name "*.pdb" -exec rm "{}" \;
echo "Removing Service helpers"
rm -f $outputFolderMono/ServiceUninstall.*
rm -f $outputFolderMono/ServiceInstall.*
echo "Removing native windows binaries Sqlite, MediaInfo"
rm -f $outputFolderMono/sqlite3.*
rm -f $outputFolderMono/MediaInfo.*
echo "Adding NzbDrone.Core.dll.config (for dllmap)"
cp $sourceFolder/NzbDrone.Core/NzbDrone.Core.dll.config $outputFolderMono
echo "Adding CurlSharp.dll.config (for dllmap)"
cp $sourceFolder/NzbDrone.Common/CurlSharp.dll.config $outputFolderMono
echo "Renaming NzbDrone.Console.exe to NzbDrone.exe"
rm $outputFolderMono/NzbDrone.exe*
for file in $outputFolderMono/NzbDrone.Console.exe*; do
mv "$file" "${file//.Console/}"
done
echo "Removing NzbDrone.Windows"
rm $outputFolderMono/NzbDrone.Windows.*
echo "Adding NzbDrone.Mono to UpdatePackage"
cp $outputFolderMono/NzbDrone.Mono.* $updateFolderMono
echo "##teamcity[progressFinish 'Creating Mono Package']"
}
PackageOsx()
{
echo "##teamcity[progressStart 'Creating OS X Package']"
rm -rf $outputFolderOsx
cp -r $outputFolderMono $outputFolderOsx
echo "Adding sqlite dylibs"
cp $sourceFolder/Libraries/Sqlite/*.dylib $outputFolderOsx
echo "Adding MediaInfo dylib"
cp $sourceFolder/Libraries/MediaInfo/*.dylib $outputFolderOsx
echo "Adding Startup script"
cp ./osx/Sonarr $outputFolderOsx
echo "##teamcity[progressFinish 'Creating OS X Package']"
}
PackageOsxApp()
{
echo "##teamcity[progressStart 'Creating OS X App Package']"
rm -rf $outputFolderOsxApp
mkdir $outputFolderOsxApp
cp -r ./osx/Sonarr.app $outputFolderOsxApp
cp -r $outputFolderOsx $outputFolderOsxApp/Sonarr.app/Contents/MacOS
echo "##teamcity[progressFinish 'Creating OS X App Package']"
}
PackageTests()
{
echo "Packaging Tests"
echo "##teamcity[progressStart 'Creating Test Package']"
rm -rf $testPackageFolder
mkdir $testPackageFolder
find $sourceFolder -path $testSearchPattern -exec cp -r -u -T "{}" $testPackageFolder \;
if [ $runtime = "dotnet" ] ; then
$nuget install NUnit.Runners -Version 2.6.1 -Output $testPackageFolder
else
mono $nuget install NUnit.Runners -Version 2.6.1 -Output $testPackageFolder
fi
cp $outputFolder/*.dll $testPackageFolder
cp ./*.sh $testPackageFolder
echo "Creating MDBs for tests"
CreateMdbs $testPackageFolder
rm -f $testPackageFolder/*.log.config
CleanFolder $testPackageFolder true
echo "Adding NzbDrone.Core.dll.config (for dllmap)"
cp $sourceFolder/NzbDrone.Core/NzbDrone.Core.dll.config $testPackageFolder
echo "Adding CurlSharp.dll.config (for dllmap)"
cp $sourceFolder/NzbDrone.Common/CurlSharp.dll.config $testPackageFolder
echo "Copying CurlSharp libraries"
cp $sourceFolder/ExternalModules/CurlSharp/libs/i386/* $testPackageFolder
echo "##teamcity[progressFinish 'Creating Test Package']"
}
CleanupWindowsPackage()
{
echo "Removing NzbDrone.Mono"
rm -f $outputFolder/NzbDrone.Mono.*
echo "Adding NzbDrone.Windows to UpdatePackage"
cp $outputFolder/NzbDrone.Windows.* $updateFolder
}
# Use mono or .net depending on OS
case "$(uname -s)" in
CYGWIN*|MINGW32*|MINGW64*|MSYS*)
# on windows, use dotnet
runtime="dotnet"
;;
*)
# otherwise use mono
runtime="mono"
;;
esac
Build
RunGulp
PackageMono
PackageOsx
PackageOsxApp
PackageTests
CleanupWindowsPackage

View File

@@ -1,50 +0,0 @@
<Query Kind="Program" />
void Main()
{
var files = Directory.GetFiles("c:\\git\\sonarr\\src\\UI","*.js", SearchOption.AllDirectories);
var moduleRegex = new Regex(@"module.exports\s*=\s*\(function\s*\(\)\s*{\n\s*return\s*(\w|\W)*\)\.call\(this\);$");
var functionHead = new Regex(@"\s*\(function\s*\(\)\s*{\n\s*return\s*");
var functionTail = new Regex(@"\}\).call\(this\);$");
var multiVar = new Regex(@"^(?<d>var\s*\w*\s*=\s*require\(.*\)),");
var seperateDeclearatuin = new Regex(@"^((\w|\$|_)*\s=\srequire\(.*\))(,|;)", RegexOptions.Multiline);
foreach (var filePath in files)
{
var text = File.ReadAllText(filePath);
var newContent = text.Replace("// Generated by uRequire v0.7.0-beta.14 template: 'nodejs'","");
newContent = newContent.Replace("var __isAMD = !!(typeof define === 'function' && define.amd),","");
newContent = newContent.Replace("__isNode = (typeof exports === 'object'),","");
newContent = newContent.Replace("__isWeb = !__isNode;","");
newContent = newContent.Replace("\"use strict\";","'use strict';");
newContent = newContent.Trim();
if(moduleRegex.IsMatch(newContent))
{
filePath.Dump();
newContent = functionHead.Replace(newContent," ");
newContent = functionTail.Replace(newContent,"");
}
if(multiVar.IsMatch(newContent))
{
newContent = multiVar.Replace(newContent,"$1;"); //first one
}
newContent = seperateDeclearatuin.Replace(newContent,"var $1;"); //ones after
newContent.Replace("var $ = require('jquery'), var","var $ = require('jquery');");
File.WriteAllText(filePath,newContent.Trim());
}
}
// Define other methods and classes here

2
debian/copyright vendored
View File

@@ -3,7 +3,7 @@ Upstream-Name: nzbdrone
Source: https://github.com/Sonarr/Sonarr
Files: *
Copyright: 2010-2014 Sonarr <hello@sonarr.tv>
Copyright: 2010-2016 Sonarr <hello@sonarr.tv>
License: GPL-3.0+

View File

@@ -6,7 +6,13 @@ require('./less');
require('./handlebars');
require('./copy');
gulp.task('build', function () {
return runSequence('clean',
['webpack', 'less', 'handlebars', 'copyHtml', 'copyContent', 'copyJs']);
gulp.task('build', function() {
return runSequence('clean', [
'webpack',
'less',
'handlebars',
'copyHtml',
'copyContent',
'copyJs'
]);
});

View File

@@ -3,6 +3,6 @@ var del = require('del');
var paths = require('./paths');
gulp.task('clean', function (cb) {
del([paths.dest.root], cb);
gulp.task('clean', function(cb) {
del([paths.dest.root], cb);
});

View File

@@ -1,27 +1,31 @@
var gulp = require('gulp');
var print = require('gulp-print');
var cache = require('gulp-cached');
var livereload = require('gulp-livereload');
var paths = require('./paths.js');
gulp.task('copyJs', function () {
return gulp.src(
[
paths.src.root + "polyfills.js",
paths.src.root + "JsLibraries\\handlebars.runtime.js",
])
.pipe(cache('copyJs'))
.pipe(print())
.pipe(gulp.dest(paths.dest.root));
return gulp.src(
[
paths.src.root + 'polyfills.js',
paths.src.root + 'JsLibraries/handlebars.runtime.js'
])
.pipe(cache('copyJs'))
.pipe(print())
.pipe(gulp.dest(paths.dest.root))
.pipe(livereload());
});
gulp.task('copyHtml', function () {
return gulp.src(paths.src.html)
.pipe(cache('copyHtml'))
.pipe(gulp.dest(paths.dest.root));
return gulp.src(paths.src.html)
.pipe(cache('copyHtml'))
.pipe(gulp.dest(paths.dest.root))
.pipe(livereload());
});
gulp.task('copyContent', function () {
return gulp.src([paths.src.content + '**/*.*', '!**/*.less'])
.pipe(gulp.dest(paths.dest.content));
return gulp.src([paths.src.content + '**/*.*', '!**/*.less'])
.pipe(gulp.dest(paths.dest.content))
.pipe(livereload());
});

View File

@@ -1,7 +1,7 @@
module.exports = {
onError:function (error) {
onError : function(error) {
//If you want details of the error in the console
console.log(error.toString());
this.emit('end');
}
}
};

View File

@@ -8,5 +8,4 @@ require('./less.js');
require('./stripBom.js');
require('./imageMin.js');
require('./webpack.js');
require('./start.js');

View File

@@ -3,21 +3,25 @@ var handlebars = require('gulp-handlebars');
var declare = require('gulp-declare');
var concat = require('gulp-concat');
var wrap = require("gulp-wrap");
var livereload = require('gulp-livereload');
var path = require('path');
var streamqueue = require('streamqueue');
var stripbom = require('gulp-stripbom');
var paths = require('./paths.js');
gulp.task('handlebars', function () {
gulp.task('handlebars', function() {
var coreStream = gulp.src([paths.src.templates, '!*/**/*Partial.*'])
.pipe(stripbom({ showLog: false }))
var coreStream = gulp.src([
paths.src.templates,
'!*/**/*Partial.*'
])
.pipe(stripbom({ showLog : false }))
.pipe(handlebars())
.pipe(declare({
namespace: 'T',
noRedeclare: true,
processName: function (filePath) {
namespace : 'T',
noRedeclare : true,
processName : function(filePath) {
filePath = path.relative(paths.src.root, filePath);
@@ -29,12 +33,12 @@ gulp.task('handlebars', function () {
}));
var partialStream = gulp.src([paths.src.partials])
.pipe(stripbom({ showLog: false }))
.pipe(stripbom({ showLog : false }))
.pipe(handlebars())
.pipe(wrap('Handlebars.template(<%= contents %>)'))
.pipe(wrap('Handlebars.registerPartial(<%= processPartialName(file.relative) %>, <%= contents %>)', {}, {
imports: {
processPartialName: function (fileName) {
imports : {
processPartialName : function(fileName) {
return JSON.stringify(
path.basename(fileName, '.js')
);
@@ -42,11 +46,10 @@ gulp.task('handlebars', function () {
}
}));
return streamqueue({ objectMode: true },
return streamqueue({ objectMode : true },
partialStream,
coreStream
).pipe(concat('templates.js'))
.pipe(gulp.dest(paths.dest.root));
.pipe(gulp.dest(paths.dest.root))
.pipe(livereload());
});

View File

@@ -2,14 +2,13 @@ var gulp = require('gulp');
var print = require('gulp-print');
var paths = require('./paths.js');
gulp.task('imageMin', function () {
gulp.task('imageMin', function() {
var imagemin = require('gulp-imagemin');
return gulp.src(paths.src.images)
.pipe(imagemin({
progressive: false,
optimizationLevel :4,
svgoPlugins: [{removeViewBox: false}]
progressive : false,
optimizationLevel : 4,
svgoPlugins : [{ removeViewBox : false }]
}))
.pipe(print())
.pipe(gulp.dest(paths.src.content + 'Images/'));

View File

@@ -4,9 +4,11 @@ var stylish = require('jshint-stylish');
var cache = require('gulp-cached');
var paths = require('./paths.js');
gulp.task('jshint', function () {
return gulp.src([paths.src.scripts, paths.src.exclude.libs])
gulp.task('jshint', function() {
return gulp.src([
paths.src.scripts,
paths.src.exclude.libs
])
.pipe(cache('jshint'))
.pipe(jshint())
.pipe(jshint.reporter(stylish));

View File

@@ -1,33 +1,46 @@
var gulp = require('gulp');
var less = require('gulp-less');
var print = require('gulp-print');
var less = require('gulp-less');
var postcss = require('gulp-postcss');
var sourcemaps = require('gulp-sourcemaps');
var autoprefixer = require('autoprefixer-core');
var livereload = require('gulp-livereload');
var print = require('gulp-print');
var paths = require('./paths');
var errorHandler = require('./errorHandler');
gulp.task('less', function () {
return gulp.src([
paths.src.content + 'bootstrap.less',
paths.src.content + 'theme.less',
paths.src.content + 'overrides.less',
paths.src.root + 'Series/series.less',
paths.src.root + 'Activity/activity.less',
paths.src.root + 'AddSeries/addSeries.less',
paths.src.root + 'Calendar/calendar.less',
paths.src.root + 'Cells/cells.less',
paths.src.root + 'Settings/settings.less',
paths.src.root + 'System/Logs/logs.less',
paths.src.root + 'System/Update/update.less',
paths.src.root + 'System/Info/info.less',
])
gulp.task('less', function() {
var src = [
paths.src.content + 'bootstrap.less',
paths.src.content + 'theme.less',
paths.src.content + 'overrides.less',
paths.src.root + 'Series/series.less',
paths.src.root + 'Activity/activity.less',
paths.src.root + 'AddSeries/addSeries.less',
paths.src.root + 'Calendar/calendar.less',
paths.src.root + 'Cells/cells.less',
paths.src.root + 'ManualImport/manualimport.less',
paths.src.root + 'Settings/settings.less',
paths.src.root + 'System/Logs/logs.less',
paths.src.root + 'System/Update/update.less',
paths.src.root + 'System/Info/info.less'
];
return gulp.src(src)
.pipe(print())
.pipe(sourcemaps.init())
.pipe(less({
dumpLineNumbers: 'false',
compress: true,
yuicompress: true,
ieCompat: true,
strictImports: true
dumpLineNumbers : 'false',
compress : true,
yuicompress : true,
ieCompat : true,
strictImports : true
}))
.pipe(postcss([ autoprefixer({ browsers: ['last 2 versions'] }) ]))
.on('error', errorHandler.onError)
.pipe(gulp.dest(paths.dest.content));
.pipe(sourcemaps.write(paths.dest.content))
.pipe(gulp.dest(paths.dest.content))
.pipe(livereload());
});

View File

@@ -1,19 +1,21 @@
module.exports = {
src: {
root: './src/UI/',
templates: './src/UI/**/*.hbs',
html: './src/UI/*.html',
partials: './src/UI/**/*Partial.hbs',
scripts: './src/UI/**/*.js',
less: ['./src/UI/**/*.less'],
content: './src/UI/Content/',
images: './src/UI/Content/Images/**/*',
exclude :{
libs:'!./src/UI/JsLibraries/**'
var paths = {
src : {
root : './src/UI/',
templates : './src/UI/**/*.hbs',
html : './src/UI/*.html',
partials : './src/UI/**/*Partial.hbs',
scripts : './src/UI/**/*.js',
less : ['./src/UI/**/*.less'],
content : './src/UI/Content/',
images : './src/UI/Content/Images/**/*',
exclude : {
libs : '!./src/UI/JsLibraries/**'
}
},
dest: {
root: './_output/UI/',
content: './_output/UI/Content/'
dest : {
root : './_output/UI/',
content : './_output/UI/Content/'
}
};
module.exports = paths;

112
gulp/start.js Normal file
View File

@@ -0,0 +1,112 @@
// will download and run sonarr (server) in a non-windows enviroment
// you can use this if you don't care about the server code and just want to work
// with the web code.
var http = require('http');
var gulp = require('gulp');
var fs = require('fs');
var targz = require('tar.gz');
var del = require('del');
var print = require('gulp-print');
var spawn = require('child_process').spawn;
function download(url, dest, cb) {
console.log('Downloading ' + url + ' to ' + dest);
var file = fs.createWriteStream(dest);
var request = http.get(url, function (response) {
response.pipe(file);
file.on('finish', function () {
console.log('Download completed');
file.close(cb);
});
});
}
function getLatest(cb) {
var branch = 'develop';
process.argv.forEach(function (val) {
var branchMatch = /branch=([\S]*)/.exec(val);
if (branchMatch && branchMatch.length > 1) {
branch = branchMatch[1];
}
});
var url = 'http://services.sonarr.tv/v1/update/' + branch + '?os=osx';
console.log('Checking for latest version:', url);
http.get(url, function (res) {
var data = '';
res.on('data', function (chunk) {
data += chunk;
});
res.on('end', function () {
var updatePackage = JSON.parse(data).updatePackage;
console.log('Latest version available: ' + updatePackage.version + ' Release Date: ' + updatePackage.releaseDate);
cb(updatePackage);
});
}).on('error', function (e) {
console.log('problem with request: ' + e.message);
});
}
function extract(source, dest, cb) {
console.log('extracting download page to ' + dest);
new targz().extract(source, dest, function (err) {
if (err) {
console.log(err);
}
console.log('Update package extracted.');
cb();
});
}
gulp.task('getSonarr', function () {
//gulp.src('/Users/kayone/git/Sonarr/_start/2.0.0.3288/NzbDrone/*.*')
// .pipe(print())
// .pipe(gulp.dest('./_output
//return;
try {
fs.mkdirSync('./_start/');
} catch (e) {
if (e.code != 'EEXIST') {
throw e;
}
}
getLatest(function (package) {
var packagePath = "./_start/" + package.filename;
var dirName = "./_start/" + package.version;
download(package.url, packagePath, function () {
extract(packagePath, dirName, function () {
// clean old binaries
console.log('Cleaning old binaries');
del.sync(['./_output/*', '!./_output/UI/']);
console.log('copying binaries to target');
gulp.src(dirName + '/NzbDrone/*.*')
.pipe(gulp.dest('./_output/'));
});
});
});
});
gulp.task('startSonarr', function () {
var ls = spawn('mono', ['--debug', './_output/NzbDrone.exe']);
ls.stdout.on('data', function (data) {
process.stdout.write('' + data);
});
ls.stderr.on('data', function (data) {
process.stdout.write('' + data);
});
ls.on('close', function (code) {
console.log('child process exited with code ' + code);
});
});

View File

@@ -7,6 +7,10 @@ var stripBom = function (dest) {
.pipe(stripbom({ showLog: false }))
.pipe(gulp.dest(dest));
gulp.src(paths.src.less)
.pipe(stripbom({ showLog: false }))
.pipe(gulp.dest(dest));
gulp.src(paths.src.templates)
.pipe(stripbom({ showLog: false }))
.pipe(gulp.dest(dest));

View File

@@ -1,6 +1,5 @@
var gulp = require('gulp');
//var livereload = require('gulp-livereload');
var livereload = require('gulp-livereload');
var paths = require('./paths.js');
@@ -10,24 +9,12 @@ require('./less.js');
require('./copy.js');
require('./webpack.js');
gulp.task('watch', ['jshint', 'handlebars', 'less','copyHtml', 'copyContent','copyJs'], function () {
gulp.start('webpackWatch');
gulp.watch([paths.src.scripts, paths.src.exclude.libs], ['jshint','copyJs']);
gulp.watch(paths.src.templates, ['handlebars']);
gulp.watch([paths.src.less, paths.src.exclude.libs], ['less']);
gulp.watch([paths.src.html], ['copyHtml']);
gulp.watch([paths.src.content + '**/*.*', '!**/*.less'], ['copyContent']);
});
gulp.task('liveReload', ['jshint', 'handlebars', 'less', 'webPack'], function () {
var server = livereload();
gulp.watch([
'app/**/*.js',
'app/**/*.css',
'app/index.html',
'app/login.html'
]).on('change', function (file) {
server.changed(file.path);
});
});
gulp.task('watch', ['jshint', 'handlebars', 'less', 'copyHtml', 'copyContent', 'copyJs'], function () {
livereload.listen();
gulp.start('webpackWatch');
gulp.watch([paths.src.scripts, paths.src.exclude.libs], ['jshint', 'copyJs']);
gulp.watch(paths.src.templates, ['handlebars']);
gulp.watch([paths.src.less, paths.src.exclude.libs], ['less']);
gulp.watch([paths.src.html], ['copyHtml']);
gulp.watch([paths.src.content + '**/*.*', '!**/*.less'], ['copyContent']);
});

View File

@@ -1,20 +1,13 @@
var gulp = require('gulp');
var gulpWebpack = require('gulp-webpack');
var webpack = require('webpack');
var webpackStream = require('webpack-stream');
var livereload = require('gulp-livereload');
var webpackConfig = require('../webpack.config');
webpackConfig.devtool = "#source-map";
gulp.task('webpack', function() {
return gulp.src('main.js')
.pipe(gulpWebpack(webpackConfig, webpack))
.pipe(gulp.dest(''));
return gulp.src('main.js').pipe(webpackStream(webpackConfig)).pipe(gulp.dest(''));
});
gulp.task('webpackWatch', function() {
webpackConfig.watch = true;
return gulp.src('main.js')
.pipe(gulpWebpack(webpackConfig, webpack))
.pipe(gulp.dest(''));
webpackConfig.watch = true;
return gulp.src('main.js').pipe(webpackStream(webpackConfig)).pipe(gulp.dest('')).pipe(livereload());
});

View File

@@ -1 +1 @@
require('./gulp/gulpfile.js');
require('./gulp/gulpFile.js');

View File

@@ -5,3 +5,4 @@ NUNIT="$TESTDIR/NUnit.Runners.2.6.1/tools/nunit-console-x86.exe"
mono --debug --runtime=v4.0 $NUNIT $EXCLUDE -xml:NzbDrone.Api.Result.xml $TESTDIR/NzbDrone.Api.Test.dll
mono --debug --runtime=v4.0 $NUNIT $EXCLUDE -xml:NzbDrone.Core.Result.xml $TESTDIR/NzbDrone.Core.Test.dll
mono --debug --runtime=v4.0 $NUNIT $EXCLUDE -xml:NzbDrone.Integration.Result.xml $TESTDIR/NzbDrone.Integration.Test.dll
mono --debug --runtime=v4.0 $NUNIT $EXCLUDE -xml:NzbDrone.Common.Result.xml $TESTDIR/NzbDrone.Common.Test.dll

View File

@@ -4,7 +4,7 @@
DIR=$(cd "$(dirname "$0")"; pwd)
#change these values to match your app
EXE_PATH="$DIR/nzbdrone.exe"
EXE_PATH="$DIR/NzbDrone.exe"
APPNAME="Sonarr"
#set up environment

View File

@@ -15,25 +15,31 @@
"gitHead": "9ff7aa1bf7fe38c4c5bdb92f56c8ad556916ed67",
"readmeFilename": "readme.md",
"dependencies": {
"del": "1.1.1",
"gulp": "3.8.10",
"gulp-cached": "1.0.2",
"gulp-concat": "2.4.3",
"autoprefixer-core": "5.2.1",
"del": "1.2.0",
"gulp": "3.9.0",
"gulp-cached": "1.1.0",
"gulp-concat": "2.6.0",
"gulp-declare": "0.3.0",
"gulp-handlebars": "3.0.1",
"gulp-jshint": "1.9.2",
"gulp-less": "2.0.1",
"gulp-jshint": "1.11.2",
"gulp-less": "3.0.3",
"gulp-livereload": "3.8.0",
"gulp-postcss": "6.0.0",
"gulp-print": "1.1.0",
"gulp-replace": "0.5.2",
"gulp-replace": "0.5.3",
"gulp-run": "1.6.8",
"gulp-sourcemaps": "1.5.2",
"gulp-stripbom": "1.0.4",
"gulp-run": "1.6.6",
"gulp-webpack": "1.2.0",
"gulp-wrap": "0.10.1",
"handlebars": "2.0.0",
"jshint-loader": "0.8.1",
"jshint-stylish": "1.0.0",
"run-sequence": "1.0.2",
"streamqueue": "0.1.1",
"webpack": "1.5.3"
"gulp-webpack": "1.5.0",
"gulp-wrap": "0.11.0",
"handlebars": "3.0.3",
"jshint-loader": "0.8.3",
"jshint-stylish": "2.0.1",
"run-sequence": "1.1.1",
"streamqueue": "1.1.0",
"tar.gz": "0.1.1",
"webpack": "1.12.0",
"webpack-stream": "2.1.0"
}
}

View File

@@ -5,7 +5,7 @@ Sonarr is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS fee
## Major Features Include: ##
* Support for major platforms: Windows, Linux, OSX, Raspberry Pi, etc.
* 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*
@@ -21,7 +21,7 @@ Sonarr is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS fee
## Configuring Development Environment: ##
### Requirements ###
- Visual Studio 2013 ([Express Edition](http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-for-web "Express Edition") might work but not tested.)
- 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/)
- [Gulp](http://gulpjs.com)
@@ -30,11 +30,12 @@ Sonarr is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS fee
- 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`
- install gulp `npm install gulp -g`
- start gulp to monitor your dev environment for any changes that need post processing using `gulp watch` command.
*Please note gulp must be running at all times while you are working with NzbDrone client source files.*
*Please note gulp must be running at all times while you are working with Sonarr client source files.*
### Development ###
@@ -44,7 +45,7 @@ Sonarr is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS fee
### License ###
* [GNU GPL v3](http://www.gnu.org/licenses/gpl.html)
Copyright 2010-2014
Copyright 2010-2016
### Sponsors ###

View File

@@ -1,17 +0,0 @@
Param(
[Parameter(Mandatory=$true, Position=0, HelpMessage="A branch name is #requires required")]
[string]$branch,
[Parameter(Mandatory=$true, Position=1, HelpMessage="A version is required")]
[string]$version
)
if ($branch -eq "<default>")
{
$branch = "teamcity";
}
Write-Host $branch;
Write-Host $version;
Write-Host "NzbDrone.$branch.$version.zip";
Rename-Item "nzbdrone.zip" "NzbDrone.$branch.$version.zip"

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
</configuration>

Binary file not shown.

View File

@@ -1,136 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
<!-- Enable the restore command to run before builds -->
<RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>
<!-- Property that enables building a package from a project -->
<BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
<!-- Determines if package restore consent is required to restore packages -->
<RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>
<!-- Download NuGet.exe if it does not already exist -->
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
</PropertyGroup>
<ItemGroup Condition=" '$(PackageSources)' == '' ">
<!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
<!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
<!--
<PackageSource Include="https://www.nuget.org/api/v2/" />
<PackageSource Include="https://my-nuget-source/nuget/" />
-->
</ItemGroup>
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
<!-- Windows specific commands -->
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
<PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
</PropertyGroup>
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
<PackagesConfig>packages.config</PackagesConfig>
</PropertyGroup>
<PropertyGroup>
<!-- NuGet command -->
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>
<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
<RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
<NonInteractiveSwitch Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' ">-NonInteractive</NonInteractiveSwitch>
<PaddedSolutionDir Condition=" '$(OS)' == 'Windows_NT'">"$(SolutionDir) "</PaddedSolutionDir>
<PaddedSolutionDir Condition=" '$(OS)' != 'Windows_NT' ">"$(SolutionDir)"</PaddedSolutionDir>
<!-- Commands -->
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>
<!-- We need to ensure packages are restored prior to assembly resolve -->
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
RestorePackages;
$(BuildDependsOn);
</BuildDependsOn>
<!-- Make the build depend on restore packages -->
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
$(BuildDependsOn);
BuildPackage;
</BuildDependsOn>
</PropertyGroup>
<Target Name="CheckPrerequisites">
<!-- Raise an error if we're unable to locate nuget.exe -->
<Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
<!--
Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
This effectively acts as a lock that makes sure that the download operation will only happen once and all
parallel builds will have to wait for it to complete.
-->
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)" />
</Target>
<Target Name="_DownloadNuGet">
<DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
</Target>
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(RestoreCommand)"
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
<Exec Command="$(RestoreCommand)"
LogStandardErrorAsError="true"
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
</Target>
<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(BuildCommand)"
Condition=" '$(OS)' != 'Windows_NT' " />
<Exec Command="$(BuildCommand)"
LogStandardErrorAsError="true"
Condition=" '$(OS)' == 'Windows_NT' " />
</Target>
<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<OutputFilename ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System.Core" />
<Using Namespace="System" />
<Using Namespace="System.IO" />
<Using Namespace="System.Net" />
<Using Namespace="Microsoft.Build.Framework" />
<Using Namespace="Microsoft.Build.Utilities" />
<Code Type="Fragment" Language="cs">
<![CDATA[
try {
OutputFilename = Path.GetFullPath(OutputFilename);
Log.LogMessage("Downloading latest version of NuGet.exe...");
WebClient webClient = new WebClient();
webClient.DownloadFile("https://www.nuget.org/nuget.exe", OutputFilename);
return true;
}
catch (Exception ex) {
Log.LogErrorFromException(ex);
return false;
}
]]>
</Code>
</Task>
</UsingTask>
</Project>

Binary file not shown.

View File

@@ -1,9 +0,0 @@
<?xml version ="1.0"?>
<!-- This allows mt.exe to run on machines with the CLR v4 installed but not 1.1 or 2.0 -->
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
<supportedRuntime version="v2.0.50727"/>
<supportedRuntime version="v1.1.4322"/>
</startup>
</configuration>

View File

@@ -73,13 +73,6 @@
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

View File

@@ -85,13 +85,6 @@
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

View File

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

View File

@@ -144,7 +144,6 @@
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap os="osx" dll="MediaInfo.dll" target="libmediainfo.0.dylib"/>
<dllmap os="linux" dll="MediaInfo.dll" target="libmediainfo.so.0" />
<dllmap os="freebsd" dll="MediaInfo.dll" target="libmediainfo.so.0" />
<dllmap os="solaris" dll="MediaInfo.dll" target="libmediainfo.so.0.0.0" />
</configuration>

View File

@@ -56,7 +56,7 @@ namespace Microsoft.AspNet.SignalR.Infrastructure
}
catch(NotImplementedException)
{
// This happens on mono
// This happens on mono
}
}

View File

@@ -276,10 +276,9 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="AfterBuild">
</Target>
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
</Target>
-->
</Project>

View File

@@ -102,7 +102,6 @@
</ItemGroup>
<Import Project="..\Common\Microsoft.AspNet.SignalR.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
@@ -110,4 +109,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

View File

@@ -116,14 +116,12 @@ namespace NzbDrone.Api.Test.MappingTests
profileResource.InjectTo<Profile>();
}
[Test]
public void should_map_tracked_command()
{
var profileResource = new ApplicationUpdateCommand();
profileResource.InjectTo<CommandResource>();
var commandResource = new CommandModel { Body = new ApplicationUpdateCommand() };
commandResource.InjectTo<CommandResource>();
}
}

View File

@@ -38,13 +38,13 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="FluentAssertions, Version=3.2.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\FluentAssertions.3.2.1\lib\net40\FluentAssertions.dll</HintPath>
<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>
<Private>True</Private>
</Reference>
<Reference Include="FluentAssertions.Core, Version=3.2.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\FluentAssertions.3.2.1\lib\net40\FluentAssertions.Core.dll</HintPath>
<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>
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@@ -64,7 +64,7 @@
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
</Reference>
<Reference Include="Omu.ValueInjecter">
<HintPath>..\packages\valueinjecter.2.3.3\lib\net35\Omu.ValueInjecter.dll</HintPath>
<HintPath>..\packages\ValueInjecter.2.3.3\lib\net35\Omu.ValueInjecter.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -104,7 +104,6 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
@@ -112,4 +111,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="FluentAssertions" version="3.2.1" targetFramework="net40" />
<package id="FluentAssertions" version="4.2.1" targetFramework="net40" />
<package id="Moq" version="4.0.10827" />
<package id="NBuilder" version="3.0.1.1" targetFramework="net40" />
<package id="NUnit" version="2.6.3" targetFramework="net40" />
<package id="valueinjecter" version="2.3.3" targetFramework="net40" />
<package id="ValueInjecter" version="2.3.3" targetFramework="net40" />
</packages>

View File

@@ -3,6 +3,7 @@ using Nancy;
using Nancy.Authentication.Forms;
using Nancy.Extensions;
using Nancy.ModelBinding;
using NzbDrone.Common.EnsureThat;
using NzbDrone.Core.Authentication;
using NzbDrone.Core.Configuration;
@@ -23,6 +24,11 @@ namespace NzbDrone.Api.Authentication
private Response Login(LoginResource resource)
{
Ensure.That(resource.Username, () => resource.Username).IsNotNullOrWhiteSpace();
// TODO: A null or empty password should not be allowed, uncomment in v3
//Ensure.That(resource.Password, () => resource.Password).IsNotNullOrWhiteSpace();
var user = _userService.FindUser(resource.Username, resource.Password);
if (user == null)

View File

@@ -22,7 +22,7 @@ namespace NzbDrone.Api.Authentication
private readonly IUserService _userService;
private static readonly NzbDroneUser AnonymousUser = new NzbDroneUser { UserName = "Anonymous" };
private static String API_KEY;
private static string API_KEY;
private static AuthenticationType AUTH_METHOD;
public AuthenticationService(IConfigFileProvider configFileProvider, IUserService userService)

View File

@@ -39,8 +39,8 @@ namespace NzbDrone.Api.Authentication
pipelines.EnableBasicAuthentication(new BasicAuthenticationConfiguration(_authenticationService, "Sonarr"));
}
pipelines.BeforeRequest.AddItemToEndOfPipeline(RequiresAuthentication);
pipelines.AfterRequest.AddItemToEndOfPipeline(RemoveLoginHooksForApiCalls);
pipelines.BeforeRequest.AddItemToEndOfPipeline((Func<NancyContext, Response>) RequiresAuthentication);
pipelines.AfterRequest.AddItemToEndOfPipeline((Action<NancyContext>) RemoveLoginHooksForApiCalls);
}
private Response RequiresAuthentication(NancyContext context)
@@ -74,8 +74,8 @@ namespace NzbDrone.Api.Authentication
{
if (context.Request.IsApiRequest())
{
if ((context.Response.StatusCode == HttpStatusCode.SeeOther &&
context.Response.ContentType.Equals("text/html", StringComparison.InvariantCultureIgnoreCase)) ||
if ((context.Response.StatusCode == HttpStatusCode.SeeOther &&
context.Response.Headers["Location"].StartsWith("/login", StringComparison.InvariantCultureIgnoreCase)) ||
context.Response.StatusCode == HttpStatusCode.Unauthorized)
{
context.Response = new { Error = "Unauthorized" }.AsResponse(HttpStatusCode.Unauthorized);

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using NzbDrone.Api.REST;
using NzbDrone.Core.Qualities;
using NzbDrone.Api.Series;
using NzbDrone.Core.Indexers;
namespace NzbDrone.Api.Blacklist
{
@@ -13,6 +14,9 @@ namespace NzbDrone.Api.Blacklist
public string SourceTitle { get; set; }
public QualityModel Quality { get; set; }
public DateTime Date { get; set; }
public DownloadProtocol Protocol { get; set; }
public string Indexer { get; set; }
public string Message { get; set; }
public SeriesResource Series { get; set; }
}

View File

@@ -22,16 +22,33 @@ namespace NzbDrone.Api.Calendar
private Response GetCalendarFeed()
{
var start = DateTime.Today.AddDays(-7);
var end = DateTime.Today.AddDays(28);
var pastDays = 7;
var futureDays = 28;
var start = DateTime.Today.AddDays(-pastDays);
var end = DateTime.Today.AddDays(futureDays);
// TODO: Remove start/end parameters in v3, they don't work well for iCal
var queryStart = Request.Query.Start;
var queryEnd = Request.Query.End;
var queryPastDays = Request.Query.PastDays;
var queryFutureDays = Request.Query.FutureDays;
if (queryStart.HasValue) start = DateTime.Parse(queryStart.Value);
if (queryEnd.HasValue) end = DateTime.Parse(queryEnd.Value);
var episodes = _episodeService.EpisodesBetweenDates(start, end);
if (queryPastDays.HasValue)
{
pastDays = int.Parse(queryPastDays.Value);
start = DateTime.Today.AddDays(-pastDays);
}
if (queryFutureDays.HasValue)
{
futureDays = int.Parse(queryFutureDays.Value);
end = DateTime.Today.AddDays(futureDays);
}
var episodes = _episodeService.EpisodesBetweenDates(start, end, false);
var icalCalendar = new iCalendar();
foreach (var episode in episodes.OrderBy(v => v.AirDateUtc.Value))

View File

@@ -23,14 +23,17 @@ namespace NzbDrone.Api.Calendar
{
var start = DateTime.Today;
var end = DateTime.Today.AddDays(2);
var includeUnmonitored = false;
var queryStart = Request.Query.Start;
var queryEnd = Request.Query.End;
var queryIncludeUnmonitored = Request.Query.Unmonitored;
if (queryStart.HasValue) start = DateTime.Parse(queryStart.Value);
if (queryEnd.HasValue) end = DateTime.Parse(queryEnd.Value);
if (queryIncludeUnmonitored.HasValue) includeUnmonitored = Convert.ToBoolean(queryIncludeUnmonitored.Value);
var resources = ToListResource(() => _episodeService.EpisodesBetweenDates(start, end));
var resources = ToListResource(() => _episodeService.EpisodesBetweenDates(start, end, includeUnmonitored));
return resources.OrderBy(e => e.AirDateUtc).ToList();
}

View File

@@ -5,14 +5,14 @@ namespace NzbDrone.Api.ClientSchema
{
public class Field
{
public Int32 Order { get; set; }
public String Name { get; set; }
public String Label { get; set; }
public String HelpText { get; set; }
public String HelpLink { get; set; }
public Object Value { get; set; }
public String Type { get; set; }
public Boolean Advanced { get; set; }
public int Order { get; set; }
public string Name { get; set; }
public string Label { get; set; }
public string HelpText { get; set; }
public string HelpLink { get; set; }
public object Value { get; set; }
public string Type { get; set; }
public bool Advanced { get; set; }
public List<SelectOption> SelectOptions { get; set; }
}
}

View File

@@ -28,15 +28,15 @@ namespace NzbDrone.Api.ClientSchema
{
var field = new Field
{
Name = propertyInfo.Name,
Label = fieldAttribute.Label,
HelpText = fieldAttribute.HelpText,
HelpLink = fieldAttribute.HelpLink,
Order = fieldAttribute.Order,
Advanced = fieldAttribute.Advanced,
Type = fieldAttribute.Type.ToString().ToLowerInvariant()
};
{
Name = propertyInfo.Name,
Label = fieldAttribute.Label,
HelpText = fieldAttribute.HelpText,
HelpLink = fieldAttribute.HelpLink,
Order = fieldAttribute.Order,
Advanced = fieldAttribute.Advanced,
Type = fieldAttribute.Type.ToString().ToLowerInvariant()
};
var value = propertyInfo.GetValue(model, null);
if (value != null)
@@ -53,11 +53,9 @@ namespace NzbDrone.Api.ClientSchema
}
}
return result;
return result.OrderBy(r => r.Order).ToList();
}
public static object ReadFormSchema(List<Field> fields, Type targetType, object defaults = null)
{
Ensure.That(targetType, () => targetType).IsNotNull();
@@ -79,19 +77,19 @@ namespace NzbDrone.Api.ClientSchema
{
var field = fields.Find(f => f.Name == propertyInfo.Name);
if (propertyInfo.PropertyType == typeof(Int32))
if (propertyInfo.PropertyType == typeof(int))
{
var value = Convert.ToInt32(field.Value);
propertyInfo.SetValue(target, value, null);
}
else if (propertyInfo.PropertyType == typeof(Int64))
else if (propertyInfo.PropertyType == typeof(long))
{
var value = Convert.ToInt64(field.Value);
propertyInfo.SetValue(target, value, null);
}
else if (propertyInfo.PropertyType == typeof(Nullable<Int32>))
else if (propertyInfo.PropertyType == typeof(int?))
{
var value = field.Value.ToString().ParseInt32();
propertyInfo.SetValue(target, value, null);
@@ -103,20 +101,37 @@ namespace NzbDrone.Api.ClientSchema
propertyInfo.SetValue(target, value, null);
}
else if (propertyInfo.PropertyType == typeof (IEnumerable<Int32>))
else if (propertyInfo.PropertyType == typeof(IEnumerable<int>))
{
IEnumerable<Int32> value;
IEnumerable<int> value;
if (field.Value.GetType() == typeof (JArray))
if (field.Value.GetType() == typeof(JArray))
{
value = ((JArray) field.Value).Select(s => s.Value<Int32>());
value = ((JArray)field.Value).Select(s => s.Value<int>());
}
else
{
value = field.Value.ToString().Split(new []{','}, StringSplitOptions.RemoveEmptyEntries).Select(s => Convert.ToInt32(s));
value = field.Value.ToString().Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(s => Convert.ToInt32(s));
}
propertyInfo.SetValue(target, value, null);
}
else if (propertyInfo.PropertyType == typeof(IEnumerable<string>))
{
IEnumerable<string> value;
if (field.Value.GetType() == typeof(JArray))
{
value = ((JArray)field.Value).Select(s => s.Value<string>());
}
else
{
value = field.Value.ToString().Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
}
propertyInfo.SetValue(target, value, null);
}
@@ -144,4 +159,4 @@ namespace NzbDrone.Api.ClientSchema
return options.OrderBy(o => o.Value).ToList();
}
}
}
}

View File

@@ -4,10 +4,9 @@ using System.Linq;
using NzbDrone.Api.Extensions;
using NzbDrone.Api.Mapping;
using NzbDrone.Api.Validation;
using NzbDrone.Common.Composition;
using NzbDrone.Common;
using NzbDrone.Core.Datastore.Events;
using NzbDrone.Core.Messaging.Commands;
using NzbDrone.Core.Messaging.Commands.Tracking;
using NzbDrone.Core.Messaging.Events;
using NzbDrone.Core.ProgressMessaging;
using NzbDrone.SignalR;
@@ -15,58 +14,55 @@ using NzbDrone.SignalR;
namespace NzbDrone.Api.Commands
{
public class CommandModule : NzbDroneRestModuleWithSignalR<CommandResource, Command>, IHandle<CommandUpdatedEvent>
public class CommandModule : NzbDroneRestModuleWithSignalR<CommandResource, CommandModel>, IHandle<CommandUpdatedEvent>
{
private readonly ICommandExecutor _commandExecutor;
private readonly IContainer _container;
private readonly ITrackCommands _trackCommands;
private readonly IManageCommandQueue _commandQueueManager;
private readonly IServiceFactory _serviceFactory;
public CommandModule(ICommandExecutor commandExecutor,
public CommandModule(IManageCommandQueue commandQueueManager,
IBroadcastSignalRMessage signalRBroadcaster,
IContainer container,
ITrackCommands trackCommands)
IServiceFactory serviceFactory)
: base(signalRBroadcaster)
{
_commandExecutor = commandExecutor;
_container = container;
_trackCommands = trackCommands;
_commandQueueManager = commandQueueManager;
_serviceFactory = serviceFactory;
GetResourceById = GetCommand;
CreateResource = StartCommand;
GetResourceAll = GetAllCommands;
GetResourceAll = GetStartedCommands;
PostValidator.RuleFor(c => c.Name).NotBlank();
}
private CommandResource GetCommand(int id)
{
return _trackCommands.GetById(id).InjectTo<CommandResource>();
return _commandQueueManager.Get(id).InjectTo<CommandResource>();
}
private int StartCommand(CommandResource commandResource)
{
var commandType =
_container.GetImplementations(typeof(Command))
.Single(c => c.Name.Replace("Command", "")
.Equals(commandResource.Name, StringComparison.InvariantCultureIgnoreCase));
_serviceFactory.GetImplementations(typeof (Command))
.Single(c => c.Name.Replace("Command", "")
.Equals(commandResource.Name, StringComparison.InvariantCultureIgnoreCase));
dynamic command = Request.Body.FromJson(commandType);
command.Manual = true;
command.Trigger = CommandTrigger.Manual;
var trackedCommand = (Command)_commandExecutor.PublishCommandAsync(command);
var trackedCommand = _commandQueueManager.Push(command, CommandPriority.Normal, CommandTrigger.Manual);
return trackedCommand.Id;
}
private List<CommandResource> GetAllCommands()
private List<CommandResource> GetStartedCommands()
{
return ToListResource(_trackCommands.RunningCommands);
return ToListResource(_commandQueueManager.GetStarted());
}
public void Handle(CommandUpdatedEvent message)
{
if (message.Command.SendUpdatesToClient)
if (message.Command.Body.SendUpdatesToClient)
{
BroadcastResourceChange(ModelAction.Updated, message.Command.Id);
BroadcastResourceChange(ModelAction.Updated, message.Command.InjectTo<CommandResource>());
}
}
}

View File

@@ -1,18 +1,95 @@
using System;
using Newtonsoft.Json;
using NzbDrone.Api.REST;
using NzbDrone.Core.Messaging.Commands.Tracking;
using NzbDrone.Core.Messaging.Commands;
namespace NzbDrone.Api.Commands
{
public class CommandResource : RestResource
{
public String Name { get; set; }
public String Message { get; set; }
public DateTime StartedOn { get; set; }
public DateTime StateChangeTime { get; set; }
public Boolean SendUpdatesToClient { get; set; }
public CommandStatus State { get; set; }
public string Name { get; set; }
public string Message { get; set; }
public Command Body { get; set; }
public CommandPriority Priority { get; set; }
public CommandStatus Status { get; set; }
public DateTime Queued { get; set; }
public DateTime? Started { get; set; }
public DateTime? Ended { get; set; }
public TimeSpan? Duration { get; set; }
public string Exception { get; set; }
public CommandTrigger Trigger { get; set; }
[JsonIgnore]
public string CompletionMessage { get; set; }
//Legacy
public CommandStatus State
{
get
{
return Status;
}
set { }
}
public bool Manual
{
get
{
return Trigger == CommandTrigger.Manual;
}
set { }
}
public DateTime StartedOn
{
get
{
return Queued;
}
set { }
}
public DateTime? StateChangeTime
{
get
{
if (Started.HasValue) return Started.Value;
return Ended;
}
set { }
}
public bool SendUpdatesToClient
{
get
{
if (Body != null) return Body.SendUpdatesToClient;
return false;
}
set { }
}
public bool UpdateScheduledTask
{
get
{
if (Body != null) return Body.UpdateScheduledTask;
return false;
}
set { }
}
public DateTime? LastExecutionTime { get; set; }
public Boolean Manual { get; set; }
}
}
}

View File

@@ -7,16 +7,19 @@ namespace NzbDrone.Api.Config
{
public class DownloadClientConfigModule : NzbDroneConfigModule<DownloadClientConfigResource>
{
public DownloadClientConfigModule(IConfigService configService, RootFolderValidator rootFolderValidator, PathExistsValidator pathExistsValidator)
public DownloadClientConfigModule(IConfigService configService,
RootFolderValidator rootFolderValidator,
PathExistsValidator pathExistsValidator,
MappedNetworkDriveValidator mappedNetworkDriveValidator)
: base(configService)
{
SharedValidator.RuleFor(c => c.DownloadedEpisodesFolder)
.Cascade(CascadeMode.StopOnFirstFailure)
.IsValidPath()
.SetValidator(rootFolderValidator)
.SetValidator(mappedNetworkDriveValidator)
.SetValidator(pathExistsValidator)
.When(c => !String.IsNullOrWhiteSpace(c.DownloadedEpisodesFolder));
.When(c => !string.IsNullOrWhiteSpace(c.DownloadedEpisodesFolder));
}
}
}

View File

@@ -5,14 +5,14 @@ namespace NzbDrone.Api.Config
{
public class DownloadClientConfigResource : RestResource
{
public String DownloadedEpisodesFolder { get; set; }
public String DownloadClientWorkingFolders { get; set; }
public Int32 DownloadedEpisodesScanInterval { get; set; }
public string DownloadedEpisodesFolder { get; set; }
public string DownloadClientWorkingFolders { get; set; }
public int DownloadedEpisodesScanInterval { get; set; }
public Boolean EnableCompletedDownloadHandling { get; set; }
public Boolean RemoveCompletedDownloads { get; set; }
public bool EnableCompletedDownloadHandling { get; set; }
public bool RemoveCompletedDownloads { get; set; }
public Boolean AutoRedownloadFailed { get; set; }
public Boolean RemoveFailedDownloads { get; set; }
public bool AutoRedownloadFailed { get; set; }
public bool RemoveFailedDownloads { get; set; }
}
}

View File

@@ -27,21 +27,23 @@ namespace NzbDrone.Api.Config
GetResourceById = GetHostConfig;
UpdateResource = SaveHostConfig;
SharedValidator.RuleFor(c => c.Branch).NotEmpty().WithMessage("Branch name is required, 'master' is the default");
SharedValidator.RuleFor(c => c.BindAddress)
.ValidIp4Address()
.NotListenAllIp4Address()
.When(c => c.BindAddress != "*");
SharedValidator.RuleFor(c => c.Port).ValidPort();
SharedValidator.RuleFor(c => c.UrlBase).ValidUrlBase();
SharedValidator.RuleFor(c => c.Username).NotEmpty().When(c => c.AuthenticationMethod != AuthenticationType.None);
SharedValidator.RuleFor(c => c.Password).NotEmpty().When(c => c.AuthenticationMethod != AuthenticationType.None);
SharedValidator.RuleFor(c => c.SslPort).ValidPort().When(c => c.EnableSsl);
SharedValidator.RuleFor(c => c.SslCertHash).NotEmpty().When(c => c.EnableSsl && OsInfo.IsWindows);
SharedValidator.RuleFor(c => c.Branch).NotEmpty().WithMessage("Branch name is required, 'master' is the default");
SharedValidator.RuleFor(c => c.UpdateScriptPath).IsValidPath().When(c => c.UpdateMechanism == UpdateMechanism.Script);
SharedValidator.RuleFor(c => c.BindAddress)
.ValidIp4Address()
.NotListenAllIp4Address()
.When(c => c.BindAddress != "*");
}
private HostConfigResource GetHostConfig()

View File

@@ -7,23 +7,23 @@ namespace NzbDrone.Api.Config
{
public class HostConfigResource : RestResource
{
public String BindAddress { get; set; }
public Int32 Port { get; set; }
public Int32 SslPort { get; set; }
public Boolean EnableSsl { get; set; }
public Boolean LaunchBrowser { get; set; }
public string BindAddress { get; set; }
public int Port { get; set; }
public int SslPort { get; set; }
public bool EnableSsl { get; set; }
public bool LaunchBrowser { get; set; }
public AuthenticationType AuthenticationMethod { get; set; }
public Boolean AnalyticsEnabled { get; set; }
public String Username { get; set; }
public String Password { get; set; }
public String LogLevel { get; set; }
public String Branch { get; set; }
public String ApiKey { get; set; }
public Boolean Torrent { get; set; }
public String SslCertHash { get; set; }
public String UrlBase { get; set; }
public Boolean UpdateAutomatically { get; set; }
public bool AnalyticsEnabled { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public string LogLevel { get; set; }
public string Branch { get; set; }
public string ApiKey { get; set; }
public bool Torrent { get; set; }
public string SslCertHash { get; set; }
public string UrlBase { get; set; }
public bool UpdateAutomatically { get; set; }
public UpdateMechanism UpdateMechanism { get; set; }
public String UpdateScriptPath { get; set; }
public string UpdateScriptPath { get; set; }
}
}

View File

@@ -1,4 +1,5 @@
using FluentValidation;
using NzbDrone.Api.Validation;
using NzbDrone.Core.Configuration;
namespace NzbDrone.Api.Config
@@ -16,8 +17,7 @@ namespace NzbDrone.Api.Config
.GreaterThanOrEqualTo(0);
SharedValidator.RuleFor(c => c.RssSyncInterval)
.InclusiveBetween(10, 120)
.When(c => c.RssSyncInterval > 0);
.IsValidRssSyncInterval();
}
}
}

View File

@@ -5,8 +5,8 @@ namespace NzbDrone.Api.Config
{
public class IndexerConfigResource : RestResource
{
public Int32 MinimumAge { get; set; }
public Int32 Retention { get; set; }
public Int32 RssSyncInterval { get; set; }
public int MinimumAge { get; set; }
public int Retention { get; set; }
public int RssSyncInterval { get; set; }
}
}

View File

@@ -12,7 +12,7 @@ namespace NzbDrone.Api.Config
{
SharedValidator.RuleFor(c => c.FileChmod).NotEmpty();
SharedValidator.RuleFor(c => c.FolderChmod).NotEmpty();
SharedValidator.RuleFor(c => c.RecycleBin).IsValidPath().SetValidator(pathExistsValidator).When(c => !String.IsNullOrWhiteSpace(c.RecycleBin));
SharedValidator.RuleFor(c => c.RecycleBin).IsValidPath().SetValidator(pathExistsValidator).When(c => !string.IsNullOrWhiteSpace(c.RecycleBin));
}
}
}

View File

@@ -6,20 +6,20 @@ namespace NzbDrone.Api.Config
{
public class MediaManagementConfigResource : RestResource
{
public Boolean AutoUnmonitorPreviouslyDownloadedEpisodes { get; set; }
public String RecycleBin { get; set; }
public Boolean AutoDownloadPropers { get; set; }
public Boolean CreateEmptySeriesFolders { get; set; }
public bool AutoUnmonitorPreviouslyDownloadedEpisodes { get; set; }
public string RecycleBin { get; set; }
public bool AutoDownloadPropers { get; set; }
public bool CreateEmptySeriesFolders { get; set; }
public FileDateType FileDate { get; set; }
public Boolean SetPermissionsLinux { get; set; }
public String FileChmod { get; set; }
public String FolderChmod { get; set; }
public String ChownUser { get; set; }
public String ChownGroup { get; set; }
public bool SetPermissionsLinux { get; set; }
public string FileChmod { get; set; }
public string FolderChmod { get; set; }
public string ChownUser { get; set; }
public string ChownGroup { get; set; }
public Boolean SkipFreeSpaceCheckWhenImporting { get; set; }
public Boolean CopyUsingHardlinks { get; set; }
public Boolean EnableMediaInfo { get; set; }
public bool SkipFreeSpaceCheckWhenImporting { get; set; }
public bool CopyUsingHardlinks { get; set; }
public bool EnableMediaInfo { get; set; }
}
}

View File

@@ -57,7 +57,7 @@ namespace NzbDrone.Api.Config
var nameSpec = _namingConfigService.GetConfig();
var resource = nameSpec.InjectTo<NamingConfigResource>();
if (String.IsNullOrWhiteSpace(resource.StandardEpisodeFormat))
if (string.IsNullOrWhiteSpace(resource.StandardEpisodeFormat))
{
return resource;
}

View File

@@ -5,8 +5,9 @@ namespace NzbDrone.Api.Config
{
public class NamingConfigResource : RestResource
{
public Boolean RenameEpisodes { get; set; }
public Int32 MultiEpisodeStyle { get; set; }
public bool RenameEpisodes { get; set; }
public bool ReplaceIllegalCharacters { get; set; }
public int MultiEpisodeStyle { get; set; }
public string StandardEpisodeFormat { get; set; }
public string DailyEpisodeFormat { get; set; }
public string AnimeEpisodeFormat { get; set; }

View File

@@ -6,13 +6,15 @@ namespace NzbDrone.Api.Config
public class UiConfigResource : RestResource
{
//Calendar
public Int32 FirstDayOfWeek { get; set; }
public String CalendarWeekColumnHeader { get; set; }
public int FirstDayOfWeek { get; set; }
public string CalendarWeekColumnHeader { get; set; }
//Dates
public String ShortDateFormat { get; set; }
public String LongDateFormat { get; set; }
public String TimeFormat { get; set; }
public Boolean ShowRelativeDates { get; set; }
public string ShortDateFormat { get; set; }
public string LongDateFormat { get; set; }
public string TimeFormat { get; set; }
public bool ShowRelativeDates { get; set; }
public bool EnableColorImpairedMode { get; set; }
}
}

View File

@@ -7,7 +7,7 @@ namespace NzbDrone.Api.DiskSpace
{
public string Path { get; set; }
public string Label { get; set; }
public Int64 FreeSpace { get; set; }
public Int64 TotalSpace { get; set; }
public long FreeSpace { get; set; }
public long TotalSpace { get; set; }
}
}

View File

@@ -5,7 +5,7 @@ namespace NzbDrone.Api.DownloadClient
{
public class DownloadClientResource : ProviderResource
{
public Boolean Enable { get; set; }
public bool Enable { get; set; }
public DownloadProtocol Protocol { get; set; }
}
}

View File

@@ -52,16 +52,16 @@ namespace NzbDrone.Api.EpisodeFiles
private List<EpisodeFileResource> GetEpisodeFiles()
{
var seriesId = (int?)Request.Query.SeriesId;
if (seriesId == null)
if (!Request.Query.SeriesId.HasValue)
{
throw new BadRequestException("seriesId is missing");
}
var series = _seriesService.GetSeries(seriesId.Value);
var seriesId = (int)Request.Query.SeriesId;
return _mediaFileService.GetFilesBySeries(seriesId.Value)
var series = _seriesService.GetSeries(seriesId);
return _mediaFileService.GetFilesBySeries(seriesId)
.Select(f => MapToResource(series, f)).ToList();
}

View File

@@ -6,15 +6,15 @@ namespace NzbDrone.Api.EpisodeFiles
{
public class EpisodeFileResource : RestResource
{
public Int32 SeriesId { get; set; }
public Int32 SeasonNumber { get; set; }
public String RelativePath { get; set; }
public String Path { get; set; }
public Int64 Size { get; set; }
public int SeriesId { get; set; }
public int SeasonNumber { get; set; }
public string RelativePath { get; set; }
public string Path { get; set; }
public long Size { get; set; }
public DateTime DateAdded { get; set; }
public String SceneName { get; set; }
public string SceneName { get; set; }
public QualityModel Quality { get; set; }
public Boolean QualityCutoffNotMet { get; set; }
public bool QualityCutoffNotMet { get; set; }
}
}

View File

@@ -20,14 +20,14 @@ namespace NzbDrone.Api.Episodes
private List<EpisodeResource> GetEpisodes()
{
var seriesId = (int?)Request.Query.SeriesId;
if (seriesId == null)
if (!Request.Query.SeriesId.HasValue)
{
throw new BadRequestException("seriesId is missing");
}
var resources = ToListResource(_episodeService.GetEpisodeBySeries(seriesId.Value));
var seriesId = (int)Request.Query.SeriesId;
var resources = ToListResource(_episodeService.GetEpisodeBySeries(seriesId));
return resources;
}
@@ -36,5 +36,10 @@ namespace NzbDrone.Api.Episodes
{
_episodeService.SetEpisodeMonitored(episodeResource.Id, episodeResource.Monitored);
}
protected override List<EpisodeResource> LoadSeries(List<EpisodeResource> resources)
{
return resources;
}
}
}
}

View File

@@ -40,7 +40,7 @@ namespace NzbDrone.Api.Episodes
ISeriesService seriesService,
IQualityUpgradableSpecification qualityUpgradableSpecification,
IBroadcastSignalRMessage signalRBroadcaster,
String resource)
string resource)
: base(signalRBroadcaster, resource)
{
_episodeService = episodeService;
@@ -79,7 +79,8 @@ namespace NzbDrone.Api.Episodes
{
var resources = base.ToListResource(modelList);
return resources.LoadSubtype<EpisodeResource, SeriesResource, Core.Tv.Series>(e => e.SeriesId, _seriesService.GetSeries).ToList();
return LoadSeries(resources);
}
public void Handle(EpisodeGrabbedEvent message)
@@ -100,5 +101,10 @@ namespace NzbDrone.Api.Episodes
BroadcastResourceChange(ModelAction.Updated, episode.Id);
}
}
protected virtual List<EpisodeResource> LoadSeries(List<EpisodeResource> resources)
{
return resources.LoadSubtype<EpisodeResource, SeriesResource, Core.Tv.Series>(e => e.SeriesId, _seriesService.GetSeries).ToList();
}
}
}
}

View File

@@ -8,30 +8,30 @@ namespace NzbDrone.Api.Episodes
{
public class EpisodeResource : RestResource
{
public Int32 SeriesId { get; set; }
public Int32 EpisodeFileId { get; set; }
public Int32 SeasonNumber { get; set; }
public Int32 EpisodeNumber { get; set; }
public String Title { get; set; }
public String AirDate { get; set; }
public int SeriesId { get; set; }
public int EpisodeFileId { get; set; }
public int SeasonNumber { get; set; }
public int EpisodeNumber { get; set; }
public string Title { get; set; }
public string AirDate { get; set; }
public DateTime? AirDateUtc { get; set; }
public String Overview { get; set; }
public string Overview { get; set; }
public EpisodeFileResource EpisodeFile { get; set; }
public Boolean HasFile { get; set; }
public Boolean Monitored { get; set; }
public Nullable<Int32> AbsoluteEpisodeNumber { get; set; }
public Nullable<Int32> SceneAbsoluteEpisodeNumber { get; set; }
public Nullable<Int32> SceneEpisodeNumber { get; set; }
public Nullable<Int32> SceneSeasonNumber { get; set; }
public Int32 TvDbEpisodeId { get; set; }
public bool HasFile { get; set; }
public bool Monitored { get; set; }
public int? AbsoluteEpisodeNumber { get; set; }
public int? SceneAbsoluteEpisodeNumber { get; set; }
public int? SceneEpisodeNumber { get; set; }
public int? SceneSeasonNumber { get; set; }
public bool UnverifiedSceneNumbering { get; set; }
public DateTime? EndTime { get; set; }
public DateTime? GrabDate { get; set; }
public String SeriesTitle { get; set; }
public string SeriesTitle { get; set; }
public SeriesResource Series { get; set; }
//Hiding this so people don't think its usable (only used to set the initial state)
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public Boolean Grabbed { get; set; }
public bool Grabbed { get; set; }
}
}

View File

@@ -18,18 +18,13 @@ namespace NzbDrone.Api.Episodes
private List<RenameEpisodeResource> GetEpisodes()
{
int seriesId;
if (Request.Query.SeriesId.HasValue)
{
seriesId = (int)Request.Query.SeriesId;
}
else
if (!Request.Query.SeriesId.HasValue)
{
throw new BadRequestException("seriesId is missing");
}
var seriesId = (int)Request.Query.SeriesId;
if (Request.Query.SeasonNumber.HasValue)
{
var seasonNumber = (int)Request.Query.SeasonNumber;

View File

@@ -6,11 +6,11 @@ namespace NzbDrone.Api.Episodes
{
public class RenameEpisodeResource : RestResource
{
public Int32 SeriesId { get; set; }
public Int32 SeasonNumber { get; set; }
public List<Int32> EpisodeNumbers { get; set; }
public Int32 EpisodeFileId { get; set; }
public String ExistingPath { get; set; }
public String NewPath { get; set; }
public int SeriesId { get; set; }
public int SeasonNumber { get; set; }
public List<int> EpisodeNumbers { get; set; }
public int EpisodeFileId { get; set; }
public string ExistingPath { get; set; }
public string NewPath { get; set; }
}
}

View File

@@ -63,7 +63,7 @@ namespace NzbDrone.Api.ErrorManagement
}.AsResponse(HttpStatusCode.Conflict);
}
var sqlErrorMessage = String.Format("[{0} {1}]", context.Request.Method, context.Request.Path);
var sqlErrorMessage = string.Format("[{0} {1}]", context.Request.Method, context.Request.Path);
_logger.ErrorException(sqlErrorMessage, sqLiteException);
}

View File

@@ -13,7 +13,7 @@ namespace NzbDrone.Api.Extensions
{
private static readonly ICached<MethodInfo> SetterCache = new Cached<MethodInfo>();
public static IEnumerable<TParent> LoadSubtype<TParent, TChild, TSourceChild>(this IEnumerable<TParent> parents, Func<TParent, Int32> foreignKeySelector, Func<IEnumerable<Int32>, IEnumerable<TSourceChild>> sourceChildSelector)
public static IEnumerable<TParent> LoadSubtype<TParent, TChild, TSourceChild>(this IEnumerable<TParent> parents, Func<TParent, int> foreignKeySelector, Func<IEnumerable<int>, IEnumerable<TSourceChild>> sourceChildSelector)
where TSourceChild : ModelBase, new()
where TChild : RestResource, new()
where TParent : RestResource

View File

@@ -1,4 +1,5 @@
using Nancy;
using System;
using Nancy;
using Nancy.Bootstrapper;
using NzbDrone.Api.Frontend;
@@ -15,7 +16,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
public void Register(IPipelines pipelines)
{
pipelines.AfterRequest.AddItemToStartOfPipeline(Handle);
pipelines.AfterRequest.AddItemToStartOfPipeline((Action<NancyContext>) Handle);
}
private void Handle(NancyContext context)

View File

@@ -9,7 +9,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
{
public void Register(IPipelines pipelines)
{
pipelines.AfterRequest.AddItemToEndOfPipeline(Handle);
pipelines.AfterRequest.AddItemToEndOfPipeline((Action<NancyContext>) Handle);
}
private void Handle(NancyContext context)
@@ -31,7 +31,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
allowedMethods = response.Headers["Allow"];
}
var requestedHeaders = String.Join(", ", request.Headers[AccessControlHeaders.RequestHeaders]);
var requestedHeaders = string.Join(", ", request.Headers[AccessControlHeaders.RequestHeaders]);
response.Headers.Add(AccessControlHeaders.AllowOrigin, "*");
response.Headers.Add(AccessControlHeaders.AllowMethods, allowedMethods);

View File

@@ -1,3 +1,4 @@
using System;
using Nancy;
using Nancy.Bootstrapper;
using NzbDrone.Api.Frontend;
@@ -15,7 +16,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
public void Register(IPipelines pipelines)
{
pipelines.BeforeRequest.AddItemToStartOfPipeline(Handle);
pipelines.BeforeRequest.AddItemToStartOfPipeline((Func<NancyContext, Response>) Handle);
}
private Response Handle(NancyContext context)

View File

@@ -1,4 +1,5 @@
using Nancy;
using System;
using Nancy;
using Nancy.Bootstrapper;
using NzbDrone.Common.EnvironmentInfo;
@@ -8,7 +9,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
{
public void Register(IPipelines pipelines)
{
pipelines.AfterRequest.AddItemToStartOfPipeline(Handle);
pipelines.AfterRequest.AddItemToStartOfPipeline((Action<NancyContext>) Handle);
}
private void Handle(NancyContext context)

View File

@@ -1,19 +1,31 @@
using System;
using System.IO;
using System.Linq;
using Nancy;
using NzbDrone.Api.Extensions;
using NzbDrone.Common.Disk;
using NzbDrone.Common.Extensions;
using NzbDrone.Core.MediaFiles;
namespace NzbDrone.Api.FileSystem
{
public class FileSystemModule : NzbDroneApiModule
{
private readonly IFileSystemLookupService _fileSystemLookupService;
private readonly IDiskProvider _diskProvider;
private readonly IDiskScanService _diskScanService;
public FileSystemModule(IFileSystemLookupService fileSystemLookupService)
public FileSystemModule(IFileSystemLookupService fileSystemLookupService,
IDiskProvider diskProvider,
IDiskScanService diskScanService)
: base("/filesystem")
{
_fileSystemLookupService = fileSystemLookupService;
_diskProvider = diskProvider;
_diskScanService = diskScanService;
Get["/"] = x => GetContents();
Get["/type"] = x => GetEntityType();
Get["/mediafiles"] = x => GetMediaFiles();
}
private Response GetContents()
@@ -29,5 +41,36 @@ namespace NzbDrone.Api.FileSystem
return _fileSystemLookupService.LookupContents((string)pathQuery.Value, includeFiles).AsResponse();
}
private Response GetEntityType()
{
var pathQuery = Request.Query.path;
var path = (string)pathQuery.Value;
if (_diskProvider.FileExists(path))
{
return new { type = "file" }.AsResponse();
}
//Return folder even if it doesn't exist on disk to avoid leaking anything from the UI about the underlying system
return new { type = "folder" }.AsResponse();
}
private Response GetMediaFiles()
{
var pathQuery = Request.Query.path;
var path = (string)pathQuery.Value;
if (!_diskProvider.FolderExists(path))
{
return new string[0].AsResponse();
}
return _diskScanService.GetVideoFiles(path).Select(f => new {
Path = f,
RelativePath = path.GetRelativePath(f),
Name = Path.GetFileName(f)
}).AsResponse();
}
}
}

View File

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

View File

@@ -3,17 +3,20 @@ using System.IO;
using NLog;
using NzbDrone.Common.Disk;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Core.Configuration;
namespace NzbDrone.Api.Frontend.Mappers
{
public class FaviconMapper : StaticResourceMapperBase
{
private readonly IAppFolderInfo _appFolderInfo;
private readonly IConfigFileProvider _configFileProvider;
public FaviconMapper(IAppFolderInfo appFolderInfo, IDiskProvider diskProvider, Logger logger)
public FaviconMapper(IAppFolderInfo appFolderInfo, IDiskProvider diskProvider,IConfigFileProvider configFileProvider, Logger logger)
: base(diskProvider, logger)
{
_appFolderInfo = appFolderInfo;
_configFileProvider = configFileProvider;
}
public override string Map(string resourceUrl)
@@ -27,7 +30,7 @@ namespace NzbDrone.Api.Frontend.Mappers
var path = Path.Combine("Content", "Images", fileName);
return Path.Combine(_appFolderInfo.StartUpFolder, "UI", path);
return Path.Combine(_appFolderInfo.StartUpFolder, _configFileProvider.UiFolder, path);
}
public override bool CanHandle(string resourceUrl)

View File

@@ -17,10 +17,10 @@ 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("(?<=(?:href|src)=\").*?(css|js)(?=\")", RegexOptions.Compiled | RegexOptions.IgnoreCase);
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 String API_KEY;
private static String URL_BASE;
private static string API_KEY;
private static string URL_BASE;
private string _generatedContent
;
@@ -36,7 +36,7 @@ namespace NzbDrone.Api.Frontend.Mappers
_configFileProvider = configFileProvider;
_analyticsService = analyticsService;
_cacheBreakProviderFactory = cacheBreakProviderFactory;
_indexPath = Path.Combine(appFolderInfo.StartUpFolder, "UI", "index.html");
_indexPath = Path.Combine(appFolderInfo.StartUpFolder, _configFileProvider.UiFolder, "index.html");
API_KEY = configFileProvider.ApiKey;
URL_BASE = configFileProvider.UrlBase;
@@ -85,8 +85,19 @@ namespace NzbDrone.Api.Frontend.Mappers
text = ReplaceRegex.Replace(text, match =>
{
var url = cacheBreakProvider.AddCacheBreakerToPath(match.Value);
return URL_BASE + url;
string url;
if (match.Groups["nohash"].Success)
{
url = match.Groups["path"].Value;
}
else
{
url = cacheBreakProvider.AddCacheBreakerToPath(match.Groups["path"].Value);
}
return string.Format("{0}=\"{1}{2}\"", match.Groups["attribute"].Value, URL_BASE, url);
});
text = text.Replace("API_ROOT", URL_BASE + "/api");

View File

@@ -12,11 +12,12 @@ namespace NzbDrone.Api.Frontend.Mappers
public class LoginHtmlMapper : StaticResourceMapperBase
{
private readonly IDiskProvider _diskProvider;
private readonly IConfigFileProvider _configFileProvider;
private readonly Func<ICacheBreakerProvider> _cacheBreakProviderFactory;
private readonly string _indexPath;
private static readonly Regex ReplaceRegex = new Regex("(?<=(?:href|src|data-main)=\").*?(?=\")", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static String URL_BASE;
private static string URL_BASE;
private string _generatedContent;
public LoginHtmlMapper(IAppFolderInfo appFolderInfo,
@@ -27,8 +28,9 @@ namespace NzbDrone.Api.Frontend.Mappers
: base(diskProvider, logger)
{
_diskProvider = diskProvider;
_configFileProvider = configFileProvider;
_cacheBreakProviderFactory = cacheBreakProviderFactory;
_indexPath = Path.Combine(appFolderInfo.StartUpFolder, "UI", "login.html");
_indexPath = Path.Combine(appFolderInfo.StartUpFolder, _configFileProvider.UiFolder, "login.html");
URL_BASE = configFileProvider.UrlBase;
}

View File

@@ -0,0 +1,34 @@
using System;
using System.IO;
using NLog;
using NzbDrone.Common.Disk;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Core.Configuration;
namespace NzbDrone.Api.Frontend.Mappers
{
public class RobotsTxtMapper : StaticResourceMapperBase
{
private readonly IAppFolderInfo _appFolderInfo;
private readonly IConfigFileProvider _configFileProvider;
public RobotsTxtMapper(IAppFolderInfo appFolderInfo, IDiskProvider diskProvider, IConfigFileProvider configFileProvider, Logger logger)
: base(diskProvider, logger)
{
_appFolderInfo = appFolderInfo;
_configFileProvider = configFileProvider;
}
public override string Map(string resourceUrl)
{
var path = Path.Combine("Content", "robots.txt");
return Path.Combine(_appFolderInfo.StartUpFolder, _configFileProvider.UiFolder, path);
}
public override bool CanHandle(string resourceUrl)
{
return resourceUrl.Equals("/robots.txt");
}
}
}

View File

@@ -2,17 +2,20 @@ using System.IO;
using NLog;
using NzbDrone.Common.Disk;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Core.Configuration;
namespace NzbDrone.Api.Frontend.Mappers
{
public class StaticResourceMapper : StaticResourceMapperBase
{
private readonly IAppFolderInfo _appFolderInfo;
private readonly IConfigFileProvider _configFileProvider;
public StaticResourceMapper(IAppFolderInfo appFolderInfo, IDiskProvider diskProvider, Logger logger)
public StaticResourceMapper(IAppFolderInfo appFolderInfo, IDiskProvider diskProvider, IConfigFileProvider configFileProvider, Logger logger)
: base(diskProvider, logger)
{
_appFolderInfo = appFolderInfo;
_configFileProvider = configFileProvider;
}
public override string Map(string resourceUrl)
@@ -20,7 +23,7 @@ namespace NzbDrone.Api.Frontend.Mappers
var path = resourceUrl.Replace('/', Path.DirectorySeparatorChar);
path = path.Trim(Path.DirectorySeparatorChar);
return Path.Combine(_appFolderInfo.StartUpFolder, "UI", path);
return Path.Combine(_appFolderInfo.StartUpFolder, _configFileProvider.UiFolder, path);
}
public override bool CanHandle(string resourceUrl)
@@ -30,7 +33,8 @@ namespace NzbDrone.Api.Frontend.Mappers
resourceUrl.EndsWith(".map") ||
resourceUrl.EndsWith(".css") ||
(resourceUrl.EndsWith(".ico") && !resourceUrl.Equals("/favicon.ico")) ||
resourceUrl.EndsWith(".swf");
resourceUrl.EndsWith(".swf") ||
resourceUrl.EndsWith("oauth.html");
}
}
}

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