Fixed some bugs in the UI #865

pull/1514/head
Jamie.Rees 7 years ago
parent 7d1885d5b4
commit a166410a26

@ -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,
});
}

@ -17,7 +17,7 @@ export class SearchComponent implements OnInit {
}
public selectTvTab() {
this.showMovie = true;
this.showTv = false;
this.showMovie = false;
this.showTv = true;
}
}

@ -58,16 +58,9 @@
<span *ngIf="node.data.firstAired" class="label label-info" target="_blank">Air Date: {{node.data.firstAired | date: 'dd/MM/yyyy'}}</span>
<span *ngIf="node.data.available" class="label label-success">Available</span>
<span *ngIf="node.data.approved && !node.data.available" class="label label-info">Processing Request</span>
<div *ngIf="node.data.requested && !node.data.available; then requested else notRequested"></div>
<ng-template #requested>
<span *ngIf="!node.data.available" class="label label-warning">Pending Approval</span>
</ng-template>
<ng-template #notRequested>
<span *ngIf="!node.data.available" class="label label-danger">Not Yet Requested</span>
</ng-template>
<ng-template [ngIf]="result.available"><span class="label label-success">Available</span></ng-template>
<span id="{{id}}netflixTab"></span>

@ -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;
}
}

@ -1,4 +1,4 @@
/// <binding BeforeBuild='vendor, build' />
/// <binding BeforeBuild='build' />
'use strict';
const gulp = require('gulp');

Loading…
Cancel
Save