mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-08 14:10:50 -07:00
another test for #37
This commit is contained in:
parent
1d814cd76e
commit
cd682cdff9
2 changed files with 12 additions and 12 deletions
|
@ -78,24 +78,24 @@ 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();
|
||||||
if (!requestedModels.Any())
|
|
||||||
{ return; }
|
|
||||||
|
|
||||||
var jsonRepo = new JsonRequestService(new RequestJsonRepository(Db, new MemoryCacheProvider()));
|
|
||||||
|
|
||||||
foreach (var r in requestedModels)
|
|
||||||
{
|
|
||||||
var id = jsonRepo.AddRequest(r);
|
|
||||||
result.Add(id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (SqliteException)
|
catch (SqliteException)
|
||||||
{
|
{
|
||||||
// There is no requested table so they do not have an old version of the DB
|
// There is no requested table so they do not have an old version of the DB
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!requestedModels.Any())
|
||||||
|
{ return; }
|
||||||
|
|
||||||
|
var jsonRepo = new JsonRequestService(new RequestJsonRepository(Db, new MemoryCacheProvider()));
|
||||||
|
|
||||||
|
foreach (var r in requestedModels)
|
||||||
|
{
|
||||||
|
var id = jsonRepo.AddRequest(r);
|
||||||
|
result.Add(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (result.Any(x => x == -1))
|
if (result.Any(x => x == -1))
|
||||||
{
|
{
|
||||||
|
|
|
@ -75,7 +75,7 @@ namespace PlexRequests.UI
|
||||||
{
|
{
|
||||||
ServerFactory = "Microsoft.Owin.Host.HttpListener"
|
ServerFactory = "Microsoft.Owin.Host.HttpListener"
|
||||||
};
|
};
|
||||||
options.Urls.Add($"http://+:{port}");
|
options.Urls.Add($"http://localhost:{port}/");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue