feat: a tiny bit of work to rip out letterboxd

This commit is contained in:
Cory Dransfeldt 2023-10-02 09:20:07 -07:00
parent 2f0c3d7ac0
commit 681f26e9ea
8 changed files with 80 additions and 53 deletions

View file

@ -45,7 +45,7 @@ module.exports = {
tagLookup: (url, tagMap) => {
if (!url) return
if (url.includes('https://goodreads.com')) return '#Books #Reading'
if (url.includes('https://letterboxd.com')) return '#Movies #Letterboxd'
if (url.includes('https://trakt.tv')) return '#Movies #Trakt'
return tagMap[url] || ''
},
webmentionsByUrl: (webmentions, url) => {

View file

@ -15,11 +15,7 @@ module.exports = {
normalized['alt'] = `${item['plays']} plays of ${item['title']}`
normalized['subtext'] = `${item['plays']} plays`
}
if (item.type === 'book') normalized['alt'] = item['title']
if (item.type === 'movie') {
normalized['title'] = item['title']
normalized['alt'] = `${item['title']} - ${item['description']}`
}
if (item.type === 'book' || item.type === 'movie') normalized['alt'] = item['title']
if (item.type === 'tv') {
normalized['title'] = item['title']
normalized['alt'] = `${item['title']} from ${item['name']}`