From c576ed4e454fe6b4974e7ad873670e3adc9d0a96 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Fri, 2 Dec 2022 22:05:20 -0500 Subject: Fixes to various things --- backend/PlayAudio.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'backend/PlayAudio.js') diff --git a/backend/PlayAudio.js b/backend/PlayAudio.js index 9b4a83b..3ae2b91 100644 --- a/backend/PlayAudio.js +++ b/backend/PlayAudio.js @@ -28,14 +28,17 @@ import { integer } from '../commands/play.js'; const { statusChannel, txtFile } = JSON.parse(readFileSync('./config.json', 'utf-8')); let fileData; + export let audio; -export let duration; -export let metadataEmpty = false; +export let currentTrack; + +export let metadataEmpty; + export let audioTitle; export let audioArtist; export let audioYear; export let audioAlbum; -export let currentTrack; +export let duration; const inputFiles = readdirSync('music'); export async function playAudio(bot) { @@ -66,7 +69,7 @@ export async function playAudio(bot) { audio = audio.split('.').slice(0, -1).join('.'); - if (txtFile === true) { + if (txtFile) { fileData = 'Now Playing: ' + audio; writeFile('./now-playing.txt', fileData, (err) => { if (err) { console.log(err); } -- cgit v1.2.3