diff --git a/frontend/src/app/features/collections/user-collections/userCollection-list-item/userCollections-list-item.component.ts b/frontend/src/app/features/collections/user-collections/userCollection-list-item/userCollections-list-item.component.ts index 6f59bc9..85a2c49 100644 --- a/frontend/src/app/features/collections/user-collections/userCollection-list-item/userCollections-list-item.component.ts +++ b/frontend/src/app/features/collections/user-collections/userCollection-list-item/userCollections-list-item.component.ts @@ -49,11 +49,37 @@ export class UserCollectionsListItemComponent { return this.getEntryPosterPath(this.list.entries[0]); } + return `https://www.themoviedb.org/w1280/${this.list.posterPath}`; // * if the collection is empty return 'assets/images/default/default-poster.png'; } } + getCollectionBakcgroundPath() { + return `https://www.themoviedb.org/w1280/${this.list.backdropPath}`; + + // if (this.list.isLocal) { + // if (this.list.backdropPath == null) + // return 'assets/images/default/default-poster.png'; + + // // * use the collection custom poster + // return ( + // environment.API_URL + + // `/media/collections/posters/preview/` + + // this.list.posterPath + // ); + // } else { + // // * use the poster of the first entry in the collection if its no empty + // if (this.list.entries.length != 0) { + // return this.getEntryPosterPath(this.list.entries[0]); + // } + + // return `https://www.themoviedb.org/w1280/${this.list.backdropPath}`; + // // * if the collection is empty + // return 'assets/images/default/default-poster.png'; + // } + } + getEntryPosterPath(entry: Entry) { // * Is in library: use a local poster if (entry.medias) { diff --git a/frontend/src/app/features/home/home.component.html b/frontend/src/app/features/home/home.component.html index 352ca2e..59cfa32 100644 --- a/frontend/src/app/features/home/home.component.html +++ b/frontend/src/app/features/home/home.component.html @@ -149,33 +149,8 @@ - - - -
diff --git a/frontend/src/app/features/home/home.component.ts b/frontend/src/app/features/home/home.component.ts index 01c410e..3cbdb9f 100644 --- a/frontend/src/app/features/home/home.component.ts +++ b/frontend/src/app/features/home/home.component.ts @@ -1,8 +1,6 @@ import { Component, OnInit } from '@angular/core'; import ApexCharts from 'apexcharts'; -import { EntrySeenService } from '../../core/services/entry-seen.service'; import { LibraryService } from '../../core/services/library.service'; -import { EpisodeSeenService } from '../../core/services/episode-seen.service'; import { forkJoin } from 'rxjs'; import { StatisticsService } from '../../core/services/statistics.service'; import { WatchTime } from '../../shared/models/statistics/watchTime.model'; @@ -54,9 +52,7 @@ export class HomeComponent implements OnInit { constructor( private statisticsService: StatisticsService, private libraryService: LibraryService - ) { - console.log('hey im home'); - } + ) {} async ngOnInit() { // ? get counts (movies, series, favorit, watchlist) diff --git a/frontend/src/app/shared/components/cards/main-card/main-card.component.css b/frontend/src/app/shared/components/cards/main-card/main-card.component.css index 5944e92..dbd0828 100644 --- a/frontend/src/app/shared/components/cards/main-card/main-card.component.css +++ b/frontend/src/app/shared/components/cards/main-card/main-card.component.css @@ -61,6 +61,15 @@ white-space: normal; } +/* ! OVER LAY 1 HIDDEN MODE */ +.movie-card .card-body { + opacity: 0; +} + +.movie-card:hover .card-body { + opacity: 1; +} + /* ! OVER LAY 2 */ .movie-card:hover .card-overlay-2 { opacity: 0; diff --git a/frontend/src/app/shared/components/cards/main-card/main-card.component.html b/frontend/src/app/shared/components/cards/main-card/main-card.component.html index d7e6a41..06f41c2 100644 --- a/frontend/src/app/shared/components/cards/main-card/main-card.component.html +++ b/frontend/src/app/shared/components/cards/main-card/main-card.component.html @@ -1,6 +1,7 @@
- Movie Poster + Movie Poster
@@ -18,21 +19,22 @@
-
+
{{formattedRate}}
- +
- +
- +
diff --git a/frontend/src/app/shared/components/cards/main-card/main-card.component.ts b/frontend/src/app/shared/components/cards/main-card/main-card.component.ts index c7c2105..10e22ed 100644 --- a/frontend/src/app/shared/components/cards/main-card/main-card.component.ts +++ b/frontend/src/app/shared/components/cards/main-card/main-card.component.ts @@ -12,6 +12,7 @@ import { Entry } from '../../../models/entry.model'; import { LibraryService } from '../../../../core/services/library.service'; import { Router } from '@angular/router'; import { ConfirmModalComponent } from '../../modals/confirm-modal/confirm-modal.component'; +import { environment } from '../../../../../environments/environment.prod'; @Component({ selector: 'app-main-card', @@ -121,7 +122,7 @@ export class MainCardComponent implements OnInit { // console.log(`Entry added to library`, entry); entry.isInLibrary = true; this.entry = entry; - this.libraryService.refrechEntries().subscribe(); + this.libraryService.refreshEntries().subscribe(); this.onEntryUpdate.emit(this.entry.id); this.lockActions = false; obs.unsubscribe(); @@ -131,6 +132,7 @@ export class MainCardComponent implements OnInit { // TODO error notification console.error('Error adding entry:', error); this.lockActions = false; + obs.unsubscribe(); }, }); } @@ -159,7 +161,7 @@ export class MainCardComponent implements OnInit { this.entry.id = 0; this.entry.isInLibrary = false; this.onEntryRemove.emit(this.entry.id); - this.libraryService.refrechEntries().subscribe(); + this.libraryService.refreshEntries().subscribe(); // todo entry removed notification }, error: (error) => { @@ -219,12 +221,12 @@ export class MainCardComponent implements OnInit { get posterPath() { // * Not in library, use TMDB poster if (!this.entry.isInLibrary) - return `https://image.tmdb.org/t/p/w300` + this.entry.poster_path; + return `https://image.tmdb.org/t/p/w342` + this.entry.poster_path; // * Is in library: use a local poster if (this.entry.medias) { const selectedPosters = this.entry.medias.filter( - (m) => m.type == 'poster' && m.is_selected + (m) => m.type == 'poster' && m.isSelected ); if ( @@ -232,9 +234,8 @@ export class MainCardComponent implements OnInit { selectedPosters[0] && selectedPosters[0].path ) { - const name = selectedPosters[0].path.split('.')[0]; - const extention = selectedPosters[0].path.split('.')[1]; - return `http://localhost:4000/api/v1/media/entries/posters/${name}_preview.${extention}`; + const name = selectedPosters[0].path; + return environment.API_URL + `/media/entries/posters/preview/${name}`; } } diff --git a/frontend/src/app/shared/components/modals/list-selection-modal/user-collections-modal.component.html b/frontend/src/app/shared/components/modals/list-selection-modal/user-collections-modal.component.html index d7c3188..7a12a24 100644 --- a/frontend/src/app/shared/components/modals/list-selection-modal/user-collections-modal.component.html +++ b/frontend/src/app/shared/components/modals/list-selection-modal/user-collections-modal.component.html @@ -1,57 +1,38 @@ - -