mirror of https://github.com/Radarr/Radarr
Fixed: All compiler warnings
This commit is contained in:
parent
abde842bf0
commit
d0f13e16d5
|
@ -1,6 +1,8 @@
|
|||
<Project>
|
||||
<!-- Common to all Radarr Projects -->
|
||||
<PropertyGroup>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
||||
<RuntimeIdentifiers>win-x64;osx-x64;linux-x64</RuntimeIdentifiers>
|
||||
|
|
|
@ -41,8 +41,6 @@ namespace NzbDrone.Api.Movies
|
|||
{
|
||||
if (model == null) return null;
|
||||
|
||||
AlternativeTitleResource resource = null;
|
||||
|
||||
return new AlternativeTitleResource
|
||||
{
|
||||
Id = model.Id,
|
||||
|
|
|
@ -19,8 +19,6 @@ namespace NzbDrone.Core.Test.MediaFiles.MovieImport.Aggregation.Aggregators
|
|||
private Mock<IAugmentQuality> _fileExtensionAugmenter;
|
||||
private Mock<IAugmentQuality> _nameAugmenter;
|
||||
|
||||
private IEnumerable<IAugmentQuality> _qualityAugmenters;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
|
|
|
@ -10,8 +10,9 @@ namespace NzbDrone.Core.Test.ParserTests.ParsingServiceTests.AugmentersTests
|
|||
public abstract class AugmentMovieInfoFixture<TAugmenter> : CoreTest<TAugmenter> where TAugmenter : class, IAugmentParsedMovieInfo
|
||||
{
|
||||
protected ParsedMovieInfo MovieInfo;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
public virtual void Setup()
|
||||
{
|
||||
MovieInfo = new ParsedMovieInfo
|
||||
{
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FluentAssertions;
|
||||
using FluentAssertions.Equivalency;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.History;
|
||||
using NzbDrone.Core.Indexers;
|
||||
using NzbDrone.Core.Indexers.Rarbg;
|
||||
using NzbDrone.Core.Languages;
|
||||
using NzbDrone.Core.Parser;
|
||||
using NzbDrone.Core.Parser.Augmenters;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
|
||||
|
@ -20,8 +18,9 @@ namespace NzbDrone.Core.Test.ParserTests.ParsingServiceTests.AugmentersTests
|
|||
private AugmentWithHistory _customSubject { get; set; }
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
public override void Setup()
|
||||
{
|
||||
base.Setup();
|
||||
//Add multi indexer
|
||||
GivenIndexerSettings(new RarbgSettings
|
||||
{
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.Indexers;
|
||||
using NzbDrone.Core.Indexers.Rarbg;
|
||||
using NzbDrone.Core.Indexers.TorrentRss;
|
||||
using NzbDrone.Core.Languages;
|
||||
using NzbDrone.Core.Parser;
|
||||
using NzbDrone.Core.Parser.Augmenters;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
|
||||
|
@ -18,12 +14,6 @@ namespace NzbDrone.Core.Test.ParserTests.ParsingServiceTests.AugmentersTests
|
|||
{
|
||||
private IndexerDefinition _indexerDefinition;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private ReleaseInfo ReleaseInfoWithLanguages(params Language[] languages)
|
||||
{
|
||||
_indexerDefinition = new IndexerDefinition
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace NzbDrone.Core.CustomFormats
|
|||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return (Id != null ? Id.GetHashCode() : 0);
|
||||
return Id.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ using NzbDrone.Common.Cache;
|
|||
using NzbDrone.Common.Composition;
|
||||
using NzbDrone.Core.Blacklisting;
|
||||
using NzbDrone.Core.Datastore;
|
||||
using NzbDrone.Core.Download.Pending;
|
||||
using NzbDrone.Core.History;
|
||||
using NzbDrone.Core.Lifecycle;
|
||||
using NzbDrone.Core.MediaFiles;
|
||||
|
@ -29,10 +28,7 @@ namespace NzbDrone.Core.CustomFormats
|
|||
{
|
||||
private readonly ICustomFormatRepository _formatRepository;
|
||||
private IProfileService _profileService;
|
||||
private readonly IMediaFileService _mediaFileService;
|
||||
private readonly IBlacklistService _blacklistService;
|
||||
private readonly IHistoryService _historyService;
|
||||
private readonly IPendingReleaseService _pendingReleaseService;
|
||||
|
||||
public IProfileService ProfileService
|
||||
{
|
||||
|
@ -54,17 +50,12 @@ namespace NzbDrone.Core.CustomFormats
|
|||
public static Dictionary<int, CustomFormat> AllCustomFormats;
|
||||
|
||||
public CustomFormatService(ICustomFormatRepository formatRepository, ICacheManager cacheManager,
|
||||
IContainer container, IHistoryService historyService,/*IMediaFileService mediaFileService, IBlacklistService blacklistService,
|
||||
IHistoryService historyService, IPendingReleaseService pendingReleaseService,*/
|
||||
IContainer container, IHistoryService historyService,
|
||||
Logger logger)
|
||||
{
|
||||
_formatRepository = formatRepository;
|
||||
_container = container;
|
||||
_cache = cacheManager.GetCache<Dictionary<int, CustomFormat>>(typeof(CustomFormat), "formats");
|
||||
/*_mediaFileService = mediaFileService;
|
||||
_blacklistService = blacklistService;
|
||||
_historyService = historyService;
|
||||
_pendingReleaseService = pendingReleaseService;*/
|
||||
_historyService = historyService;
|
||||
_logger = logger;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ namespace NzbDrone.Core.Download.Clients.Hadouken
|
|||
|
||||
public class HadoukenProxy : IHadoukenProxy
|
||||
{
|
||||
private static int _callId;
|
||||
private readonly IHttpClient _httpClient;
|
||||
private readonly Logger _logger;
|
||||
|
||||
|
@ -175,4 +174,4 @@ namespace NzbDrone.Core.Download.Clients.Hadouken
|
|||
return HadoukenTorrentState.Unknown;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,8 +13,6 @@ namespace NzbDrone.Core.Instrumentation
|
|||
{
|
||||
public class DatabaseTarget : TargetWithLayout, IHandle<ApplicationShutdownRequested>
|
||||
{
|
||||
private readonly SQLiteConnection _connection;
|
||||
|
||||
private readonly IConnectionStringFactory _connectionStringFactory;
|
||||
|
||||
const string INSERT_COMMAND = "INSERT INTO [Logs]([Message],[Time],[Logger],[Exception],[ExceptionType],[Level]) " +
|
||||
|
@ -120,4 +118,4 @@ namespace NzbDrone.Core.Instrumentation
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -156,13 +156,13 @@ namespace NzbDrone.Core.MediaFiles
|
|||
|
||||
_diskProvider.MoveFolder(oldFolder, movie.Path);
|
||||
|
||||
if (false)
|
||||
{
|
||||
var movieFiles = _mediaFileService.GetFilesByMovie(movie.Id);
|
||||
_logger.ProgressInfo("Renaming movie files for {0}", movie.Title);
|
||||
RenameFiles(movieFiles, movie, oldFolder);
|
||||
_logger.ProgressInfo("All movie files renamed for {0}", movie.Title);
|
||||
}
|
||||
// if (false)
|
||||
// {
|
||||
// var movieFiles = _mediaFileService.GetFilesByMovie(movie.Id);
|
||||
// _logger.ProgressInfo("Renaming movie files for {0}", movie.Title);
|
||||
// RenameFiles(movieFiles, movie, oldFolder);
|
||||
// _logger.ProgressInfo("All movie files renamed for {0}", movie.Title);
|
||||
// }
|
||||
|
||||
_movieService.UpdateMovie(movie);
|
||||
|
||||
|
|
|
@ -63,6 +63,8 @@ namespace NzbDrone.Core.MetadataSource.PreDB
|
|||
private List<PreDBResult> GetResults(string category = "", string search = "")
|
||||
{
|
||||
return new List<PreDBResult>();
|
||||
|
||||
/* PreDB is blocked
|
||||
var builder = new HttpRequestBuilder("http://predb.me").AddQueryParam("rss", "1");
|
||||
if (category.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
|
@ -110,7 +112,7 @@ namespace NzbDrone.Core.MetadataSource.PreDB
|
|||
_logger.Error(ex, "Error while searching PreDB.");
|
||||
}
|
||||
|
||||
return new List<PreDBResult>();
|
||||
return new List<PreDBResult>(); */
|
||||
}
|
||||
|
||||
private List<Movie> FindMatchesToResults(List<PreDBResult> results)
|
||||
|
|
|
@ -56,6 +56,11 @@ namespace NzbDrone.Core.Movies.AlternativeTitles
|
|||
return item.CleanTitle == this.CleanTitle;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return CleanTitle.GetHashCode();
|
||||
}
|
||||
|
||||
public override String ToString()
|
||||
{
|
||||
return Title;
|
||||
|
|
|
@ -3,8 +3,6 @@ using NzbDrone.Core.NetImport.Exceptions;
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text.RegularExpressions;
|
||||
using NLog;
|
||||
using NzbDrone.Common.Extensions;
|
||||
|
||||
namespace NzbDrone.Core.NetImport.CouchPotato
|
||||
|
@ -13,7 +11,6 @@ namespace NzbDrone.Core.NetImport.CouchPotato
|
|||
{
|
||||
private readonly CouchPotatoSettings _settings;
|
||||
private NetImportResponse _importResponse;
|
||||
private readonly Logger _logger;
|
||||
|
||||
public CouchPotatoParser(CouchPotatoSettings settings)
|
||||
{
|
||||
|
|
|
@ -21,6 +21,5 @@ namespace NzbDrone.Core.NetImport
|
|||
public LazyLoaded<Profile> Profile { get; set; }
|
||||
public string RootFolderPath { get; set; }
|
||||
public override bool Enable => Enabled;
|
||||
public HashSet<int> Tags { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace NzbDrone.Core.NetImport.RSSImport
|
|||
|
||||
public override IParseNetImportResponse GetParser()
|
||||
{
|
||||
return new RSSImportParser(Settings);
|
||||
return new RSSImportParser(Settings, _logger);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,14 +19,16 @@ namespace NzbDrone.Core.NetImport.RSSImport
|
|||
public class RSSImportParser : IParseNetImportResponse
|
||||
{
|
||||
private readonly RSSImportSettings _settings;
|
||||
private NetImportResponse _importResponse;
|
||||
private readonly Logger _logger;
|
||||
private NetImportResponse _importResponse;
|
||||
|
||||
private static readonly Regex ReplaceEntities = new Regex("&[a-z]+;", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
public RSSImportParser(RSSImportSettings settings)
|
||||
public RSSImportParser(RSSImportSettings settings,
|
||||
Logger logger)
|
||||
{
|
||||
_settings = settings;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public virtual IList<Movie> ParseResponse(NetImportResponse importResponse)
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace NzbDrone.Core.NetImport.Radarr
|
|||
public override bool Enabled => true;
|
||||
public override bool EnableAuto => false;
|
||||
|
||||
private readonly IHttpClient _httpClient;
|
||||
private readonly Logger _logger;
|
||||
private readonly ISearchForNewMovie _skyhookProxy;
|
||||
|
||||
public RadarrLists(IHttpClient httpClient, IConfigService configService, IParsingService parsingService, ISearchForNewMovie skyhookProxy,
|
||||
|
@ -24,8 +22,6 @@ namespace NzbDrone.Core.NetImport.Radarr
|
|||
: base(httpClient, configService, parsingService, logger)
|
||||
{
|
||||
_skyhookProxy = skyhookProxy;
|
||||
_logger = logger;
|
||||
_httpClient = httpClient;
|
||||
}
|
||||
|
||||
public override IEnumerable<ProviderDefinition> DefaultDefinitions
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
using Newtonsoft.Json;
|
||||
using NzbDrone.Core.NetImport.Exceptions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using NLog;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Core.MetadataSource.SkyHook.Resource;
|
||||
using NzbDrone.Core.MetadataSource;
|
||||
|
@ -17,7 +13,6 @@ namespace NzbDrone.Core.NetImport.Radarr
|
|||
private readonly RadarrSettings _settings;
|
||||
private NetImportResponse _importResponse;
|
||||
private readonly ISearchForNewMovie _skyhookProxy;
|
||||
private readonly Logger _logger;
|
||||
|
||||
public RadarrParser(RadarrSettings settings, ISearchForNewMovie skyhookProxy)
|
||||
{
|
||||
|
@ -75,4 +70,4 @@ namespace NzbDrone.Core.NetImport.Radarr
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@ namespace NzbDrone.Core.NetImport.StevenLu
|
|||
{
|
||||
private readonly StevenLuSettings _settings;
|
||||
private NetImportResponse _importResponse;
|
||||
private readonly Logger _logger;
|
||||
|
||||
public StevenLuParser(StevenLuSettings settings)
|
||||
{
|
||||
|
|
|
@ -13,16 +13,12 @@ namespace NzbDrone.Core.NetImport.TMDb
|
|||
public override bool Enabled => true;
|
||||
public override bool EnableAuto => false;
|
||||
|
||||
private readonly IHttpClient _httpClient;
|
||||
private readonly Logger _logger;
|
||||
private readonly ISearchForNewMovie _skyhookProxy;
|
||||
|
||||
public TMDbImport(IHttpClient httpClient, IConfigService configService, IParsingService parsingService, ISearchForNewMovie skyhookProxy,
|
||||
Logger logger)
|
||||
: base(httpClient, configService, parsingService, logger)
|
||||
{
|
||||
_logger = logger;
|
||||
_httpClient = httpClient;
|
||||
_skyhookProxy = skyhookProxy;
|
||||
}
|
||||
|
||||
|
@ -41,4 +37,4 @@ namespace NzbDrone.Core.NetImport.TMDb
|
|||
return new TMDbParser(Settings, _skyhookProxy);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
using Newtonsoft.Json;
|
||||
using NzbDrone.Core.NetImport.Exceptions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using NLog;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Core.MetadataSource.SkyHook.Resource;
|
||||
using NzbDrone.Core.MetadataSource;
|
||||
using TinyIoC;
|
||||
|
||||
namespace NzbDrone.Core.NetImport.TMDb
|
||||
{
|
||||
|
@ -16,7 +13,6 @@ namespace NzbDrone.Core.NetImport.TMDb
|
|||
private readonly TMDbSettings _settings;
|
||||
private NetImportResponse _importResponse;
|
||||
private readonly ISearchForNewMovie _skyhookProxy;
|
||||
private readonly Logger _logger;
|
||||
|
||||
public TMDbParser(TMDbSettings settings, ISearchForNewMovie skyhookProxy)
|
||||
{
|
||||
|
@ -96,4 +92,4 @@ namespace NzbDrone.Core.NetImport.TMDb
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,14 +11,9 @@ namespace NzbDrone.Core.NetImport.Trakt
|
|||
public override bool Enabled => true;
|
||||
public override bool EnableAuto => false;
|
||||
|
||||
private readonly IHttpClient _httpClient;
|
||||
public IConfigService _configService;
|
||||
|
||||
public TraktImport(IHttpClient httpClient, IConfigService configService, IParsingService parsingService, Logger logger)
|
||||
: base(httpClient, configService, parsingService, logger)
|
||||
{
|
||||
_configService = configService;
|
||||
_httpClient = httpClient;
|
||||
}
|
||||
|
||||
public override INetImportRequestGenerator GetRequestGenerator()
|
||||
|
|
|
@ -11,7 +11,6 @@ namespace NzbDrone.Core.NetImport.Trakt
|
|||
{
|
||||
private readonly TraktSettings _settings;
|
||||
private NetImportResponse _importResponse;
|
||||
private readonly Logger _logger;
|
||||
|
||||
public TraktParser(TraktSettings settings)
|
||||
{
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace Radarr.Host
|
|||
private readonly IBrowserService _browserService;
|
||||
private readonly IContainer _container;
|
||||
private readonly Logger _logger;
|
||||
private CancelHandler _cancelHandler;
|
||||
// private CancelHandler _cancelHandler;
|
||||
|
||||
public NzbDroneConsoleFactory(IConfigFileProvider configFileProvider,
|
||||
IHostController hostController,
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace NzbDrone.Integration.Test.Client
|
|||
public SimpleCommandResource PostAndWait<T>(T command) where T : Command, new()
|
||||
{
|
||||
var request = BuildRequest();
|
||||
request.AddBody(command);
|
||||
request.AddJsonBody(command);
|
||||
var result = Post<SimpleCommandResource>(request);
|
||||
result.Id.Should().NotBe(0);
|
||||
|
||||
|
|
|
@ -215,7 +215,7 @@ namespace NzbDrone.Integration.Test
|
|||
connected = true;
|
||||
break;
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
if (retryCount > 25)
|
||||
{
|
||||
|
|
|
@ -29,13 +29,15 @@ namespace Radarr.Api.V2.MovieFiles
|
|||
private readonly Logger _logger;
|
||||
|
||||
public MovieFileModule(IBroadcastSignalRMessage signalRBroadcaster,
|
||||
IMediaFileService mediaFileService,
|
||||
IMovieService movieService,
|
||||
IUpgradableSpecification qualityUpgradableSpecification,
|
||||
Logger logger)
|
||||
IMediaFileService mediaFileService,
|
||||
IRecycleBinProvider recycleBinProvider,
|
||||
IMovieService movieService,
|
||||
IUpgradableSpecification qualityUpgradableSpecification,
|
||||
Logger logger)
|
||||
: base(signalRBroadcaster)
|
||||
{
|
||||
_mediaFileService = mediaFileService;
|
||||
_recycleBinProvider = recycleBinProvider;
|
||||
_movieService = movieService;
|
||||
_qualityUpgradableSpecification = qualityUpgradableSpecification;
|
||||
_logger = logger;
|
||||
|
|
|
@ -36,8 +36,6 @@ namespace Radarr.Api.V2.Movies
|
|||
{
|
||||
if (model == null) return null;
|
||||
|
||||
AlternativeTitleResource resource = null;
|
||||
|
||||
return new AlternativeTitleResource
|
||||
{
|
||||
Id = model.Id,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
using System.IO;
|
||||
using NLog;
|
||||
using NzbDrone.Common.Disk;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
using NzbDrone.Core.Backup;
|
||||
|
||||
namespace Radarr.Http.Frontend.Mappers
|
||||
|
@ -9,7 +8,6 @@ namespace Radarr.Http.Frontend.Mappers
|
|||
public class BackupFileMapper : StaticResourceMapperBase
|
||||
{
|
||||
private readonly IBackupService _backupService;
|
||||
private readonly IAppFolderInfo _appFolderInfo;
|
||||
|
||||
public BackupFileMapper(IBackupService backupService, IDiskProvider diskProvider, Logger logger)
|
||||
: base(diskProvider, logger)
|
||||
|
|
Loading…
Reference in New Issue