Beispiel #1
0
const addToReportPlaylist = ({ comment, content, username }) => {
  const m3uWriter = m3u.writer()
  m3uWriter.comment(`${username} - ${comment}`)
  m3uWriter.file(content.path)
  fs.appendFileSync(
    `${PLAYLISTS_DIRECTORY}/report-${today}.m3u`,
    m3uWriter.toString(),
    { encoding: 'utf8' }
  )
}
Beispiel #2
0
const saveToM3uPlaylist = (content) => {
  const m3uWriter = m3u.writer()
  m3uWriter.comment(content.username)
  m3uWriter.file(content.path)
  fs.appendFileSync(playlistName, m3uWriter.toString(), { encoding: 'utf8' })
}