feat: update podcast and tts services for next.js
This commit is contained in:
@ -7,15 +7,12 @@ export async function updatePodcastRSS() {
|
||||
|
||||
const channelTitle = "自動生成ポッドキャスト";
|
||||
const channelLink = "https://your-domain.com/podcast";
|
||||
const channelDescription =
|
||||
"RSSフィードから自動生成されたポッドキャストです。";
|
||||
const channelDescription = "RSSフィードから自動生成されたポッドキャストです。";
|
||||
const lastBuildDate = new Date().toUTCString();
|
||||
|
||||
let itemsXml = "";
|
||||
for (const ep of episodes) {
|
||||
const fileUrl = `https://your-domain.com/static/podcast_audio/${path.basename(
|
||||
ep.audioPath,
|
||||
)}`;
|
||||
const fileUrl = `https://your-domain.com/podcast_audio/${path.basename(ep.audioPath)}`;
|
||||
const pubDate = new Date(ep.pubDate).toUTCString();
|
||||
itemsXml += `
|
||||
<item>
|
||||
|
@ -21,7 +21,7 @@ export async function generateTTS(
|
||||
throw new Error("TTSのAudioStreamが空です");
|
||||
}
|
||||
|
||||
const outputDir = path.join(__dirname, "../static/podcast_audio");
|
||||
const outputDir = path.join(__dirname, "../public/podcast_audio");
|
||||
if (!fs.existsSync(outputDir)) {
|
||||
fs.mkdirSync(outputDir, { recursive: true });
|
||||
}
|
||||
|
Reference in New Issue
Block a user