better description

This commit is contained in:
Luke Berndt
2023-02-26 07:35:53 -05:00
parent b4f35a1f16
commit 65b07c2811
3 changed files with 7 additions and 0 deletions

View File

@@ -241,6 +241,7 @@ const savePodcast = (event, podcastUrl) => {
}
});
podcast.len = totalTime;
podcast.eventUrl = frontend_server + "/events/" + event._id;
podcast.save();
}

View File

@@ -11,6 +11,7 @@ var podcastSchema = mongoose.Schema({
downloadUrl: String,
systems: [String],
numCalls: Number,
eventUrl: String,
len: Number
},
{

View File

@@ -137,6 +137,10 @@ async function getPodcast(req, res, next) {
itunesImage: 'https://openmhz.com/podcast/cover.png'
});
for (const podcast of podcasts) {
let description = podcast.description +"\n\nRadio Systems:\n";
for (const system of podcast.systems) {
description = description + " - " + system + "\n"
}
feed.addItem({
title: podcast.title,
description: podcast.description,
@@ -144,6 +148,7 @@ async function getPodcast(req, res, next) {
url: podcast.downloadUrl, // link to the item
},
author: 'OpenMHz', // optional - defaults to feed author property
url: podcast.eventUrl,
date: podcast.startTime, // any format that js Date can parse.
itunesAuthor: 'OpenMHz',
itunesExplicit: false,