From a166410a26a467b2aa08d66c040a1208910f6022 Mon Sep 17 00:00:00 2001 From: "Jamie.Rees" Date: Thu, 21 Sep 2017 13:56:25 +0100 Subject: [PATCH] Fixed some bugs in the UI #865 --- src/Ombi.Core/Engine/TvSearchEngine.cs | 4 ++-- src/Ombi/ClientApp/app/search/search.component.ts | 4 ++-- src/Ombi/ClientApp/app/search/tvsearch.component.html | 11 ++--------- src/Ombi/ClientApp/app/search/tvsearch.component.ts | 8 ++++++-- src/Ombi/gulpfile.js | 2 +- 5 files changed, 13 insertions(+), 16 deletions(-) diff --git a/src/Ombi.Core/Engine/TvSearchEngine.cs b/src/Ombi.Core/Engine/TvSearchEngine.cs index d54f00a93..28aa6061a 100644 --- a/src/Ombi.Core/Engine/TvSearchEngine.cs +++ b/src/Ombi.Core/Engine/TvSearchEngine.cs @@ -80,7 +80,7 @@ namespace Ombi.Core.Engine { Url = e.url, Title = e.name, - AirDate = DateTime.Parse(e.airstamp), + AirDate = DateTime.Parse(e.airstamp ?? DateTime.MinValue.ToString()), EpisodeNumber = e.number, }); @@ -93,7 +93,7 @@ namespace Ombi.Core.Engine { Url = e.url, Title = e.name, - AirDate = DateTime.Parse(e.airstamp), + AirDate = DateTime.Parse(e.airstamp ?? DateTime.MinValue.ToString()), EpisodeNumber = e.number, }); } diff --git a/src/Ombi/ClientApp/app/search/search.component.ts b/src/Ombi/ClientApp/app/search/search.component.ts index 312847b74..f76d05b14 100644 --- a/src/Ombi/ClientApp/app/search/search.component.ts +++ b/src/Ombi/ClientApp/app/search/search.component.ts @@ -17,7 +17,7 @@ export class SearchComponent implements OnInit { } public selectTvTab() { - this.showMovie = true; - this.showTv = false; + this.showMovie = false; + this.showTv = true; } } diff --git a/src/Ombi/ClientApp/app/search/tvsearch.component.html b/src/Ombi/ClientApp/app/search/tvsearch.component.html index 68bea84d5..8a9f6051a 100644 --- a/src/Ombi/ClientApp/app/search/tvsearch.component.html +++ b/src/Ombi/ClientApp/app/search/tvsearch.component.html @@ -58,16 +58,9 @@ Air Date: {{node.data.firstAired | date: 'dd/MM/yyyy'}} - Available - Processing Request -
- - Pending Approval - + + Available - - Not Yet Requested - diff --git a/src/Ombi/ClientApp/app/search/tvsearch.component.ts b/src/Ombi/ClientApp/app/search/tvsearch.component.ts index f8d2cc65f..344e32c11 100644 --- a/src/Ombi/ClientApp/app/search/tvsearch.component.ts +++ b/src/Ombi/ClientApp/app/search/tvsearch.component.ts @@ -131,7 +131,7 @@ export class TvSearchComponent implements OnInit, OnDestroy { this.searchService.getShowInformationTreeNode(val.data.id) .takeUntil(this.subscriptions) .subscribe(x => { - this.updateItem(val.data, x); + this.updateItem(val, x); }); }); } @@ -181,7 +181,11 @@ export class TvSearchComponent implements OnInit, OnDestroy { private updateItem(key: TreeNode, updated: TreeNode) { const index = this.tvResults.indexOf(key, 0); if (index > -1) { - this.tvResults[index] = updated; + // Update certian properties, otherwise we will loose some data + this.tvResults[index].data.banner = updated.data.banner; + this.tvResults[index].data.imdbId = updated.data.imdbId; + this.tvResults[index].data.seasonRequests = updated.data.seasonRequests; + this.tvResults[index].data.seriesId = updated.data.seriesId; } } diff --git a/src/Ombi/gulpfile.js b/src/Ombi/gulpfile.js index 7cda90d8d..83dcc687d 100644 --- a/src/Ombi/gulpfile.js +++ b/src/Ombi/gulpfile.js @@ -1,4 +1,4 @@ -/// +/// 'use strict'; const gulp = require('gulp');