Improve participants lists

This commit is contained in:
Dennis Reimann
2023-10-02 16:45:33 +02:00
parent fee4f92c54
commit f1716fe0d1
4 changed files with 47 additions and 32 deletions

View File

@@ -67,12 +67,13 @@ const parseEpisode = e => {
const duration = e['itunes:duration']
const enclosure = e.enclosure.__attr
const [, participantsString] =
firstLine.match(/(?:(?:von\sund\s)?mit\s)([^.]*)$/i) || []
firstLine.match(/(?:(?:von\sund\s)?mit\s)([^.]*)/i) || []
const participants = participantsString
? participantsString
.replace(/(\s*,\s*|\s*und\s*|\s*&\s*)/gi, '%')
.trim()
.split('%')
.map(p => p.trim())
: []
return {
block,