Updated the Obsidian docs-vault
This commit is contained in:
1 parent
72fd77ee01
commit
260282a0e2
36 files changed
+3497
-144
No files matched your search
@@ -0,0 +1,54 @@
|
||||
---
|
||||
title: Collections
|
||||
tags:
|
||||
- feature
|
||||
- collections
|
||||
---
|
||||
|
||||
# Collections
|
||||
|
||||
## Overview
|
||||
|
||||
Collections group related entries together. Two types:
|
||||
|
||||
| Type | Source | `isUserCollection` |
|
||||
|---|---|---|
|
||||
| TMDB Collections | Auto-fetched from TMDB (e.g., "The Dark Knight Trilogy") | `false` |
|
||||
| User Collections | Manually created by the user | `true` |
|
||||
|
||||
## Data Model
|
||||
|
||||
See [[Models#Collection]] and [[Models#UserCollectionEntry]].
|
||||
|
||||
- Collections linked to entries via `UserCollectionEntry` join table
|
||||
- Join table has `order` field — auto-managed by Sequelize hooks
|
||||
- Hooks in `sequelizeHooks.js` maintain order on create/update/destroy
|
||||
|
||||
## TMDB Collections
|
||||
|
||||
When an entry is added that belongs to a TMDB collection:
|
||||
|
||||
1. [[Services#EntryManager]] detects `collection_id` on the entry
|
||||
2. Calls [[Services#CollectionManager]] `.fetchAndSaveCollection(tmdbId)`
|
||||
3. Collection created with poster/backdrop from TMDB
|
||||
4. Missing parts can be fetched via "Fetch Parts" action
|
||||
|
||||
## User Collections
|
||||
|
||||
Users can create custom collections:
|
||||
|
||||
- Name, description
|
||||
- Poster and backdrop (upload via multipart)
|
||||
- Add/remove entries, reorder
|
||||
|
||||
## API Endpoints
|
||||
|
||||
See [[API Reference#Collections]].
|
||||
|
||||
## Frontend
|
||||
|
||||
- [[Pages#CollectionsPage|CollectionsPage]] — Grid of all collections
|
||||
- [[Pages#CollectionDetailsPage|CollectionDetailsPage]] — Collection detail with entries
|
||||
- [[Components#Dialogs|CollectionEditDialog]] — Create/edit dialog
|
||||
- [[Components#Dialogs|AddEntryToCollectionDialog]] — Add entry picker
|
||||
- [[Hooks#useCollections]] — Query and mutation hooks
|
||||
Reference in new issue
Block a user