fix: disambiguate tmdb ids by media type across lookups (#2577)
This commit is contained in:
@@ -173,7 +173,7 @@ class BlocklistedTagProcessor implements RunnableScanner<StatusBase> {
|
||||
|
||||
for (const entry of response.results) {
|
||||
const blocklistEntry = await blocklistRepository.findOne({
|
||||
where: { tmdbId: entry.id },
|
||||
where: { tmdbId: entry.id, mediaType },
|
||||
});
|
||||
|
||||
if (blocklistEntry) {
|
||||
@@ -209,7 +209,11 @@ class BlocklistedTagProcessor implements RunnableScanner<StatusBase> {
|
||||
const mediaRepository = em.getRepository(Media);
|
||||
const mediaToRemove = await mediaRepository
|
||||
.createQueryBuilder('media')
|
||||
.innerJoinAndSelect(Blocklist, 'blist', 'blist.tmdbId = media.tmdbId')
|
||||
.innerJoinAndSelect(
|
||||
Blocklist,
|
||||
'blist',
|
||||
'blist.tmdbId = media.tmdbId AND blist.mediaType = media.mediaType'
|
||||
)
|
||||
.where(`blist.blocklistedTags IS NOT NULL`)
|
||||
.getMany();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user