fix: fix template literal errors in llm, podcast, and tts services

This commit is contained in:
2025-06-04 08:18:38 +09:00
parent 4fe300d5d6
commit a1cbf358ef
3 changed files with 19 additions and 19 deletions

View File

@ -16,28 +16,28 @@ export async function updatePodcastRSS() {
ep.audioPath
)}`;
const pubDate = new Date(ep.pubDate).toUTCString();
itemsXml += \`
itemsXml += `
<item>
<title><![CDATA[\${ep.title}]]></title>
<title><![CDATA[${ep.title}]]></title>
<description><![CDATA[この記事を元に自動生成したポッドキャストです]]></description>
<enclosure url="\${fileUrl}" length="\${fs.statSync(ep.audioPath).size}" type="audio/mpeg" />
<guid>\${fileUrl}</guid>
<pubDate>\${pubDate}</pubDate>
<enclosure url="${fileUrl}" length="${fs.statSync(ep.audioPath).size}" type="audio/mpeg" />
<guid>${fileUrl}</guid>
<pubDate>${pubDate}</pubDate>
</item>
\`;
`;
}
const rssXml = \`<?xml version="1.0" encoding="UTF-8"?>
const rssXml = `<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title><![CDATA[\${channelTitle}]]></title>
<link>\${channelLink}</link>
<description><![CDATA[\${channelDescription}]]></description>
<lastBuildDate>\${lastBuildDate}</lastBuildDate>
\${itemsXml}
<title><![CDATA[${channelTitle}]]></title>
<link>${channelLink}</link>
<description><![CDATA[${channelDescription}]]></description>
<lastBuildDate>${lastBuildDate}</lastBuildDate>
${itemsXml}
</channel>
</rss>
\`;
`;
const outputPath = path.join(__dirname, "../public/podcast.xml");
fs.writeFileSync(outputPath, rssXml.trim());