minor random fix/changes

This commit is contained in:
X4Lo committed 2024-09-10 19:04:40 +01:00
1 parent 9d89eda74c
commit b35ab48b4f
8 files changed
+94 -104

No files matched your search

@@ -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) {
@@ -149,33 +149,8 @@
</div>
</div>
</div>
<!-- series watchtime -->
<!-- <div class="card rounded-4">
<div class="card-body">
<div class="d-flex gap-2 mb-4">
<div
class="wh-48 d-flex bg-danger text-danger bg-opacity-10 align-items-center justify-content-center rounded-circle"
style="min-width: 48px;">
<span class="material-icons-outlined">tv</span>
</div>
<h5 class="mb-0 d-flex align-items-center gap-2">
Total Time Spent Watching Tv-Series
</h5>
</div>
<div class="d-flex align-items-start justify-content">
<div class="d-flex flex-column align-items-start gap-1">
<h5 class="mb-0 time-color">{{ watchTime.allTime.series | number }} minutes</h5>
<p class="mb-0">and it is</p>
<h5 class="mb-0 time-color">{{ watchTime.allTime.series | minutesFormat:'hours' | number }} hours</h5>
<p class="mb-0">which is about {{watchTime.allTime.series | minutesFormat:'days'}} days.</p>
</div>
</div>
</div>
</div> -->
</div>
<!-- watch history graph -->
<div class="col-12 col-xl-7 col-xxl-8 d-flex">
<div class="card w-100 rounded-4">
@@ -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)