feat: self host movies/tv
This commit is contained in:
parent
eccf1027b8
commit
e3bf4c15e8
13 changed files with 178 additions and 164 deletions
|
@ -49,7 +49,6 @@ export const tagMap = (collection) => {
|
|||
const posts = collectionData.data.collections.posts
|
||||
const links = collectionData.data.collections.links
|
||||
const books = collectionData.data.books
|
||||
const movies = collectionData.data.movies
|
||||
|
||||
if (posts) posts.forEach((post) => {
|
||||
const url = post.url.includes('http') ? post.url : `https://coryd.dev${post.url}`
|
||||
|
@ -74,13 +73,6 @@ export const tagMap = (collection) => {
|
|||
if (tagString) tags[book.url] = tagString.replace(/\s+/g,' ')
|
||||
})
|
||||
|
||||
if (movies) movies.forEach((movie) => {
|
||||
const tagString = movie['tags']?.map((tag) => tagAliases[tag.toLowerCase()])
|
||||
.join(' ')
|
||||
.trim()
|
||||
if (tagString) tags[movie.url] = tagString.replace(/\s+/g,' ')
|
||||
})
|
||||
|
||||
return tags
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
export default {
|
||||
'11ty': '#Eleventy',
|
||||
accessibility: '#Accessibility',
|
||||
action: '#Action',
|
||||
adventure: '#Adventure',
|
||||
ai: '#AI',
|
||||
backblaze: '#Backblaze',
|
||||
'black metal': '#BlackMetal',
|
||||
|
@ -18,14 +16,12 @@ export default {
|
|||
eleventy: '#Eleventy',
|
||||
email: '#Email',
|
||||
emo: '#Emo',
|
||||
fantasy: '#Fantasy',
|
||||
fastmail: '#Email',
|
||||
fiction: '#Fiction',
|
||||
gmail: '#Email',
|
||||
grindcore: '#Grindcore',
|
||||
health: '#Health',
|
||||
'indie web': '#IndieWeb #SmallWeb',
|
||||
'horror': '#Horror',
|
||||
ios: '#iOS #Apple',
|
||||
javascript: '#JavaScript',
|
||||
'last.fm': '#Music',
|
||||
|
|
|
@ -57,7 +57,7 @@ export default {
|
|||
if (!url) return
|
||||
if (url.includes('#artists')) return `#Music`
|
||||
if (url.includes('openlibrary.org')) return `#Books #NowReading ${tagMap[url]}`.trim()
|
||||
if (url.includes('trakt.tv')) return `#Movies #Watching ${tagMap[url]}`.trim()
|
||||
if (url.includes('themoviedb.org/movie')) return `#Movies #Watching`
|
||||
return tagMap[url] || ''
|
||||
},
|
||||
|
||||
|
|
Reference in a new issue