- Fix credit dedup key to people_id + cast_type (scoped to entry_id) - Detect aggregate_credits format via Array.isArray(c.roles) instead of is_tvseries flag - Join multiple roles/jobs with "; " instead of taking only the first - Add episode_count field to Credit model from total_episode_count - Increase character and job columns to VARCHAR(500) - Deselect existing collection posters/backdrops before inserting new upload - Updated docs-vault - Updated some agents files
1.8 KiB
1.8 KiB
title, tags
| title | tags | ||
|---|---|---|---|
| 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
UserCollectionEntryjoin table - Join table has
orderfield — auto-managed by Sequelize hooks - Hooks in
sequelizeHooks.jsmaintain order on create/update/destroy
TMDB Collections
When an entry is added that belongs to a TMDB collection:
- Services#EntryManager detects
collection_idon the entry - Calls Services#CollectionManager
.fetchAndSaveCollection(tmdbId) - Collection created with poster/backdrop from TMDB
- 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
[!info] Media Upload Behavior When a new poster or backdrop is uploaded for a collection, all existing media of the same type are deselected (
isSelected = false) before the new one is created withisSelected = true. This ensures only the latest upload is active.
API Endpoints
See API Reference#Collections.
Frontend
- Pages#CollectionsPage — Grid of all collections
- Pages#CollectionDetailsPage — Collection detail with entries
- Components#Dialogs — Create/edit dialog
- Components#Dialogs — Add entry picker
- Hooks#useCollections — Query and mutation hooks