diff --git a/api/now-playing.js b/api/now-playing.js
index 94fa1ae2..f93c2e58 100644
--- a/api/now-playing.js
+++ b/api/now-playing.js
@@ -73,46 +73,11 @@ const emojiMap = (genre, artist) => {
}
export default async () => {
- const TV_KEY = Netlify.env.get("API_KEY_TRAKT")
const scrobbles = getStore('scrobbles')
const headers = {
"Content-Type": "application/json",
"Cache-Control": "public, s-maxage=360, stale-while-revalidate=1080",
}
- const traktRes = await fetch("https://api.trakt.tv/users/cdransf/watching", {
- headers: {
- "Content-Type": "application/json",
- "trakt-api-version": 2,
- "trakt-api-key": TV_KEY,
- },
- })
- .then((data) => {
- if (data.status === 204) return {}
- if (data.ok) return data?.json()
- throw new Error('Something went wrong with the Trakt endpoint.')
- })
- .catch(err => {
- console.log(err)
- return {}
- })
-
- if (Object.keys(traktRes).length) {
- if (traktRes["type"] === "episode") {
- return new Response(JSON.stringify({
- content: `📺 ${traktRes["show"]["title"]} • ${traktRes["episode"]["title"]}`,
- }),
- { headers }
- )
- }
-
- if (traktRes["type"] === "movie") {
- return new Response(JSON.stringify({
- content: `🎥 ${traktRes["movie"]["title"]}`,
- }),
- { headers }
- )
- }
- }
const scrobbleData = await scrobbles.get('now-playing', { type: 'json'})
if (!scrobbleData) return new Response(JSON.stringify({}, { headers }))
diff --git a/package.json b/package.json
index e96466fb..c5819ea5 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "coryd.dev",
- "version": "13.0.6",
+ "version": "13.1.6",
"description": "The source for my personal site. Built using 11ty.",
"type": "module",
"scripts": {