This commit is contained in:
X4Lo committed 2025-01-14 17:56:02 +01:00
1 parent 289dc98042
commit 65177c7553
18 files changed
+156 -203

No files matched your search

@@ -179,7 +179,7 @@
}
/* ! collection */
/* ! collection banner */
.card-img-overlay:hover h5 {
color: var(--shz-blue-default) !important;
}
@@ -188,6 +188,8 @@
cursor: pointer;
}
.card-img-overlay img {
.collection-card,
.collection-card img {
aspect-ratio: 16/9;
height: 100%;
}
@@ -147,6 +147,7 @@ export class EntryPageComponent implements OnInit {
if (entryRatings) {
// TODO show notification
this.entry.entryRating = entryRatings;
this.libraryService.setEntry(this.entry);
}
},
error: (error) => {
@@ -217,7 +218,10 @@ export class EntryPageComponent implements OnInit {
// ? from the watchlist, so now we need to refrech libraryService in order to
// ? update the watchlist page
if (this.entry.watchlist) {
this.libraryService.refreshEntries().subscribe();
this.entry.watchlist = false;
this.libraryService.setEntry(this.entry);
// this.libraryService.refetchEntries().subscribe();
}
}
},
@@ -284,6 +288,7 @@ export class EntryPageComponent implements OnInit {
// console.log(`Entry updated: `, entry);
this.entry = entry;
this.entry.isInLibrary = true;
this.libraryService.setEntry(this.entry);
},
error: (error) => {
console.log(`Error updating entry: `, error);
@@ -306,6 +311,7 @@ export class EntryPageComponent implements OnInit {
// console.log(`Entry updated: `, entry);
this.entry = entry;
this.entry.isInLibrary = true;
this.libraryService.setEntry(this.entry);
},
error: (error) => {
console.log(`Error updating entry: `, error);
@@ -718,8 +724,8 @@ export class EntryPageComponent implements OnInit {
settingsModal() {
const dialogRef = this.dialog.open(EntrySettingsModalComponent, {
width: '800px',
height: '600px',
width: '400px',
// height: '600px',
minHeight: '50%',
panelClass: 'media-dialog-container',
data: {
@@ -734,7 +740,8 @@ export class EntryPageComponent implements OnInit {
this.entry.hidden = result.entry.hidden;
this.entry.showInCalendar = result.entry.showInCalendar;
this.entry.autoSync = result.entry.autoSync;
} else {
this.libraryService.setEntry(this.entry);
}
});
}
@@ -177,7 +177,7 @@ export class HomeComponent implements OnInit {
getCounts() {
// TODO performance: change this to get stats from backend directly
this.libraryService.getAllEntries(true).subscribe((entries) => {
this.libraryService.newGetAllEntries().subscribe((entries) => {
this.counts.favorit = entries.filter((e) => e.favorit).length;
this.counts.watchlist = entries.filter((e) => e.watchlist).length;
this.counts.movies = entries.filter(
@@ -68,6 +68,6 @@ a.clear-filter-link {
}
::ng-deep ol,
::ng-deep ul {
::ng-deep ul:not(.metismenu) {
padding-left: 0 !important;
}
@@ -133,7 +133,7 @@ export class EntriesDisplayComponent
// uses libraryService to get library all content
getEntries(forceFetch: boolean = false) {
this.libraryService.getAllEntries(forceFetch).subscribe({
this.libraryService.newGetAllEntries().subscribe({
next: (entries) => {
if (this.displayType == 'favorit') {
this.entries = entries.filter((e) => e.favorit);
@@ -27,7 +27,7 @@ export class FavoritComponent {
// uses libraryService to get library all content
getEntries(forceFetch: boolean = false) {
this.libraryService.getAllEntries(forceFetch).subscribe({
this.libraryService.newGetAllEntries().subscribe({
next: (entries) => {
this.entries = entries.filter((e) => e.favorit);
@@ -77,6 +77,6 @@ a.clear-filter-link {
}
::ng-deep ol,
::ng-deep ul {
::ng-deep ul:not(.metismenu) {
padding-left: 0 !important;
}
@@ -121,7 +121,7 @@ export class LibraryPageComponent implements OnInit, AfterViewInit {
// ? uses libraryService to get library all entries
getEntries(forceFetch: boolean = false) {
this.libraryService.getAllEntries(forceFetch).subscribe({
this.libraryService.newGetAllEntries().subscribe({
next: (entries) => {
this.entries = entries.filter((e) => !e.watchlist);
this.populateYears();
@@ -185,7 +185,7 @@ export class LibraryPageComponent implements OnInit, AfterViewInit {
// this.filterCriteria();
// this.setQueryParameters(); // * update url query
console.log(this.filterCriteria);
// console.log(this.filterCriteria);
});
}
@@ -323,7 +323,7 @@ export class LibraryPageComponent implements OnInit, AfterViewInit {
);
});
console.log(temp);
// console.log(temp);
// ? sort filter
temp = await this.sortEntries(temp);
@@ -88,7 +88,7 @@ export class LibraryTableLineComponent {
// console.log(`Entry added to library`, entry);
entry.isInLibrary = true;
this.entry = entry;
this.libraryService.refreshEntries().subscribe();
this.libraryService.refetchEntries().subscribe();
this.onEntryUpdate.emit(this.entry.id);
this.lockActions = false;
obs.unsubscribe();
@@ -126,7 +126,7 @@ export class LibraryTableLineComponent {
this.entry.id = 0;
this.entry.isInLibrary = false;
this.onEntryRemove.emit(this.entry.id);
this.libraryService.refreshEntries().subscribe();
this.libraryService.refetchEntries().subscribe();
// todo entry removed notification
},
error: (error) => {