Skip to content

Commit

Permalink
another test for #37
Browse files Browse the repository at this point in the history
  • Loading branch information
tidusjar committed Mar 18, 2016
1 parent 1d814cd commit cd682cd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions PlexRequests.Core/Setup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,24 +78,24 @@ private void MigrateDb() // TODO: Remove when no longer needed
try
{
var records = repo.GetAll();

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)
{
// There is no requested table so they do not have an old version of the DB
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))
{
Expand Down
2 changes: 1 addition & 1 deletion PlexRequests.UI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static void Main(string[] args)
{
ServerFactory = "Microsoft.Owin.Host.HttpListener"
};
options.Urls.Add($"http://+:{port}");
options.Urls.Add($"http://localhost:{port}/");
try
{

Expand Down

0 comments on commit cd682cd

Please sign in to comment.