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