From 2ae0e1354ab21e78b14342d3a1eee1b8558c67ec Mon Sep 17 00:00:00 2001 From: DaleJV Date: Fri, 4 Feb 2022 15:53:36 +1300 Subject: [PATCH 1/2] Add OPUS file extension to LocalProvider.js to allow for local OPUS file playback The 'OPUS' extension was not added, therefore all local songs with the .opus extension never were added to the queue. --- src/classes/providers/LocalProvider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/providers/LocalProvider.js b/src/classes/providers/LocalProvider.js index 25ef339..5adb43b 100644 --- a/src/classes/providers/LocalProvider.js +++ b/src/classes/providers/LocalProvider.js @@ -51,7 +51,7 @@ class LocalProvider extends AbstractProvider { } } -LocalProvider.FILE_EXTENSIONS = ['mp3', 'm4a']; +LocalProvider.FILE_EXTENSIONS = ['mp3', 'm4a', 'opus']; LocalProvider.isFileSupported = (path) => { return LocalProvider.FILE_EXTENSIONS.some((ext) => path.endsWith(ext)); From 478aa36a36ae99c93a24f719b99d31cb5308eaa2 Mon Sep 17 00:00:00 2001 From: DaleJV Date: Sun, 13 Feb 2022 19:40:46 +1300 Subject: [PATCH 2/2] Updated bot version and ReadMe --- README.md | 6 +++--- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 05fc1dc..8c9cc8e 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ This setting needs to be a positive number greater or equal to **1**. If you set the `intermission_interval` to `null` in your config, no intermissions will be played. If you do add an `intermission_interval`, the bot will generate a folder named `local-intermissions` and a file named `intermissions.txt` inside the `data` folder. Both of these act the same way as `local-music` and `queue.txt`, which means that intermission audios -can be added as local `.mp3` or `.m4a` files inside the `local-intermissions` folder and audio URLs can be added into the `intermissions.txt` file. +can be added as local `.mp3`, `.opus` or `.m4a` files inside the `local-intermissions` folder and audio URLs can be added into the `intermissions.txt` file. If you set an `intermission_interval`, you will need to add at least one file inside the `local-intermissions` folder or add at least an audio URL inside `intermissions.txt`, otherwise the bot will crash. @@ -143,7 +143,7 @@ Check [configuration](#configuration) to see which environment variables you can The following volumes can be used: * `/opt/app/config`: The config folder for the bot, here you can use the `settings.json` file to configure the bot if you don't want to use environment variables. -* `/opt/app/data`: The data folder for the bot. Here you can find the `queue.txt` file containing all the song URLs for the bot to play. There will also be a `local-music` folder to insert your MP3 or M4A files to play. +* `/opt/app/data`: The data folder for the bot. Here you can find the `queue.txt` file containing all the song URLs for the bot to play. There will also be a `local-music` folder to insert your MP3, OPUS or M4A files to play. ## Usage @@ -160,7 +160,7 @@ This bot is designed to work only on one server at a time. Inviting your bot to The music that is played is stored in the `queue.txt` inside the `data` folder. You can add the music you want the bot to play in this file. Any links must begin with `https://` or `http://`. -Additionally, you can play local music by inserting `.mp3` or `.m4a` files inside the `data/local-music` folder. Make sure the files are properly ID3 tagged so the bot can get the artist and song name from the metadata. +Additionally, you can play local music by inserting `.mp3`, `.opus` or or `.m4a` files inside the `data/local-music` folder. Make sure the files are properly ID3 tagged so the bot can get the artist and song name from the metadata. ## Supported URLs diff --git a/package-lock.json b/package-lock.json index 6837444..a003adc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "discord-music-24-7", - "version": "4.1.0", + "version": "4.2.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 816ccbf..92f5c07 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "discord-music-24-7", - "version": "4.1.0", + "version": "4.2.1", "description": "A 24/7 music bot for Discord.", "main": "./src/app.js", "scripts": {