Major rework of media handelling, and collections
This commit is contained in:
1 parent
b42e055691
commit
f7cb2bed53
37 files changed
+1120
-411
No files matched your search
@@ -4,7 +4,7 @@ const Entry = require('../models/Entry')
|
||||
const EntryId = require('../models/EntryId')
|
||||
const EntryRating = require('../models/EntryRating')
|
||||
const EntrySeen = require('../models/EntrySeen');
|
||||
const UserCollection = require('../models/UserCollection');
|
||||
const UserCollection = require('../models/Collection');
|
||||
const UserCollectionEntry = require('../models/UserCollectionEntry');
|
||||
const Season = require('../models/Season');
|
||||
const Episode = require('../models/Episode');
|
||||
@@ -92,14 +92,14 @@ UserCollectionEntry.afterDestroy(async (instance, options) => {
|
||||
|
||||
// ? updating collection poster
|
||||
// ? remove the poster if the collection is empty now
|
||||
if (collectionsEntries.length == 0) {
|
||||
updates.poster = null;
|
||||
} else {
|
||||
// ? replace poster it belonged to the removed entry
|
||||
// if (userCollection.poster_path == entry.poster_path) {
|
||||
// updates.poster_path = collectionsEntries[0].entry.poster_path;
|
||||
// }
|
||||
}
|
||||
// if (collectionsEntries.length == 0) {
|
||||
// updates.poster = null;
|
||||
// } else {
|
||||
// // ? replace poster it belonged to the removed entry
|
||||
// // if (userCollection.poster_path == entry.poster_path) {
|
||||
// // updates.poster_path = collectionsEntries[0].entry.poster_path;
|
||||
// // }
|
||||
// }
|
||||
|
||||
// ? updating order, only if the removed entry isn't placed at the end
|
||||
let order = instance.order;
|
||||
|
||||
Reference in new issue
Block a user