mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-07 10:14:13 -04:00
Cleaning up
This commit is contained in:
parent
1f070d9d14
commit
034d326730
@ -3,7 +3,7 @@
|
|||||||
<mat-card class="show">
|
<mat-card class="show">
|
||||||
<a href="/show/{{show.slug}}" routerLink="show/{{show.slug}}" class="d-flex">
|
<a href="/show/{{show.slug}}" routerLink="show/{{show.slug}}" class="d-flex">
|
||||||
<div class="thumb">
|
<div class="thumb">
|
||||||
<div [style.background-image]="getThumb(show.slug)"> </div>
|
<div [style.background-image]="getThumb(show)"> </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="data">
|
<div class="data">
|
||||||
<p class="title">{{show.title}}</p>
|
<p class="title">{{show.title}}</p>
|
||||||
|
@ -10,11 +10,12 @@ import {DomSanitizer} from "@angular/platform-browser";
|
|||||||
export class ShowGridComponent
|
export class ShowGridComponent
|
||||||
{
|
{
|
||||||
@Input() shows: Show[]
|
@Input() shows: Show[]
|
||||||
|
@Input() externalShows: boolean = false;
|
||||||
|
|
||||||
constructor(private sanitizer: DomSanitizer) { }
|
constructor(private sanitizer: DomSanitizer) { }
|
||||||
|
|
||||||
getThumb(slug: string)
|
getThumb(show: Show)
|
||||||
{
|
{
|
||||||
return this.sanitizer.bypassSecurityTrustStyle("url(/poster/" + slug + ")");
|
return this.sanitizer.bypassSecurityTrustStyle(`url(${show.poster})`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import {ExternalID} from "./external-id";
|
||||||
|
|
||||||
export interface Episode
|
export interface Episode
|
||||||
{
|
{
|
||||||
seasonNumber: number;
|
seasonNumber: number;
|
||||||
@ -8,6 +10,6 @@ export interface Episode
|
|||||||
overview: string;
|
overview: string;
|
||||||
releaseDate;
|
releaseDate;
|
||||||
runtime: number;
|
runtime: number;
|
||||||
externalIDs: string;
|
|
||||||
showTitle: string;
|
showTitle: string;
|
||||||
|
externalIDs: ExternalID[];
|
||||||
}
|
}
|
||||||
|
6
src/models/external-id.ts
Normal file
6
src/models/external-id.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
export interface ExternalID
|
||||||
|
{
|
||||||
|
provider: {name: string, logo: string};
|
||||||
|
id: string;
|
||||||
|
link: string;
|
||||||
|
}
|
@ -1,3 +1,5 @@
|
|||||||
|
import {ExternalID} from "./external-id";
|
||||||
|
|
||||||
export interface People
|
export interface People
|
||||||
{
|
{
|
||||||
slug: string;
|
slug: string;
|
||||||
@ -5,5 +7,5 @@ export interface People
|
|||||||
role: string;
|
role: string;
|
||||||
type: string;
|
type: string;
|
||||||
|
|
||||||
externalIDs: string;
|
externalIDs: ExternalID[];
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { Episode } from "./episode";
|
import { Episode } from "./episode";
|
||||||
|
import {ExternalID} from "./external-id";
|
||||||
|
|
||||||
export interface Season
|
export interface Season
|
||||||
{
|
{
|
||||||
@ -6,4 +7,5 @@ export interface Season
|
|||||||
title: string;
|
title: string;
|
||||||
overview: string;
|
overview: string;
|
||||||
episodes: Episode[];
|
episodes: Episode[];
|
||||||
|
externalIDs: ExternalID[]
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import { Season } from "./season";
|
|||||||
import { Genre } from "./genre";
|
import { Genre } from "./genre";
|
||||||
import { People } from "./people";
|
import { People } from "./people";
|
||||||
import { Studio } from "./studio";
|
import { Studio } from "./studio";
|
||||||
|
import {ExternalID} from "./external-id";
|
||||||
|
|
||||||
export interface Show
|
export interface Show
|
||||||
{
|
{
|
||||||
@ -17,9 +18,11 @@ export interface Show
|
|||||||
trailerUrl: string;
|
trailerUrl: string;
|
||||||
isCollection: boolean;
|
isCollection: boolean;
|
||||||
isMovie: boolean;
|
isMovie: boolean;
|
||||||
|
|
||||||
startYear: number;
|
startYear: number;
|
||||||
endYear : number;
|
endYear : number;
|
||||||
|
poster: string;
|
||||||
|
logo: string;
|
||||||
|
backdrop: string;
|
||||||
|
|
||||||
externalIDs: [string, string][];
|
externalIDs: ExternalID[];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user