Use the md5 index when looking up library items by original url

This commit is contained in:
Jackson Harper 2024-02-02 13:08:00 +08:00
parent 2c037d6a8a
commit d339c5e8f1

View file

@ -669,7 +669,7 @@ export const findLibraryItemByUrl = async (
.leftJoinAndSelect('recommender.profile', 'profile')
.leftJoinAndSelect('recommendations.group', 'group')
.where('library_item.user_id = :userId', { userId })
.andWhere('library_item.original_url = :url', { url })
.andWhere('md5(library_item.original_url) = md5(:url)', { url })
.getOne(),
undefined,
userId