117 lines
2.5 KiB
Markdown
117 lines
2.5 KiB
Markdown
# xmpp-radio-tower
|
|
|
|
Experimental music bot for xmpp similar to discord music bots
|
|
|
|
# Working Status
|
|
|
|
- Conversations: Works
|
|
|
|
- Cheogram: Likely to work
|
|
|
|
- Monocles chat: Works
|
|
|
|
- Monal: Works
|
|
|
|
- Dino: Does not work
|
|
|
|
- Movim: Works but sometimes buggy (?)
|
|
|
|
- Siskin: Did not tested yet
|
|
|
|
# Features
|
|
|
|
- Calling the bot over any xmpp clients supporting calls
|
|
|
|
- Shuffle playlist
|
|
|
|
- Queue system
|
|
|
|
- Add new songs from links yt-dlp supports
|
|
|
|
- Search for songs
|
|
|
|
- Radio relaying (copies m3u8 or mp3 streams of real radios)
|
|
|
|
# TODO
|
|
|
|
- Fix a bug where if bandwith is exhausted song switches without any command
|
|
|
|
- Change the User Agent of bot to a less suspicious one
|
|
|
|
- Fix the memory management
|
|
|
|
- Add Dino call support
|
|
|
|
- Test Movim more extensively
|
|
|
|
- Add non-YT search options without the need to copy paste links
|
|
|
|
- Add Alastor references
|
|
|
|
- Allow to prefer low latency over quality
|
|
|
|
- Test IPv6 streaming support
|
|
|
|
- Extend search results to 10-15 instead of 5
|
|
|
|
- Option to search locally instead of playing the song
|
|
|
|
- Try if video calls have sound and blank visuals as a bug
|
|
|
|
# How to install
|
|
|
|
I do not remember most details about dependencies but I will try to make an install guide.
|
|
|
|
## Dependencies
|
|
The bot highly relies on the ffmpeg binary for audio. Also having an up to date version of yt-dlp helps a lot.
|
|
|
|
## Installation
|
|
Clone the projects or just copy the scripts over.
|
|
|
|
## Set up the Python Environment
|
|
I have used venv since it is what I know.
|
|
|
|
```bash
|
|
python3 -m venv venv
|
|
```
|
|
|
|
## pip install
|
|
Literally
|
|
|
|
```bash
|
|
pip install slixmpp aiortc aiohttp av mutagen yt-dlp slixmpp-omemo omemo dnspython
|
|
```
|
|
|
|
I am not sure if dnspython is necessary but just in case.
|
|
|
|
## Create Directories
|
|
Create the folder structure for music and downloads:
|
|
```bash
|
|
mkdir -p music/downloads
|
|
```
|
|
|
|
## Configuration
|
|
|
|
Take a look at file named `config.ini` in the bot folder. Edit it (every config has their descriptions near them).
|
|
|
|
## Run the Bot
|
|
|
|
## Manual Start
|
|
```bash
|
|
# Ensure you are in your python environment
|
|
python3 xmpp_radio_bot.py -c config.ini
|
|
```
|
|
|
|
## Usage
|
|
|
|
The bot mostly uses OMEMO encrypted messages. You may need to "Trust" the bot's fingerprint in your client (Gajim/Conversations/Dino) for commands to work if encryption is active. Plaintext works too but I do not check it mostly since OMEMO is good anyways.
|
|
|
|
Inside the DMs with the bot (or inside the bot control muc configured) type "!help" to see how can the bot used.
|
|
|
|
# Changelog
|
|
|
|
- v0.1 Absolute Solver
|
|
Main testing version
|
|
|
|
- v0.2 Branded Pens!
|
|
Future version |