aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common.Implementations
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-04-09 22:32:27 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-04-09 22:32:27 -0400
commit6ea48d1e7c32f159c2e8c92f73f84b09bb78ec3f (patch)
treefd907ec9c752b7c760ab764f74a15b35f6ff660d /MediaBrowser.Common.Implementations
parentbe4f301198fa0d1d455478eebfc960a6e61c33e9 (diff)
parent638dba51ec75f9180c44ec4e75b67f7cea774910 (diff)
Merge branch 'beta'
Diffstat (limited to 'MediaBrowser.Common.Implementations')
-rw-r--r--MediaBrowser.Common.Implementations/Archiving/ZipClient.cs2
-rw-r--r--MediaBrowser.Common.Implementations/BaseApplicationHost.cs5
-rw-r--r--MediaBrowser.Common.Implementations/Configuration/ConfigurationHelper.cs1
-rw-r--r--MediaBrowser.Common.Implementations/Devices/DeviceId.cs1
-rw-r--r--MediaBrowser.Common.Implementations/ScheduledTasks/TaskManager.cs1
-rw-r--r--MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs1
-rw-r--r--MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs4
-rw-r--r--MediaBrowser.Common.Implementations/Security/MBLicenseFile.cs4
-rw-r--r--MediaBrowser.Common.Implementations/Security/MbAdmin.cs4
-rw-r--r--MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs6
-rw-r--r--MediaBrowser.Common.Implementations/Serialization/JsonSerializer.cs3
-rw-r--r--MediaBrowser.Common.Implementations/Serialization/XmlSerializer.cs1
-rw-r--r--MediaBrowser.Common.Implementations/Updates/GithubUpdater.cs2
-rw-r--r--MediaBrowser.Common.Implementations/Updates/InstallationManager.cs5
14 files changed, 13 insertions, 27 deletions
diff --git a/MediaBrowser.Common.Implementations/Archiving/ZipClient.cs b/MediaBrowser.Common.Implementations/Archiving/ZipClient.cs
index 0009c7193..1272e43b9 100644
--- a/MediaBrowser.Common.Implementations/Archiving/ZipClient.cs
+++ b/MediaBrowser.Common.Implementations/Archiving/ZipClient.cs
@@ -5,10 +5,8 @@ using SharpCompress.Archive.Tar;
using SharpCompress.Common;
using SharpCompress.Reader;
using SharpCompress.Reader.Zip;
-using System;
using System.IO;
using CommonIO;
-using MediaBrowser.Common.IO;
namespace MediaBrowser.Common.Implementations.Archiving
{
diff --git a/MediaBrowser.Common.Implementations/BaseApplicationHost.cs b/MediaBrowser.Common.Implementations/BaseApplicationHost.cs
index caf8f54a6..f44c975d4 100644
--- a/MediaBrowser.Common.Implementations/BaseApplicationHost.cs
+++ b/MediaBrowser.Common.Implementations/BaseApplicationHost.cs
@@ -7,7 +7,6 @@ using MediaBrowser.Common.Implementations.ScheduledTasks;
using MediaBrowser.Common.Implementations.Security;
using MediaBrowser.Common.Implementations.Serialization;
using MediaBrowser.Common.Implementations.Updates;
-using MediaBrowser.Common.IO;
using MediaBrowser.Common.Net;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Common.Progress;
@@ -251,7 +250,7 @@ namespace MediaBrowser.Common.Implementations
progress.Report(15);
var innerProgress = new ActionableProgress<double>();
- innerProgress.RegisterAction(p => progress.Report((.8 * p) + 15));
+ innerProgress.RegisterAction(p => progress.Report(.8 * p + 15));
await RegisterResources(innerProgress).ConfigureAwait(false);
@@ -661,7 +660,7 @@ namespace MediaBrowser.Common.Implementations
{
try
{
- return Assembly.Load(File.ReadAllBytes((file)));
+ return Assembly.Load(File.ReadAllBytes(file));
}
catch (Exception ex)
{
diff --git a/MediaBrowser.Common.Implementations/Configuration/ConfigurationHelper.cs b/MediaBrowser.Common.Implementations/Configuration/ConfigurationHelper.cs
index 276da58d4..419b85fa7 100644
--- a/MediaBrowser.Common.Implementations/Configuration/ConfigurationHelper.cs
+++ b/MediaBrowser.Common.Implementations/Configuration/ConfigurationHelper.cs
@@ -2,7 +2,6 @@
using System;
using System.IO;
using System.Linq;
-using MediaBrowser.Common.IO;
namespace MediaBrowser.Common.Implementations.Configuration
{
diff --git a/MediaBrowser.Common.Implementations/Devices/DeviceId.cs b/MediaBrowser.Common.Implementations/Devices/DeviceId.cs
index 4cad3cd31..f1581704b 100644
--- a/MediaBrowser.Common.Implementations/Devices/DeviceId.cs
+++ b/MediaBrowser.Common.Implementations/Devices/DeviceId.cs
@@ -4,7 +4,6 @@ using System;
using System.IO;
using System.Text;
using CommonIO;
-using MediaBrowser.Common.IO;
namespace MediaBrowser.Common.Implementations.Devices
{
diff --git a/MediaBrowser.Common.Implementations/ScheduledTasks/TaskManager.cs b/MediaBrowser.Common.Implementations/ScheduledTasks/TaskManager.cs
index f3316646b..3aab59ee1 100644
--- a/MediaBrowser.Common.Implementations/ScheduledTasks/TaskManager.cs
+++ b/MediaBrowser.Common.Implementations/ScheduledTasks/TaskManager.cs
@@ -11,7 +11,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using CommonIO;
-using MediaBrowser.Common.IO;
using Microsoft.Win32;
namespace MediaBrowser.Common.Implementations.ScheduledTasks
diff --git a/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs b/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs
index c7423a775..b4cc5d753 100644
--- a/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs
+++ b/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs
@@ -1,5 +1,4 @@
using MediaBrowser.Common.Configuration;
-using MediaBrowser.Common.IO;
using MediaBrowser.Common.ScheduledTasks;
using MediaBrowser.Model.Logging;
using System;
diff --git a/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs b/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs
index 8507d3184..b18ea03b1 100644
--- a/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs
+++ b/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs
@@ -1,9 +1,7 @@
using MediaBrowser.Common.Configuration;
-using MediaBrowser.Common.IO;
using MediaBrowser.Common.ScheduledTasks;
using System;
using System.Collections.Generic;
-using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
@@ -57,7 +55,7 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks
public Task Execute(CancellationToken cancellationToken, IProgress<double> progress)
{
// Delete log files more than n days old
- var minDateModified = DateTime.UtcNow.AddDays(-(ConfigurationManager.CommonConfiguration.LogFileRetentionDays));
+ var minDateModified = DateTime.UtcNow.AddDays(-ConfigurationManager.CommonConfiguration.LogFileRetentionDays);
var filesToDelete = _fileSystem.GetFiles(ConfigurationManager.CommonApplicationPaths.LogDirectoryPath, true)
.Where(f => _fileSystem.GetLastWriteTimeUtc(f) < minDateModified)
diff --git a/MediaBrowser.Common.Implementations/Security/MBLicenseFile.cs b/MediaBrowser.Common.Implementations/Security/MBLicenseFile.cs
index 79e558794..78515cd14 100644
--- a/MediaBrowser.Common.Implementations/Security/MBLicenseFile.cs
+++ b/MediaBrowser.Common.Implementations/Security/MBLicenseFile.cs
@@ -103,11 +103,11 @@ namespace MediaBrowser.Common.Implementations.Security
}
catch (DirectoryNotFoundException)
{
- (File.Create(licenseFile)).Close();
+ File.Create(licenseFile).Close();
}
catch (FileNotFoundException)
{
- (File.Create(licenseFile)).Close();
+ File.Create(licenseFile).Close();
}
}
if (contents != null && contents.Length > 0)
diff --git a/MediaBrowser.Common.Implementations/Security/MbAdmin.cs b/MediaBrowser.Common.Implementations/Security/MbAdmin.cs
index ab4a83257..76ff92c2e 100644
--- a/MediaBrowser.Common.Implementations/Security/MbAdmin.cs
+++ b/MediaBrowser.Common.Implementations/Security/MbAdmin.cs
@@ -3,11 +3,11 @@ namespace MediaBrowser.Common.Implementations.Security
{
public class MbAdmin
{
- public const string HttpUrl = "http://www.mb3admin.com/admin/";
+ public const string HttpUrl = "https://www.mb3admin.com/admin/";
/// <summary>
/// Leaving as http for now until we get it squared away
/// </summary>
- public const string HttpsUrl = "http://www.mb3admin.com/admin/";
+ public const string HttpsUrl = "https://www.mb3admin.com/admin/";
}
}
diff --git a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
index a6dbf77e9..4e01041bc 100644
--- a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
+++ b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
@@ -21,7 +21,7 @@ namespace MediaBrowser.Common.Implementations.Security
public class PluginSecurityManager : ISecurityManager
{
private const string MBValidateUrl = MbAdmin.HttpsUrl + "service/registration/validate";
- private const string AppstoreRegUrl = /*MbAdmin.HttpsUrl*/ "http://mb3admin.com/admin/service/appstore/register";
+ private const string AppstoreRegUrl = /*MbAdmin.HttpsUrl*/ "https://mb3admin.com/admin/service/appstore/register";
/// <summary>
/// The _is MB supporter
@@ -299,7 +299,7 @@ namespace MediaBrowser.Common.Implementations.Security
};
record.TrialVersion = IsInTrial(reg.expDate, record.RegChecked, record.IsRegistered);
- record.IsValid = !record.RegChecked || (record.IsRegistered || record.TrialVersion);
+ record.IsValid = !record.RegChecked || record.IsRegistered || record.TrialVersion;
return record;
}
@@ -314,7 +314,7 @@ namespace MediaBrowser.Common.Implementations.Security
var isInTrial = expirationDate > DateTime.UtcNow;
- return (isInTrial && !isRegistered);
+ return isInTrial && !isRegistered;
}
/// <summary>
diff --git a/MediaBrowser.Common.Implementations/Serialization/JsonSerializer.cs b/MediaBrowser.Common.Implementations/Serialization/JsonSerializer.cs
index 269294b36..6610cd3ff 100644
--- a/MediaBrowser.Common.Implementations/Serialization/JsonSerializer.cs
+++ b/MediaBrowser.Common.Implementations/Serialization/JsonSerializer.cs
@@ -1,5 +1,4 @@
-using MediaBrowser.Common.IO;
-using MediaBrowser.Model.Serialization;
+using MediaBrowser.Model.Serialization;
using System;
using System.IO;
using CommonIO;
diff --git a/MediaBrowser.Common.Implementations/Serialization/XmlSerializer.cs b/MediaBrowser.Common.Implementations/Serialization/XmlSerializer.cs
index 449c23b2d..189fb7afc 100644
--- a/MediaBrowser.Common.Implementations/Serialization/XmlSerializer.cs
+++ b/MediaBrowser.Common.Implementations/Serialization/XmlSerializer.cs
@@ -4,7 +4,6 @@ using System.Collections.Concurrent;
using System.IO;
using System.Xml;
using CommonIO;
-using MediaBrowser.Common.IO;
namespace MediaBrowser.Common.Implementations.Serialization
{
diff --git a/MediaBrowser.Common.Implementations/Updates/GithubUpdater.cs b/MediaBrowser.Common.Implementations/Updates/GithubUpdater.cs
index 90a324193..2ffaedc4b 100644
--- a/MediaBrowser.Common.Implementations/Updates/GithubUpdater.cs
+++ b/MediaBrowser.Common.Implementations/Updates/GithubUpdater.cs
@@ -2,8 +2,6 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
-using System.Reflection;
-using System.Text;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Common.Net;
diff --git a/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs b/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs
index 8e0df9005..5c82ccb0e 100644
--- a/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs
+++ b/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs
@@ -1,7 +1,6 @@
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Events;
using MediaBrowser.Common.Implementations.Security;
-using MediaBrowser.Common.IO;
using MediaBrowser.Common.Net;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Common.Progress;
@@ -200,7 +199,7 @@ namespace MediaBrowser.Common.Implementations.Updates
{
var packages = _jsonSerializer.DeserializeFromStream<List<PackageInfo>>(stream).ToList();
- if ((DateTime.UtcNow - _lastPackageUpdateTime) > GetCacheLength())
+ if (DateTime.UtcNow - _lastPackageUpdateTime > GetCacheLength())
{
UpdateCachedPackages(CancellationToken.None, false);
}
@@ -233,7 +232,7 @@ namespace MediaBrowser.Common.Implementations.Updates
try
{
- if ((DateTime.UtcNow - _lastPackageUpdateTime) < GetCacheLength())
+ if (DateTime.UtcNow - _lastPackageUpdateTime < GetCacheLength())
{
return;
}