Major rework of media handelling, and collections

This commit is contained in:
X4Lo committed 2024-09-13 21:27:01 +01:00
1 parent b42e055691
commit f7cb2bed53
37 files changed
+1120 -411

No files matched your search

@@ -3,6 +3,7 @@ import { EntryRating } from './entryRating.model';
import { EntrySeen } from './entrySeen.model';
import { Media } from './media.model';
import { Season } from './season.model';
import { UserCollection } from './userCollection.model';
export interface Entry {
id: number;
@@ -11,6 +12,7 @@ export interface Entry {
entryRating: EntryRating;
entrySeen: EntrySeen[];
seasons: Season[];
collections: UserCollection[];
title: string;
original_title: string;
@@ -4,6 +4,8 @@ export interface Media {
id: number;
entry_id: number;
mediaable: string;
mediaableId: number;
entry: Entry;
type: string;
@@ -1,4 +1,5 @@
import { CollectionEntry } from './dtos/collection-entry.dto';
import { Media } from './media.model';
import { UserCollectionEntry } from './userCollectionEntry.model';
export interface UserCollection {
@@ -12,6 +13,7 @@ export interface UserCollection {
isUserCollection: boolean;
userRating: number;
medias: Media[];
posterPath: string;
backdropPath: string;
isLocal: boolean;
@@ -21,6 +23,12 @@ export interface UserCollection {
changed: boolean;
isChecked: boolean;
// * Processed fields
mediasCount: number;
entriesCount: number;
selectedPoster: string;
selectedBackdrop: string;
createdAt: Date;
updatedAt: Date;
}