mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-22 06:50:33 -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>
|
||||||
@ -19,13 +19,13 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<mat-menu #more="matMenu">
|
<mat-menu #more="matMenu">
|
||||||
<ng-template matMenuContent let-episode="episode">
|
<ng-template matMenuContent let-episode="episode">
|
||||||
<a [href]="'/video/' + episode.link" download><button mat-menu-item>Download episode</button></a>
|
<a [href]="'/video/' + episode.link" download><button mat-menu-item>Download episode</button></a>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</mat-menu>
|
</mat-menu>
|
||||||
|
|
||||||
<button mat-raised-button color="accent" class="scrollBtn leftBtn d-none" #leftBtn (click)="scrollLeft()"><mat-icon>arrow_left</mat-icon></button>
|
<button mat-raised-button color="accent" class="scrollBtn leftBtn d-none" #leftBtn (click)="scrollLeft()"><mat-icon>arrow_left</mat-icon></button>
|
||||||
<button mat-raised-button color="accent" class="scrollBtn rightBtn" #rightBtn (click)="scrollRight()"><mat-icon>arrow_right</mat-icon></button>
|
<button mat-raised-button color="accent" class="scrollBtn rightBtn" #rightBtn (click)="scrollRight()"><mat-icon>arrow_right</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -52,8 +52,8 @@ export class PlayerComponent implements OnInit
|
|||||||
private thumb: HTMLElement;
|
private thumb: HTMLElement;
|
||||||
private progress: HTMLElement;
|
private progress: HTMLElement;
|
||||||
private buffered: HTMLElement;
|
private buffered: HTMLElement;
|
||||||
|
|
||||||
|
|
||||||
private oidcSecurity: OidcSecurityService;
|
private oidcSecurity: OidcSecurityService;
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, private sanitizer: DomSanitizer, private snackBar: MatSnackBar, private title: Title, private router: Router, private location: Location, private injector: Injector) { }
|
constructor(private route: ActivatedRoute, private sanitizer: DomSanitizer, private snackBar: MatSnackBar, private title: Title, private router: Router, private location: Location, private injector: Injector) { }
|
||||||
@ -78,7 +78,7 @@ export class PlayerComponent implements OnInit
|
|||||||
this.title.setTitle(this.item.showTitle + " - Kyoo");
|
this.title.setTitle(this.item.showTitle + " - Kyoo");
|
||||||
else
|
else
|
||||||
this.title.setTitle(this.item.showTitle + " S" + this.item.seasonNumber + ":E" + this.item.episodeNumber + " - Kyoo");
|
this.title.setTitle(this.item.showTitle + " S" + this.item.seasonNumber + ":E" + this.item.episodeNumber + " - Kyoo");
|
||||||
|
|
||||||
if (navigator.userAgent.match(/Mobi/) && document.fullscreenElement == null)
|
if (navigator.userAgent.match(/Mobi/) && document.fullscreenElement == null)
|
||||||
{
|
{
|
||||||
this.fullscreen();
|
this.fullscreen();
|
||||||
@ -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()
|
||||||
@ -620,7 +620,7 @@ export class PlayerComponent implements OnInit
|
|||||||
track.src = subtitle.link.replace(".srt", ".vtt");
|
track.src = subtitle.link.replace(".srt", ".vtt");
|
||||||
track.classList.add("subtitle_container");
|
track.classList.add("subtitle_container");
|
||||||
track.default = true;
|
track.default = true;
|
||||||
track.onload = () =>
|
track.onload = () =>
|
||||||
{
|
{
|
||||||
this.player.textTracks[0].mode = "showing";
|
this.player.textTracks[0].mode = "showing";
|
||||||
};
|
};
|
||||||
|
@ -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