From 40fb27ebab8dd0492c994acd451152b9ec925a23 Mon Sep 17 00:00:00 2001 From: "Jamie.Rees" Date: Fri, 12 May 2017 16:30:20 +0100 Subject: [PATCH] Small changes --- Ombi/Ombi.Core/Engine/TvRequestEngine.cs | 4 ++-- Ombi/Ombi.Store/Context/OmbiContext.cs | 12 +++++++----- Ombi/Ombi/Views/Shared/_Layout.cshtml | 2 +- Ombi/Ombi/gulpfile.js | 3 ++- Ombi/Ombi/wwwroot/app/interfaces/ISearchTvResult.ts | 2 +- .../wwwroot/app/requests/tvrequests.component.html | 2 +- Ombi/Ombi/wwwroot/app/search/tvsearch.component.ts | 2 +- 7 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Ombi/Ombi.Core/Engine/TvRequestEngine.cs b/Ombi/Ombi.Core/Engine/TvRequestEngine.cs index 946136aa3..a6cf368cf 100644 --- a/Ombi/Ombi.Core/Engine/TvRequestEngine.cs +++ b/Ombi/Ombi.Core/Engine/TvRequestEngine.cs @@ -68,7 +68,7 @@ namespace Ombi.Core.Engine if (tv.LatestSeason) { - var latest = showInfo.Season.OrderBy(x => x).FirstOrDefault(); + var latest = showInfo.Season.OrderBy(x => x.SeasonNumber).FirstOrDefault(); foreach (var modelSeasonRequest in model.SeasonRequests) { if (modelSeasonRequest.SeasonNumber == latest.SeasonNumber) @@ -82,7 +82,7 @@ namespace Ombi.Core.Engine } if (tv.FirstSeason) { - var first = showInfo.Season.OrderByDescending(x => x).FirstOrDefault(); + var first = showInfo.Season.OrderByDescending(x => x.SeasonNumber).FirstOrDefault(); foreach (var modelSeasonRequest in model.SeasonRequests) { if (modelSeasonRequest.SeasonNumber == first.SeasonNumber) diff --git a/Ombi/Ombi.Store/Context/OmbiContext.cs b/Ombi/Ombi.Store/Context/OmbiContext.cs index da4f6ac74..56c265773 100644 --- a/Ombi/Ombi.Store/Context/OmbiContext.cs +++ b/Ombi/Ombi.Store/Context/OmbiContext.cs @@ -17,12 +17,14 @@ namespace Ombi.Store.Context Database.EnsureCreated(); Database.Migrate(); -//#if DEBUG -// var file = File.ReadAllText(); -//#else - +#if DEBUG + var location = System.Reflection.Assembly.GetEntryAssembly().Location; + var directory = System.IO.Path.GetDirectoryName(location); + var file = File.ReadAllText(Path.Combine(directory,"SqlTables.sql")); +#else + var file = File.ReadAllText("SqlTables.sql"); -//#endif +#endif // Run Script Database.ExecuteSqlCommand(file, 0); diff --git a/Ombi/Ombi/Views/Shared/_Layout.cshtml b/Ombi/Ombi/Views/Shared/_Layout.cshtml index 3dd96968a..acd7e1aad 100644 --- a/Ombi/Ombi/Views/Shared/_Layout.cshtml +++ b/Ombi/Ombi/Views/Shared/_Layout.cshtml @@ -1,4 +1,4 @@ -@**@ + diff --git a/Ombi/Ombi/gulpfile.js b/Ombi/Ombi/gulpfile.js index e34da0f86..f23ca39dc 100644 --- a/Ombi/Ombi/gulpfile.js +++ b/Ombi/Ombi/gulpfile.js @@ -71,7 +71,8 @@ var paths = { './bower_components/PACE/themes/orange/pace-theme-flat-top.css', './bower_components/PACE/themes/orange/pace-theme-loading-bar.css', './node_modules/primeng/resources/primeng.css', - './node_modules/tether/dist/css/tether.css' + './node_modules/tether/dist/css/tether.css', + './node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css', ], dest: './css/lib/' }, diff --git a/Ombi/Ombi/wwwroot/app/interfaces/ISearchTvResult.ts b/Ombi/Ombi/wwwroot/app/interfaces/ISearchTvResult.ts index 0c52813b8..6a1341c35 100644 --- a/Ombi/Ombi/wwwroot/app/interfaces/ISearchTvResult.ts +++ b/Ombi/Ombi/wwwroot/app/interfaces/ISearchTvResult.ts @@ -2,7 +2,7 @@ export interface ISearchTvResult { id: number, - seriesName: string, + title: string, aliases: string[], banner: string, seriesId: number, diff --git a/Ombi/Ombi/wwwroot/app/requests/tvrequests.component.html b/Ombi/Ombi/wwwroot/app/requests/tvrequests.component.html index 080c7a406..b5dca888a 100644 --- a/Ombi/Ombi/wwwroot/app/requests/tvrequests.component.html +++ b/Ombi/Ombi/wwwroot/app/requests/tvrequests.component.html @@ -78,7 +78,7 @@
- +
diff --git a/Ombi/Ombi/wwwroot/app/search/tvsearch.component.ts b/Ombi/Ombi/wwwroot/app/search/tvsearch.component.ts index 33c4e29ae..619ff113d 100644 --- a/Ombi/Ombi/wwwroot/app/search/tvsearch.component.ts +++ b/Ombi/Ombi/wwwroot/app/search/tvsearch.component.ts @@ -107,7 +107,7 @@ export class TvSearchComponent implements OnInit, OnDestroy { if (this.result.requestAdded) { this.notificationService.success("Request Added", - `Request for ${searchResult.seriesName} has been added successfully`); + `Request for ${searchResult.title} has been added successfully`); } else { this.notificationService.warning("Request Added", this.result.message); }