update naming methods

This commit is contained in:
Luke Pulverenti
2014-11-16 17:46:01 -05:00
parent 5fdd7ec672
commit 049ef9b4ec
20 changed files with 83 additions and 108 deletions

View File

@@ -186,15 +186,18 @@ namespace MediaBrowser.Common.Implementations.Security
string mb2Equivalent = null,
string version = null)
{
var lastChecked = LicenseFile.LastChecked(feature);
//check the reg file first to alleviate strain on the MB admin server - must actually check in every 30 days tho
var reg = new RegRecord
{
registered = LicenseFile.LastChecked(feature) > DateTime.UtcNow.AddDays(-3)
// Cache the result for up to a week
registered = lastChecked > DateTime.UtcNow.AddDays(-7)
};
var success = reg.registered;
if (!reg.registered)
if (!(lastChecked > DateTime.UtcNow.AddDays(-1)))
{
var mac = _networkManager.GetMacAddress();
var data = new Dictionary<string, string>