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' } ) }
const saveToM3uPlaylist = (content) => { const m3uWriter = m3u.writer() m3uWriter.comment(content.username) m3uWriter.file(content.path) fs.appendFileSync(playlistName, m3uWriter.toString(), { encoding: 'utf8' }) }