- Added a visual indication on the UI to tell the admin there is a update available.

- We are now also recording the last scheduled run in the database
This commit is contained in:
tidusjar 2016-04-29 14:08:30 +01:00
commit df3dc4ac04
28 changed files with 392 additions and 45 deletions

View file

@ -28,6 +28,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using Mono.Data.Sqlite;
using NLog;
@ -72,18 +73,19 @@ namespace PlexRequests.Core
private int CheckSchema()
{
var checker = new StatusChecker();
var status = checker.GetStatus();
var productVersion = AssemblyHelper.GetProductVersion();
var trimStatus = new Regex("[^0-9]", RegexOptions.Compiled).Replace(productVersion, string.Empty).PadRight(4, '0');
var version = int.Parse(trimStatus);
var connection = Db.DbConnection();
var schema = connection.GetSchemaVersion();
if (schema == null)
{
connection.CreateSchema(status.DBVersion); // Set the default.
connection.CreateSchema(version); // Set the default.
schema = connection.GetSchemaVersion();
}
var version = schema.SchemaVersion;
version = schema.SchemaVersion;
return version;
}