mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-22 15:00:35 -04:00
Renaming links to slugs
This commit is contained in:
parent
82dfe99c68
commit
0c966ed49e
@ -2,7 +2,7 @@
|
|||||||
<div class="episodes" #scrollView (scroll)="onScroll()">
|
<div class="episodes" #scrollView (scroll)="onScroll()">
|
||||||
<div class="episode" *ngFor="let episode of this.episodes" #episodeDom >
|
<div class="episode" *ngFor="let episode of this.episodes" #episodeDom >
|
||||||
<button mat-icon-button class="moreBtn" [matMenuTriggerFor]="more" [matMenuTriggerData]="{episode: episode}"><i class="material-icons">more_vert</i></button>
|
<button mat-icon-button class="moreBtn" [matMenuTriggerFor]="more" [matMenuTriggerData]="{episode: episode}"><i class="material-icons">more_vert</i></button>
|
||||||
<a routerLink="/watch/{{episode.link}}" href="/watch/{{episode.link}}">
|
<a routerLink="/watch/{{episode.slug}}" href="/watch/{{episode.slug}}">
|
||||||
<div matRipple class="img" [style.background-image]="sanitize(episode.thumb)">
|
<div matRipple class="img" [style.background-image]="sanitize(episode.thumb)">
|
||||||
<button mat-icon-button class="playBtn"><i class="material-icons playIcon">play_circle_outline</i></button>
|
<button mat-icon-button class="playBtn"><i class="material-icons playIcon">play_circle_outline</i></button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -414,11 +414,11 @@ export class PlayerComponent implements OnInit
|
|||||||
|
|
||||||
if (this.playMethod == method.direct)
|
if (this.playMethod == method.direct)
|
||||||
{
|
{
|
||||||
this.player.src = "/video/" + this.item.link;
|
this.player.src = "/video/" + this.item.slug;
|
||||||
}
|
}
|
||||||
else if (this.playMethod == method.transmux)
|
else if (this.playMethod == method.transmux)
|
||||||
{
|
{
|
||||||
this.hlsPlayer.loadSource("/video/transmux/" + this.item.link + "/");
|
this.hlsPlayer.loadSource("/video/transmux/" + this.item.slug + "/");
|
||||||
this.hlsPlayer.attachMedia(this.player);
|
this.hlsPlayer.attachMedia(this.player);
|
||||||
this.hlsPlayer.on(Hls.Events.MANIFEST_LOADED, () =>
|
this.hlsPlayer.on(Hls.Events.MANIFEST_LOADED, () =>
|
||||||
{
|
{
|
||||||
@ -427,7 +427,7 @@ export class PlayerComponent implements OnInit
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.hlsPlayer.loadSource("/video/transcode/" + this.item.link + "/");
|
this.hlsPlayer.loadSource("/video/transcode/" + this.item.slug + "/");
|
||||||
this.hlsPlayer.attachMedia(this.player);
|
this.hlsPlayer.attachMedia(this.player);
|
||||||
this.hlsPlayer.on(Hls.Events.MANIFEST_LOADED, () =>
|
this.hlsPlayer.on(Hls.Events.MANIFEST_LOADED, () =>
|
||||||
{
|
{
|
||||||
@ -444,7 +444,7 @@ export class PlayerComponent implements OnInit
|
|||||||
next()
|
next()
|
||||||
{
|
{
|
||||||
if (this.item.nextEpisode != null)
|
if (this.item.nextEpisode != null)
|
||||||
this.router.navigate(["/watch/" + this.item.nextEpisode.link], { queryParamsHandling: "merge", replaceUrl: true });
|
this.router.navigate(["/watch/" + this.item.nextEpisode.slug], { queryParamsHandling: "merge", replaceUrl: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
previous()
|
previous()
|
||||||
|
@ -6,7 +6,7 @@ export interface Episode
|
|||||||
episodeNumber: number;
|
episodeNumber: number;
|
||||||
title: string;
|
title: string;
|
||||||
thumb: string;
|
thumb: string;
|
||||||
link: string;
|
slug: string;
|
||||||
overview: string;
|
overview: string;
|
||||||
releaseDate;
|
releaseDate;
|
||||||
runtime: number;
|
runtime: number;
|
||||||
|
@ -7,7 +7,7 @@ export interface WatchItem
|
|||||||
seasonNumber: number;
|
seasonNumber: number;
|
||||||
episodeNumber: number;
|
episodeNumber: number;
|
||||||
title: string;
|
title: string;
|
||||||
link: string;
|
slug: string;
|
||||||
duration: number;
|
duration: number;
|
||||||
releaseDate;
|
releaseDate;
|
||||||
isMovie: boolean;
|
isMovie: boolean;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user