|
|
@ -15,27 +15,28 @@ aria-label="Search" [ngbTypeahead]="searchModel" [resultFormatter]="formatter" [
|
|
|
|
<mat-spinner diameter="50"></mat-spinner>
|
|
|
|
<mat-spinner diameter="50"></mat-spinner>
|
|
|
|
</mat-option>
|
|
|
|
</mat-option>
|
|
|
|
<ng-container *ngIf="!searching">
|
|
|
|
<ng-container *ngIf="!searching">
|
|
|
|
<mat-option *ngFor="let result of results" [value]="result">
|
|
|
|
<mat-option class="option" *ngFor="let result of results" [value]="result">
|
|
|
|
<div *ngIf="result.mediaType === 'movie'">
|
|
|
|
<img *ngIf="result.poster" class="option-img" aria-hidden [src]="'https://image.tmdb.org/t/p/w300/'+result.poster" height="75">
|
|
|
|
<i class="fa fa-film"></i>
|
|
|
|
<span *ngIf="result.mediaType === 'movie'">
|
|
|
|
|
|
|
|
<i *ngIf="!result.poster" class="fa fa-film"></i>
|
|
|
|
<span>{{result.title}}</span>
|
|
|
|
<span>{{result.title}}</span>
|
|
|
|
</div>
|
|
|
|
</span>
|
|
|
|
<div *ngIf="result.mediaType === 'tv'">
|
|
|
|
<span *ngIf="result.mediaType === 'tv'">
|
|
|
|
<i class="fa fa-tv"></i>
|
|
|
|
<i *ngIf="!result.poster" class="fa fa-tv"></i>
|
|
|
|
|
|
|
|
|
|
|
|
<span>{{result.title}}</span>
|
|
|
|
<span>{{result.title}}</span>
|
|
|
|
</div>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
<div *ngIf="result.mediaType === 'Artist'">
|
|
|
|
<span *ngIf="result.mediaType === 'Artist'">
|
|
|
|
<i class="fa fa-music"></i>
|
|
|
|
<i *ngIf="!result.poster" class="fa fa-music"></i>
|
|
|
|
|
|
|
|
|
|
|
|
<span>{{result.title}}</span>
|
|
|
|
<span>{{result.title}}</span>
|
|
|
|
</div>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
<div *ngIf="result.mediaType === 'person'">
|
|
|
|
<span *ngIf="result.mediaType === 'person'">
|
|
|
|
<i class="fa fa-user"></i>
|
|
|
|
<i *ngIf="!result.poster" class="fa fa-user"></i>
|
|
|
|
<span>{{result.title}}</span>
|
|
|
|
<span>{{result.title}}</span>
|
|
|
|
</div>
|
|
|
|
</span>
|
|
|
|
</mat-option>
|
|
|
|
</mat-option>
|
|
|
|
</ng-container>
|
|
|
|
</ng-container>
|
|
|
|
</mat-autocomplete>
|
|
|
|
</mat-autocomplete>
|
|
|
|