Skip to content

Commit 407c0a9

Browse files
authored
Auto-populate YouTube video titles (#2171)
1 parent d9213c3 commit 407c0a9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

api/resolvers/item.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ import { verifyHmac } from './wallet'
2828
import { parse } from 'tldts'
2929
import { shuffleArray } from '@/lib/rand'
3030

31+
metadataRuleSets.title.rules.unshift(['h1 > yt-formatted-string.ytd-watch-metadata', el => el.getAttribute('title')])
32+
3133
function commentsOrderByClause (me, models, sort) {
3234
const sharedSortsArray = []
3335
sharedSortsArray.push('("Item"."pinId" IS NOT NULL) DESC')

0 commit comments

Comments
 (0)