Small changes

pull/3539/head
Jamie Rees 5 years ago
parent e9bdebdd99
commit 7a9d22e43c

@ -1,7 +0,0 @@
language: csharp
solution: src/Ombi.sln
install:
- mono Tools/nuget.exe restore Ombi.sln
- nuget install NUnit.Runners -OutputDirectory testrunner
script:
- xbuild /p:Configuration=Release Ombi.sln /p:TargetFrameworkVersion="v4.5"

@ -2,16 +2,21 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoFixture" Version="4.5.0" />
<PackageReference Include="Moq" Version="4.10.0" />
<PackageReference Include="Nunit" Version="3.11.0" />
<PackageReference Include="NUnit.ConsoleRunner" Version="3.9.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
<PackageReference Include="AutoFixture" Version="4.11.0" />
<PackageReference Include="Moq" Version="4.14.1" />
<PackageReference Include="Nunit" Version="3.12.0" />
<PackageReference Include="NUnit.ConsoleRunner" Version="3.11.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.2.0" />
<packagereference Include="Microsoft.NET.Test.Sdk" Version="16.0.1"></packagereference>
<packagereference Include="Microsoft.NET.Test.Sdk" Version="16.6.1"></packagereference>
</ItemGroup>
<ItemGroup>

@ -70,7 +70,7 @@ namespace Ombi.Core.Tests.Rule.Search
var result = await Rule.Execute(search);
Assert.True(result.Success);
Assert.That(search.EmbyUrl, Is.EqualTo("http://test.com/#!/item/item.html?id=1"));
Assert.That(search.EmbyUrl, Is.EqualTo("http://test.com/#!/item.html?id=1"));
}
[Test]
@ -99,7 +99,7 @@ namespace Ombi.Core.Tests.Rule.Search
var result = await Rule.Execute(search);
Assert.True(result.Success);
Assert.That(search.EmbyUrl, Is.EqualTo("https://app.emby.media/#!/item/item.html?id=1"));
Assert.That(search.EmbyUrl, Is.EqualTo("https://app.emby.media/#!/item.html?id=1"));
}
[Test]

@ -113,7 +113,7 @@ namespace Ombi.Core.Tests.Rule.Search
PercentOfTracks = 100
}
}.AsQueryable());
var request = new SearchAlbumViewModel { ForeignAlbumId = "ABC" };
var request = new SearchAlbumViewModel { ForeignAlbumId = "abc" };
var result = await Rule.Execute(request);
Assert.True(result.Success);

@ -63,7 +63,7 @@ namespace Ombi.Core.Tests.Rule.Search
ForeignArtistId = "abc",
}
}.AsQueryable());
var request = new SearchArtistViewModel { ForignArtistId = "ABC" };
var request = new SearchArtistViewModel { ForignArtistId = "abc" };
var result = await Rule.Execute(request);
Assert.True(result.Success);

@ -2,62 +2,68 @@
<html lang="en">
<head>
<script type='text/javascript'>
<script type='text/javascript'>
function configExists(url) {
var req = new XMLHttpRequest();
req.open('GET', url, false);
req.send();
return req.status === 200 && req.responseURL === url;
}
function configExists(url) {
var req = new XMLHttpRequest();
req.open('GET', url, false);
req.send();
return req.status === 200 && req.responseURL === url;
}
var probePath = 'styles/please-wait.js';
var origin = document.location.origin;
var pathSegments = document.location.pathname.split('/');
var probePath = 'styles/please-wait.js';
var origin = document.location.origin;
var pathSegments = document.location.pathname.split('/');
var basePath = '/'
var configFound = false;
for (var i = 0; i < pathSegments.length; i++) {
var segment = pathSegments[i];
if (segment.length > 0) {
basePath = basePath + segment + '/';
}
var fullPath = origin + basePath + probePath;
configFound = configExists(fullPath);
if (configFound) {
break;
}
}
var basePathToUse = basePath.substring(0, basePath.length - 1); // trim off the trailing '/'
basePathToUse == '' ? '/' : basePathToUse;
window["baseHref"] = configFound ? basePathToUse : '/';
var basePath = '/'
var configFound = false;
for (var i = 0; i < pathSegments.length; i++) {
var segment = pathSegments[i];
if (segment.length > 0) {
basePath = basePath + segment + '/';
}
var fullPath = origin + basePath + probePath;
configFound = configExists(fullPath);
if (configFound) {
break;
}
}
var basePathToUse = basePath.substring(0, basePath.length - 1); // trim off the trailing '/'
basePathToUse == '' ? '/' : basePathToUse;
window["baseHref"] = configFound ? basePathToUse : '/';
document.write("<base href='" + (configFound ? basePath : '/') + "' />");
document.write("<base href='" + (configFound ? basePath : '/') + "' />");
console.log(window["baseHref"]);
</script>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
<link href="styles/please-wait.css" rel="stylesheet">
<link href="styles/spinkit.css" rel="stylesheet">
<link href="styles/11-folding-cube.css" rel="stylesheet">
<script src="styles/please-wait.js"></script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
console.log(window["baseHref"]);
</script>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
<link href="styles/please-wait.css" rel="stylesheet">
<link href="styles/spinkit.css" rel="stylesheet">
<link href="styles/11-folding-cube.css" rel="stylesheet">
<script src="styles/please-wait.js"></script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta property="og:image:height" content="375" />
<meta property="og:image:width" content="991" />
<meta property="og:image" content="~/images/logo.png" />
<meta property="og:site_name" content="Ombi" />
<meta property="og:title" content="Ombi" />
<meta property="og:type" content="website" />
<meta property="og:description" content="Ombi, media request tool">
<title>Ombi</title>
<title>Ombi</title>
</head>
<body>
<app-ombi>
<script type="text/javascript">
var colors = ["#f44336","#f44336","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722","#9e9e9e","#607d8b"];
var bgColor = colors[Math.floor(Math.random() * colors.length)];
window.loading_screen = window.pleaseWait({
// logo: "assets/images/logo.png",
template: `<div class='pg-loading-inner'>
<app-ombi>
<script type="text/javascript">
var colors = ["#f44336", "#f44336", "#9c27b0", "#673ab7", "#3f51b5", "#2196f3", "#03a9f4", "#00bcd4", "#009688", "#4caf50", "#cddc39", "#ffeb3b", "#ffc107", "#ff9800", "#ff5722", "#9e9e9e", "#607d8b"];
var bgColor = colors[Math.floor(Math.random() * colors.length)];
window.loading_screen = window.pleaseWait({
// logo: "assets/images/logo.png",
template: `<div class='pg-loading-inner'>
<div class='pg-loading-center-outer'>
<div class='pg-loading-center-middle'>
<h1 class='pg-loading-logo-header'>
@ -68,11 +74,11 @@ function configExists(url) {
</div>
</div>
</div>`,
backgroundColor: bgColor,
loadingHtml: "<div class='sk-folding-cube'><div class='sk-cube1 sk-cube'></div><div class='sk-cube2 sk-cube'></div><div class='sk-cube4 sk-cube'></div><div class='sk-cube3 sk-cube'></div></div>"
});
</script>
</app-ombi>
backgroundColor: bgColor,
loadingHtml: "<div class='sk-folding-cube'><div class='sk-cube1 sk-cube'></div><div class='sk-cube2 sk-cube'></div><div class='sk-cube4 sk-cube'></div><div class='sk-cube3 sk-cube'></div></div>"
});
</script>
</app-ombi>
</body>
</html>
</html>
Loading…
Cancel
Save