Frontend:
- updated season/episodes models - used mediaSelector in EpisodeDialog and SeasonPage - added default-still.png
This commit is contained in:
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({
|
this.entryService.updateEntry(this.entry.id, entryData).subscribe({
|
||||||
next: (entry) => {
|
next: (entry) => {
|
||||||
// console.log(`Entry updated: `, entry);
|
// console.log(`Entry updated: `, entry);
|
||||||
this.entry = entry;
|
this.entry.favorit = entry.favorit;
|
||||||
this.entry.isInLibrary = true;
|
this.entry.isInLibrary = true;
|
||||||
this.libraryService.setEntry(this.entry);
|
this.libraryService.setEntry(this.entry);
|
||||||
},
|
},
|
||||||
@@ -306,8 +306,7 @@ export class EntryPageComponent implements OnInit {
|
|||||||
|
|
||||||
this.entryService.updateEntry(this.entry.id, entryData).subscribe({
|
this.entryService.updateEntry(this.entry.id, entryData).subscribe({
|
||||||
next: (entry) => {
|
next: (entry) => {
|
||||||
// console.log(`Entry updated: `, entry);
|
this.entry.hidden = entry.hidden;
|
||||||
this.entry = entry;
|
|
||||||
this.entry.isInLibrary = true;
|
this.entry.isInLibrary = true;
|
||||||
this.libraryService.setEntry(this.entry);
|
this.libraryService.setEntry(this.entry);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -157,7 +157,6 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 2rem;
|
gap: 2rem;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
background: rgba(0, 0, 0, 0.1);
|
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<!-- Episode Header -->
|
<!-- Episode Header -->
|
||||||
<div class="episode-header">
|
<div class="episode-header">
|
||||||
<div class="episode-still">
|
<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>
|
||||||
<div class="episode-title-section">
|
<div class="episode-title-section">
|
||||||
<h2>Episode {{episode.episode_number}}</h2>
|
<h2>Episode {{episode.episode_number}}</h2>
|
||||||
@@ -22,6 +22,10 @@
|
|||||||
<span class="material-symbols-outlined">schedule</span>
|
<span class="material-symbols-outlined">schedule</span>
|
||||||
{{episode.runtime}} min
|
{{episode.runtime}} min
|
||||||
</span>
|
</span>
|
||||||
|
<span *ngIf="episode.tmdb_rating">
|
||||||
|
<span class="material-symbols-outlined">star</span>
|
||||||
|
{{episode.tmdb_rating | floatFormat:1}}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
<!-- Left Column -->
|
<!-- Left Column -->
|
||||||
<div class="col-md-3 left-col">
|
<div class="col-md-3 left-col">
|
||||||
<div class="poster">
|
<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>
|
||||||
|
|
||||||
<div class="card info-card">
|
<div class="card info-card">
|
||||||
@@ -100,7 +101,7 @@
|
|||||||
<div class="card mb-3" *ngFor="let episode of selectedSeason.episodes">
|
<div class="card mb-3" *ngFor="let episode of selectedSeason.episodes">
|
||||||
<div class="row g-0">
|
<div class="row g-0">
|
||||||
<div class="col-md-3 episode-image-container" (click)="showEpisodeDetails($event, episode)">
|
<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>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
@@ -140,7 +141,7 @@
|
|||||||
<div class="episode-cards-grid" *ngIf="episodesViewMode === 'grid'">
|
<div class="episode-cards-grid" *ngIf="episodesViewMode === 'grid'">
|
||||||
<div class="card" *ngFor="let episode of selectedSeason.episodes">
|
<div class="card" *ngFor="let episode of selectedSeason.episodes">
|
||||||
<div class="episode-image-container" (click)="showEpisodeDetails($event, episode)">
|
<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>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
@@ -176,7 +177,7 @@
|
|||||||
<div class="episode-cards-grid-2" *ngIf="episodesViewMode === 'grid-2'">
|
<div class="episode-cards-grid-2" *ngIf="episodesViewMode === 'grid-2'">
|
||||||
<div class="card" *ngFor="let episode of selectedSeason.episodes">
|
<div class="card" *ngFor="let episode of selectedSeason.episodes">
|
||||||
<div class="episode-image-container">
|
<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>
|
||||||
<div class="card-overlay">
|
<div class="card-overlay">
|
||||||
<div class="d-flex justify-content-between align-items-start">
|
<div class="d-flex justify-content-between align-items-start">
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { EpisodeSeen } from './episode-seen.model';
|
import { EpisodeSeen } from './episode-seen.model';
|
||||||
|
import { Media } from './media.model';
|
||||||
import { Season } from './season.model';
|
import { Season } from './season.model';
|
||||||
|
|
||||||
export interface Episode {
|
export interface Episode {
|
||||||
@@ -10,6 +11,8 @@ export interface Episode {
|
|||||||
season_id: number;
|
season_id: number;
|
||||||
season: Season;
|
season: Season;
|
||||||
|
|
||||||
|
medias: Media[];
|
||||||
|
|
||||||
episodeSeen: EpisodeSeen[];
|
episodeSeen: EpisodeSeen[];
|
||||||
|
|
||||||
name: string;
|
name: string;
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
import { Entry } from './entry.model';
|
import { Entry } from './entry.model';
|
||||||
import { Episode } from './episode.models';
|
import { Episode } from './episode.models';
|
||||||
|
import { Media } from './media.model';
|
||||||
|
|
||||||
export interface Season {
|
export interface Season {
|
||||||
id: number;
|
id: number;
|
||||||
|
|
||||||
episodes: Episode[];
|
episodes: Episode[];
|
||||||
|
medias: Media[];
|
||||||
|
|
||||||
tmdb_id: string;
|
tmdb_id: string;
|
||||||
imdb_id: string;
|
imdb_id: string;
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
Reference in new issue
Block a user