Cleaning up

This commit is contained in:
Zoe Roux 2020-04-04 00:23:38 +02:00
parent 81bdb69aac
commit e91fc94789
3 changed files with 6 additions and 6 deletions

View File

@ -24,7 +24,7 @@
<a class="show" *ngFor="let show of this.shows" [href]="getLink(show)" [routerLink]="getLink(show)">
<div matRipple [style.background-image]="getThumb(show.slug)" > </div>
<p class="title">{{show.title}}</p>
<p class="date" *ngIf="show.endYear; else elseBlock">{{show.startYear}} - {{show.endYear}}</p>
<p class="date" *ngIf="show.endYear && show.startYear != show.endYear; else elseBlock">{{show.startYear}} - {{show.endYear}}</p>
<ng-template #elseBlock><p class="date">{{show.startYear}}</p></ng-template>
</a>
</div>

View File

@ -4,11 +4,11 @@
<div class="header container pt-sm-5">
<div class="row">
<img class="poster d-none d-sm-block" src="poster/{{this.show.slug}}" />
<img class="poster d-none d-sm-block" src="poster/{{this.show.slug}}" alt=""/>
<div class="main col">
<div class="info">
<h1 class="title">{{this.show.title}}</h1>
<h2 class="date" *ngIf="show.endYear; else elseBlock">{{show.startYear}} - {{show.endYear}}</h2>
<h2 class="date" *ngIf="show.endYear && show.startYear != show.endYear; else elseBlock">{{show.startYear}} - {{show.endYear}}</h2>
<ng-template #elseBlock><h2 class="date">{{show.startYear}}</h2></ng-template>
</div>
<div class="buttons">
@ -30,7 +30,7 @@
</div>
</div>
<div class="col-3 secondary d-none d-md-block">
<img src="logo/{{this.show.slug}}" />
<img src="logo/{{this.show.slug}}" #logo alt="" (error)="logo.style.display = 'none'" />
<div>
<p>Studio: <b><a routerLink="/studio/{{this.show.studio?.slug}}">{{this.show.studio?.name}}</a></b></p>

View File

@ -32,7 +32,7 @@ export class ShowDetailsComponent implements OnInit
this.show = data.show;
this.title.setTitle(this.show.title + " - Kyoo");
if (this.season == null || this.show.seasons.find(x => x.seasonNumber == this.season) == null)
if (this.season == undefined || this.show.seasons == undefined || this.show.seasons.find(x => x.seasonNumber == this.season) == null)
this.season = 1;
this.getEpisodes();
@ -70,7 +70,7 @@ export class ShowDetailsComponent implements OnInit
getEpisodes()
{
if (this.show == null)
if (this.show == undefined || this.show.seasons == undefined)
return;
if (this.show.seasons.find(x => x.seasonNumber == this.season).episodes != null)