|
|
@ -78,8 +78,13 @@ namespace PlexRequests.Core
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var records = repo.GetAll();
|
|
|
|
var records = repo.GetAll();
|
|
|
|
|
|
|
|
|
|
|
|
requestedModels = records as RequestedModel[] ?? records.ToArray();
|
|
|
|
requestedModels = records as RequestedModel[] ?? records.ToArray();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (SqliteException)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// There is no requested table so they do not have an old version of the DB
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
if (!requestedModels.Any())
|
|
|
|
if (!requestedModels.Any())
|
|
|
|
{ return; }
|
|
|
|
{ return; }
|
|
|
|
|
|
|
|
|
|
|
@ -90,12 +95,7 @@ namespace PlexRequests.Core
|
|
|
|
var id = jsonRepo.AddRequest(r);
|
|
|
|
var id = jsonRepo.AddRequest(r);
|
|
|
|
result.Add(id);
|
|
|
|
result.Add(id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (SqliteException)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// There is no requested table so they do not have an old version of the DB
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (result.Any(x => x == -1))
|
|
|
|
if (result.Any(x => x == -1))
|
|
|
|
{
|
|
|
|
{
|
|
|
|