Compare commits

..

2 Commits

Author SHA1 Message Date
Logan Cusano
d7b7b04f78 Update PDAB Wrappers
All checks were successful
Run Discord Radio Bot v3 Tests / test (push) Successful in 46s
- Close the socket server when there are no active connections
2024-04-14 23:59:04 -04:00
Logan Cusano
2c9383824e Updated client setup script
- Added pip
- updated branch for op25
- Improved the python deps install
2024-04-14 23:46:43 -04:00
2 changed files with 10 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
import { connectToChannel, leaveVoiceChannel, checkIfConnectedToVC, initDiscordBotClient, requestDiscordUsername, requestDiscordID, requestDiscordClientClose } from './pdabHandler.mjs';
import { connectToChannel, leaveVoiceChannel, checkIfConnectedToVC, initDiscordBotClient, requestDiscordUsername, requestDiscordID, requestDiscordClientClose, closePdabSocketServer } from './pdabHandler.mjs';
import { openOP25, closeOP25 } from '../op25Handler/op25Handler.mjs';
let activeDiscordClient = undefined;
@@ -50,6 +50,9 @@ export const leaveDiscordVC = async (guildId) => {
// Close the python client
await requestDiscordClientClose();
// Close the IPC server
await closePdabSocketServer();
}
}
}

View File

@@ -78,7 +78,7 @@ apt upgrade -y
# Install the necessary packages
echo "Installing dependencies..."
apt install -y nodejs portaudio19-dev libportaudio2 libpulse-dev pulseaudio apulse git ffmpeg git python3
apt install -y nodejs portaudio19-dev libportaudio2 libpulse-dev pulseaudio apulse git ffmpeg git python3 python3-pip
echo "Setting up Pulse Audio"
@@ -112,10 +112,13 @@ systemctl stop PulseAudio.service
echo "Installing npm dependencies..."
npm install
# Get rid of PEP 668
rm -rf /usr/lib/python3.11/EMTERNALL-MANAGED
# Getting the Python DAB
echo "Installing PDAB and Dependencies"
git clone -b DRBv3 https://git.vpn.cusano.net/logan/Python-Discord-Audio-Bot.git ./discordAudioBot/pdab
pip3 install -r ./discordAudioBot/pdab/requirements.txt
pip3 install --system -r ./discordAudioBot/pdab/requirements.txt
# Generate .env file
echo "Creating the config .env file..."
@@ -201,7 +204,7 @@ echo "\n\n\t\tDiscord Client Node install completed!\n\n"
####------------------- OP25 Installation
# Clone OP25 from the git repository
echo "Cloning OP25 from the git repository..."
git clone https://github.com/boatbod/op25.git
git clone -b gr310 https://github.com/boatbod/op25.git
# Navigate to the OP25 directory
ogPwd=$(pwd)