mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 13:53:19 -07:00
Merge dev into branch
This commit is contained in:
commit
83050edf68
19 changed files with 487 additions and 87 deletions
22
PlexRequests.UI/Content/bootstrap-switch.min.css
vendored
Normal file
22
PlexRequests.UI/Content/bootstrap-switch.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
22
PlexRequests.UI/Content/bootstrap-switch.min.js
vendored
Normal file
22
PlexRequests.UI/Content/bootstrap-switch.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -122,8 +122,8 @@ namespace PlexRequests.UI.Helpers
|
|||
|
||||
var sb = new StringBuilder();
|
||||
var startUrl = $"{content}/Content";
|
||||
sb.AppendLine($"<link rel=\"stylesheet\" href=\"{startUrl}/datepicker.min.css\" type=\"text/css\"/>");
|
||||
sb.AppendLine($"<script src=\"{startUrl}/bootstrap-datetimepicker.min.js\"></script>");
|
||||
sb.AppendLine($"<link rel=\"stylesheet\" href=\"/{startUrl}/datepicker.min.css\" type=\"text/css\"/>");
|
||||
sb.AppendLine($"<script src=\"/{startUrl}/bootstrap-datetimepicker.min.js\"></script>");
|
||||
|
||||
return helper.Raw(sb.ToString());
|
||||
}
|
||||
|
@ -133,14 +133,6 @@ namespace PlexRequests.UI.Helpers
|
|||
var assetLocation = GetBaseUrl();
|
||||
|
||||
var content = GetContentUrl(assetLocation);
|
||||
var settings = GetSettings();
|
||||
if (string.IsNullOrEmpty(settings.ThemeName))
|
||||
{
|
||||
settings.ThemeName = Themes.PlexTheme;
|
||||
}
|
||||
if (settings.ThemeName == "PlexBootstrap.css") settings.ThemeName = Themes.PlexTheme;
|
||||
if (settings.ThemeName == "OriginalBootstrap.css") settings.ThemeName = Themes.OriginalTheme;
|
||||
|
||||
var startUrl = $"{content}/Content";
|
||||
|
||||
sb.AppendLine($"<script src=\"{startUrl}/angular.min.js\"></script>"); // Load angular first
|
||||
|
@ -161,6 +153,20 @@ namespace PlexRequests.UI.Helpers
|
|||
return helper.Raw(sb.ToString());
|
||||
}
|
||||
|
||||
public static IHtmlString LoadSettingsAssets(this HtmlHelpers helper)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
var assetLocation = GetBaseUrl();
|
||||
|
||||
var content = GetContentUrl(assetLocation);
|
||||
|
||||
sb.AppendLine($"<script src=\"{content}/Content/bootstrap-switch.min.js\" type=\"text/javascript\"></script>");
|
||||
sb.AppendLine($"<link rel=\"stylesheet\" href=\"{content}/Content/bootstrap-switch.min.css\" type=\"text/css\"/>");
|
||||
|
||||
return helper.Raw(sb.ToString());
|
||||
}
|
||||
|
||||
|
||||
public static IHtmlString LoadRequestAssets(this HtmlHelpers helper)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
|
|
|
@ -117,6 +117,29 @@ namespace PlexRequests.UI.Helpers
|
|||
return addResult;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (requestAll ?? false)
|
||||
{
|
||||
//// Monitor all seasons
|
||||
//foreach (var season in series.seasons)
|
||||
//{
|
||||
// season.monitored = true;
|
||||
//}
|
||||
|
||||
|
||||
//SonarrApi.UpdateSeries(series, sonarrSettings.ApiKey, sonarrSettings.FullUri);
|
||||
//SonarrApi.SearchForSeries(series.id, sonarrSettings.ApiKey, sonarrSettings.FullUri); // Search For all episodes!"
|
||||
|
||||
|
||||
// This is a work around for this issue: https://github.com/Sonarr/Sonarr/issues/1507
|
||||
// The above is the previous code.
|
||||
SonarrApi.AddSeries(model.ProviderId, model.Title, qualityProfile,
|
||||
sonarrSettings.SeasonFolders, sonarrSettings.RootPath, 0, model.SeasonList, sonarrSettings.ApiKey,
|
||||
sonarrSettings.FullUri, true, true);
|
||||
return new SonarrAddSeries { title = series.title }; // We have updated it
|
||||
}
|
||||
|
||||
// Series exists, don't need to add it
|
||||
if (series == null)
|
||||
{
|
||||
|
@ -126,21 +149,8 @@ namespace PlexRequests.UI.Helpers
|
|||
sonarrSettings.FullUri);
|
||||
|
||||
await Task.Delay(TimeSpan.FromSeconds(1));
|
||||
|
||||
series = await GetSonarrSeries(sonarrSettings, model.ProviderId);
|
||||
}
|
||||
|
||||
if (requestAll ?? false)
|
||||
{
|
||||
// Monitor all seasons
|
||||
foreach (var season in series.seasons)
|
||||
{
|
||||
season.monitored = true;
|
||||
}
|
||||
|
||||
SonarrApi.UpdateSeries(series, sonarrSettings.ApiKey, sonarrSettings.FullUri);
|
||||
SonarrApi.SearchForSeries(series.id, sonarrSettings.ApiKey, sonarrSettings.FullUri); // Search For all episodes!"
|
||||
return new SonarrAddSeries { title = series.title }; // We have updated it
|
||||
series = await GetSonarrSeries(sonarrSettings, model.ProviderId);
|
||||
}
|
||||
|
||||
if (first ?? false)
|
||||
|
|
|
@ -45,6 +45,8 @@ namespace PlexRequests.UI.NinjectModules
|
|||
{
|
||||
Bind<ICacheProvider>().To<MemoryCacheProvider>().InSingletonScope();
|
||||
Bind<ISqliteConfiguration>().To<DbConfiguration>().WithConstructorArgument("provider", new SqliteFactory());
|
||||
Bind<IPlexDatabase>().To<PlexDatabase>().WithConstructorArgument("provider", new SqliteFactory());
|
||||
|
||||
|
||||
Bind<IUserMapper>().To<UserMapper>();
|
||||
Bind<ICustomUserMapper>().To<UserMapper>();
|
||||
|
|
|
@ -304,6 +304,12 @@
|
|||
<DependentUpon>base.css</DependentUpon>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\bootstrap-switch.min.css">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\bootstrap-switch.min.js">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\bootstrap.css">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<form class="form-horizontal" method="POST" id="mainForm">
|
||||
<fieldset>
|
||||
<legend>Plex Settings</legend>
|
||||
|
||||
@*<input id="advancedToggle" type="checkbox"/>*@ @*TODO*@
|
||||
<div class="form-group">
|
||||
<label for="Ip" class="control-label">Plex Hostname or IP</label>
|
||||
<div>
|
||||
|
@ -87,6 +87,13 @@
|
|||
<input type="text" class="form-control form-control-custom " id="SubDir" name="SubDir" value="@Model.SubDir">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="PlexDatabaseLocationOverride" class="control-label">Plex Database Override</label>
|
||||
<div>
|
||||
<input type="text" class="form-control form-control-custom " id="PlexDatabaseLocationOverride" name="PlexDatabaseLocationOverride" value="@Model.PlexDatabaseLocationOverride">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="authToken" class="control-label">Plex Authorization Token</label>
|
||||
|
@ -129,6 +136,9 @@
|
|||
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
$("#advancedToggle").bootstrapSwitch();
|
||||
|
||||
var base = '@Html.GetBaseUrl()';
|
||||
|
||||
$('#testPlex').click(function (e) {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@using PlexRequests.UI.Helpers
|
||||
@Html.LoadSettingsAssets()
|
||||
<div class="col-lg-3 col-md-3 col-sm-4">
|
||||
<div class="list-group table-of-contents">
|
||||
@Html.GetSidebarUrl(Context, "/admin", "Plex Request")
|
||||
|
|
|
@ -207,8 +207,8 @@
|
|||
<button style="text-align: right" class="btn btn-success-outline disabled" disabled><i class="fa fa-check"></i> @UI.Search_Available</button><br />
|
||||
{{else}}
|
||||
<div class="dropdown">
|
||||
<button id="{{id}}" class="btn btn-primary-outline dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
<i class="fa fa-plus"></i> @UI.Search_Request
|
||||
<button id="{{id}}" class="btn {{#if available}}btn-success-outline{{else}}btn-primary-outline{{/if}} dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
<i class="fa fa-plus"></i> {{#if available}}@UI.Search_Available{{else}}@UI.Search_Request {{/if}}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
|
||||
|
|
|
@ -99,7 +99,6 @@
|
|||
$.ajax({
|
||||
url: url,
|
||||
success: function (result) {
|
||||
console.log("we win + " + result.url);
|
||||
if (result.url && result.url != "donationLinkError") {
|
||||
$("#customDonate").show();
|
||||
var donateLink = $("#customDonateHref");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue