From 22db06de97d43f10e984059ff3e63e66a3276a01 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 7 Nov 2013 08:20:19 -0800 Subject: [PATCH 01/63] Log response from SAB (trace) --- .../Download/Clients/Sabnzbd/SabCommunicationProxy.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabCommunicationProxy.cs b/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabCommunicationProxy.cs index f1d348b17..9da0d90ac 100644 --- a/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabCommunicationProxy.cs +++ b/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabCommunicationProxy.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using NLog; using NzbDrone.Common.Serializer; using NzbDrone.Core.Configuration; using RestSharp; @@ -16,10 +17,12 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd public class SabCommunicationProxy : ISabCommunicationProxy { private readonly IConfigService _configService; + private readonly Logger _logger; - public SabCommunicationProxy(IConfigService configService) + public SabCommunicationProxy(IConfigService configService, Logger logger) { _configService = configService; + _logger = logger; } public string DownloadNzb(Stream nzb, string title, string category, int priority) @@ -44,7 +47,8 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd { var client = BuildClient(action); var response = client.Execute(restRequest); - + _logger.Trace("Response: {0}", response); + CheckForError(response); return response.Content; From 0f1884fd202518c0381ec5801ce85c3e17e14371 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 7 Nov 2013 08:25:53 -0800 Subject: [PATCH 02/63] Added continuing/ended to series details New: Series status added to series details --- src/UI/Series/Details/InfoViewTemplate.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/UI/Series/Details/InfoViewTemplate.html b/src/UI/Series/Details/InfoViewTemplate.html index 5c3753ea0..bef8be3df 100644 --- a/src/UI/Series/Details/InfoViewTemplate.html +++ b/src/UI/Series/Details/InfoViewTemplate.html @@ -2,6 +2,12 @@ {{network}} {{runtime}} minutes {{path}} +{{#if_eq status compare="continuing"}} + Continuing +{{else}} + Ended +{{/if_eq}} + Trakt From 6b04faedbcb173c835088dd3623cc20657fdc24e Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 7 Nov 2013 16:33:26 -0800 Subject: [PATCH 03/63] Newznab daily search forces slashes now. Fixed: Issue with some locales and daily episode searching --- src/NzbDrone.Core/Indexers/Newznab/Newznab.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/Indexers/Newznab/Newznab.cs b/src/NzbDrone.Core/Indexers/Newznab/Newznab.cs index a9cf5eca2..8de08902b 100644 --- a/src/NzbDrone.Core/Indexers/Newznab/Newznab.cs +++ b/src/NzbDrone.Core/Indexers/Newznab/Newznab.cs @@ -101,10 +101,10 @@ namespace NzbDrone.Core.Indexers.Newznab { if (tvRageId > 0) { - return RecentFeed.Select(url => String.Format("{0}&limit=100&rid={1}&season={2:yyyy}&ep={2:MM/dd}", url, tvRageId, date)).ToList(); + return RecentFeed.Select(url => String.Format("{0}&limit=100&rid={1}&season={2:yyyy}&ep={2:MM}/{2:dd}", url, tvRageId, date)).ToList(); } - return RecentFeed.Select(url => String.Format("{0}&limit=100&q={1}&season={2:yyyy}&ep={2:MM/dd}", url, NewsnabifyTitle(seriesTitle), date)).ToList(); + return RecentFeed.Select(url => String.Format("{0}&limit=100&q={1}&season={2:yyyy}&ep={2:MM}/{2:dd}", url, NewsnabifyTitle(seriesTitle), date)).ToList(); } public override IEnumerable GetSeasonSearchUrls(string seriesTitle, int tvRageId, int seasonNumber, int offset) From 2183526a344ae2fa73a995102f3d00814500ffdc Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 7 Nov 2013 17:02:35 -0800 Subject: [PATCH 04/63] New: Show ended on add series if applicable --- src/NzbDrone.Core/MetadataSource/Trakt/FullShow.cs | 1 + src/NzbDrone.Core/MetadataSource/TraktProxy.cs | 14 +++++++++++--- src/UI/AddSeries/SearchResultViewTemplate.html | 9 +++++++-- src/UI/AddSeries/addSeries.less | 7 +++++++ 4 files changed, 26 insertions(+), 5 deletions(-) diff --git a/src/NzbDrone.Core/MetadataSource/Trakt/FullShow.cs b/src/NzbDrone.Core/MetadataSource/Trakt/FullShow.cs index bf7745d43..852d36731 100644 --- a/src/NzbDrone.Core/MetadataSource/Trakt/FullShow.cs +++ b/src/NzbDrone.Core/MetadataSource/Trakt/FullShow.cs @@ -25,6 +25,7 @@ namespace NzbDrone.Core.MetadataSource.Trakt public int tvrage_id { get; set; } public int last_updated { get; set; } public string poster { get; set; } + public bool? ended { get; set; } public Images images { get; set; } public List genres { get; set; } public List seasons { get; set; } diff --git a/src/NzbDrone.Core/MetadataSource/TraktProxy.cs b/src/NzbDrone.Core/MetadataSource/TraktProxy.cs index 441f6ee21..1774efed6 100644 --- a/src/NzbDrone.Core/MetadataSource/TraktProxy.cs +++ b/src/NzbDrone.Core/MetadataSource/TraktProxy.cs @@ -78,7 +78,7 @@ namespace NzbDrone.Core.MetadataSource series.Network = show.network; series.AirTime = show.air_time_utc; series.TitleSlug = show.url.ToLower().Replace("http://trakt.tv/show/", ""); - series.Status = GetSeriesStatus(show.status); + series.Status = GetSeriesStatus(show.status, show.ended); series.Seasons = show.seasons.Select(s => new Tv.Season { @@ -114,9 +114,17 @@ namespace NzbDrone.Core.MetadataSource return withoutExtension + "-300" + extension; } - private static SeriesStatusType GetSeriesStatus(string status) + private static SeriesStatusType GetSeriesStatus(string status, bool? ended) { - if (string.IsNullOrWhiteSpace(status)) return SeriesStatusType.Continuing; + if (string.IsNullOrWhiteSpace(status)) + { + if (ended.HasValue && ended.Value) + { + return SeriesStatusType.Ended; + } + + return SeriesStatusType.Continuing; + } if (status.Equals("Ended", StringComparison.InvariantCultureIgnoreCase)) return SeriesStatusType.Ended; return SeriesStatusType.Continuing; } diff --git a/src/UI/AddSeries/SearchResultViewTemplate.html b/src/UI/AddSeries/SearchResultViewTemplate.html index 091c8bb35..5b64b09a9 100644 --- a/src/UI/AddSeries/SearchResultViewTemplate.html +++ b/src/UI/AddSeries/SearchResultViewTemplate.html @@ -1,4 +1,4 @@ -
+
@@ -9,7 +9,12 @@
-

{{titleWithYear}}

+

+ {{titleWithYear}} + {{#unless_eq status compare="continuing"}} + Ended + {{/unless_eq}} +

{{overview}} diff --git a/src/UI/AddSeries/addSeries.less b/src/UI/AddSeries/addSeries.less index 6a4d0258d..1d36d9906 100644 --- a/src/UI/AddSeries/addSeries.less +++ b/src/UI/AddSeries/addSeries.less @@ -57,6 +57,13 @@ .search-item { + .series-title { + .label { + margin-left: 15px; + vertical-align: middle; + } + } + .new-series-overview { overflow : hidden; height : 120px; From 5c2073b297a62ef9387e20f1ed8370b08d95c6df Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 7 Nov 2013 17:46:07 -0800 Subject: [PATCH 05/63] Free disk space check on Linux will use best match Fixed: Better disk space check on Linux --- src/NzbDrone.Common/DiskProvider.cs | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/NzbDrone.Common/DiskProvider.cs b/src/NzbDrone.Common/DiskProvider.cs index a3d9e0255..c1a72b6d1 100644 --- a/src/NzbDrone.Common/DiskProvider.cs +++ b/src/NzbDrone.Common/DiskProvider.cs @@ -303,25 +303,23 @@ namespace NzbDrone.Common { var drives = DriveInfo.GetDrives(); - foreach (var drive in drives) + try { - try - { - if (drive.IsReady && path.StartsWith(drive.Name, StringComparison.CurrentCultureIgnoreCase)) - { - return drive.AvailableFreeSpace; - } - } - catch (InvalidOperationException e) - { - Logger.ErrorException("Couldn't get free space for " + path, e); - } + return + drives.Where(drive => + drive.IsReady && path.StartsWith(drive.Name, StringComparison.CurrentCultureIgnoreCase)) + .OrderByDescending(drive => drive.Name.Length) + .First() + .AvailableFreeSpace; + } + catch (InvalidOperationException e) + { + Logger.ErrorException("Couldn't get free space for " + path, e); } return null; } - return DriveFreeSpaceEx(root); } From 94d50de6cb8a55b89dd41369737f2b749cc9b339 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 7 Nov 2013 17:47:50 -0800 Subject: [PATCH 06/63] Fixed: Parsing .ts files for runtime should work now --- src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs b/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs index 4879218d0..ce8170a95 100644 --- a/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs +++ b/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs @@ -61,7 +61,7 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo aBitRate = aBitRate.Remove(ABindex); Int32.TryParse(aBitRate, out audioBitRate); - Int32.TryParse(mediaInfo.Get(StreamKind.General, 0, "PlayTime"), out runTime); + Int32.TryParse(mediaInfo.Get(StreamKind.Video, 0, "PlayTime"), out runTime); Int32.TryParse(mediaInfo.Get(StreamKind.Audio, 0, "StreamCount"), out streamCount); string audioChannelsStr = mediaInfo.Get(StreamKind.Audio, 0, "Channel(s)"); From 3789602e56a9418506f32258d718f94958095023 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 7 Nov 2013 17:52:50 -0800 Subject: [PATCH 07/63] Refresh series logs more and is done in alphabetical order --- src/NzbDrone.Core/MediaFiles/DiskScanService.cs | 3 ++- src/NzbDrone.Core/Tv/RefreshSeriesService.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/MediaFiles/DiskScanService.cs b/src/NzbDrone.Core/MediaFiles/DiskScanService.cs index 069bc18e3..80df872a2 100644 --- a/src/NzbDrone.Core/MediaFiles/DiskScanService.cs +++ b/src/NzbDrone.Core/MediaFiles/DiskScanService.cs @@ -54,6 +54,7 @@ namespace NzbDrone.Core.MediaFiles var decisions = _importDecisionMaker.GetImportDecisions(mediaFileList, series, false); _importApprovedEpisodes.Import(decisions); + _logger.Info("Completed scanning disk for {0}", series.Title); } public string[] GetVideoFiles(string path, bool allDirectories = true) @@ -65,7 +66,7 @@ namespace NzbDrone.Core.MediaFiles var mediaFileList = filesOnDisk.Where(c => MediaFileExtensions.Extensions.Contains(Path.GetExtension(c).ToLower())).ToList(); - _logger.Trace("{0} video files were found in {1}", mediaFileList.Count, path); + _logger.Debug("{0} video files were found in {1}", mediaFileList.Count, path); return mediaFileList.ToArray(); } diff --git a/src/NzbDrone.Core/Tv/RefreshSeriesService.cs b/src/NzbDrone.Core/Tv/RefreshSeriesService.cs index 881c24b75..acee4ee85 100644 --- a/src/NzbDrone.Core/Tv/RefreshSeriesService.cs +++ b/src/NzbDrone.Core/Tv/RefreshSeriesService.cs @@ -106,7 +106,7 @@ namespace NzbDrone.Core.Tv } else { - var allSeries = _seriesService.GetAllSeries().OrderBy(c => c.LastInfoSync).ToList(); + var allSeries = _seriesService.GetAllSeries().OrderBy(c => c.Title).ToList(); foreach (var series in allSeries) { From 96635a632311a7965138f6b47d6cdf13f54dc1df Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 10 Nov 2013 00:00:17 -0800 Subject: [PATCH 08/63] Fixed icon path for monodevelop --- src/NzbDrone/Properties/Resources.resx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NzbDrone/Properties/Resources.resx b/src/NzbDrone/Properties/Resources.resx index ad9178376..408bab357 100644 --- a/src/NzbDrone/Properties/Resources.resx +++ b/src/NzbDrone/Properties/Resources.resx @@ -119,6 +119,6 @@ - ..\..\nzbdrone.host\nzbdrone.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\..\NzbDrone.Host\NzbDrone.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file From 5b329ba3af306e1e7a1be2bc63af2c8894dafafc Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 10 Nov 2013 01:51:53 -0800 Subject: [PATCH 09/63] Fixed: Now able to queue downloads using manual search on mono (Linux) --- src/NzbDrone.Core/Parser/Model/ReleaseInfo.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/NzbDrone.Core/Parser/Model/ReleaseInfo.cs b/src/NzbDrone.Core/Parser/Model/ReleaseInfo.cs index e5b3d9ed8..b5ae81ad8 100644 --- a/src/NzbDrone.Core/Parser/Model/ReleaseInfo.cs +++ b/src/NzbDrone.Core/Parser/Model/ReleaseInfo.cs @@ -19,6 +19,13 @@ namespace NzbDrone.Core.Parser.Model { return DateTime.UtcNow.Subtract(PublishDate).Days; } + + //This prevents manually downloading a release from blowing up in mono + //TODO: Is there a better way? + private set + { + + } } public string ReleaseGroup { get; set; } From ab60420f582caeb40f360c9e40e6a7149a428a34 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 10 Nov 2013 02:05:25 -0800 Subject: [PATCH 10/63] listenTo, not promise for log table loading --- src/UI/System/Logs/Table/LogsTableLayout.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/UI/System/Logs/Table/LogsTableLayout.js b/src/UI/System/Logs/Table/LogsTableLayout.js index 95a59851a..e364baa3c 100644 --- a/src/UI/System/Logs/Table/LogsTableLayout.js +++ b/src/UI/System/Logs/Table/LogsTableLayout.js @@ -58,8 +58,8 @@ define( initialize: function () { this.collection = new LogCollection(); - this.collectionPromise = this.collection.fetch(); + this.listenTo(this.collection, 'sync', this._showTable); vent.on(vent.Events.CommandComplete, this._commandComplete, this); }, @@ -68,12 +68,7 @@ define( }, onShow: function () { - var self = this; this._showToolbar(); - - this.collectionPromise.done(function () { - self._showTable(); - }); }, _showTable: function () { From 35fc30e330bbc8e12a65f89ca67f74e37666ff93 Mon Sep 17 00:00:00 2001 From: kayone Date: Sun, 10 Nov 2013 13:33:44 -0800 Subject: [PATCH 11/63] fixed rjs task. --- Gruntfile.js | 94 +++---------- src/UI/JsLibraries/backbone.deep.model.js | 139 ++++++++++++++++--- src/UI/Mixins/underscore.mixin.deepExtend.js | 122 ---------------- src/UI/app.js | 15 +- src/UI/jQuery/jquery.shim.js | 7 + 5 files changed, 159 insertions(+), 218 deletions(-) delete mode 100644 src/UI/Mixins/underscore.mixin.deepExtend.js create mode 100644 src/UI/jQuery/jquery.shim.js diff --git a/Gruntfile.js b/Gruntfile.js index 9780b6e71..20a533ca5 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -105,52 +105,26 @@ module.exports = function (grunt) { }, copy: { - index : { + content: { cwd : srcRoot, expand: true, - src : '*ndex.html', + src : [ + 'index.html', + '**/*.css', + '**/*.png', + '**/*.jpg', + '**/*.ico', + '**/FontAwesome/*.*', + '**/fonts/*.*' + ], dest : outputDir }, scripts: { cwd : srcRoot, expand: true, - src : '**/*.js', - dest : outputDir - }, - styles : { - cwd : srcRoot, - expand: true, - src : '**/*.css', - dest : outputDir - }, - images : { - cwd : srcRoot, - expand: true, - src : '**/*.png', - dest : outputDir - }, - jpg : { - cwd : srcRoot, - expand: true, - src : '**/*.jpg', - dest : outputDir - }, - icon : { - cwd : srcRoot, - expand: true, - src : '**/*.ico', - dest : outputDir - }, - fontAwesome : { - cwd : srcRoot, - expand: true, - src : '**/FontAwesome/*.*', - dest : outputDir - }, - fonts : { - cwd : srcRoot, - expand: true, - src : '**/fonts/*.*', + src : [ + '**/*.js', + ], dest : outputDir } }, @@ -158,16 +132,17 @@ module.exports = function (grunt) { requirejs: { compile:{ options: { - mainConfigFile: "_output/UI/app.js", + mainConfigFile: "src/UI/app.js", fileExclusionRegExp: /^.*\.(?!js$)[^.]+$/, - preserveLicenseComments: true, - dir: "rjs/", + preserveLicenseComments: false, + dir: outputDir, optimize: 'none', removeCombined: true, inlineText: false, + keepBuildDir : true, modules: [{ name: 'app', - exclude: ['JsLibraries/jquery'] + exclude: ['JsLibraries/jquery', 'templates.js'] }], } @@ -190,37 +165,13 @@ module.exports = function (grunt) { files: '<%= handlebars.files.src %>', tasks: ['handlebars'] }, - copyIndex : { - files: '<%= copy.index.cwd %><%= copy.index.src %>', - tasks: ['copy:index'] + copyContent : { + files: '<%= copy.content.cwd %><%= copy.content.src %>', + tasks: ['copy:content'] }, copyScripts: { files: '<%= copy.scripts.cwd %><%= copy.scripts.src %>', tasks: ['copy:scripts'] - }, - copyStyles : { - files: '<%= copy.styles.cwd %><%= copy.styles.src %>', - tasks: ['copy:styles'] - }, - copyImages : { - files: '<%= copy.images.cwd %><%= copy.images.src %>', - tasks: ['copy:images'] - }, - copyJpg : { - files: '<%= copy.jpg.cwd %><%= copy.jpg.src %>', - tasks: ['copy:jpg'] - }, - copyIcon : { - files: '<%= copy.icon.cwd %><%= copy.icon.src %>', - tasks: ['copy:icon'] - }, - copyFontAwesome : { - files: '<%= copy.fontAwesome.cwd %><%= copy.fontAwesome.src %>', - tasks: ['copy:fontAwesome'] - }, - copyFonts : { - files: '<%= copy.fonts.cwd %><%= copy.fonts.src %>', - tasks: ['copy:fonts'] } } }); @@ -234,7 +185,8 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-curl'); grunt.loadNpmTasks('grunt-contrib-requirejs'); - grunt.registerTask('package', ['clean:output', 'copy', 'less', 'handlebars']); + grunt.registerTask('package', ['clean:output','handlebars', 'copy', 'less']); + grunt.registerTask('packagerjs', ['clean:output','handlebars', 'requirejs', 'copy:content', 'less']); grunt.registerTask('default', ['package', 'watch']); grunt.registerTask('update', ['curl']); diff --git a/src/UI/JsLibraries/backbone.deep.model.js b/src/UI/JsLibraries/backbone.deep.model.js index cbea78c52..7d65d8802 100644 --- a/src/UI/JsLibraries/backbone.deep.model.js +++ b/src/UI/JsLibraries/backbone.deep.model.js @@ -1,3 +1,124 @@ +/*jshint expr:true eqnull:true */ +/** + * + * Backbone.DeepModel v0.10.4 + * + * Copyright (c) 2013 Charles Davison, Pow Media Ltd + * + * https://github.com/powmedia/backbone-deep-model + * Licensed under the MIT License + */ + +/** + * Underscore mixins for deep objects + * + * Based on https://gist.github.com/echong/3861963 + */ +(function() { + var arrays, basicObjects, deepClone, deepExtend, deepExtendCouple, isBasicObject, + __slice = [].slice; + + deepClone = function(obj) { + var func, isArr; + if (!_.isObject(obj) || _.isFunction(obj)) { + return obj; + } + if (obj instanceof Backbone.Collection || obj instanceof Backbone.Model) { + return obj; + } + if (_.isDate(obj)) { + return new Date(obj.getTime()); + } + if (_.isRegExp(obj)) { + return new RegExp(obj.source, obj.toString().replace(/.*\//, "")); + } + isArr = _.isArray(obj || _.isArguments(obj)); + func = function(memo, value, key) { + if (isArr) { + memo.push(deepClone(value)); + } else { + memo[key] = deepClone(value); + } + return memo; + }; + return _.reduce(obj, func, isArr ? [] : {}); + }; + + isBasicObject = function(object) { + if (object == null) return false; + return (object.prototype === {}.prototype || object.prototype === Object.prototype) && _.isObject(object) && !_.isArray(object) && !_.isFunction(object) && !_.isDate(object) && !_.isRegExp(object) && !_.isArguments(object); + }; + + basicObjects = function(object) { + return _.filter(_.keys(object), function(key) { + return isBasicObject(object[key]); + }); + }; + + arrays = function(object) { + return _.filter(_.keys(object), function(key) { + return _.isArray(object[key]); + }); + }; + + deepExtendCouple = function(destination, source, maxDepth) { + var combine, recurse, sharedArrayKey, sharedArrayKeys, sharedObjectKey, sharedObjectKeys, _i, _j, _len, _len1; + if (maxDepth == null) { + maxDepth = 20; + } + if (maxDepth <= 0) { + console.warn('_.deepExtend(): Maximum depth of recursion hit.'); + return _.extend(destination, source); + } + sharedObjectKeys = _.intersection(basicObjects(destination), basicObjects(source)); + recurse = function(key) { + return source[key] = deepExtendCouple(destination[key], source[key], maxDepth - 1); + }; + for (_i = 0, _len = sharedObjectKeys.length; _i < _len; _i++) { + sharedObjectKey = sharedObjectKeys[_i]; + recurse(sharedObjectKey); + } + sharedArrayKeys = _.intersection(arrays(destination), arrays(source)); + combine = function(key) { + return source[key] = _.union(destination[key], source[key]); + }; + for (_j = 0, _len1 = sharedArrayKeys.length; _j < _len1; _j++) { + sharedArrayKey = sharedArrayKeys[_j]; + combine(sharedArrayKey); + } + return _.extend(destination, source); + }; + + deepExtend = function() { + var finalObj, maxDepth, objects, _i; + objects = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), maxDepth = arguments[_i++]; + if (!_.isNumber(maxDepth)) { + objects.push(maxDepth); + maxDepth = 20; + } + if (objects.length <= 1) { + return objects[0]; + } + if (maxDepth <= 0) { + return _.extend.apply(this, objects); + } + finalObj = objects.shift(); + while (objects.length > 0) { + finalObj = deepExtendCouple(finalObj, deepClone(objects.shift()), maxDepth); + } + return finalObj; + }; + + _.mixin({ + deepClone: deepClone, + isBasicObject: isBasicObject, + basicObjects: basicObjects, + arrays: arrays, + deepExtend: deepExtend + }); + +}).call(this); + /** * Main source */ @@ -208,15 +329,11 @@ // var separator = DeepModel.keyPathSeparator; - var alreadyTriggered = {}; // * @restorer for (var i = 0, l = changes.length; i < l; i++) { var key = changes[i]; - if (!alreadyTriggered.hasOwnProperty(key) || !alreadyTriggered[key]) { // * @restorer - alreadyTriggered[key] = true; // * @restorer - this.trigger('change:' + key, this, getNested(current, key), options); - } // * @restorer + this.trigger('change:' + key, this, getNested(current, key), options); var fields = key.split(separator); @@ -225,17 +342,7 @@ var parentKey = _.first(fields, n).join(separator), wildcardKey = parentKey + separator + '*'; - if (!alreadyTriggered.hasOwnProperty(wildcardKey) || !alreadyTriggered[wildcardKey]) { // * @restorer - alreadyTriggered[wildcardKey] = true; // * @restorer - this.trigger('change:' + wildcardKey, this, getNested(current, parentKey), options); - } // * @restorer - - // + @restorer - if (!alreadyTriggered.hasOwnProperty(parentKey) || !alreadyTriggered[parentKey]) { - alreadyTriggered[parentKey] = true; - this.trigger('change:' + parentKey, this, getNested(current, parentKey), options); - } - // - @restorer + this.trigger('change:' + wildcardKey, this, getNested(current, parentKey), options); } // } diff --git a/src/UI/Mixins/underscore.mixin.deepExtend.js b/src/UI/Mixins/underscore.mixin.deepExtend.js deleted file mode 100644 index 70596a584..000000000 --- a/src/UI/Mixins/underscore.mixin.deepExtend.js +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Underscore mixins for deep objects - * - * Based on https://gist.github.com/echong/3861963 - */ -define( - [ - 'underscore' - ], function (_) { - - var arrays, basicObjects, deepClone, deepExtend, deepExtendCouple, isBasicObject, __slice = - [ - ].slice; - - deepClone = function (obj) { - var func, isArr; - if (!_.isObject(obj) || _.isFunction(obj)) { - return obj; - } - if (obj instanceof Backbone.Collection || obj instanceof Backbone.Model) { - return obj; - } - if (_.isDate(obj)) { - return new Date(obj.getTime()); - } - if (_.isRegExp(obj)) { - return new RegExp(obj.source, obj.toString().replace(/.*\//, '')); - } - isArr = _.isArray(obj || _.isArguments(obj)); - func = function (memo, value, key) { - if (isArr) { - memo.push(deepClone(value)); - } - else { - memo[key] = deepClone(value); - } - return memo; - }; - return _.reduce(obj, func, isArr ? - [ - ] :{}); - }; - - isBasicObject = function (object) { - if (object == null) { - return false; - } - return (object.prototype === {}.prototype || object.prototype === Object.prototype) && _.isObject(object) && !_.isArray(object) && !_.isFunction(object) && !_.isDate(object) && !_.isRegExp(object) && !_.isArguments(object); - }; - - basicObjects = function (object) { - return _.filter(_.keys(object), function (key) { - return isBasicObject(object[key]); - }); - }; - - arrays = function (object) { - return _.filter(_.keys(object), function (key) { - return _.isArray(object[key]); - }); - }; - - deepExtendCouple = function (destination, source, maxDepth) { - var combine, recurse, sharedArrayKey, sharedArrayKeys, sharedObjectKey, sharedObjectKeys, _i, _j, _len, _len1; - if (maxDepth == null) { - maxDepth = 20; - } - if (maxDepth <= 0) { - console.warn('_.deepExtend(): Maximum depth of recursion hit.'); - return _.extend(destination, source); - } - sharedObjectKeys = _.intersection(basicObjects(destination), basicObjects(source)); - recurse = function (key) { - return source[key] = deepExtendCouple(destination[key], source[key], maxDepth - 1); - }; - for (_i = 0, _len = sharedObjectKeys.length; _i < _len; _i++) { - sharedObjectKey = sharedObjectKeys[_i]; - recurse(sharedObjectKey); - } - sharedArrayKeys = _.intersection(arrays(destination), arrays(source)); - combine = function (key) { - return source[key] = _.union(destination[key], source[key]); - }; - for (_j = 0, _len1 = sharedArrayKeys.length; _j < _len1; _j++) { - sharedArrayKey = sharedArrayKeys[_j]; - combine(sharedArrayKey); - } - return _.extend(destination, source); - }; - - deepExtend = function () { - var finalObj, maxDepth, objects, _i; - objects = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) :(_i = 0, - [ - ]), maxDepth = arguments[_i++]; - if (!_.isNumber(maxDepth)) { - objects.push(maxDepth); - maxDepth = 20; - } - if (objects.length <= 1) { - return objects[0]; - } - if (maxDepth <= 0) { - return _.extend.apply(this, objects); - } - finalObj = objects.shift(); - while (objects.length > 0) { - finalObj = deepExtendCouple(finalObj, deepClone(objects.shift()), maxDepth); - } - return finalObj; - }; - - - _.mixin({ - deepClone : deepClone, - isBasicObject: isBasicObject, - basicObjects : basicObjects, - arrays : arrays, - deepExtend : deepExtend - }); - }); - diff --git a/src/UI/app.js b/src/UI/app.js index 7d4aab71d..7bbcb7b96 100644 --- a/src/UI/app.js +++ b/src/UI/app.js @@ -21,7 +21,7 @@ require.config({ 'signalR' : 'JsLibraries/jquery.signalR', 'jquery.knob' : 'JsLibraries/jquery.knob', 'jquery.dotdotdot' : 'JsLibraries/jquery.dotdotdot', - 'jquery' : 'JsLibraries/jquery', + 'jquery' : 'jquery/jquery.shim', 'libs' : 'JsLibraries/', 'api': 'Require/require.api' @@ -29,6 +29,11 @@ require.config({ shim: { + + jquery :{ + exports: '$' + }, + signalR: { deps: [ @@ -76,14 +81,6 @@ require.config({ exports: 'Backbone' }, - - 'backbone.deepmodel': { - deps: - [ - 'Mixins/underscore.mixin.deepExtend' - ] - }, - 'backbone.validation': { deps : [ diff --git a/src/UI/jQuery/jquery.shim.js b/src/UI/jQuery/jquery.shim.js new file mode 100644 index 000000000..8afee0490 --- /dev/null +++ b/src/UI/jQuery/jquery.shim.js @@ -0,0 +1,7 @@ +'use strict'; +define( + [ + + ], function () { + return window.$; + }); From 9536c6c1bbd46a2a5cb0e887dfe112a03d497c1a Mon Sep 17 00:00:00 2001 From: kayone Date: Sun, 10 Nov 2013 19:11:42 -0800 Subject: [PATCH 12/63] fixed jquery shim. --- src/UI/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UI/app.js b/src/UI/app.js index 7bbcb7b96..490f4c5d9 100644 --- a/src/UI/app.js +++ b/src/UI/app.js @@ -21,7 +21,7 @@ require.config({ 'signalR' : 'JsLibraries/jquery.signalR', 'jquery.knob' : 'JsLibraries/jquery.knob', 'jquery.dotdotdot' : 'JsLibraries/jquery.dotdotdot', - 'jquery' : 'jquery/jquery.shim', + 'jquery' : 'jQuery/jquery.shim', 'libs' : 'JsLibraries/', 'api': 'Require/require.api' From 47d924cff3ca7b2ba30ffe6a3bc9b13eae5f8f57 Mon Sep 17 00:00:00 2001 From: kayone Date: Sun, 10 Nov 2013 20:09:11 -0800 Subject: [PATCH 13/63] added jshint --- Gruntfile.js | 22 +++++ src/UI/AddSeries/AddSeriesView.js | 2 +- .../Existing/UnmappedFolderCollection.js | 5 +- src/UI/Calendar/CalendarView.js | 27 +++---- src/UI/Cells/EpisodeNumberCell.js | 5 +- src/UI/Cells/NzbDroneCell.js | 9 ++- src/UI/Cells/QualityProfileCell.js | 5 +- src/UI/Config.js | 4 +- src/UI/Form/FormBuilder.js | 6 +- src/UI/Instrumentation/ErrorHandler.js | 2 +- src/UI/Mixins/AutoComplete.js | 2 +- src/UI/Navbar/NavbarView.js | 9 ++- src/UI/Quality/QualitySizeCollection.js | 3 +- src/UI/Require/require.api.js | 9 ++- src/UI/SeasonPass/SeriesLayout.js | 10 +-- src/UI/Series/Details/SeriesDetailsLayout.js | 3 +- src/UI/Series/EpisodeCollection.js | 2 +- src/UI/Series/EpisodeFileCollection.js | 2 +- src/UI/Series/Index/SeriesIndexLayout.js | 8 +- src/UI/ServerStatus.js | 11 ++- src/UI/Settings/SettingsLayout.js | 2 +- src/UI/Shared/FormatHelpers.js | 4 +- src/UI/Shared/Grid/Pager.js | 7 +- src/UI/Shared/NzbDroneController.js | 4 +- src/UI/Shared/SignalRBroadcaster.js | 3 +- src/UI/Shared/Toolbar/ToolbarLayout.js | 5 +- src/UI/System/Logs/Files/LogFileCollection.js | 25 +++--- src/UI/app.js | 6 +- src/UI/jQuery/RouteBinder.js | 80 ++++++++++--------- src/UI/jQuery/jquery.validation.js | 2 +- 30 files changed, 167 insertions(+), 117 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 20a533ca5..24bbaf1a6 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -129,6 +129,27 @@ module.exports = function (grunt) { } }, + jshint: { + options: { + '-W030': false, + '-W064': false, + '-W097': false, + '-W100': false, + 'undef': true, + 'globals': { + 'require': true, + 'define': true, + 'window': true, + 'document': true, + 'console': true + } + }, + all: [ + srcRoot + '**/*.js', + '!**/JsLibraries/*.js' + ] + }, + requirejs: { compile:{ options: { @@ -184,6 +205,7 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-notify'); grunt.loadNpmTasks('grunt-curl'); grunt.loadNpmTasks('grunt-contrib-requirejs'); + grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.registerTask('package', ['clean:output','handlebars', 'copy', 'less']); grunt.registerTask('packagerjs', ['clean:output','handlebars', 'requirejs', 'copy:content', 'less']); diff --git a/src/UI/AddSeries/AddSeriesView.js b/src/UI/AddSeries/AddSeriesView.js index 1f96de134..179cc4a52 100644 --- a/src/UI/AddSeries/AddSeriesView.js +++ b/src/UI/AddSeries/AddSeriesView.js @@ -80,7 +80,7 @@ define( this.collection.reset(); if (!options.term || options.term === this.collection.term) { - return $.Deferred().resolve(); + return Marionette.$.Deferred().resolve(); } this.searchResult.show(new LoadingView()); diff --git a/src/UI/AddSeries/Existing/UnmappedFolderCollection.js b/src/UI/AddSeries/Existing/UnmappedFolderCollection.js index a6328a521..cbebd6af7 100644 --- a/src/UI/AddSeries/Existing/UnmappedFolderCollection.js +++ b/src/UI/AddSeries/Existing/UnmappedFolderCollection.js @@ -2,8 +2,9 @@ define( [ 'backbone', - 'AddSeries/Existing/UnmappedFolderModel' - ], function (Backbone, UnmappedFolderModel) { + 'AddSeries/Existing/UnmappedFolderModel', + 'underscore' + ], function (Backbone, UnmappedFolderModel,_) { return Backbone.Collection.extend({ model: UnmappedFolderModel, diff --git a/src/UI/Calendar/CalendarView.js b/src/UI/Calendar/CalendarView.js index 0d4422845..727c8f578 100644 --- a/src/UI/Calendar/CalendarView.js +++ b/src/UI/Calendar/CalendarView.js @@ -7,7 +7,7 @@ define( 'moment', 'Calendar/Collection', 'fullcalendar' - ], function (vent, Marionette, Moment, CalendarCollection) { + ], function (vent, Marionette, moment, CalendarCollection) { var _instance; @@ -16,7 +16,10 @@ define( this.collection = new CalendarCollection(); }, render : function () { - $(this.$el).empty().fullCalendar({ + + var self = this; + + this.$el.empty().fullCalendar({ defaultView : 'basicWeek', allDayDefault : false, ignoreTimezone: false, @@ -34,8 +37,8 @@ define( }, events : this.getEvents, eventRender : function (event, element) { - $(element).addClass(event.statusLevel); - $(element).children('.fc-event-inner').addClass(event.statusLevel); + self.$(element).addClass(event.statusLevel); + self.$(element).children('.fc-event-inner').addClass(event.statusLevel); }, eventClick : function (event) { vent.trigger(vent.Commands.ShowEpisodeDetails, {episode: event.model}); @@ -50,8 +53,8 @@ define( }, getEvents: function (start, end, callback) { - var startDate = Moment(start).toISOString(); - var endDate = Moment(end).toISOString(); + var startDate = moment(start).toISOString(); + var endDate = moment(end).toISOString(); _instance.collection.fetch({ data : { start: startDate, end: endDate }, @@ -61,7 +64,7 @@ define( var seriesTitle = element.get('series').title; var start = element.get('airDateUtc'); var runtime = element.get('series').runtime; - var end = Moment(start).add('minutes', runtime).toISOString(); + var end = moment(start).add('minutes', runtime).toISOString(); element.set({ @@ -83,9 +86,9 @@ define( getStatusLevel: function (element) { var hasFile = element.get('hasFile'); - var currentTime = Moment(); - var start = Moment(element.get('airDateUtc')); - var end = Moment(element.get('end')); + var currentTime = moment(); + var start = moment(element.get('airDateUtc')); + var end = moment(element.get('end')); var statusLevel = 'primary'; @@ -94,10 +97,6 @@ define( } else if (currentTime.isAfter(start) && currentTime.isBefore(end)) { - var s = start.toISOString(); - var e = end.toISOString(); - var c = currentTime.toISOString(); - statusLevel = 'warning'; } diff --git a/src/UI/Cells/EpisodeNumberCell.js b/src/UI/Cells/EpisodeNumberCell.js index 0daf55b81..41a034ba2 100644 --- a/src/UI/Cells/EpisodeNumberCell.js +++ b/src/UI/Cells/EpisodeNumberCell.js @@ -3,8 +3,9 @@ define( [ 'Cells/NzbDroneCell', - 'Shared/FormatHelpers' - ], function (NzbDroneCell, FormatHelpers) { + 'Shared/FormatHelpers', + 'underscore' + ], function (NzbDroneCell, FormatHelpers, _) { return NzbDroneCell.extend({ className: 'episode-number-cell', diff --git a/src/UI/Cells/NzbDroneCell.js b/src/UI/Cells/NzbDroneCell.js index e5e6c595e..15bd99e76 100644 --- a/src/UI/Cells/NzbDroneCell.js +++ b/src/UI/Cells/NzbDroneCell.js @@ -2,8 +2,9 @@ define( [ - 'backgrid' - ], function (Backgrid) { + 'backgrid', + 'backbone' + ], function (Backgrid, Backbone) { return Backgrid.Cell.extend({ _originalInit: Backgrid.Cell.prototype.initialize, @@ -15,8 +16,8 @@ define( this.listenTo(this.model, 'change', this._refresh); if (this._onEdit) { - this.listenTo(this.model, "backgrid:edit", function (model, column, cell, editor) { - if (column.get("name") == this.column.get("name")) { + this.listenTo(this.model, 'backgrid:edit', function (model, column, cell, editor) { + if (column.get('name') === this.column.get('name')) { this._onEdit(model, column, cell, editor); } }); diff --git a/src/UI/Cells/QualityProfileCell.js b/src/UI/Cells/QualityProfileCell.js index 292a1dd41..7cd6efd88 100644 --- a/src/UI/Cells/QualityProfileCell.js +++ b/src/UI/Cells/QualityProfileCell.js @@ -2,8 +2,9 @@ define( [ 'backgrid', - 'Quality/QualityProfileCollection' - ], function (Backgrid, QualityProfileCollection) { + 'Quality/QualityProfileCollection', + 'underscore' + ], function (Backgrid, QualityProfileCollection,_) { return Backgrid.Cell.extend({ className: 'quality-profile-cell', diff --git a/src/UI/Config.js b/src/UI/Config.js index f1bbf757c..7721fa79f 100644 --- a/src/UI/Config.js +++ b/src/UI/Config.js @@ -18,7 +18,7 @@ define( getValue: function (key, defaultValue) { - var storeValue = localStorage.getItem(key); + var storeValue = window.localStorage.getItem(key); if (!storeValue) { return defaultValue; @@ -35,7 +35,7 @@ define( return; } - localStorage.setItem(key, value); + window.localStorage.setItem(key, value); vent.trigger(this.Events.ConfigUpdatedEvent, {key: key, value: value}); } diff --git a/src/UI/Form/FormBuilder.js b/src/UI/Form/FormBuilder.js index c0d4535ff..bb391f162 100644 --- a/src/UI/Form/FormBuilder.js +++ b/src/UI/Form/FormBuilder.js @@ -1,8 +1,10 @@ 'use strict'; define( [ - 'handlebars' - ], function (Handlebars) { + 'marionette', + 'handlebars', + 'underscore' + ], function (Marionette, Handlebars, _) { var _fieldBuilder = function (field) { if (!field.type) { diff --git a/src/UI/Instrumentation/ErrorHandler.js b/src/UI/Instrumentation/ErrorHandler.js index 92ccd4db1..80fc27441 100644 --- a/src/UI/Instrumentation/ErrorHandler.js +++ b/src/UI/Instrumentation/ErrorHandler.js @@ -38,7 +38,7 @@ return false; //don't suppress default alerts and logs. }; - $(document).ajaxError(function (event, xmlHttpRequest, ajaxOptions) { + window.$(document).ajaxError(function (event, xmlHttpRequest, ajaxOptions) { //don't report 200 error codes if (xmlHttpRequest.status >= 200 && xmlHttpRequest.status <= 300) { diff --git a/src/UI/Mixins/AutoComplete.js b/src/UI/Mixins/AutoComplete.js index 7903cef05..a80610313 100644 --- a/src/UI/Mixins/AutoComplete.js +++ b/src/UI/Mixins/AutoComplete.js @@ -1,6 +1,6 @@ 'use strict'; -define(function () { +define(['jquery'],function ($) { $.fn.autoComplete = function (resource) { $(this).typeahead({ diff --git a/src/UI/Navbar/NavbarView.js b/src/UI/Navbar/NavbarView.js index 85ca28cb6..fce2d5268 100644 --- a/src/UI/Navbar/NavbarView.js +++ b/src/UI/Navbar/NavbarView.js @@ -2,10 +2,11 @@ define( [ 'marionette', - 'Navbar/Search' - ], function (Marionette) { + 'Navbar/Search', + 'jquery' + ], function (Marionette, $) { return Marionette.ItemView.extend({ - template : 'Navbar/NavbarTemplate', + template: 'Navbar/NavbarTemplate', ui: { search: '.x-series-search' @@ -15,7 +16,7 @@ define( 'click a': 'onClick' }, - onRender: function (){ + onRender: function () { this.ui.search.bindSearch(); }, diff --git a/src/UI/Quality/QualitySizeCollection.js b/src/UI/Quality/QualitySizeCollection.js index b29fc62f7..92c580647 100644 --- a/src/UI/Quality/QualitySizeCollection.js +++ b/src/UI/Quality/QualitySizeCollection.js @@ -1,8 +1,9 @@ 'use strict'; define( [ + 'backbone', 'Quality/QualitySizeModel' - ], function (QualitySizeModel) { + ], function (Backbone, QualitySizeModel) { return Backbone.Collection.extend({ model: QualitySizeModel, url : window.NzbDrone.ApiRoot + '/qualitysize' diff --git a/src/UI/Require/require.api.js b/src/UI/Require/require.api.js index e3d855279..920cb76b0 100644 --- a/src/UI/Require/require.api.js +++ b/src/UI/Require/require.api.js @@ -1,9 +1,12 @@ -define(function () { +define( + [ + 'jquery' + ], function ($) { 'use strict'; return { load: function (name, parentRequire, onload, config) { - if(config.isBuild){ + if (config.isBuild) { return onload(); } @@ -19,7 +22,7 @@ define(function () { xhr : xhr, status: status, error : error}); - }); + }); } }; }); diff --git a/src/UI/SeasonPass/SeriesLayout.js b/src/UI/SeasonPass/SeriesLayout.js index 828f25341..b4e6d3bff 100644 --- a/src/UI/SeasonPass/SeriesLayout.js +++ b/src/UI/SeasonPass/SeriesLayout.js @@ -112,13 +112,13 @@ define( var element; if (e.target.localName === 'i') { - seasonNumber = parseInt($(e.target).parent('td').attr('data-season-number'), 10); - element = $(e.target); + seasonNumber = parseInt(this.$(e.target).parent('td').attr('data-season-number'), 10); + element = this.$(e.target); } else { - seasonNumber = parseInt($(e.target).attr('data-season-number'), 10); - element = $(e.target).children('i'); + seasonNumber = parseInt(this.$(e.target).attr('data-season-number'), 10); + element = this.$(e.target).children('i'); } this.model.setSeasonMonitored(seasonNumber); @@ -146,7 +146,7 @@ define( } }, - _toggleSeriesMonitored: function (e) { + _toggleSeriesMonitored: function () { var savePromise = this.model.save('monitored', !this.model.get('monitored'), { wait: true }); diff --git a/src/UI/Series/Details/SeriesDetailsLayout.js b/src/UI/Series/Details/SeriesDetailsLayout.js index e2b4ce627..b04aa0aa9 100644 --- a/src/UI/Series/Details/SeriesDetailsLayout.js +++ b/src/UI/Series/Details/SeriesDetailsLayout.js @@ -1,6 +1,7 @@ 'use strict'; define( [ + 'jquery', 'vent', 'reqres', 'marionette', @@ -15,7 +16,7 @@ define( 'underscore', 'backstrech', 'Mixins/backbone.signalr.mixin' - ], function (vent,reqres, Marionette, Backbone, EpisodeCollection, EpisodeFileCollection, SeasonCollection, SeasonCollectionView, InfoView, CommandController, LoadingView, _) { + ], function ($,vent,reqres, Marionette, Backbone, EpisodeCollection, EpisodeFileCollection, SeasonCollection, SeasonCollectionView, InfoView, CommandController, LoadingView, _) { return Marionette.Layout.extend({ itemViewContainer: '.x-series-seasons', diff --git a/src/UI/Series/EpisodeCollection.js b/src/UI/Series/EpisodeCollection.js index 3bd6d9979..8c72b2440 100644 --- a/src/UI/Series/EpisodeCollection.js +++ b/src/UI/Series/EpisodeCollection.js @@ -54,7 +54,7 @@ define( options = {}; } - options['data'] = { seriesId: this.seriesId }; + options.data = { seriesId: this.seriesId }; return this.originalFetch.call(this, options); } diff --git a/src/UI/Series/EpisodeFileCollection.js b/src/UI/Series/EpisodeFileCollection.js index 5cd65aaad..42472d0ed 100644 --- a/src/UI/Series/EpisodeFileCollection.js +++ b/src/UI/Series/EpisodeFileCollection.js @@ -23,7 +23,7 @@ define( options = {}; } - options['data'] = { seriesId: this.seriesId }; + options.data = { seriesId: this.seriesId }; return this.originalFetch.call(this, options); } diff --git a/src/UI/Series/Index/SeriesIndexLayout.js b/src/UI/Series/Index/SeriesIndexLayout.js index 704e7f725..6a78e0754 100644 --- a/src/UI/Series/Index/SeriesIndexLayout.js +++ b/src/UI/Series/Index/SeriesIndexLayout.js @@ -2,6 +2,7 @@ define( [ 'marionette', + 'backgrid', 'Series/Index/Posters/CollectionView', 'Series/Index/List/CollectionView', 'Series/Index/EmptyView', @@ -16,8 +17,10 @@ define( 'Cells/SeriesStatusCell', 'Series/Index/FooterView', 'Series/Index/FooterModel', - 'Shared/Toolbar/ToolbarLayout' + 'Shared/Toolbar/ToolbarLayout', + 'underscore' ], function (Marionette, + Backgrid, PosterCollectionView, ListCollectionView, EmptyView, @@ -32,7 +35,8 @@ define( SeriesStatusCell, FooterView, FooterModel, - ToolbarLayout) { + ToolbarLayout, + _) { return Marionette.Layout.extend({ template: 'Series/Index/SeriesIndexLayoutTemplate', diff --git a/src/UI/ServerStatus.js b/src/UI/ServerStatus.js index 589d45fc6..95e1fd968 100644 --- a/src/UI/ServerStatus.js +++ b/src/UI/ServerStatus.js @@ -1,6 +1,6 @@ window.NzbDrone.ApiRoot = '/api'; -var statusText = $.ajax({ +var statusText = window.$.ajax({ type : 'GET', url : window.NzbDrone.ApiRoot + '/system/status', async: false, @@ -13,10 +13,13 @@ window.NzbDrone.ServerStatus = JSON.parse(statusText); var footerText = window.NzbDrone.ServerStatus.version; -$(document).ready(function () { - if (window.NzbDrone.ServerStatus.branch != 'master') { +window.$(document).ready(function () { + if (window.NzbDrone.ServerStatus.branch !== 'master') { footerText += '
' + window.NzbDrone.ServerStatus.branch; } - $('#footer-region .version').html(footerText); + window.$('#footer-region .version').html(footerText); }); + + + diff --git a/src/UI/Settings/SettingsLayout.js b/src/UI/Settings/SettingsLayout.js index f03ac5416..20ae6912d 100644 --- a/src/UI/Settings/SettingsLayout.js +++ b/src/UI/Settings/SettingsLayout.js @@ -83,7 +83,7 @@ define( this.indexerSettings = new IndexerCollection(); this.notificationSettings = new NotificationCollection(); - $.when(this.settings.fetch(), + Backbone.$.when(this.settings.fetch(), this.generalSettings.fetch(), this.namingSettings.fetch(), this.indexerSettings.fetch(), diff --git a/src/UI/Shared/FormatHelpers.js b/src/UI/Shared/FormatHelpers.js index c29e1606a..badfc18f3 100644 --- a/src/UI/Shared/FormatHelpers.js +++ b/src/UI/Shared/FormatHelpers.js @@ -51,7 +51,7 @@ define( return ''; } - return input.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); + return input.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); } - } + }; }); diff --git a/src/UI/Shared/Grid/Pager.js b/src/UI/Shared/Grid/Pager.js index 7ddfe4ab5..e230f8d1d 100644 --- a/src/UI/Shared/Grid/Pager.js +++ b/src/UI/Shared/Grid/Pager.js @@ -1,8 +1,9 @@ 'use strict'; define( [ + 'marionette', 'backgrid.paginator' - ], function (Paginator) { + ], function (Marionette, Paginator) { return Paginator.extend({ @@ -24,7 +25,7 @@ define( changePage: function (e) { e.preventDefault(); - var target = $(e.target); + var target =this.$(e.target); if (target.closest('li').hasClass('disabled')) { return; @@ -59,7 +60,7 @@ define( } var state = collection.state; - var pageIndex = $(e.target).text() * 1; + var pageIndex = target.text(); collection.getPage(state.firstPage === 0 ? pageIndex - 1 :pageIndex); }, diff --git a/src/UI/Shared/NzbDroneController.js b/src/UI/Shared/NzbDroneController.js index 2ff57cfd4..f5c0adcf1 100644 --- a/src/UI/Shared/NzbDroneController.js +++ b/src/UI/Shared/NzbDroneController.js @@ -14,10 +14,10 @@ define( setTitle: function (title) { if (title.toLocaleLowerCase() === 'nzbdrone') { - window.document.title = 'NzbDrone'; + document.title = 'NzbDrone'; } else { - window.document.title = title + ' - NzbDrone'; + document.title = title + ' - NzbDrone'; } } }); diff --git a/src/UI/Shared/SignalRBroadcaster.js b/src/UI/Shared/SignalRBroadcaster.js index 453b08843..55b0c2b31 100644 --- a/src/UI/Shared/SignalRBroadcaster.js +++ b/src/UI/Shared/SignalRBroadcaster.js @@ -2,8 +2,9 @@ define( [ 'vent', + 'jquery', 'signalR' - ], function (vent) { + ], function (vent, $) { return { appInitializer: function () { diff --git a/src/UI/Shared/Toolbar/ToolbarLayout.js b/src/UI/Shared/Toolbar/ToolbarLayout.js index 8945337a2..7f4b64bf9 100644 --- a/src/UI/Shared/Toolbar/ToolbarLayout.js +++ b/src/UI/Shared/Toolbar/ToolbarLayout.js @@ -5,8 +5,9 @@ define( 'Shared/Toolbar/ButtonCollection', 'Shared/Toolbar/ButtonModel', 'Shared/Toolbar/Radio/RadioButtonCollectionView', - 'Shared/Toolbar/Button/ButtonCollectionView' - ], function (Marionette, ButtonCollection, ButtonModel, RadioButtonCollectionView, ButtonCollectionView) { + 'Shared/Toolbar/Button/ButtonCollectionView', + 'underscore' + ], function (Marionette, ButtonCollection, ButtonModel, RadioButtonCollectionView, ButtonCollectionView,_) { return Marionette.Layout.extend({ template: 'Shared/Toolbar/ToolbarLayoutTemplate', diff --git a/src/UI/System/Logs/Files/LogFileCollection.js b/src/UI/System/Logs/Files/LogFileCollection.js index b26a983fe..88fefca42 100644 --- a/src/UI/System/Logs/Files/LogFileCollection.js +++ b/src/UI/System/Logs/Files/LogFileCollection.js @@ -1,14 +1,17 @@ -'use strict'; +'use strict'; -define(['System/Logs/Files/LogFileModel' ], -function (LogFileModel) { - return Backbone.Collection.extend({ - url : window.NzbDrone.ApiRoot + '/log/files', - model: LogFileModel, +define( + [ + 'backbone', + 'System/Logs/Files/LogFileModel' + ], function (Backbone, LogFileModel) { + return Backbone.Collection.extend({ + url : window.NzbDrone.ApiRoot + '/log/files', + model: LogFileModel, - state: { - sortKey : 'lastWriteTime', - order : 1 - } + state: { + sortKey: 'lastWriteTime', + order : 1 + } + }); }); -}); diff --git a/src/UI/app.js b/src/UI/app.js index 490f4c5d9..18e2a9454 100644 --- a/src/UI/app.js +++ b/src/UI/app.js @@ -99,8 +99,8 @@ require.config({ exports: 'Marionette', init : function (Backbone, TemplateMixin, AsNamedView) { - TemplateMixin.call(Marionette.TemplateCache); - AsNamedView.call(Marionette.ItemView.prototype); + TemplateMixin.call(window.Marionette.TemplateCache); + AsNamedView.call(window.Marionette.ItemView.prototype); } }, @@ -140,7 +140,7 @@ require.config({ 'Shared/Grid/HeaderCell' ], function () { - Backgrid.Column.prototype.defaults = { + window.Backgrid.Column.prototype.defaults = { name : undefined, label : undefined, sortable : true, diff --git a/src/UI/jQuery/RouteBinder.js b/src/UI/jQuery/RouteBinder.js index fcd7effeb..8a1fac21f 100644 --- a/src/UI/jQuery/RouteBinder.js +++ b/src/UI/jQuery/RouteBinder.js @@ -1,55 +1,59 @@ 'use strict'; -define(['backbone'],function (Backbone) { - //This module will automatically route all relative links through backbone router rather than - //causing links to reload pages. +define( + [ + 'backbone', + 'jquery' + ], function (Backbone,$) { + //This module will automatically route all relative links through backbone router rather than + //causing links to reload pages. - var routeBinder = { + var routeBinder = { - bind: function () { - var self = this; - $(document).on('click', 'a[href]', function (event) { - self._handleClick(event); - }); - }, + bind: function () { + var self = this; + $(document).on('click', 'a[href]', function (event) { + self._handleClick(event); + }); + }, - _handleClick: function (event) { - var $target = $(event.target); + _handleClick: function (event) { + var $target = $(event.target); - //check if tab nav - if ($target.parents('.nav-tabs').length) { - return; - } + //check if tab nav + if ($target.parents('.nav-tabs').length) { + return; + } - if ($target.hasClass('no-router')) { - return; - } + if ($target.hasClass('no-router')) { + return; + } - event.preventDefault(); + event.preventDefault(); - var href = event.target.getAttribute('href'); + var href = event.target.getAttribute('href'); - if (!href && $target.parent('a') && $target.parent('a')[0]) { + if (!href && $target.parent('a') && $target.parent('a')[0]) { - var linkElement = $target.parent('a')[0]; + var linkElement = $target.parent('a')[0]; - href = linkElement.getAttribute('href'); - } + href = linkElement.getAttribute('href'); + } - if (!href) { - throw 'couldn\'t find route target'; - } + if (!href) { + throw 'couldn\'t find route target'; + } - if (!href.startsWith('http')) { - Backbone.history.navigate(href, { trigger: true }); - } + if (!href.startsWith('http')) { + Backbone.history.navigate(href, { trigger: true }); + } - else { - //Open in new tab - window.open(href, '_blank'); + else { + //Open in new tab + window.open(href, '_blank'); + } } - } - }; + }; - return routeBinder; -}); + return routeBinder; + }); diff --git a/src/UI/jQuery/jquery.validation.js b/src/UI/jQuery/jquery.validation.js index 6f94a50db..362dffaef 100644 --- a/src/UI/jQuery/jquery.validation.js +++ b/src/UI/jQuery/jquery.validation.js @@ -50,7 +50,7 @@ define( }; $.fn.addFormError = function (error) { - this.find('.control-group').parent().prepend('
' + error.errorMessage + '
') + this.find('.control-group').parent().prepend('
' + error.errorMessage + '
'); }; $.fn.removeAllErrors = function () { From 1ba49ac61531d9cdbc52b48e430b9367cab06ee1 Mon Sep 17 00:00:00 2001 From: kayone Date: Sun, 10 Nov 2013 20:10:10 -0800 Subject: [PATCH 14/63] added jshint to package task. --- Gruntfile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 24bbaf1a6..c8aa52b10 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -207,8 +207,8 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-requirejs'); grunt.loadNpmTasks('grunt-contrib-jshint'); - grunt.registerTask('package', ['clean:output','handlebars', 'copy', 'less']); - grunt.registerTask('packagerjs', ['clean:output','handlebars', 'requirejs', 'copy:content', 'less']); + grunt.registerTask('package', ['clean:output', 'jshint', 'handlebars', 'copy', 'less']); + grunt.registerTask('packagerjs', ['clean:output','jshint', 'handlebars', 'requirejs', 'copy:content', 'less']); grunt.registerTask('default', ['package', 'watch']); grunt.registerTask('update', ['curl']); From 1f37597b6fe0afc03720ef9380c347a1c5d9d304 Mon Sep 17 00:00:00 2001 From: kayone Date: Sun, 10 Nov 2013 20:17:44 -0800 Subject: [PATCH 15/63] added jshint to package.json --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 13dce8658..71db95c3a 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "grunt-curl": "*", "grunt-notify": "*", "grunt-contrib-clean": "*", - "grunt-contrib-requirejs": "*" + "grunt-contrib-requirejs": "*", + "grunt-contrib-jshint": "*" } } From 6e792c6916843bedf11c6f5a375f0f8ca2339d07 Mon Sep 17 00:00:00 2001 From: kayone Date: Sun, 10 Nov 2013 20:48:24 -0800 Subject: [PATCH 16/63] fixed local integration tests. --- src/NzbDrone.Integration.Test/NzbDroneRunner.cs | 14 ++++++-------- src/UI/Navbar/NavbarView.js | 1 - 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/NzbDrone.Integration.Test/NzbDroneRunner.cs b/src/NzbDrone.Integration.Test/NzbDroneRunner.cs index 375fdc0b9..44dc3f5be 100644 --- a/src/NzbDrone.Integration.Test/NzbDroneRunner.cs +++ b/src/NzbDrone.Integration.Test/NzbDroneRunner.cs @@ -5,7 +5,6 @@ using System.Linq; using System.Threading; using System.Xml.Linq; using NUnit.Framework; -using NzbDrone.Common; using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Common.Processes; using NzbDrone.Core.Configuration; @@ -41,8 +40,7 @@ namespace NzbDrone.Integration.Test if (BuildInfo.IsDebug) { - - Start("..\\..\\..\\..\\_output\\NzbDrone.Console.exe"); + Start("..\\..\\..\\..\\..\\_output\\NzbDrone.Console.exe"); } else { @@ -58,7 +56,7 @@ namespace NzbDrone.Integration.Test Assert.Fail("Process has exited"); } - SetApiKey(); + ApiKey = GetApiKey(); var request = new RestRequest("system/status"); request.AddHeader("Authorization", ApiKey); @@ -100,16 +98,16 @@ namespace NzbDrone.Integration.Test } } - private void SetApiKey() + private string GetApiKey() { var configFile = Path.Combine(AppData, "config.xml"); - if (!String.IsNullOrWhiteSpace(ApiKey)) return; - if (!File.Exists(configFile)) return; + if (!String.IsNullOrWhiteSpace(ApiKey)) return ApiKey; + if (!File.Exists(configFile)) return null; var xDoc = XDocument.Load(configFile); var config = xDoc.Descendants(ConfigFileProvider.CONFIG_ELEMENT_NAME).Single(); - ApiKey = config.Descendants("ApiKey").Single().Value; + return config.Descendants("ApiKey").Single().Value; } } } \ No newline at end of file diff --git a/src/UI/Navbar/NavbarView.js b/src/UI/Navbar/NavbarView.js index fce2d5268..e007712e6 100644 --- a/src/UI/Navbar/NavbarView.js +++ b/src/UI/Navbar/NavbarView.js @@ -2,7 +2,6 @@ define( [ 'marionette', - 'Navbar/Search', 'jquery' ], function (Marionette, $) { return Marionette.ItemView.extend({ From 1695ff73051b619f0b2e9e66772fbb7094ad1c97 Mon Sep 17 00:00:00 2001 From: kayone Date: Sun, 10 Nov 2013 22:39:10 -0800 Subject: [PATCH 17/63] fixed UI not loading --- src/UI/Navbar/NavbarView.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/UI/Navbar/NavbarView.js b/src/UI/Navbar/NavbarView.js index e007712e6..b44a13562 100644 --- a/src/UI/Navbar/NavbarView.js +++ b/src/UI/Navbar/NavbarView.js @@ -2,7 +2,8 @@ define( [ 'marionette', - 'jquery' + 'jquery', + 'Navbar/Search' ], function (Marionette, $) { return Marionette.ItemView.extend({ template: 'Navbar/NavbarTemplate', From af3ffa1c48a4e94aa81e6acb9ccc8e99b6551d84 Mon Sep 17 00:00:00 2001 From: kayone Date: Sun, 10 Nov 2013 23:26:13 -0800 Subject: [PATCH 18/63] more reliable apikey for integration tests. --- .../Notifications/Xbmc/HttpApiProvider.cs | 2 +- .../NzbDroneRunner.cs | 24 ++++++++++++------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/NzbDrone.Core/Notifications/Xbmc/HttpApiProvider.cs b/src/NzbDrone.Core/Notifications/Xbmc/HttpApiProvider.cs index e0a2fa260..6178056f9 100644 --- a/src/NzbDrone.Core/Notifications/Xbmc/HttpApiProvider.cs +++ b/src/NzbDrone.Core/Notifications/Xbmc/HttpApiProvider.cs @@ -119,7 +119,7 @@ namespace NzbDrone.Core.Notifications.Xbmc return String.Empty; var xDoc = XDocument.Load(new StringReader(response.Replace("&", "&"))); - var xml = (from x in xDoc.Descendants("xml") select x).FirstOrDefault(); + var xml = xDoc.Descendants("xml").Select(x => x).FirstOrDefault(); if (xml == null) return null; diff --git a/src/NzbDrone.Integration.Test/NzbDroneRunner.cs b/src/NzbDrone.Integration.Test/NzbDroneRunner.cs index 44dc3f5be..318f6b01a 100644 --- a/src/NzbDrone.Integration.Test/NzbDroneRunner.cs +++ b/src/NzbDrone.Integration.Test/NzbDroneRunner.cs @@ -4,6 +4,7 @@ using System.IO; using System.Linq; using System.Threading; using System.Xml.Linq; +using System.Xml.XPath; using NUnit.Framework; using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Common.Processes; @@ -56,7 +57,7 @@ namespace NzbDrone.Integration.Test Assert.Fail("Process has exited"); } - ApiKey = GetApiKey(); + SetApiKey(); var request = new RestRequest("system/status"); request.AddHeader("Authorization", ApiKey); @@ -98,16 +99,23 @@ namespace NzbDrone.Integration.Test } } - private string GetApiKey() + private void SetApiKey() { var configFile = Path.Combine(AppData, "config.xml"); - if (!String.IsNullOrWhiteSpace(ApiKey)) return ApiKey; - if (!File.Exists(configFile)) return null; - - var xDoc = XDocument.Load(configFile); - var config = xDoc.Descendants(ConfigFileProvider.CONFIG_ELEMENT_NAME).Single(); - return config.Descendants("ApiKey").Single().Value; + while (ApiKey == null) + { + if (File.Exists(configFile)) + { + var apiKeyElement = XDocument.Load(configFile) + .XPathSelectElement("Config/ApiKey"); + if (apiKeyElement != null) + { + ApiKey = apiKeyElement.Value; + } + } + Thread.Sleep(1000); + } } } } \ No newline at end of file From c57c319e0c7c45f8b8bf88ce37e3a590ca4d8b52 Mon Sep 17 00:00:00 2001 From: kayone Date: Mon, 11 Nov 2013 00:00:15 -0800 Subject: [PATCH 19/63] updated OWIN to 2.0.1 --- src/NzbDrone.Console/NzbDrone.Console.csproj | 8 ++++---- src/NzbDrone.Console/packages.config | 4 ++-- src/NzbDrone.Host/NzbDrone.Host.csproj | 12 ++++++------ src/NzbDrone.Host/Owin/OwinHostController.cs | 6 +++++- src/NzbDrone.Host/packages.config | 6 +++--- .../NzbDrone.Integration.Test.csproj | 13 +++++++------ src/NzbDrone.Integration.Test/packages.config | 6 +++--- src/NzbDrone/NzbDrone.csproj | 8 ++++---- src/NzbDrone/packages.config | 4 ++-- 9 files changed, 36 insertions(+), 31 deletions(-) diff --git a/src/NzbDrone.Console/NzbDrone.Console.csproj b/src/NzbDrone.Console/NzbDrone.Console.csproj index f4351791a..956b066b2 100644 --- a/src/NzbDrone.Console/NzbDrone.Console.csproj +++ b/src/NzbDrone.Console/NzbDrone.Console.csproj @@ -71,13 +71,13 @@ False ..\packages\Microsoft.AspNet.SignalR.Owin.1.1.3\lib\net40\Microsoft.AspNet.SignalR.Owin.dll - + False - ..\packages\Microsoft.Owin.1.1.0-beta2\lib\net40\Microsoft.Owin.dll + ..\packages\Microsoft.Owin.2.0.1\lib\net40\Microsoft.Owin.dll - + False - ..\packages\Microsoft.Owin.Hosting.1.1.0-beta2\lib\net40\Microsoft.Owin.Hosting.dll + ..\packages\Microsoft.Owin.Hosting.2.0.1\lib\net40\Microsoft.Owin.Hosting.dll False diff --git a/src/NzbDrone.Console/packages.config b/src/NzbDrone.Console/packages.config index 19f3a3d8b..268430b6b 100644 --- a/src/NzbDrone.Console/packages.config +++ b/src/NzbDrone.Console/packages.config @@ -2,8 +2,8 @@ - - + + diff --git a/src/NzbDrone.Host/NzbDrone.Host.csproj b/src/NzbDrone.Host/NzbDrone.Host.csproj index b4aa2ad35..a99ee29a5 100644 --- a/src/NzbDrone.Host/NzbDrone.Host.csproj +++ b/src/NzbDrone.Host/NzbDrone.Host.csproj @@ -77,17 +77,17 @@ False ..\packages\Microsoft.AspNet.SignalR.Owin.1.1.3\lib\net40\Microsoft.AspNet.SignalR.Owin.dll - + False - ..\packages\Microsoft.Owin.1.1.0-beta2\lib\net40\Microsoft.Owin.dll + ..\packages\Microsoft.Owin.2.0.1\lib\net40\Microsoft.Owin.dll - + False - ..\packages\Microsoft.Owin.Host.HttpListener.1.1.0-beta2\lib\net40\Microsoft.Owin.Host.HttpListener.dll + ..\packages\Microsoft.Owin.Host.HttpListener.2.0.1\lib\net40\Microsoft.Owin.Host.HttpListener.dll - + False - ..\packages\Microsoft.Owin.Hosting.1.1.0-beta2\lib\net40\Microsoft.Owin.Hosting.dll + ..\packages\Microsoft.Owin.Hosting.2.0.1\lib\net40\Microsoft.Owin.Hosting.dll False diff --git a/src/NzbDrone.Host/Owin/OwinHostController.cs b/src/NzbDrone.Host/Owin/OwinHostController.cs index 5af5a96c5..d1c35c1b0 100644 --- a/src/NzbDrone.Host/Owin/OwinHostController.cs +++ b/src/NzbDrone.Host/Owin/OwinHostController.cs @@ -72,7 +72,11 @@ namespace NzbDrone.Host.Owin try { - _host = WebApp.Start(OwinServiceProviderFactory.Create(), options, BuildApp); + + // options.ServerFactory = new + //_host = WebApp.Start(OwinServiceProviderFactory.Create(), options, BuildApp); + _host = WebApp.Start(options, BuildApp); + } catch (TargetInvocationException ex) { diff --git a/src/NzbDrone.Host/packages.config b/src/NzbDrone.Host/packages.config index f134e38ed..49e1440a1 100644 --- a/src/NzbDrone.Host/packages.config +++ b/src/NzbDrone.Host/packages.config @@ -2,9 +2,9 @@ - - - + + + diff --git a/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj b/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj index 75bea0f21..d4d0791eb 100644 --- a/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj +++ b/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj @@ -44,16 +44,17 @@ ..\packages\Microsoft.AspNet.SignalR.Client.1.1.3\lib\net40\Microsoft.AspNet.SignalR.Client.dll - - ..\packages\Microsoft.Owin.1.1.0-beta2\lib\net40\Microsoft.Owin.dll + + False + ..\packages\Microsoft.Owin.2.0.1\lib\net40\Microsoft.Owin.dll - + False - ..\packages\Microsoft.Owin.Host.HttpListener.1.1.0-beta2\lib\net40\Microsoft.Owin.Host.HttpListener.dll + ..\packages\Microsoft.Owin.Host.HttpListener.2.0.1\lib\net40\Microsoft.Owin.Host.HttpListener.dll - + False - ..\packages\Microsoft.Owin.Hosting.1.1.0-beta2\lib\net40\Microsoft.Owin.Hosting.dll + ..\packages\Microsoft.Owin.Hosting.2.0.1\lib\net40\Microsoft.Owin.Hosting.dll False diff --git a/src/NzbDrone.Integration.Test/packages.config b/src/NzbDrone.Integration.Test/packages.config index 101c14bc1..f982437a4 100644 --- a/src/NzbDrone.Integration.Test/packages.config +++ b/src/NzbDrone.Integration.Test/packages.config @@ -3,9 +3,9 @@ - - - + + + diff --git a/src/NzbDrone/NzbDrone.csproj b/src/NzbDrone/NzbDrone.csproj index f428eae7b..155fc5ccc 100644 --- a/src/NzbDrone/NzbDrone.csproj +++ b/src/NzbDrone/NzbDrone.csproj @@ -71,13 +71,13 @@ False ..\packages\Microsoft.AspNet.SignalR.Owin.1.1.3\lib\net40\Microsoft.AspNet.SignalR.Owin.dll - + False - ..\packages\Microsoft.Owin.1.1.0-beta2\lib\net40\Microsoft.Owin.dll + ..\packages\Microsoft.Owin.2.0.1\lib\net40\Microsoft.Owin.dll - + False - ..\packages\Microsoft.Owin.Hosting.1.1.0-beta2\lib\net40\Microsoft.Owin.Hosting.dll + ..\packages\Microsoft.Owin.Hosting.2.0.1\lib\net40\Microsoft.Owin.Hosting.dll False diff --git a/src/NzbDrone/packages.config b/src/NzbDrone/packages.config index 19f3a3d8b..268430b6b 100644 --- a/src/NzbDrone/packages.config +++ b/src/NzbDrone/packages.config @@ -2,8 +2,8 @@ - - + + From 40a0e044a7f6978ee0e766bfbae9e99958b450f3 Mon Sep 17 00:00:00 2001 From: kayone Date: Mon, 11 Nov 2013 00:02:42 -0800 Subject: [PATCH 20/63] updated nancy to 0.21.1.0 --- src/NzbDrone.Api/NzbDrone.Api.csproj | 8 ++++---- src/NzbDrone.Api/packages.config | 4 ++-- src/NzbDrone.Host/NzbDrone.Host.csproj | 8 ++++---- src/NzbDrone.Host/packages.config | 4 ++-- .../NzbDrone.Integration.Test.csproj | 8 ++++---- src/NzbDrone.Integration.Test/packages.config | 4 ++-- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/NzbDrone.Api/NzbDrone.Api.csproj b/src/NzbDrone.Api/NzbDrone.Api.csproj index 2227fbe11..d97184e75 100644 --- a/src/NzbDrone.Api/NzbDrone.Api.csproj +++ b/src/NzbDrone.Api/NzbDrone.Api.csproj @@ -46,13 +46,13 @@ False ..\packages\Microsoft.AspNet.SignalR.Core.1.1.3\lib\net40\Microsoft.AspNet.SignalR.Core.dll - + False - ..\packages\Nancy.0.20.0\lib\net40\Nancy.dll + ..\packages\Nancy.0.21.1\lib\net40\Nancy.dll - + False - ..\packages\Nancy.Authentication.Basic.0.20.0\lib\net40\Nancy.Authentication.Basic.dll + ..\packages\Nancy.Authentication.Basic.0.21.1\lib\net40\Nancy.Authentication.Basic.dll False diff --git a/src/NzbDrone.Api/packages.config b/src/NzbDrone.Api/packages.config index 722ec5a8b..b722cefda 100644 --- a/src/NzbDrone.Api/packages.config +++ b/src/NzbDrone.Api/packages.config @@ -2,8 +2,8 @@ - - + + diff --git a/src/NzbDrone.Host/NzbDrone.Host.csproj b/src/NzbDrone.Host/NzbDrone.Host.csproj index a99ee29a5..a4f5110b4 100644 --- a/src/NzbDrone.Host/NzbDrone.Host.csproj +++ b/src/NzbDrone.Host/NzbDrone.Host.csproj @@ -89,13 +89,13 @@ False ..\packages\Microsoft.Owin.Hosting.2.0.1\lib\net40\Microsoft.Owin.Hosting.dll - + False - ..\packages\Nancy.0.20.0\lib\net40\Nancy.dll + ..\packages\Nancy.0.21.1\lib\net40\Nancy.dll - + False - ..\packages\Nancy.Owin.0.20.0\lib\net40\Nancy.Owin.dll + ..\packages\Nancy.Owin.0.21.1\lib\net40\Nancy.Owin.dll False diff --git a/src/NzbDrone.Host/packages.config b/src/NzbDrone.Host/packages.config index 49e1440a1..71d3d7141 100644 --- a/src/NzbDrone.Host/packages.config +++ b/src/NzbDrone.Host/packages.config @@ -5,8 +5,8 @@ - - + + diff --git a/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj b/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj index d4d0791eb..10f5c46d0 100644 --- a/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj +++ b/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj @@ -60,13 +60,13 @@ False ..\packages\Moq.4.0.10827\lib\NET40\Moq.dll - + False - ..\packages\Nancy.0.20.0\lib\net40\Nancy.dll + ..\packages\Nancy.0.21.1\lib\net40\Nancy.dll - + False - ..\packages\Nancy.Owin.0.20.0\lib\net40\Nancy.Owin.dll + ..\packages\Nancy.Owin.0.21.1\lib\net40\Nancy.Owin.dll False diff --git a/src/NzbDrone.Integration.Test/packages.config b/src/NzbDrone.Integration.Test/packages.config index f982437a4..8c6e73b29 100644 --- a/src/NzbDrone.Integration.Test/packages.config +++ b/src/NzbDrone.Integration.Test/packages.config @@ -7,8 +7,8 @@ - - + + From 844fa9d5e6f79d63a6c9cb9d31ec5fd1a4bcc463 Mon Sep 17 00:00:00 2001 From: kayone Date: Mon, 11 Nov 2013 00:17:29 -0800 Subject: [PATCH 21/63] update NLog, Restsharp, json.net --- src/NzbDrone.Api/NzbDrone.Api.csproj | 6 +- src/NzbDrone.Api/packages.config | 4 +- .../NzbDrone.Host.Test.csproj | 4 +- src/NzbDrone.App.Test/packages.config | 2 +- .../NzbDrone.Common.Test.csproj | 4 +- src/NzbDrone.Common.Test/packages.config | 2 +- src/NzbDrone.Common/NzbDrone.Common.csproj | 6 +- src/NzbDrone.Common/packages.config | 4 +- src/NzbDrone.Console/NzbDrone.Console.csproj | 6 +- src/NzbDrone.Console/packages.config | 4 +- .../NzbDrone.Core.Test.csproj | 6 +- src/NzbDrone.Core.Test/packages.config | 4 +- src/NzbDrone.Core/NzbDrone.Core.csproj | 10 +- src/NzbDrone.Core/packages.config | 6 +- src/NzbDrone.Host/NLog.xsd | 2599 +++++++++-------- src/NzbDrone.Host/NzbDrone.Host.csproj | 6 +- src/NzbDrone.Host/packages.config | 6 +- .../NzbDrone.Integration.Test.csproj | 11 +- src/NzbDrone.Integration.Test/packages.config | 6 +- .../NzbDrone.Libraries.Test.csproj | 2 +- src/NzbDrone.Libraries.Test/packages.config | 2 +- src/NzbDrone.SignalR/NzbDrone.SignalR.csproj | 5 +- src/NzbDrone.SignalR/packages.config | 2 +- .../NzbDrone.Test.Common.csproj | 6 +- src/NzbDrone.Test.Common/packages.config | 4 +- .../NzbDrone.Update.Test.csproj | 4 +- src/NzbDrone.Update.Test/packages.config | 2 +- src/NzbDrone.Update/NLog.xsd | 2599 +++++++++-------- src/NzbDrone.Update/NzbDrone.Update.csproj | 6 +- src/NzbDrone.Update/packages.config | 6 +- src/NzbDrone/NzbDrone.csproj | 6 +- src/NzbDrone/packages.config | 4 +- 32 files changed, 2720 insertions(+), 2624 deletions(-) diff --git a/src/NzbDrone.Api/NzbDrone.Api.csproj b/src/NzbDrone.Api/NzbDrone.Api.csproj index d97184e75..307ade4b0 100644 --- a/src/NzbDrone.Api/NzbDrone.Api.csproj +++ b/src/NzbDrone.Api/NzbDrone.Api.csproj @@ -56,11 +56,11 @@ False - ..\packages\Newtonsoft.Json.5.0.6\lib\net40\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.5.0.8\lib\net40\Newtonsoft.Json.dll - + False - ..\packages\NLog.2.0.1.2\lib\net40\NLog.dll + ..\packages\NLog.2.1.0\lib\net40\NLog.dll ..\packages\ValueInjecter.2.3.3\lib\net35\Omu.ValueInjecter.dll diff --git a/src/NzbDrone.Api/packages.config b/src/NzbDrone.Api/packages.config index b722cefda..2fc701d06 100644 --- a/src/NzbDrone.Api/packages.config +++ b/src/NzbDrone.Api/packages.config @@ -4,7 +4,7 @@ - - + + \ No newline at end of file diff --git a/src/NzbDrone.App.Test/NzbDrone.Host.Test.csproj b/src/NzbDrone.App.Test/NzbDrone.Host.Test.csproj index 3581eb9cb..2b3db8178 100644 --- a/src/NzbDrone.App.Test/NzbDrone.Host.Test.csproj +++ b/src/NzbDrone.App.Test/NzbDrone.Host.Test.csproj @@ -44,9 +44,9 @@ ..\packages\Moq.4.0.10827\lib\NET40\Moq.dll - + False - ..\packages\NLog.2.0.1.2\lib\net40\NLog.dll + ..\packages\NLog.2.1.0\lib\net40\NLog.dll False diff --git a/src/NzbDrone.App.Test/packages.config b/src/NzbDrone.App.Test/packages.config index 6f925b437..c88b100c8 100644 --- a/src/NzbDrone.App.Test/packages.config +++ b/src/NzbDrone.App.Test/packages.config @@ -3,6 +3,6 @@ - + \ No newline at end of file diff --git a/src/NzbDrone.Common.Test/NzbDrone.Common.Test.csproj b/src/NzbDrone.Common.Test/NzbDrone.Common.Test.csproj index 1ec40855c..dcdca41b2 100644 --- a/src/NzbDrone.Common.Test/NzbDrone.Common.Test.csproj +++ b/src/NzbDrone.Common.Test/NzbDrone.Common.Test.csproj @@ -41,9 +41,9 @@ ..\packages\Moq.4.0.10827\lib\NET40\Moq.dll - + False - ..\packages\NLog.2.0.1.2\lib\net40\NLog.dll + ..\packages\NLog.2.1.0\lib\net40\NLog.dll False diff --git a/src/NzbDrone.Common.Test/packages.config b/src/NzbDrone.Common.Test/packages.config index 01e492eef..80b884496 100644 --- a/src/NzbDrone.Common.Test/packages.config +++ b/src/NzbDrone.Common.Test/packages.config @@ -2,6 +2,6 @@ - + \ No newline at end of file diff --git a/src/NzbDrone.Common/NzbDrone.Common.csproj b/src/NzbDrone.Common/NzbDrone.Common.csproj index 869176ecb..6a6cc35f4 100644 --- a/src/NzbDrone.Common/NzbDrone.Common.csproj +++ b/src/NzbDrone.Common/NzbDrone.Common.csproj @@ -46,11 +46,11 @@ False - ..\packages\Newtonsoft.Json.5.0.6\lib\net40\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.5.0.8\lib\net40\Newtonsoft.Json.dll - + False - ..\packages\NLog.2.0.1.2\lib\net40\NLog.dll + ..\packages\NLog.2.1.0\lib\net40\NLog.dll diff --git a/src/NzbDrone.Common/packages.config b/src/NzbDrone.Common/packages.config index 7252d18f7..4e193d0ba 100644 --- a/src/NzbDrone.Common/packages.config +++ b/src/NzbDrone.Common/packages.config @@ -1,7 +1,7 @@  - - + + \ No newline at end of file diff --git a/src/NzbDrone.Console/NzbDrone.Console.csproj b/src/NzbDrone.Console/NzbDrone.Console.csproj index 956b066b2..aa2350931 100644 --- a/src/NzbDrone.Console/NzbDrone.Console.csproj +++ b/src/NzbDrone.Console/NzbDrone.Console.csproj @@ -81,11 +81,11 @@ False - ..\packages\Newtonsoft.Json.5.0.6\lib\net40\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.5.0.8\lib\net40\Newtonsoft.Json.dll - + False - ..\packages\NLog.2.0.1.2\lib\net40\NLog.dll + ..\packages\NLog.2.1.0\lib\net40\NLog.dll False diff --git a/src/NzbDrone.Console/packages.config b/src/NzbDrone.Console/packages.config index 268430b6b..4c6a0521b 100644 --- a/src/NzbDrone.Console/packages.config +++ b/src/NzbDrone.Console/packages.config @@ -4,7 +4,7 @@ - - + + \ No newline at end of file diff --git a/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj b/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj index 66bd95291..6b50fda46 100644 --- a/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj +++ b/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj @@ -79,11 +79,11 @@ False - ..\packages\Newtonsoft.Json.5.0.6\lib\net40\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.5.0.8\lib\net40\Newtonsoft.Json.dll - + False - ..\packages\NLog.2.0.1.2\lib\net40\NLog.dll + ..\packages\NLog.2.1.0\lib\net40\NLog.dll False diff --git a/src/NzbDrone.Core.Test/packages.config b/src/NzbDrone.Core.Test/packages.config index b751901cd..234ffd26d 100644 --- a/src/NzbDrone.Core.Test/packages.config +++ b/src/NzbDrone.Core.Test/packages.config @@ -8,8 +8,8 @@ - - + + diff --git a/src/NzbDrone.Core/NzbDrone.Core.csproj b/src/NzbDrone.Core/NzbDrone.Core.csproj index 9007ad74e..a2002f474 100644 --- a/src/NzbDrone.Core/NzbDrone.Core.csproj +++ b/src/NzbDrone.Core/NzbDrone.Core.csproj @@ -83,11 +83,11 @@ False - ..\packages\Newtonsoft.Json.5.0.6\lib\net40\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.5.0.8\lib\net40\Newtonsoft.Json.dll - + False - ..\packages\NLog.2.0.1.2\lib\net40\NLog.dll + ..\packages\NLog.2.1.0\lib\net40\NLog.dll ..\packages\valueinjecter.2.3.3\lib\net35\Omu.ValueInjecter.dll @@ -96,9 +96,9 @@ False ..\packages\Prowlin.0.9.4456.26422\lib\net40\Prowlin.dll - + False - ..\packages\RestSharp.104.2.0\lib\net4\RestSharp.dll + ..\packages\RestSharp.104.3.3\lib\net4\RestSharp.dll diff --git a/src/NzbDrone.Core/packages.config b/src/NzbDrone.Core/packages.config index b0bc75532..1c01c0a9f 100644 --- a/src/NzbDrone.Core/packages.config +++ b/src/NzbDrone.Core/packages.config @@ -4,9 +4,9 @@ - - + + - + \ No newline at end of file diff --git a/src/NzbDrone.Host/NLog.xsd b/src/NzbDrone.Host/NLog.xsd index 2203f4ede..49dd62049 100644 --- a/src/NzbDrone.Host/NLog.xsd +++ b/src/NzbDrone.Host/NLog.xsd @@ -224,6 +224,84 @@ + + + + + + + + + + + + Name of the target. + + + + + Indicates whether buffer should grow as needed. + + + + + Number of log events to be buffered. + + + + + Maximum number of log events that the buffer can keep. + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + + + + + + + + + + + + Name of the target. + + + + + Indicates whether to add <!-- --> comments around all written texts. + + + + + Layout used to format log messages. + + + + + @@ -289,8 +367,8 @@ - + @@ -302,14 +380,14 @@ Indicates whether to use sliding timeout. - + - Number of log events to be buffered. + Timeout (in milliseconds) after which the contents of buffer will be flushed if there's no write in the specified period of time. Use -1 to disable timed flushes. - + - Timeout (in milliseconds) after which the contents of buffer will be flushed if there's no write in the specified period of time. Use -1 to disable timed flushes. + Number of log events to be buffered. @@ -321,21 +399,22 @@ - - + + - + + - - - - + + + + @@ -347,11 +426,6 @@ Indicates whether to append newline at the end of log message. - - - Instance of that is used to format log messages. - - Action that should be taken if the message is larger than maxMessageSize. @@ -367,9 +441,9 @@ Encoding to be used. - + - Size of the connection cache (number of connections which are kept alive). + Instance of that is used to format log messages. @@ -377,14 +451,24 @@ Network address. + + + Size of the connection cache (number of connections which are kept alive). + + Indicates whether to keep connection open whenever possible. - + - Indicates whether to include source info (file name and line number) in the information sent over the network. + Maximum queue size. + + + + + Indicates whether to include dictionary contents. @@ -397,9 +481,9 @@ AppInfo field. By default it's the friendly name of the current AppDomain. - + - NDC item separator. + Indicates whether to include NLog-specific extensions to log4j schema. @@ -407,14 +491,14 @@ Indicates whether to include stack contents. - + - Indicates whether to include NLog-specific extensions to log4j schema. + NDC item separator. - + - Indicates whether to include dictionary contents. + Indicates whether to include source info (file name and line number) in the information sent over the network. @@ -443,26 +527,24 @@ - + - - + + + + + Name of the target. - - - Text to be rendered. - - Footer. @@ -473,102 +555,233 @@ Header. - - - Indicates whether to send the log messages to the standard error instead of the standard output. - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Database user name. If the ConnectionString is not provided this value will be used to construct the "User ID=" part of the connection string. - - - - - Name of the database provider. - - - - - Indicates whether to use database transactions. Some data providers require this. - - - - - Name of the connection string (as specified in <connectionStrings> configuration section. - - - - - Connection string. When provided, it overrides the values specified in DBHost, DBUserName, DBPassword, DBDatabase. - - - - - Indicates whether to keep the database connection open between the log events. - - - - - Database name. If the ConnectionString is not provided this value will be used to construct the "Database=" part of the connection string. - - - - - Database password. If the ConnectionString is not provided this value will be used to construct the "Password=" part of the connection string. - - - + - Database host name. If the ConnectionString is not provided this value will be used to construct the "Server=" part of the connection string. + Text to be rendered. - + - Connection string using for installation and uninstallation. If not provided, regular ConnectionString is being used. + Indicates whether to use default row highlighting rules. - + - Text of the SQL command to be run on each log level. + Indicates whether the error stream (stderr) should be used instead of the output stream (stdout). - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + Condition that must be met in order to set the specified foreground and background color. + + + + + Background color. + + + + + Foreground color. + + + + + + + + + + + + + + + Indicates whether to ignore case when comparing texts. + + + + + Regular expression to be matched. You must specify either text or regex. + + + + + Text to be matched. You must specify either text or regex. + + + + + Indicates whether to match whole words only. + + + + + Background color. + + + + + Foreground color. + + + + + + + + + + + + + + + + Name of the target. + + + + + Footer. + + + + + Header. + + + + + Text to be rendered. + + + + + Indicates whether to send the log messages to the standard error instead of the standard output. + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Database user name. If the ConnectionString is not provided this value will be used to construct the "User ID=" part of the connection string. + + + + + Name of the database provider. + + + + + Indicates whether to use database transactions. Some data providers require this. + + + + + Indicates whether to keep the database connection open between the log events. + + + + + Database password. If the ConnectionString is not provided this value will be used to construct the "Password=" part of the connection string. + + + + + Name of the connection string (as specified in <connectionStrings> configuration section. + + + + + Connection string. When provided, it overrides the values specified in DBHost, DBUserName, DBPassword, DBDatabase. + + + + + Database host name. If the ConnectionString is not provided this value will be used to construct the "Server=" part of the connection string. + + + + + Database name. If the ConnectionString is not provided this value will be used to construct the "Database=" part of the connection string. + + + + + Connection string using for installation and uninstallation. If not provided, regular ConnectionString is being used. + + + + + Text of the SQL command to be run on each log level. + + + + + + + + + + @@ -634,11 +847,13 @@ - + + + @@ -646,64 +861,55 @@ Name of the target. + + + Footer. + + + + + Header. + + - Layout used to format log messages. + Text to be rendered. - + - + - + Name of the target. - + - Indicates whether to return to the first target after any successful write. + Layout used to format log messages. - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + @@ -712,17 +918,92 @@ - Text to be rendered. + Layout used to format log messages. - + - Header. + Name of the machine on which Event Log service is running. - + - Footer. + Value to be used as the event Source. + + + + + Name of the Event Log to write to. This can be System, Application or any user-defined name. + + + + + Layout that renders event Category. + + + + + Layout that renders event ID. + + + + + + + + + + + + + + + Name of the target. + + + + + Indicates whether to return to the first target after any successful write. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. @@ -735,14 +1016,29 @@ Line ending mode. - + - Size in bytes above which log files will be automatically archived. + Footer. - + - Maximum number of archive files that should be kept. + Text to be rendered. + + + + + Header. + + + + + Indicates whether to automatically archive log files every time the specified time passes. + + + + + Size in bytes above which log files will be automatically archived. @@ -750,19 +1046,19 @@ Name of the file to be used for an archive. - + - Way file archives are numbered. + Maximum number of archive files that should be kept. - + - Indicates whether to automatically archive log files every time the specified time passes. + Way file archives are numbered. - + - Indicates whether to replace file contents on each write instead of appending log message at the end. + Gets ors set a value indicating whether a managed file stream is forced, instead of used the native implementation. @@ -770,11 +1066,6 @@ File attributes (Windows only). - - - Name of the file to write to. - - Indicates whether to delete old log file on startup. @@ -790,9 +1081,14 @@ Indicates whether to create directories if they don't exist. - + - Indicates whether concurrent writes to the log file by multiple processes on the same host. + Indicates whether to replace file contents on each write instead of appending log message at the end. + + + + + Name of the file to write to. @@ -800,14 +1096,14 @@ Maximum number of seconds that files are kept open. If this number is negative the files are not automatically closed after a period of inactivity. - + - Number of files to be kept open. Setting this to a higher value may improve performance in a situation where a single File target is writing to many files (such as splitting by level or by logger). + Log file buffer size in bytes. - + - Indicates whether concurrent writes to the log file by multiple processes on different network hosts. + Number of times the write is appended on the file before NLog discards the log message. @@ -815,19 +1111,24 @@ Delay in milliseconds to wait before attempting to write to the file again. - + - Number of times the write is appended on the file before NLog discards the log message. + Indicates whether to automatically flush the file buffers after each log message. - + - Log file buffer size in bytes. + Indicates whether concurrent writes to the log file by multiple processes on the same host. - + - Indicates whether to automatically flush the file buffers after each log message. + Number of files to be kept open. Setting this to a higher value may improve performance in a situation where a single File target is writing to many files (such as splitting by level or by logger). + + + + + Indicates whether concurrent writes to the log file by multiple processes on different network hosts. @@ -847,12 +1148,6 @@ - - - - - - @@ -863,9 +1158,15 @@ + + + + + + - + @@ -881,7 +1182,6 @@ - @@ -904,12 +1204,16 @@ - + + + + + @@ -921,257 +1225,327 @@ Layout used to format log messages. - - - - - - - - - - - - + - Name of the target. + Name of the Form on which the control is located. - + - Layout used to format log messages. + Name of control to which NLog will log write log text. - + - Message box title. + Indicates whether log text should be appended to the text of the control instead of overwriting it. + + + + + Whether new log entry are added to the start or the end of the control - + - + - - - + + + + + + + Name of the target. - + - Method name. The method must be public and static. + User account password. - + - Class name. + Indicates whether to revert to the credentials of the process instead of impersonating another user. + + + + + Username to change context to. + + + + + Logon Type. + + + + + Windows domain name to change context to. + + + + + Required impersonation level. + + + + + Type of the logon provider. - - - - - - - - - Layout that should be use to calcuate the value for the parameter. - - - - - Name of the parameter. - - - - - Type of the parameter. - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + Name of the target. - - - Action that should be taken if the message is larger than maxMessageSize. - - - - - Indicates whether to append newline at the end of log message. - - - - - Layout used to format log messages. - - - + - Maximum message size in bytes. + Name of the endpoint configuration in WCF configuration file. - + - Encoding to be used. + Endpoint address. - + - Size of the connection cache (number of connections which are kept alive). + Indicates whether to use binary message encoding. - + - Indicates whether to keep connection open whenever possible. + Client ID. - + - Network address. + Indicates whether to include per-event properties in the payload sent to the server. - + + + + + + + + + Layout that should be use to calcuate the value for the parameter. + + + + + Name of the parameter. + + + + + Type of the parameter. + + + + - - - - + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + Name of the target. - + - Indicates whether to append newline at the end of log message. + Indicates whether to send message as HTML instead of plain text. + + + + + Encoding to be used for sending e-mail. + + + + + Indicates whether to add new lines between log entries. - Instance of that is used to format log messages. + Text to be rendered. - + - Action that should be taken if the message is larger than maxMessageSize. + Header. - + - Maximum message size in bytes. + Footer. - + - Encoding to be used. + Recipients' email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). - + - Size of the connection cache (number of connections which are kept alive). + CC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). - + - Network address. + BCC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). - + - Indicates whether to keep connection open whenever possible. + Mail subject. - + - Indicates whether to include source info (file name and line number) in the information sent over the network. + Mail message body (repeated for each log message send in one mail). - + - Indicates whether to include call site (class and method name) in the information sent over the network. + Sender's email address (e.g. joe@domain.com). - + - AppInfo field. By default it's the friendly name of the current AppDomain. + Indicates whether NewLine characters in the body should be replaced with tags. - + - NDC item separator. + Priority used for sending mails. - + - Indicates whether to include stack contents. + Indicates whether the default Settings from System.Net.MailSettings should be used. - + - Indicates whether to include NLog-specific extensions to log4j schema. + SMTP Server to be used for sending. - + - Indicates whether to include dictionary contents. + Username used to connect to SMTP server (used when SmtpAuthentication is set to "basic"). + + + + + Port number that SMTP Server is listening on. + + + + + SMTP Authentication mode. + + + + + Password used to authenticate against SMTP server (used when SmtpAuthentication is set to "basic"). + + + + + Indicates whether SSL (secure sockets layer) should be used when communicating with SMTP server. - + + + + + + + + - @@ -1179,11 +1553,6 @@ Name of the target. - - - Indicates whether to perform layout calculation. - - Layout used to format log messages. @@ -1192,12 +1561,13 @@ - + + @@ -1209,596 +1579,699 @@ Layout used to format log messages. + + + Message box title. + + - + - + - - + + + + + + + + Name of the target. - + - Default filter to be applied when no specific rule matches. + Indicates whether to use the XML format when serializing message. This will also disable creating queues. - - - - - - - - - - - Condition to be tested. - - - - - Resulting filter to be applied when the condition matches. - - - - - - - - - - + - Name of the target. + Indicates whether to check if a queue exists before writing to it. - - - - - - - - - - - + - Name of the target. + Layout used to format log messages. - + - Number of times to repeat each log message. + Encoding to be used when writing text to the queue. - - - - - - - - - - - - + - Name of the target. + Name of the queue to write to. - + - Time to wait between retries in milliseconds. + Indicates whether to use recoverable messages (with guaranteed delivery). - + - Number of retries that should be attempted on the wrapped target in case of a failure. + Indicates whether to create the queue if it doesn't exists. + + + + + Label to associate with each message. - + - + + + + Name of the target. + + + Method name. The method must be public and static. + + + + + Class name. + + - + - + + + + + + + + + + Name of the target. + + + Indicates whether to append newline at the end of log message. + + + + + Action that should be taken if the message is larger than maxMessageSize. + + + + + Maximum message size in bytes. + + + + + Layout used to format log messages. + + + + + Encoding to be used. + + + + + Indicates whether to keep connection open whenever possible. + + + + + Size of the connection cache (number of connections which are kept alive). + + + + + Network address. + + + + + Maximum queue size. + + - + - - + + + - - - + + + + + + + + + + + + + Name of the target. - + - Web service URL. + Indicates whether to append newline at the end of log message. + + + + + Action that should be taken if the message is larger than maxMessageSize. + + + + + Maximum message size in bytes. - Encoding. + Encoding to be used. - + - Protocol to be used when calling web service. + Instance of that is used to format log messages. - + - Web service namespace. + Network address. - + - Web service method name. + Size of the connection cache (number of connections which are kept alive). - - - - - - - - - - - - - - - - - - - - - - - - - - + - Body layout (can be repeated multiple times). + Indicates whether to keep connection open whenever possible. - + - Footer layout. + Maximum queue size. - + - Header layout. + Indicates whether to include dictionary contents. - + - Quoting mode. + Indicates whether to include call site (class and method name) in the information sent over the network. - + - Quote Character. + AppInfo field. By default it's the friendly name of the current AppDomain. - + - Indicates whether CVS should include header. + Indicates whether to include NLog-specific extensions to log4j schema. - + - Custom column delimiter value (valid when ColumnDelimiter is set to 'Custom'). + Indicates whether to include stack contents. - + - Column delimiter. + NDC item separator. + + + + + Indicates whether to include source info (file name and line number) in the information sent over the network. - - - - - - - - - - - - - - - - - - - - - - - - - - Layout of the column. - - - - - Name of the column. - - - - - - - - - - - - Layout text. - - - - - - + - + + + - - - + - Body layout (can be repeated multiple times). + Name of the target. - + - Header layout. + Indicates whether to perform layout calculation. - + - Footer layout. + Layout used to format log messages. - - - - - - - - + - + - - + + - + - Condition expression. + Name of the target. - + - Action to be taken when filter matches. + Layout used to format log messages. - - - - - - - - - - + - + - - - - + + + + + + + - - - Layout to be used to filter log messages. - - - + - Substring to be matched. + Name of the target. - + - Action to be taken when filter matches. + Name of the performance counter. - + - Indicates whether to ignore case when comparing strings. + Performance counter type. - - - - - - - - - - - - - + - Indicates whether to ignore case when comparing strings. + Performance counter instance name. - + - Layout to be used to filter log messages. + Indicates whether performance counter should be automatically created. - + - Action to be taken when filter matches. + Name of the performance counter category. - + - String to compare the layout to. + Counter help text. - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - + + + - - - Layout to be used to filter log messages. - - - + - Substring to be matched. + Name of the target. - + - Action to be taken when filter matches. + Default filter to be applied when no specific rule matches. - + + + + + + + + + + + Condition to be tested. + + + + + Resulting filter to be applied when the condition matches. + + + + + + + + + + - Indicates whether to ignore case when comparing strings. + Name of the target. - + - + - - - - + + - + - Indicates whether to ignore case when comparing strings. + Name of the target. - + - Layout to be used to filter log messages. + Number of times to repeat each log message. - + + + + + + + + + + + + - Action to be taken when filter matches. + Name of the target. - + - String to compare the layout to. + Time to wait between retries in milliseconds. + + + + + Number of retries that should be attempted on the wrapped target in case of a failure. - + - - - - - - + + + + + + + + + + + Name of the target. - - - Indicates whether to use the XML format when serializing message. - - - + - Encoding to be used when writing text to the queue. + Layout used to format log messages. - + - Layout used to format log messages. + Indicates whether the created form will be initially minimized. - + - Indicates whether to use recoverable messages (with guaranteed delivery). + Maximum number of lines the rich text box will store (or 0 to disable this feature). - + - Indicates whether to create the queue if it doesn't exists. + Initial width of the form with rich text box. - + - Label to associate with each message. + Indicates whether the created window will be a tool window. - + - Name of the queue to write to. + Name of RichTextBox to which Nlog will write. - - - - - - - - - - - - - + - Name of the target. + Indicates whether scroll bar will be moved automatically to show most recent log entries. - + - Maximum number of log events that the buffer can keep. + Initial height of the form with rich text box. - + - Indicates whether buffer should grow as needed. + Name of the Form on which the control is located. If there is no open form of a specified name than NLog will create a new one. - + - Number of log events to be buffered. + Indicates whether to use default coloring rules. - + + + + + + + + + + + + + + + + + + + + + + Indicates whether to ignore case when comparing texts. + + + + + Regular expression to be matched. You must specify either text or regex. + + + + + Text to be matched. You must specify either text or regex. + + + + + Indicates whether to match whole words only. + + + + + Background color. Names are identical with KnownColor enum extended with Empty value which means that background color won't be changed. + + + + + Font color. Names are identical with KnownColor enum extended with Empty value which means that font color won't be changed. + + + + + Font style of matched text. Possible values are the same as in FontStyle enum in System.Drawing. + + + + + + + + + + + + + Condition that must be met in order to set the specified font color. + + + + + Background color. + + + + + Font color. + + + + + Font style of matched text. + + + + - + - Name of the target. - + + + + + + + + + + - Layout used to format log messages. + Name of the target. - + - @@ -1806,11 +2279,6 @@ Name of the target. - - - Indicates whether to add <!-- --> comments around all written texts. - - Layout used to format log messages. @@ -1819,764 +2287,349 @@ - + - - - - - - - + + + + + + Name of the target. - + - Text to be rendered. + Web service URL. - + - Header. + Web service namespace. - + - Footer. + Protocol to be used when calling web service. - + - Indicates whether to use default row highlighting rules. + Web service method name. - + - Indicates whether the error stream (stderr) should be used instead of the output stream (stdout). + Encoding. - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - Background color. - - - - - Condition that must be met in order to set the specified foreground and background color. - - - - - Foreground color. - - - - - - - - - - - - - - - Background color. - - - - - Foreground color. - - - - - Indicates whether to ignore case when comparing texts. - - - - - Regular expression to be matched. You must specify either text or regex. - - - - - Text to be matched. You must specify either text or regex. - - - - - Indicates whether to match whole words only. - - - - - - - - - - - - - - - Name of the target. - - - - - Footer. - - - - - Text to be rendered. - - - - - Header. - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Name of the machine on which Event Log service is running. - - - - - Value to be used as the event Source. - - - - - Layout that renders event Category. - - - - - Layout that renders event ID. - - - - - Name of the Event Log to write to. This can be System, Application or any user-defined name. - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Indicates whether log text should be appended to the text of the control instead of overwriting it. - - - - - Name of control to which NLog will log write log text. - - - - - Name of the Form on which the control is located. - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Username to change context to. - - - - - User account password. - - - - - Indicates whether to revert to the credentials of the process instead of impersonating another user. - - - - - Required impersonation level. - - - - - Windows domain name to change context to. - - - - - Logon Type. - - - - - Type of the logon provider. - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - + - + - + - - - - - - - - - - - - - - - - + + + + + + - + - Name of the target. + Body layout (can be repeated multiple times). - Header. + Header layout. - Footer. - - - - - Text to be rendered. - - - - - Indicates whether to send message as HTML instead of plain text. - - - - - Indicates whether to add new lines between log entries. - - - - - Encoding to be used for sending e-mail. - - - - - Mail subject. - - - - - Recipients' email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). - - - - - BCC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). - - - - - CC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). - - - - - Sender's email address (e.g. joe@domain.com). - - - - - Mail message body (repeated for each log message send in one mail). - - - - - Username used to connect to SMTP server (used when SmtpAuthentication is set to "basic"). + Footer layout. - + - Indicates whether SSL (secure sockets layer) should be used when communicating with SMTP server. + Quote Character. - + - Password used to authenticate against SMTP server (used when SmtpAuthentication is set to "basic"). + Quoting mode. - + - SMTP Authentication mode. + Indicates whether CVS should include header. - + - SMTP Server to be used for sending. + Custom column delimiter value (valid when ColumnDelimiter is set to 'Custom'). - + - Port number that SMTP Server is listening on. + Column delimiter. - + - - - + + + - - - - - - - - - - - - - - - Name of the target. - - - - - Performance counter instance name. - - - - - Counter help text. - - - - - Performance counter type. - - - - - Indicates whether performance counter should be automatically created. - - - - - Name of the performance counter category. - - - - - Name of the performance counter. - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - + + + + + + + + Layout of the column. + + + + + Name of the column. + + + + - + - - - - - - - - - - - - - - - - Name of the target. - - + + + - Layout used to format log messages. + Body layout (can be repeated multiple times). - + - Initial height of the form with rich text box. + Header layout. - + - Indicates whether scroll bar will be moved automatically to show most recent log entries. + Footer layout. - + + + + + + + + + + + + + + + + + - Maximum number of lines the rich text box will store (or 0 to disable this feature). + Layout text. - + + + + + + + + + + + - Indicates whether the created form will be initially minimized. + Condition expression. - + - Indicates whether the created window will be a tool window. + Action to be taken when filter matches. - + + + + + + + + + + + + + + + + + + + + + + - Name of RichTextBox to which Nlog will write. + Layout to be used to filter log messages. - + - Name of the Form on which the control is located. If there is no open form of a specified name than NLog will create a new one. + Substring to be matched. - + - Initial width of the form with rich text box. + Action to be taken when filter matches. - + - Indicates whether to use default coloring rules. + Indicates whether to ignore case when comparing strings. - - - - - - - - - - - - - - - - - - - - - - Background color. Names are identical with KnownColor enum extended with Empty value which means that background color won't be changed. - - - - - Font color. Names are identical with KnownColor enum extended with Empty value which means that font color won't be changed. - - - - - Indicates whether to ignore case when comparing texts. - - - - - Regular expression to be matched. You must specify either text or regex. - - - - - Font style of matched text. Possible values are the same as in FontStyle enum in System.Drawing. - - - - - Text to be matched. You must specify either text or regex. - - - - - Indicates whether to match whole words only. - - - - - - - - - - - - - Background color. - - - - - Condition that must be met in order to set the specified font color. - - - - - Font color. - - - - - Font style of matched text. - - - - + - + - + + + - + - Name of the target. + Indicates whether to ignore case when comparing strings. - Layout used to format log messages. + Layout to be used to filter log messages. + + + + + Action to be taken when filter matches. + + + + + String to compare the layout to. - + - + - - - - - - - + + + + - + - Name of the target. + Layout to be used to filter log messages. - + - Name of the endpoint configuration in WCF configuration file. + Substring to be matched. - + - Endpoint address. + Action to be taken when filter matches. - + - Indicates whether to use binary message encoding. + Indicates whether to ignore case when comparing strings. - + + + + + + + + + + + + + - Client ID. + Indicates whether to ignore case when comparing strings. - + - Indicates whether to include per-event properties in the payload sent to the server. + Layout to be used to filter log messages. + + + + + Action to be taken when filter matches. + + + + + String to compare the layout to. diff --git a/src/NzbDrone.Host/NzbDrone.Host.csproj b/src/NzbDrone.Host/NzbDrone.Host.csproj index a4f5110b4..db0cb8e07 100644 --- a/src/NzbDrone.Host/NzbDrone.Host.csproj +++ b/src/NzbDrone.Host/NzbDrone.Host.csproj @@ -99,11 +99,7 @@ False - ..\packages\Newtonsoft.Json.5.0.6\lib\net40\Newtonsoft.Json.dll - - - False - ..\packages\NLog.2.0.1.2\lib\net40\NLog.dll + ..\packages\Newtonsoft.Json.5.0.8\lib\net40\Newtonsoft.Json.dll False diff --git a/src/NzbDrone.Host/packages.config b/src/NzbDrone.Host/packages.config index 71d3d7141..41e52db65 100644 --- a/src/NzbDrone.Host/packages.config +++ b/src/NzbDrone.Host/packages.config @@ -7,9 +7,7 @@ - - - - + + \ No newline at end of file diff --git a/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj b/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj index 10f5c46d0..36e05e556 100644 --- a/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj +++ b/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj @@ -70,10 +70,11 @@ False - ..\packages\Newtonsoft.Json.5.0.6\lib\net40\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.5.0.8\lib\net40\Newtonsoft.Json.dll - - ..\packages\NLog.2.0.1.2\lib\net40\NLog.dll + + False + ..\packages\NLog.2.1.0\lib\net40\NLog.dll ..\packages\NUnit.2.6.2\lib\nunit.framework.dll @@ -82,9 +83,9 @@ False ..\packages\Owin.1.0\lib\net40\Owin.dll - + False - ..\packages\RestSharp.104.2.0\lib\net4\RestSharp.dll + ..\packages\RestSharp.104.3.3\lib\net4\RestSharp.dll diff --git a/src/NzbDrone.Integration.Test/packages.config b/src/NzbDrone.Integration.Test/packages.config index 8c6e73b29..990270545 100644 --- a/src/NzbDrone.Integration.Test/packages.config +++ b/src/NzbDrone.Integration.Test/packages.config @@ -9,9 +9,9 @@ - - + + - + \ No newline at end of file diff --git a/src/NzbDrone.Libraries.Test/NzbDrone.Libraries.Test.csproj b/src/NzbDrone.Libraries.Test/NzbDrone.Libraries.Test.csproj index 14c492823..673eafe98 100644 --- a/src/NzbDrone.Libraries.Test/NzbDrone.Libraries.Test.csproj +++ b/src/NzbDrone.Libraries.Test/NzbDrone.Libraries.Test.csproj @@ -39,7 +39,7 @@ False - ..\packages\Newtonsoft.Json.5.0.6\lib\net40\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.5.0.8\lib\net40\Newtonsoft.Json.dll ..\packages\NUnit.2.6.2\lib\nunit.framework.dll diff --git a/src/NzbDrone.Libraries.Test/packages.config b/src/NzbDrone.Libraries.Test/packages.config index 0a78ede96..48393462a 100644 --- a/src/NzbDrone.Libraries.Test/packages.config +++ b/src/NzbDrone.Libraries.Test/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file diff --git a/src/NzbDrone.SignalR/NzbDrone.SignalR.csproj b/src/NzbDrone.SignalR/NzbDrone.SignalR.csproj index c3110ef29..efbda7398 100644 --- a/src/NzbDrone.SignalR/NzbDrone.SignalR.csproj +++ b/src/NzbDrone.SignalR/NzbDrone.SignalR.csproj @@ -36,8 +36,9 @@ ..\packages\Microsoft.AspNet.SignalR.Core.1.1.3\lib\net40\Microsoft.AspNet.SignalR.Core.dll - - ..\packages\Newtonsoft.Json.5.0.6\lib\net40\Newtonsoft.Json.dll + + False + ..\packages\Newtonsoft.Json.5.0.8\lib\net40\Newtonsoft.Json.dll diff --git a/src/NzbDrone.SignalR/packages.config b/src/NzbDrone.SignalR/packages.config index f82b57a29..a5b443e7a 100644 --- a/src/NzbDrone.SignalR/packages.config +++ b/src/NzbDrone.SignalR/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/src/NzbDrone.Test.Common/NzbDrone.Test.Common.csproj b/src/NzbDrone.Test.Common/NzbDrone.Test.Common.csproj index dd6ffc0fe..277bbae61 100644 --- a/src/NzbDrone.Test.Common/NzbDrone.Test.Common.csproj +++ b/src/NzbDrone.Test.Common/NzbDrone.Test.Common.csproj @@ -54,11 +54,11 @@ False - ..\packages\Newtonsoft.Json.5.0.6\lib\net40\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.5.0.8\lib\net40\Newtonsoft.Json.dll - + False - ..\packages\NLog.2.0.1.2\lib\net40\NLog.dll + ..\packages\NLog.2.1.0\lib\net40\NLog.dll False diff --git a/src/NzbDrone.Test.Common/packages.config b/src/NzbDrone.Test.Common/packages.config index 6880e0bf8..2ab611796 100644 --- a/src/NzbDrone.Test.Common/packages.config +++ b/src/NzbDrone.Test.Common/packages.config @@ -3,8 +3,8 @@ - - + + \ No newline at end of file diff --git a/src/NzbDrone.Update.Test/NzbDrone.Update.Test.csproj b/src/NzbDrone.Update.Test/NzbDrone.Update.Test.csproj index 3dbc57b35..6e39cd8ab 100644 --- a/src/NzbDrone.Update.Test/NzbDrone.Update.Test.csproj +++ b/src/NzbDrone.Update.Test/NzbDrone.Update.Test.csproj @@ -50,9 +50,9 @@ ..\packages\Moq.4.0.10827\lib\NET40\Moq.dll - + False - ..\packages\NLog.2.0.1.2\lib\net40\NLog.dll + ..\packages\NLog.2.1.0\lib\net40\NLog.dll False diff --git a/src/NzbDrone.Update.Test/packages.config b/src/NzbDrone.Update.Test/packages.config index 6f925b437..c88b100c8 100644 --- a/src/NzbDrone.Update.Test/packages.config +++ b/src/NzbDrone.Update.Test/packages.config @@ -3,6 +3,6 @@ - + \ No newline at end of file diff --git a/src/NzbDrone.Update/NLog.xsd b/src/NzbDrone.Update/NLog.xsd index 2203f4ede..49dd62049 100644 --- a/src/NzbDrone.Update/NLog.xsd +++ b/src/NzbDrone.Update/NLog.xsd @@ -224,6 +224,84 @@ + + + + + + + + + + + + Name of the target. + + + + + Indicates whether buffer should grow as needed. + + + + + Number of log events to be buffered. + + + + + Maximum number of log events that the buffer can keep. + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + + + + + + + + + + + + Name of the target. + + + + + Indicates whether to add <!-- --> comments around all written texts. + + + + + Layout used to format log messages. + + + + + @@ -289,8 +367,8 @@ - + @@ -302,14 +380,14 @@ Indicates whether to use sliding timeout. - + - Number of log events to be buffered. + Timeout (in milliseconds) after which the contents of buffer will be flushed if there's no write in the specified period of time. Use -1 to disable timed flushes. - + - Timeout (in milliseconds) after which the contents of buffer will be flushed if there's no write in the specified period of time. Use -1 to disable timed flushes. + Number of log events to be buffered. @@ -321,21 +399,22 @@ - - + + - + + - - - - + + + + @@ -347,11 +426,6 @@ Indicates whether to append newline at the end of log message. - - - Instance of that is used to format log messages. - - Action that should be taken if the message is larger than maxMessageSize. @@ -367,9 +441,9 @@ Encoding to be used. - + - Size of the connection cache (number of connections which are kept alive). + Instance of that is used to format log messages. @@ -377,14 +451,24 @@ Network address. + + + Size of the connection cache (number of connections which are kept alive). + + Indicates whether to keep connection open whenever possible. - + - Indicates whether to include source info (file name and line number) in the information sent over the network. + Maximum queue size. + + + + + Indicates whether to include dictionary contents. @@ -397,9 +481,9 @@ AppInfo field. By default it's the friendly name of the current AppDomain. - + - NDC item separator. + Indicates whether to include NLog-specific extensions to log4j schema. @@ -407,14 +491,14 @@ Indicates whether to include stack contents. - + - Indicates whether to include NLog-specific extensions to log4j schema. + NDC item separator. - + - Indicates whether to include dictionary contents. + Indicates whether to include source info (file name and line number) in the information sent over the network. @@ -443,26 +527,24 @@ - + - - + + + + + Name of the target. - - - Text to be rendered. - - Footer. @@ -473,102 +555,233 @@ Header. - - - Indicates whether to send the log messages to the standard error instead of the standard output. - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Database user name. If the ConnectionString is not provided this value will be used to construct the "User ID=" part of the connection string. - - - - - Name of the database provider. - - - - - Indicates whether to use database transactions. Some data providers require this. - - - - - Name of the connection string (as specified in <connectionStrings> configuration section. - - - - - Connection string. When provided, it overrides the values specified in DBHost, DBUserName, DBPassword, DBDatabase. - - - - - Indicates whether to keep the database connection open between the log events. - - - - - Database name. If the ConnectionString is not provided this value will be used to construct the "Database=" part of the connection string. - - - - - Database password. If the ConnectionString is not provided this value will be used to construct the "Password=" part of the connection string. - - - + - Database host name. If the ConnectionString is not provided this value will be used to construct the "Server=" part of the connection string. + Text to be rendered. - + - Connection string using for installation and uninstallation. If not provided, regular ConnectionString is being used. + Indicates whether to use default row highlighting rules. - + - Text of the SQL command to be run on each log level. + Indicates whether the error stream (stderr) should be used instead of the output stream (stdout). - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + Condition that must be met in order to set the specified foreground and background color. + + + + + Background color. + + + + + Foreground color. + + + + + + + + + + + + + + + Indicates whether to ignore case when comparing texts. + + + + + Regular expression to be matched. You must specify either text or regex. + + + + + Text to be matched. You must specify either text or regex. + + + + + Indicates whether to match whole words only. + + + + + Background color. + + + + + Foreground color. + + + + + + + + + + + + + + + + Name of the target. + + + + + Footer. + + + + + Header. + + + + + Text to be rendered. + + + + + Indicates whether to send the log messages to the standard error instead of the standard output. + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Database user name. If the ConnectionString is not provided this value will be used to construct the "User ID=" part of the connection string. + + + + + Name of the database provider. + + + + + Indicates whether to use database transactions. Some data providers require this. + + + + + Indicates whether to keep the database connection open between the log events. + + + + + Database password. If the ConnectionString is not provided this value will be used to construct the "Password=" part of the connection string. + + + + + Name of the connection string (as specified in <connectionStrings> configuration section. + + + + + Connection string. When provided, it overrides the values specified in DBHost, DBUserName, DBPassword, DBDatabase. + + + + + Database host name. If the ConnectionString is not provided this value will be used to construct the "Server=" part of the connection string. + + + + + Database name. If the ConnectionString is not provided this value will be used to construct the "Database=" part of the connection string. + + + + + Connection string using for installation and uninstallation. If not provided, regular ConnectionString is being used. + + + + + Text of the SQL command to be run on each log level. + + + + + + + + + + @@ -634,11 +847,13 @@ - + + + @@ -646,64 +861,55 @@ Name of the target. + + + Footer. + + + + + Header. + + - Layout used to format log messages. + Text to be rendered. - + - + - + Name of the target. - + - Indicates whether to return to the first target after any successful write. + Layout used to format log messages. - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + @@ -712,17 +918,92 @@ - Text to be rendered. + Layout used to format log messages. - + - Header. + Name of the machine on which Event Log service is running. - + - Footer. + Value to be used as the event Source. + + + + + Name of the Event Log to write to. This can be System, Application or any user-defined name. + + + + + Layout that renders event Category. + + + + + Layout that renders event ID. + + + + + + + + + + + + + + + Name of the target. + + + + + Indicates whether to return to the first target after any successful write. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. @@ -735,14 +1016,29 @@ Line ending mode. - + - Size in bytes above which log files will be automatically archived. + Footer. - + - Maximum number of archive files that should be kept. + Text to be rendered. + + + + + Header. + + + + + Indicates whether to automatically archive log files every time the specified time passes. + + + + + Size in bytes above which log files will be automatically archived. @@ -750,19 +1046,19 @@ Name of the file to be used for an archive. - + - Way file archives are numbered. + Maximum number of archive files that should be kept. - + - Indicates whether to automatically archive log files every time the specified time passes. + Way file archives are numbered. - + - Indicates whether to replace file contents on each write instead of appending log message at the end. + Gets ors set a value indicating whether a managed file stream is forced, instead of used the native implementation. @@ -770,11 +1066,6 @@ File attributes (Windows only). - - - Name of the file to write to. - - Indicates whether to delete old log file on startup. @@ -790,9 +1081,14 @@ Indicates whether to create directories if they don't exist. - + - Indicates whether concurrent writes to the log file by multiple processes on the same host. + Indicates whether to replace file contents on each write instead of appending log message at the end. + + + + + Name of the file to write to. @@ -800,14 +1096,14 @@ Maximum number of seconds that files are kept open. If this number is negative the files are not automatically closed after a period of inactivity. - + - Number of files to be kept open. Setting this to a higher value may improve performance in a situation where a single File target is writing to many files (such as splitting by level or by logger). + Log file buffer size in bytes. - + - Indicates whether concurrent writes to the log file by multiple processes on different network hosts. + Number of times the write is appended on the file before NLog discards the log message. @@ -815,19 +1111,24 @@ Delay in milliseconds to wait before attempting to write to the file again. - + - Number of times the write is appended on the file before NLog discards the log message. + Indicates whether to automatically flush the file buffers after each log message. - + - Log file buffer size in bytes. + Indicates whether concurrent writes to the log file by multiple processes on the same host. - + - Indicates whether to automatically flush the file buffers after each log message. + Number of files to be kept open. Setting this to a higher value may improve performance in a situation where a single File target is writing to many files (such as splitting by level or by logger). + + + + + Indicates whether concurrent writes to the log file by multiple processes on different network hosts. @@ -847,12 +1148,6 @@ - - - - - - @@ -863,9 +1158,15 @@ + + + + + + - + @@ -881,7 +1182,6 @@ - @@ -904,12 +1204,16 @@ - + + + + + @@ -921,257 +1225,327 @@ Layout used to format log messages. - - - - - - - - - - - - + - Name of the target. + Name of the Form on which the control is located. - + - Layout used to format log messages. + Name of control to which NLog will log write log text. - + - Message box title. + Indicates whether log text should be appended to the text of the control instead of overwriting it. + + + + + Whether new log entry are added to the start or the end of the control - + - + - - - + + + + + + + Name of the target. - + - Method name. The method must be public and static. + User account password. - + - Class name. + Indicates whether to revert to the credentials of the process instead of impersonating another user. + + + + + Username to change context to. + + + + + Logon Type. + + + + + Windows domain name to change context to. + + + + + Required impersonation level. + + + + + Type of the logon provider. - - - - - - - - - Layout that should be use to calcuate the value for the parameter. - - - - - Name of the parameter. - - - - - Type of the parameter. - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + Name of the target. - - - Action that should be taken if the message is larger than maxMessageSize. - - - - - Indicates whether to append newline at the end of log message. - - - - - Layout used to format log messages. - - - + - Maximum message size in bytes. + Name of the endpoint configuration in WCF configuration file. - + - Encoding to be used. + Endpoint address. - + - Size of the connection cache (number of connections which are kept alive). + Indicates whether to use binary message encoding. - + - Indicates whether to keep connection open whenever possible. + Client ID. - + - Network address. + Indicates whether to include per-event properties in the payload sent to the server. - + + + + + + + + + Layout that should be use to calcuate the value for the parameter. + + + + + Name of the parameter. + + + + + Type of the parameter. + + + + - - - - + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + Name of the target. - + - Indicates whether to append newline at the end of log message. + Indicates whether to send message as HTML instead of plain text. + + + + + Encoding to be used for sending e-mail. + + + + + Indicates whether to add new lines between log entries. - Instance of that is used to format log messages. + Text to be rendered. - + - Action that should be taken if the message is larger than maxMessageSize. + Header. - + - Maximum message size in bytes. + Footer. - + - Encoding to be used. + Recipients' email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). - + - Size of the connection cache (number of connections which are kept alive). + CC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). - + - Network address. + BCC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). - + - Indicates whether to keep connection open whenever possible. + Mail subject. - + - Indicates whether to include source info (file name and line number) in the information sent over the network. + Mail message body (repeated for each log message send in one mail). - + - Indicates whether to include call site (class and method name) in the information sent over the network. + Sender's email address (e.g. joe@domain.com). - + - AppInfo field. By default it's the friendly name of the current AppDomain. + Indicates whether NewLine characters in the body should be replaced with tags. - + - NDC item separator. + Priority used for sending mails. - + - Indicates whether to include stack contents. + Indicates whether the default Settings from System.Net.MailSettings should be used. - + - Indicates whether to include NLog-specific extensions to log4j schema. + SMTP Server to be used for sending. - + - Indicates whether to include dictionary contents. + Username used to connect to SMTP server (used when SmtpAuthentication is set to "basic"). + + + + + Port number that SMTP Server is listening on. + + + + + SMTP Authentication mode. + + + + + Password used to authenticate against SMTP server (used when SmtpAuthentication is set to "basic"). + + + + + Indicates whether SSL (secure sockets layer) should be used when communicating with SMTP server. - + + + + + + + + - @@ -1179,11 +1553,6 @@ Name of the target. - - - Indicates whether to perform layout calculation. - - Layout used to format log messages. @@ -1192,12 +1561,13 @@ - + + @@ -1209,596 +1579,699 @@ Layout used to format log messages. + + + Message box title. + + - + - + - - + + + + + + + + Name of the target. - + - Default filter to be applied when no specific rule matches. + Indicates whether to use the XML format when serializing message. This will also disable creating queues. - - - - - - - - - - - Condition to be tested. - - - - - Resulting filter to be applied when the condition matches. - - - - - - - - - - + - Name of the target. + Indicates whether to check if a queue exists before writing to it. - - - - - - - - - - - + - Name of the target. + Layout used to format log messages. - + - Number of times to repeat each log message. + Encoding to be used when writing text to the queue. - - - - - - - - - - - - + - Name of the target. + Name of the queue to write to. - + - Time to wait between retries in milliseconds. + Indicates whether to use recoverable messages (with guaranteed delivery). - + - Number of retries that should be attempted on the wrapped target in case of a failure. + Indicates whether to create the queue if it doesn't exists. + + + + + Label to associate with each message. - + - + + + + Name of the target. + + + Method name. The method must be public and static. + + + + + Class name. + + - + - + + + + + + + + + + Name of the target. + + + Indicates whether to append newline at the end of log message. + + + + + Action that should be taken if the message is larger than maxMessageSize. + + + + + Maximum message size in bytes. + + + + + Layout used to format log messages. + + + + + Encoding to be used. + + + + + Indicates whether to keep connection open whenever possible. + + + + + Size of the connection cache (number of connections which are kept alive). + + + + + Network address. + + + + + Maximum queue size. + + - + - - + + + - - - + + + + + + + + + + + + + Name of the target. - + - Web service URL. + Indicates whether to append newline at the end of log message. + + + + + Action that should be taken if the message is larger than maxMessageSize. + + + + + Maximum message size in bytes. - Encoding. + Encoding to be used. - + - Protocol to be used when calling web service. + Instance of that is used to format log messages. - + - Web service namespace. + Network address. - + - Web service method name. + Size of the connection cache (number of connections which are kept alive). - - - - - - - - - - - - - - - - - - - - - - - - - - + - Body layout (can be repeated multiple times). + Indicates whether to keep connection open whenever possible. - + - Footer layout. + Maximum queue size. - + - Header layout. + Indicates whether to include dictionary contents. - + - Quoting mode. + Indicates whether to include call site (class and method name) in the information sent over the network. - + - Quote Character. + AppInfo field. By default it's the friendly name of the current AppDomain. - + - Indicates whether CVS should include header. + Indicates whether to include NLog-specific extensions to log4j schema. - + - Custom column delimiter value (valid when ColumnDelimiter is set to 'Custom'). + Indicates whether to include stack contents. - + - Column delimiter. + NDC item separator. + + + + + Indicates whether to include source info (file name and line number) in the information sent over the network. - - - - - - - - - - - - - - - - - - - - - - - - - - Layout of the column. - - - - - Name of the column. - - - - - - - - - - - - Layout text. - - - - - - + - + + + - - - + - Body layout (can be repeated multiple times). + Name of the target. - + - Header layout. + Indicates whether to perform layout calculation. - + - Footer layout. + Layout used to format log messages. - - - - - - - - + - + - - + + - + - Condition expression. + Name of the target. - + - Action to be taken when filter matches. + Layout used to format log messages. - - - - - - - - - - + - + - - - - + + + + + + + - - - Layout to be used to filter log messages. - - - + - Substring to be matched. + Name of the target. - + - Action to be taken when filter matches. + Name of the performance counter. - + - Indicates whether to ignore case when comparing strings. + Performance counter type. - - - - - - - - - - - - - + - Indicates whether to ignore case when comparing strings. + Performance counter instance name. - + - Layout to be used to filter log messages. + Indicates whether performance counter should be automatically created. - + - Action to be taken when filter matches. + Name of the performance counter category. - + - String to compare the layout to. + Counter help text. - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - + + + - - - Layout to be used to filter log messages. - - - + - Substring to be matched. + Name of the target. - + - Action to be taken when filter matches. + Default filter to be applied when no specific rule matches. - + + + + + + + + + + + Condition to be tested. + + + + + Resulting filter to be applied when the condition matches. + + + + + + + + + + - Indicates whether to ignore case when comparing strings. + Name of the target. - + - + - - - - + + - + - Indicates whether to ignore case when comparing strings. + Name of the target. - + - Layout to be used to filter log messages. + Number of times to repeat each log message. - + + + + + + + + + + + + - Action to be taken when filter matches. + Name of the target. - + - String to compare the layout to. + Time to wait between retries in milliseconds. + + + + + Number of retries that should be attempted on the wrapped target in case of a failure. - + - - - - - - + + + + + + + + + + + Name of the target. - - - Indicates whether to use the XML format when serializing message. - - - + - Encoding to be used when writing text to the queue. + Layout used to format log messages. - + - Layout used to format log messages. + Indicates whether the created form will be initially minimized. - + - Indicates whether to use recoverable messages (with guaranteed delivery). + Maximum number of lines the rich text box will store (or 0 to disable this feature). - + - Indicates whether to create the queue if it doesn't exists. + Initial width of the form with rich text box. - + - Label to associate with each message. + Indicates whether the created window will be a tool window. - + - Name of the queue to write to. + Name of RichTextBox to which Nlog will write. - - - - - - - - - - - - - + - Name of the target. + Indicates whether scroll bar will be moved automatically to show most recent log entries. - + - Maximum number of log events that the buffer can keep. + Initial height of the form with rich text box. - + - Indicates whether buffer should grow as needed. + Name of the Form on which the control is located. If there is no open form of a specified name than NLog will create a new one. - + - Number of log events to be buffered. + Indicates whether to use default coloring rules. - + + + + + + + + + + + + + + + + + + + + + + Indicates whether to ignore case when comparing texts. + + + + + Regular expression to be matched. You must specify either text or regex. + + + + + Text to be matched. You must specify either text or regex. + + + + + Indicates whether to match whole words only. + + + + + Background color. Names are identical with KnownColor enum extended with Empty value which means that background color won't be changed. + + + + + Font color. Names are identical with KnownColor enum extended with Empty value which means that font color won't be changed. + + + + + Font style of matched text. Possible values are the same as in FontStyle enum in System.Drawing. + + + + + + + + + + + + + Condition that must be met in order to set the specified font color. + + + + + Background color. + + + + + Font color. + + + + + Font style of matched text. + + + + - + - Name of the target. - + + + + + + + + + + - Layout used to format log messages. + Name of the target. - + - @@ -1806,11 +2279,6 @@ Name of the target. - - - Indicates whether to add <!-- --> comments around all written texts. - - Layout used to format log messages. @@ -1819,764 +2287,349 @@ - + - - - - - - - + + + + + + Name of the target. - + - Text to be rendered. + Web service URL. - + - Header. + Web service namespace. - + - Footer. + Protocol to be used when calling web service. - + - Indicates whether to use default row highlighting rules. + Web service method name. - + - Indicates whether the error stream (stderr) should be used instead of the output stream (stdout). + Encoding. - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - Background color. - - - - - Condition that must be met in order to set the specified foreground and background color. - - - - - Foreground color. - - - - - - - - - - - - - - - Background color. - - - - - Foreground color. - - - - - Indicates whether to ignore case when comparing texts. - - - - - Regular expression to be matched. You must specify either text or regex. - - - - - Text to be matched. You must specify either text or regex. - - - - - Indicates whether to match whole words only. - - - - - - - - - - - - - - - Name of the target. - - - - - Footer. - - - - - Text to be rendered. - - - - - Header. - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Name of the machine on which Event Log service is running. - - - - - Value to be used as the event Source. - - - - - Layout that renders event Category. - - - - - Layout that renders event ID. - - - - - Name of the Event Log to write to. This can be System, Application or any user-defined name. - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Indicates whether log text should be appended to the text of the control instead of overwriting it. - - - - - Name of control to which NLog will log write log text. - - - - - Name of the Form on which the control is located. - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Username to change context to. - - - - - User account password. - - - - - Indicates whether to revert to the credentials of the process instead of impersonating another user. - - - - - Required impersonation level. - - - - - Windows domain name to change context to. - - - - - Logon Type. - - - - - Type of the logon provider. - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - + - + - + - - - - - - - - - - - - - - - - + + + + + + - + - Name of the target. + Body layout (can be repeated multiple times). - Header. + Header layout. - Footer. - - - - - Text to be rendered. - - - - - Indicates whether to send message as HTML instead of plain text. - - - - - Indicates whether to add new lines between log entries. - - - - - Encoding to be used for sending e-mail. - - - - - Mail subject. - - - - - Recipients' email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). - - - - - BCC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). - - - - - CC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). - - - - - Sender's email address (e.g. joe@domain.com). - - - - - Mail message body (repeated for each log message send in one mail). - - - - - Username used to connect to SMTP server (used when SmtpAuthentication is set to "basic"). + Footer layout. - + - Indicates whether SSL (secure sockets layer) should be used when communicating with SMTP server. + Quote Character. - + - Password used to authenticate against SMTP server (used when SmtpAuthentication is set to "basic"). + Quoting mode. - + - SMTP Authentication mode. + Indicates whether CVS should include header. - + - SMTP Server to be used for sending. + Custom column delimiter value (valid when ColumnDelimiter is set to 'Custom'). - + - Port number that SMTP Server is listening on. + Column delimiter. - + - - - + + + - - - - - - - - - - - - - - - Name of the target. - - - - - Performance counter instance name. - - - - - Counter help text. - - - - - Performance counter type. - - - - - Indicates whether performance counter should be automatically created. - - - - - Name of the performance counter category. - - - - - Name of the performance counter. - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - + + + + + + + + Layout of the column. + + + + + Name of the column. + + + + - + - - - - - - - - - - - - - - - - Name of the target. - - + + + - Layout used to format log messages. + Body layout (can be repeated multiple times). - + - Initial height of the form with rich text box. + Header layout. - + - Indicates whether scroll bar will be moved automatically to show most recent log entries. + Footer layout. - + + + + + + + + + + + + + + + + + - Maximum number of lines the rich text box will store (or 0 to disable this feature). + Layout text. - + + + + + + + + + + + - Indicates whether the created form will be initially minimized. + Condition expression. - + - Indicates whether the created window will be a tool window. + Action to be taken when filter matches. - + + + + + + + + + + + + + + + + + + + + + + - Name of RichTextBox to which Nlog will write. + Layout to be used to filter log messages. - + - Name of the Form on which the control is located. If there is no open form of a specified name than NLog will create a new one. + Substring to be matched. - + - Initial width of the form with rich text box. + Action to be taken when filter matches. - + - Indicates whether to use default coloring rules. + Indicates whether to ignore case when comparing strings. - - - - - - - - - - - - - - - - - - - - - - Background color. Names are identical with KnownColor enum extended with Empty value which means that background color won't be changed. - - - - - Font color. Names are identical with KnownColor enum extended with Empty value which means that font color won't be changed. - - - - - Indicates whether to ignore case when comparing texts. - - - - - Regular expression to be matched. You must specify either text or regex. - - - - - Font style of matched text. Possible values are the same as in FontStyle enum in System.Drawing. - - - - - Text to be matched. You must specify either text or regex. - - - - - Indicates whether to match whole words only. - - - - - - - - - - - - - Background color. - - - - - Condition that must be met in order to set the specified font color. - - - - - Font color. - - - - - Font style of matched text. - - - - + - + - + + + - + - Name of the target. + Indicates whether to ignore case when comparing strings. - Layout used to format log messages. + Layout to be used to filter log messages. + + + + + Action to be taken when filter matches. + + + + + String to compare the layout to. - + - + - - - - - - - + + + + - + - Name of the target. + Layout to be used to filter log messages. - + - Name of the endpoint configuration in WCF configuration file. + Substring to be matched. - + - Endpoint address. + Action to be taken when filter matches. - + - Indicates whether to use binary message encoding. + Indicates whether to ignore case when comparing strings. - + + + + + + + + + + + + + - Client ID. + Indicates whether to ignore case when comparing strings. - + - Indicates whether to include per-event properties in the payload sent to the server. + Layout to be used to filter log messages. + + + + + Action to be taken when filter matches. + + + + + String to compare the layout to. diff --git a/src/NzbDrone.Update/NzbDrone.Update.csproj b/src/NzbDrone.Update/NzbDrone.Update.csproj index 3aa8ea3a4..a33f5fe1b 100644 --- a/src/NzbDrone.Update/NzbDrone.Update.csproj +++ b/src/NzbDrone.Update/NzbDrone.Update.csproj @@ -42,11 +42,7 @@ False - ..\packages\Newtonsoft.Json.5.0.6\lib\net40\Newtonsoft.Json.dll - - - False - ..\packages\NLog.2.0.1.2\lib\net40\NLog.dll + ..\packages\Newtonsoft.Json.5.0.8\lib\net40\Newtonsoft.Json.dll diff --git a/src/NzbDrone.Update/packages.config b/src/NzbDrone.Update/packages.config index f145903f2..b6253468b 100644 --- a/src/NzbDrone.Update/packages.config +++ b/src/NzbDrone.Update/packages.config @@ -1,7 +1,5 @@  - - - - + + \ No newline at end of file diff --git a/src/NzbDrone/NzbDrone.csproj b/src/NzbDrone/NzbDrone.csproj index 155fc5ccc..c6679ab6b 100644 --- a/src/NzbDrone/NzbDrone.csproj +++ b/src/NzbDrone/NzbDrone.csproj @@ -81,11 +81,11 @@ False - ..\packages\Newtonsoft.Json.5.0.6\lib\net40\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.5.0.8\lib\net40\Newtonsoft.Json.dll - + False - ..\packages\NLog.2.0.1.2\lib\net40\NLog.dll + ..\packages\NLog.2.1.0\lib\net40\NLog.dll False diff --git a/src/NzbDrone/packages.config b/src/NzbDrone/packages.config index 268430b6b..4c6a0521b 100644 --- a/src/NzbDrone/packages.config +++ b/src/NzbDrone/packages.config @@ -4,7 +4,7 @@ - - + + \ No newline at end of file From 28c6a69e0fce44dcbd122c45453b26a683481874 Mon Sep 17 00:00:00 2001 From: kayone Date: Mon, 11 Nov 2013 00:20:08 -0800 Subject: [PATCH 22/63] fixed broken build. --- src/NzbDrone.Host/NzbDrone.Host.csproj | 4 ++++ src/NzbDrone.Host/packages.config | 1 + src/NzbDrone.Update/NzbDrone.Update.csproj | 4 ++++ src/NzbDrone.Update/packages.config | 1 + 4 files changed, 10 insertions(+) diff --git a/src/NzbDrone.Host/NzbDrone.Host.csproj b/src/NzbDrone.Host/NzbDrone.Host.csproj index db0cb8e07..3e820dea4 100644 --- a/src/NzbDrone.Host/NzbDrone.Host.csproj +++ b/src/NzbDrone.Host/NzbDrone.Host.csproj @@ -101,6 +101,10 @@ False ..\packages\Newtonsoft.Json.5.0.8\lib\net40\Newtonsoft.Json.dll + + False + ..\packages\NLog.2.1.0\lib\net40\NLog.dll + False ..\packages\Owin.1.0\lib\net40\Owin.dll diff --git a/src/NzbDrone.Host/packages.config b/src/NzbDrone.Host/packages.config index 41e52db65..71de08228 100644 --- a/src/NzbDrone.Host/packages.config +++ b/src/NzbDrone.Host/packages.config @@ -8,6 +8,7 @@ + \ No newline at end of file diff --git a/src/NzbDrone.Update/NzbDrone.Update.csproj b/src/NzbDrone.Update/NzbDrone.Update.csproj index a33f5fe1b..d09ab8021 100644 --- a/src/NzbDrone.Update/NzbDrone.Update.csproj +++ b/src/NzbDrone.Update/NzbDrone.Update.csproj @@ -44,6 +44,10 @@ False ..\packages\Newtonsoft.Json.5.0.8\lib\net40\Newtonsoft.Json.dll + + False + ..\packages\NLog.2.1.0\lib\net40\NLog.dll + diff --git a/src/NzbDrone.Update/packages.config b/src/NzbDrone.Update/packages.config index b6253468b..7dd376ea4 100644 --- a/src/NzbDrone.Update/packages.config +++ b/src/NzbDrone.Update/packages.config @@ -1,5 +1,6 @@  + \ No newline at end of file From e67a805925931158a0f4db948b74ca48e0bf196c Mon Sep 17 00:00:00 2001 From: kayone Date: Mon, 11 Nov 2013 00:30:58 -0800 Subject: [PATCH 23/63] Fixed error pipeline. --- .../ErrorManagement/NzbDroneErrorPipeline.cs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/NzbDrone.Api/ErrorManagement/NzbDroneErrorPipeline.cs b/src/NzbDrone.Api/ErrorManagement/NzbDroneErrorPipeline.cs index 04e9263e2..236bcc8df 100644 --- a/src/NzbDrone.Api/ErrorManagement/NzbDroneErrorPipeline.cs +++ b/src/NzbDrone.Api/ErrorManagement/NzbDroneErrorPipeline.cs @@ -17,11 +17,10 @@ namespace NzbDrone.Api.ErrorManagement _logger = logger; } - public Response HandleException(NancyContext context, Exception aggregateException) + public Response HandleException(NancyContext context, Exception exception) { - var innerException = (aggregateException.InnerException).InnerException; - var apiException = innerException as ApiException; + var apiException = exception as ApiException; if (apiException != null) { @@ -29,7 +28,7 @@ namespace NzbDrone.Api.ErrorManagement return apiException.ToErrorResponse(); } - var validationException = innerException as ValidationException; + var validationException = exception as ValidationException; if (validationException != null) { @@ -38,23 +37,23 @@ namespace NzbDrone.Api.ErrorManagement return validationException.Errors.AsResponse(HttpStatusCode.BadRequest); } - var clientException = innerException as NzbDroneClientException; + var clientException = exception as NzbDroneClientException; if (clientException != null) { return new ErrorModel { - Message = innerException.Message, - Description = innerException.ToString() + Message = exception.Message, + Description = exception.ToString() }.AsResponse((HttpStatusCode)clientException.StatusCode); } - _logger.FatalException("Request Failed", innerException); + _logger.FatalException("Request Failed", exception); return new ErrorModel { - Message = innerException.Message, - Description = innerException.ToString() + Message = exception.Message, + Description = exception.ToString() }.AsResponse(HttpStatusCode.InternalServerError); } } From 4eecf3d1abe54a1d8766ac9e1d28a2b01f431c2a Mon Sep 17 00:00:00 2001 From: kayone Date: Mon, 11 Nov 2013 00:34:27 -0800 Subject: [PATCH 24/63] updated FluentValidation --- src/NzbDrone.Api/NzbDrone.Api.csproj | 4 ++-- src/NzbDrone.Api/packages.config | 2 +- src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj | 5 +++-- src/NzbDrone.Core.Test/packages.config | 2 +- src/NzbDrone.Core/NzbDrone.Core.csproj | 4 ++-- src/NzbDrone.Core/packages.config | 2 +- .../NzbDrone.Integration.Test.csproj | 9 +++++---- src/NzbDrone.Integration.Test/packages.config | 4 ++-- 8 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/NzbDrone.Api/NzbDrone.Api.csproj b/src/NzbDrone.Api/NzbDrone.Api.csproj index 307ade4b0..f5bf73cf7 100644 --- a/src/NzbDrone.Api/NzbDrone.Api.csproj +++ b/src/NzbDrone.Api/NzbDrone.Api.csproj @@ -38,9 +38,9 @@ - + False - ..\packages\FluentValidation.4.0.0.1\lib\Net40\FluentValidation.dll + ..\packages\FluentValidation.5.0.0.1\lib\Net40\FluentValidation.dll False diff --git a/src/NzbDrone.Api/packages.config b/src/NzbDrone.Api/packages.config index 2fc701d06..66d291dc8 100644 --- a/src/NzbDrone.Api/packages.config +++ b/src/NzbDrone.Api/packages.config @@ -1,6 +1,6 @@  - + diff --git a/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj b/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj index 6b50fda46..916fc8811 100644 --- a/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj +++ b/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj @@ -55,8 +55,9 @@ False ..\packages\FluentMigrator.1.1.1.0\tools\FluentMigrator.Runner.dll - - ..\packages\FluentValidation.4.0.0.1\lib\Net40\FluentValidation.dll + + False + ..\packages\FluentValidation.5.0.0.1\lib\Net40\FluentValidation.dll diff --git a/src/NzbDrone.Core.Test/packages.config b/src/NzbDrone.Core.Test/packages.config index 234ffd26d..88c7a8242 100644 --- a/src/NzbDrone.Core.Test/packages.config +++ b/src/NzbDrone.Core.Test/packages.config @@ -4,7 +4,7 @@ - + diff --git a/src/NzbDrone.Core/NzbDrone.Core.csproj b/src/NzbDrone.Core/NzbDrone.Core.csproj index a2002f474..ad79bd8e7 100644 --- a/src/NzbDrone.Core/NzbDrone.Core.csproj +++ b/src/NzbDrone.Core/NzbDrone.Core.csproj @@ -67,9 +67,9 @@ False ..\packages\FluentMigrator.1.1.1.0\tools\FluentMigrator.Runner.dll - + False - ..\packages\FluentValidation.4.0.0.1\lib\Net40\FluentValidation.dll + ..\packages\FluentValidation.5.0.0.1\lib\Net40\FluentValidation.dll ..\packages\Growl.0.6\lib\Growl.Connector.dll diff --git a/src/NzbDrone.Core/packages.config b/src/NzbDrone.Core/packages.config index 1c01c0a9f..36fbe4d0a 100644 --- a/src/NzbDrone.Core/packages.config +++ b/src/NzbDrone.Core/packages.config @@ -1,7 +1,7 @@  - + diff --git a/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj b/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj index 36e05e556..babcf6866 100644 --- a/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj +++ b/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj @@ -37,12 +37,13 @@ False ..\packages\FluentAssertions.2.1.0.0\lib\net40\FluentAssertions.dll - + False - ..\packages\FluentValidation.4.0.0.1\lib\Net40\FluentValidation.dll + ..\packages\FluentValidation.5.0.0.1\lib\Net40\FluentValidation.dll - - ..\packages\Microsoft.AspNet.SignalR.Client.1.1.3\lib\net40\Microsoft.AspNet.SignalR.Client.dll + + False + ..\packages\Microsoft.AspNet.SignalR.Client.2.0.0\lib\net40\Microsoft.AspNet.SignalR.Client.dll False diff --git a/src/NzbDrone.Integration.Test/packages.config b/src/NzbDrone.Integration.Test/packages.config index 990270545..cb7bb6120 100644 --- a/src/NzbDrone.Integration.Test/packages.config +++ b/src/NzbDrone.Integration.Test/packages.config @@ -1,8 +1,8 @@  - - + + From 0747e53d4fcfa299774fc1d06280cbf8844c5499 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 11 Nov 2013 14:31:33 -0800 Subject: [PATCH 25/63] Fixed logs table, added spinner to logs refresh --- src/UI/Shared/Toolbar/Button/ButtonView.js | 6 +++++- src/UI/System/Logs/Files/LogFileLayout.js | 6 ++++-- src/UI/System/Logs/Table/LogsTableLayout.js | 10 ++++++---- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/UI/Shared/Toolbar/Button/ButtonView.js b/src/UI/Shared/Toolbar/Button/ButtonView.js index a35d1a048..45300e988 100644 --- a/src/UI/Shared/Toolbar/Button/ButtonView.js +++ b/src/UI/Shared/Toolbar/Button/ButtonView.js @@ -11,6 +11,10 @@ define( template : 'Shared/Toolbar/ButtonTemplate', className: 'btn', + ui: { + icon: 'i' + }, + events: { 'click': 'onClick' }, @@ -73,7 +77,7 @@ define( var callback = this.model.get('callback'); if (callback) { - callback.call(this.model.ownerContext); + callback.call(this.model.ownerContext, this); } } }); diff --git a/src/UI/System/Logs/Files/LogFileLayout.js b/src/UI/System/Logs/Files/LogFileLayout.js index f8de17828..ad96e297b 100644 --- a/src/UI/System/Logs/Files/LogFileLayout.js +++ b/src/UI/System/Logs/Files/LogFileLayout.js @@ -12,7 +12,8 @@ define( 'System/Logs/Files/ContentsView', 'System/Logs/Files/ContentsModel', 'Shared/Toolbar/ToolbarLayout', - 'Shared/LoadingView' + 'Shared/LoadingView', + 'jQuery/jquery.spin' ], function (vent, Marionette, Backgrid, @@ -141,7 +142,8 @@ define( _refreshLogs: function () { this.contents.close(); - this.collection.fetch(); + var promise = this.collection.fetch(); + buttonContext.ui.icon.spinForPromise(promise); }, _commandComplete: function (options) { diff --git a/src/UI/System/Logs/Table/LogsTableLayout.js b/src/UI/System/Logs/Table/LogsTableLayout.js index e364baa3c..82960ba79 100644 --- a/src/UI/System/Logs/Table/LogsTableLayout.js +++ b/src/UI/System/Logs/Table/LogsTableLayout.js @@ -10,7 +10,8 @@ define( 'Shared/Grid/Pager', 'System/Logs/LogsCollection', 'Shared/Toolbar/ToolbarLayout', - 'Shared/LoadingView' + 'Shared/LoadingView', + 'jQuery/jquery.spin' ], function (vent, Marionette, Backgrid, LogTimeCell, LogLevelCell, LogRow, GridPager, LogCollection, ToolbarLayout, LoadingView) { return Marionette.Layout.extend({ template: 'System/Logs/Table/LogsTableLayoutTemplate', @@ -65,6 +66,7 @@ define( onRender: function () { this.grid.show(new LoadingView()); + this.collection.fetch(); }, onShow: function () { @@ -115,10 +117,10 @@ define( })); }, - _refreshLogs: function () { + _refreshLogs: function (buttonContext) { this.collection.state.currentPage = 1; - this.collection.fetch({ reset: true }); - this._showTable(); + var promise = this.collection.fetch({ reset: true }); + buttonContext.ui.icon.spinForPromise(promise); }, _commandComplete: function (options) { From 4defc040269aef64f744d62fdb47baddab3f8a3b Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 11 Nov 2013 14:49:50 -0800 Subject: [PATCH 26/63] Fixed log files refresh --- src/UI/System/Logs/Files/LogFileLayout.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UI/System/Logs/Files/LogFileLayout.js b/src/UI/System/Logs/Files/LogFileLayout.js index ad96e297b..a324f8cfa 100644 --- a/src/UI/System/Logs/Files/LogFileLayout.js +++ b/src/UI/System/Logs/Files/LogFileLayout.js @@ -140,7 +140,7 @@ define( this.contents.show(new ContentsView({ model: model })); }, - _refreshLogs: function () { + _refreshLogs: function (buttonContext) { this.contents.close(); var promise = this.collection.fetch(); buttonContext.ui.icon.spinForPromise(promise); From 034f8e8dfd0a824da7b48e664deb9c6b3d7175e2 Mon Sep 17 00:00:00 2001 From: kayone Date: Mon, 11 Nov 2013 19:25:54 -0800 Subject: [PATCH 27/63] added simple automation test. --- Gruntfile.js | 14 ++- .../AutomationTest.cs | 78 ++++++++++++++++ .../AutomationTestAttribute.cs | 13 +++ .../NzbDrone.Automation.Test.csproj | 88 +++++++++++++++++++ .../Properties/AssemblyInfo.cs | 36 ++++++++ src/NzbDrone.Automation.Test/packages.config | 8 ++ .../IntegrationTest.cs | 1 + .../NzbDrone.Integration.Test.csproj | 1 - .../NzbDrone.Test.Common.csproj | 5 ++ .../NzbDroneRunner.cs | 4 +- src/NzbDrone.Test.Common/packages.config | 1 + src/NzbDrone.sln | 17 +++- src/UI/Instrumentation/ErrorHandler.js | 17 ++-- src/UI/index.html | 3 +- 14 files changed, 272 insertions(+), 14 deletions(-) create mode 100644 src/NzbDrone.Automation.Test/AutomationTest.cs create mode 100644 src/NzbDrone.Automation.Test/AutomationTestAttribute.cs create mode 100644 src/NzbDrone.Automation.Test/NzbDrone.Automation.Test.csproj create mode 100644 src/NzbDrone.Automation.Test/Properties/AssemblyInfo.cs create mode 100644 src/NzbDrone.Automation.Test/packages.config rename src/{NzbDrone.Integration.Test => NzbDrone.Test.Common}/NzbDroneRunner.cs (97%) diff --git a/Gruntfile.js b/Gruntfile.js index c8aa52b10..e7ce977e4 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -186,11 +186,19 @@ module.exports = function (grunt) { files: '<%= handlebars.files.src %>', tasks: ['handlebars'] }, - copyContent : { - files: '<%= copy.content.cwd %><%= copy.content.src %>', + content : { + files: [ + '**/index.html', + '**/*.css', + '**/*.png', + '**/*.jpg', + '**/*.ico', + '**/FontAwesome/*.*', + '**/fonts/*.*' + ], tasks: ['copy:content'] }, - copyScripts: { + scripts: { files: '<%= copy.scripts.cwd %><%= copy.scripts.src %>', tasks: ['copy:scripts'] } diff --git a/src/NzbDrone.Automation.Test/AutomationTest.cs b/src/NzbDrone.Automation.Test/AutomationTest.cs new file mode 100644 index 000000000..36f6050e1 --- /dev/null +++ b/src/NzbDrone.Automation.Test/AutomationTest.cs @@ -0,0 +1,78 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using FluentAssertions; +using NLog; +using NLog.Config; +using NLog.Targets; +using NUnit.Framework; +using NzbDrone.Common.EnvironmentInfo; +using NzbDrone.Test.Common; +using OpenQA.Selenium; +using OpenQA.Selenium.Firefox; +using OpenQA.Selenium.Support.UI; + +namespace NzbDrone.Automation.Test +{ + [TestFixture] + [AutomationTest] + public abstract class AutomationTest + { + private NzbDroneRunner _runner; + protected FirefoxDriver driver; + + public AutomationTest() + { + new StartupArguments(); + + LogManager.Configuration = new LoggingConfiguration(); + var consoleTarget = new ConsoleTarget { Layout = "${level}: ${message} ${exception}" }; + LogManager.Configuration.AddTarget(consoleTarget.GetType().Name, consoleTarget); + LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", LogLevel.Trace, consoleTarget)); + } + + [SetUp] + public void SmokeTestSetup() + { + driver = new FirefoxDriver(); + + _runner = new NzbDroneRunner(); + _runner.KillAll(); + _runner.Start(); + + + driver.Url = "http://localhost:8989"; + + var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); + + wait.Until(d => d.FindElement(By.Id("x-toolbar"))); + + GetPageErrors().Should().BeEmpty(); + + } + + protected IEnumerable GetPageErrors() + { + return driver.FindElements(By.CssSelector("#errors div")) + .Select(e => e.Text); + } + + [TearDown] + public void SmokeTestTearDown() + { + _runner.KillAll(); + //driver.Quit(); + } + } + + [TestFixture] + public class MyAutoTest : AutomationTest + { + [Test] + public void Test1() + { + + } + } + +} diff --git a/src/NzbDrone.Automation.Test/AutomationTestAttribute.cs b/src/NzbDrone.Automation.Test/AutomationTestAttribute.cs new file mode 100644 index 000000000..d1cf9faec --- /dev/null +++ b/src/NzbDrone.Automation.Test/AutomationTestAttribute.cs @@ -0,0 +1,13 @@ +using NUnit.Framework; + +namespace NzbDrone.Automation.Test +{ + public class AutomationTestAttribute : CategoryAttribute + { + public AutomationTestAttribute() + : base("AutomationTest") + { + + } + } +} \ No newline at end of file diff --git a/src/NzbDrone.Automation.Test/NzbDrone.Automation.Test.csproj b/src/NzbDrone.Automation.Test/NzbDrone.Automation.Test.csproj new file mode 100644 index 000000000..d32d4c6aa --- /dev/null +++ b/src/NzbDrone.Automation.Test/NzbDrone.Automation.Test.csproj @@ -0,0 +1,88 @@ + + + + + Debug + AnyCPU + {CC26800D-F67E-464B-88DE-8EB1A0C227A3} + Library + Properties + NzbDrone.Automation.Test + NzbDrone.Automation.Test + v4.0 + 512 + ..\ + true + + + true + bin\x86\Debug\ + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + + + bin\x86\Release\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + + + + False + ..\packages\FluentAssertions.2.1.0.0\lib\net40\FluentAssertions.dll + + + ..\packages\NLog.2.1.0\lib\net40\NLog.dll + + + ..\packages\NUnit.2.6.2\lib\nunit.framework.dll + + + + + + + + + + + ..\packages\Selenium.WebDriver.2.37.0\lib\net40\WebDriver.dll + + + ..\packages\Selenium.Support.2.37.0\lib\net40\WebDriver.Support.dll + + + + + + + + + + {F2BE0FDF-6E47-4827-A420-DD4EF82407F8} + NzbDrone.Common + + + {CADDFCE0-7509-4430-8364-2074E1EEFCA2} + NzbDrone.Test.Common + + + + + + + + + \ No newline at end of file diff --git a/src/NzbDrone.Automation.Test/Properties/AssemblyInfo.cs b/src/NzbDrone.Automation.Test/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..e99cbaa72 --- /dev/null +++ b/src/NzbDrone.Automation.Test/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NzbDrone.Automation.Test")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NzbDrone.Automation.Test")] +[assembly: AssemblyCopyright("Copyright © 2013")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("6b8945f5-f5b5-4729-865d-f958fbd673d9")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/NzbDrone.Automation.Test/packages.config b/src/NzbDrone.Automation.Test/packages.config new file mode 100644 index 000000000..f51e94b57 --- /dev/null +++ b/src/NzbDrone.Automation.Test/packages.config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/NzbDrone.Integration.Test/IntegrationTest.cs b/src/NzbDrone.Integration.Test/IntegrationTest.cs index f8556a58d..fc412c174 100644 --- a/src/NzbDrone.Integration.Test/IntegrationTest.cs +++ b/src/NzbDrone.Integration.Test/IntegrationTest.cs @@ -8,6 +8,7 @@ using NzbDrone.Api.History; using NzbDrone.Api.RootFolders; using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Integration.Test.Client; +using NzbDrone.Test.Common; using NzbDrone.Test.Common.Categories; using RestSharp; diff --git a/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj b/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj index babcf6866..cfbad6bf6 100644 --- a/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj +++ b/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj @@ -108,7 +108,6 @@ - diff --git a/src/NzbDrone.Test.Common/NzbDrone.Test.Common.csproj b/src/NzbDrone.Test.Common/NzbDrone.Test.Common.csproj index 277bbae61..0c35b4049 100644 --- a/src/NzbDrone.Test.Common/NzbDrone.Test.Common.csproj +++ b/src/NzbDrone.Test.Common/NzbDrone.Test.Common.csproj @@ -64,6 +64,10 @@ False ..\packages\NUnit.2.6.2\lib\nunit.framework.dll + + False + ..\packages\RestSharp.104.3.3\lib\net4\RestSharp.dll + @@ -82,6 +86,7 @@ + diff --git a/src/NzbDrone.Integration.Test/NzbDroneRunner.cs b/src/NzbDrone.Test.Common/NzbDroneRunner.cs similarity index 97% rename from src/NzbDrone.Integration.Test/NzbDroneRunner.cs rename to src/NzbDrone.Test.Common/NzbDroneRunner.cs index 318f6b01a..8622b6555 100644 --- a/src/NzbDrone.Integration.Test/NzbDroneRunner.cs +++ b/src/NzbDrone.Test.Common/NzbDroneRunner.cs @@ -1,17 +1,15 @@ using System; using System.Diagnostics; using System.IO; -using System.Linq; using System.Threading; using System.Xml.Linq; using System.Xml.XPath; using NUnit.Framework; using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Common.Processes; -using NzbDrone.Core.Configuration; using RestSharp; -namespace NzbDrone.Integration.Test +namespace NzbDrone.Test.Common { public class NzbDroneRunner { diff --git a/src/NzbDrone.Test.Common/packages.config b/src/NzbDrone.Test.Common/packages.config index 2ab611796..28a2e5f1d 100644 --- a/src/NzbDrone.Test.Common/packages.config +++ b/src/NzbDrone.Test.Common/packages.config @@ -6,5 +6,6 @@ + \ No newline at end of file diff --git a/src/NzbDrone.sln b/src/NzbDrone.sln index f118155ff..d7333e186 100644 --- a/src/NzbDrone.sln +++ b/src/NzbDrone.sln @@ -1,5 +1,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 +# Visual Studio 2013 +VisualStudioVersion = 12.0.21005.1 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{57A04B72-8088-4F75-A582-1158CF8291F7}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test.Common", "Test.Common", "{47697CDB-27B6-4B05-B4F8-0CBE6F6EDF97}" @@ -58,6 +60,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Host", "Host", "{486ADF86-D EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NzbDrone.SignalR", "NzbDrone.SignalR\NzbDrone.SignalR.csproj", "{7C2CC69F-5CA0-4E5C-85CB-983F9F6C3B36}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NzbDrone.Automation.Test", "NzbDrone.Automation.Test\NzbDrone.Automation.Test.csproj", "{CC26800D-F67E-464B-88DE-8EB1A0C227A3}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -278,6 +282,16 @@ Global {7C2CC69F-5CA0-4E5C-85CB-983F9F6C3B36}.Release|Mixed Platforms.Build.0 = Release|x86 {7C2CC69F-5CA0-4E5C-85CB-983F9F6C3B36}.Release|x86.ActiveCfg = Release|x86 {7C2CC69F-5CA0-4E5C-85CB-983F9F6C3B36}.Release|x86.Build.0 = Release|x86 + {CC26800D-F67E-464B-88DE-8EB1A0C227A3}.Debug|Any CPU.ActiveCfg = Debug|x86 + {CC26800D-F67E-464B-88DE-8EB1A0C227A3}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {CC26800D-F67E-464B-88DE-8EB1A0C227A3}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {CC26800D-F67E-464B-88DE-8EB1A0C227A3}.Debug|x86.ActiveCfg = Debug|x86 + {CC26800D-F67E-464B-88DE-8EB1A0C227A3}.Debug|x86.Build.0 = Debug|x86 + {CC26800D-F67E-464B-88DE-8EB1A0C227A3}.Release|Any CPU.ActiveCfg = Release|x86 + {CC26800D-F67E-464B-88DE-8EB1A0C227A3}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {CC26800D-F67E-464B-88DE-8EB1A0C227A3}.Release|Mixed Platforms.Build.0 = Release|x86 + {CC26800D-F67E-464B-88DE-8EB1A0C227A3}.Release|x86.ActiveCfg = Release|x86 + {CC26800D-F67E-464B-88DE-8EB1A0C227A3}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -291,6 +305,7 @@ Global {D18A5DEB-5102-4775-A1AF-B75DAAA8907B} = {57A04B72-8088-4F75-A582-1158CF8291F7} {CBF6B8B0-A015-413A-8C86-01238BB45770} = {57A04B72-8088-4F75-A582-1158CF8291F7} {8CEFECD0-A6C2-498F-98B1-3FBE5820F9AB} = {57A04B72-8088-4F75-A582-1158CF8291F7} + {CC26800D-F67E-464B-88DE-8EB1A0C227A3} = {57A04B72-8088-4F75-A582-1158CF8291F7} {FAFB5948-A222-4CF6-AD14-026BE7564802} = {47697CDB-27B6-4B05-B4F8-0CBE6F6EDF97} {CADDFCE0-7509-4430-8364-2074E1EEFCA2} = {47697CDB-27B6-4B05-B4F8-0CBE6F6EDF97} {6BCE712F-846D-4846-9D1B-A66B858DA755} = {F9E67978-5CD6-4A5F-827B-4249711C0B02} diff --git a/src/UI/Instrumentation/ErrorHandler.js b/src/UI/Instrumentation/ErrorHandler.js index 80fc27441..d55c10735 100644 --- a/src/UI/Instrumentation/ErrorHandler.js +++ b/src/UI/Instrumentation/ErrorHandler.js @@ -4,6 +4,10 @@ window.Messenger().post(message); }; + var addError = function(message){ + window.$('#errors').append('
' + message + '
'); + }; + window.onerror = function (msg, url, line) { try { @@ -28,6 +32,8 @@ window.Messenger().post(message); + addError(message.message); + } catch (error) { console.log('An error occurred while reporting error. ' + error); @@ -58,22 +64,23 @@ if (xmlHttpRequest.status === 0 && xmlHttpRequest.readyState === 0) { return false; - //message.message = 'NzbDrone Server Not Reachable. make sure NzbDrone is running.'; } - else if (xmlHttpRequest.status === 400 && ajaxOptions.isValidatedCall) { + + if (xmlHttpRequest.status === 400 && ajaxOptions.isValidatedCall) { return false; } - else if (xmlHttpRequest.status === 503) { + if (xmlHttpRequest.status === 503) { message.message = xmlHttpRequest.responseJSON.message; } - else - { + else { message.message = '[{0}] {1} : {2}'.format(ajaxOptions.type, xmlHttpRequest.statusText, ajaxOptions.url); } window.Messenger().post(message); + addError(message.message); + return false; }); diff --git a/src/UI/index.html b/src/UI/index.html index 5af3cf1a8..515edecb9 100644 --- a/src/UI/index.html +++ b/src/UI/index.html @@ -61,7 +61,8 @@
- +
+