Frontend:

- updated season/episodes models
- used mediaSelector in EpisodeDialog and SeasonPage
- added default-still.png
This commit is contained in:
X4Lo committed 2025-04-01 23:55:22 +00:00
1 parent 4e20c5320b
commit 1a39ab23cf
7 files changed
+17 -9

No files matched your search

@@ -284,7 +284,7 @@ export class EntryPageComponent implements OnInit {
this.entryService.updateEntry(this.entry.id, entryData).subscribe({
next: (entry) => {
// console.log(`Entry updated: `, entry);
this.entry = entry;
this.entry.favorit = entry.favorit;
this.entry.isInLibrary = true;
this.libraryService.setEntry(this.entry);
},
@@ -306,8 +306,7 @@ export class EntryPageComponent implements OnInit {
this.entryService.updateEntry(this.entry.id, entryData).subscribe({
next: (entry) => {
// console.log(`Entry updated: `, entry);
this.entry = entry;
this.entry.hidden = entry.hidden;
this.entry.isInLibrary = true;
this.libraryService.setEntry(this.entry);
},
@@ -157,7 +157,6 @@
align-items: center;
gap: 2rem;
padding: 1rem;
background: rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
@@ -8,7 +8,7 @@
<!-- Episode Header -->
<div class="episode-header">
<div class="episode-still">
<img [src]="posterPath(episode.still_path)" [alt]="episode.name">
<img [src]="episode.still_path | mediaSelector:episode.medias:'episodes':'still'" [alt]="episode.name">
</div>
<div class="episode-title-section">
<h2>Episode {{episode.episode_number}}</h2>
@@ -22,6 +22,10 @@
<span class="material-symbols-outlined">schedule</span>
{{episode.runtime}} min
</span>
<span *ngIf="episode.tmdb_rating">
<span class="material-symbols-outlined">star</span>
{{episode.tmdb_rating | floatFormat:1}}
</span>
</div>
</div>
</div>
@@ -7,7 +7,8 @@
<!-- Left Column -->
<div class="col-md-3 left-col">
<div class="poster">
<img [src]="posterPath(selectedSeason.poster_path)" alt="Season Poster" class="img-fluid mb-3">
<img [src]="selectedSeason.poster_path | mediaSelector:selectedSeason.medias:'seasons':'poster'"
alt="Season Poster" class="img-fluid mb-3">
</div>
<div class="card info-card">
@@ -100,7 +101,7 @@
<div class="card mb-3" *ngFor="let episode of selectedSeason.episodes">
<div class="row g-0">
<div class="col-md-3 episode-image-container" (click)="showEpisodeDetails($event, episode)">
<img [src]="posterPath(episode.still_path)" class="episode-still" alt="Episode Still">
<img [src]="episode.still_path | mediaSelector:episode.medias:'episodes':'still':'preview'" class="episode-still" alt="Episode Still">
</div>
<div class="col-md-9">
<div class="card-body">
@@ -140,7 +141,7 @@
<div class="episode-cards-grid" *ngIf="episodesViewMode === 'grid'">
<div class="card" *ngFor="let episode of selectedSeason.episodes">
<div class="episode-image-container" (click)="showEpisodeDetails($event, episode)">
<img [src]="posterPath(episode.still_path)" class="episode-still" alt="Episode Still">
<img [src]="episode.still_path | mediaSelector:episode.medias:'episodes':'still':'preview'" class="episode-still" alt="Episode Still">
</div>
<div class="card-body">
<div class="d-flex justify-content-between">
@@ -176,7 +177,7 @@
<div class="episode-cards-grid-2" *ngIf="episodesViewMode === 'grid-2'">
<div class="card" *ngFor="let episode of selectedSeason.episodes">
<div class="episode-image-container">
<img [src]="posterPath(episode.still_path)" class="episode-still" alt="Episode Still">
<img [src]="episode.still_path | mediaSelector:episode.medias:'episodes':'still':'preview'" class="episode-still" alt="Episode Still">
</div>
<div class="card-overlay">
<div class="d-flex justify-content-between align-items-start">
@@ -1,4 +1,5 @@
import { EpisodeSeen } from './episode-seen.model';
import { Media } from './media.model';
import { Season } from './season.model';
export interface Episode {
@@ -10,6 +11,8 @@ export interface Episode {
season_id: number;
season: Season;
medias: Media[];
episodeSeen: EpisodeSeen[];
name: string;
@@ -1,10 +1,12 @@
import { Entry } from './entry.model';
import { Episode } from './episode.models';
import { Media } from './media.model';
export interface Season {
id: number;
episodes: Episode[];
medias: Media[];
tmdb_id: string;
imdb_id: string;