feat(backend): fix credit duplicates, support multi-role TV credits, fix collection upload
- 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
This commit is contained in:
1 parent
260282a0e2
commit
ce01dc34fa
14 files changed
+293
-45
No files matched your search
@@ -108,7 +108,7 @@ class CollectionController {
|
||||
};
|
||||
|
||||
if (posterPath) {
|
||||
// ? generating preview
|
||||
// ? generating preview
|
||||
_mediaOptimizerService.doGeneratePreview("collections", 'posters', posterPath).then((result) => {
|
||||
const msg = `Collection Service | Generated Collection Preview`;
|
||||
logToFile(msg);
|
||||
@@ -118,6 +118,12 @@ class CollectionController {
|
||||
logToFile(err);
|
||||
});
|
||||
|
||||
// Deselect existing posters for this collection
|
||||
await Media.update(
|
||||
{ isSelected: false },
|
||||
{ where: { mediaable: 'collection', mediaableId: collectionId, type: 'poster', isSelected: true } }
|
||||
);
|
||||
|
||||
await Media.create({
|
||||
mediaable: 'collection',
|
||||
mediaableId: collectionId,
|
||||
@@ -130,7 +136,7 @@ class CollectionController {
|
||||
}
|
||||
|
||||
if (backdropPath) {
|
||||
// ? generating preview
|
||||
// ? generating preview
|
||||
_mediaOptimizerService.doGeneratePreview("collections", 'backdrops', backdropPath).then((result) => {
|
||||
const msg = `Collection Routes | Generated Collection Preview`;
|
||||
logToFile(msg);
|
||||
@@ -140,6 +146,12 @@ class CollectionController {
|
||||
logToFile(err);
|
||||
});
|
||||
|
||||
// Deselect existing backdrops for this collection
|
||||
await Media.update(
|
||||
{ isSelected: false },
|
||||
{ where: { mediaable: 'collection', mediaableId: collectionId, type: 'backdrop', isSelected: true } }
|
||||
);
|
||||
|
||||
// ? inserting data
|
||||
await Media.create({
|
||||
mediaable: 'collection',
|
||||
|
||||
Reference in new issue
Block a user