This commit is contained in:
Matthieu Grieger 2016-01-11 19:27:29 -08:00
parent 80b5b44b23
commit 2d6fd3ea10
5 changed files with 18 additions and 3 deletions

View file

@ -1,6 +1,10 @@
MumbleDJ Changelog
==================
### January 11, 2015 -- `v2.8.10`
* Created a new configuration value in the General section called PlayerCommand. This allows the user to change between "ffmpeg" and "avconv" for playing audio files.
* Added check for valid PlayerCommand value. If the value is invalid the bot will default to `ffmpeg`.
### December 26, 2015 -- `v2.8.9`
* Fixed an incorrect `!currentsong` message for songs within playlists.
@ -15,7 +19,7 @@ MumbleDJ Changelog
* Added argument to !listsongs command to specify how many songs to list (thanks [@nkhoit](https://github.com/nkhoit)).
### December 14, 2015 -- `v2.8.5`
* Added !listsongs command (thanks [@nkhoit](https://github.com/nkhoit)).
* Added !listsongs command (thanks [@nkhoit](https://github.com/nkhoit)).
### December 7, 2015 -- `v2.8.4`
* YouTube and SoundCloud API keys are now stored in the configuration file instead of environment variables. Existing installations with API keys in environment variables will automatically be migrated to the configuration file (thanks [@Gamah](https://github.com/Gamah)).

View file

@ -92,7 +92,7 @@ Effective April 20th, 2015, all requests to YouTube's API must use v3 of their A
###SOUNDCLOUD API KEYS
A SoundCloud API key is required for SoundCloud integration. If no SoundCloud API key is found, then the service will be disabled (YouTube links will still work however).
**1)** Login/signup for a SoundCloud account on [https://soundcloud.com](https://soundcloud.com)
**1)** Login/signup for a SoundCloud account on [https://soundcloud.com](https://soundcloud.com)
**2)** Now to get the API key create a new app here: [http://soundcloud.com/you/apps/new](http://soundcloud.com/you/apps/new)
@ -105,7 +105,7 @@ A SoundCloud API key is required for SoundCloud integration. If no SoundCloud AP
**1)** Install and correctly configure [`Go`](https://golang.org/) (1.4 or higher). Specifically, make sure to follow [this guide](https://golang.org/doc/code.html) and set the `GOPATH` environment variable properly.
**2)** Install [`ffmpeg`](https://www.ffmpeg.org/) and [`mercurial`](http://mercurial.selenic.com/) if they are not already installed on your system. Also be sure that you have
[`opus`](http://www.opus-codec.org/) and its development headers installed on your system, as well as `openal` (check your distributions repo for the package name).
[`opus`](http://www.opus-codec.org/) and its development headers installed on your system, as well as `openal` (check your distributions repo for the package name). If you want to use `avconv` from `libav` instead of `ffmpeg` you must make the necessary change in the configuration file.
**3)** Install [`youtube-dl`](https://github.com/rg3/youtube-dl#installation). It is recommended to install `youtube-dl` through the method described on the linked GitHub page, rather than installing through a distribution repository. This ensures that you get the most up-to-date version of `youtube-dl`.

View file

@ -38,6 +38,10 @@ AutomaticShuffleOn = false
# Default Value: true
AnnounceNewTrack = true
# Command to use to play audio files. The two supported choices are "ffmpeg" and "avconv".
# Default Value: "ffmpeg"
PlayerCommand = "ffmpeg"
[Cache]
# Cache songs as they are downloaded?

View file

@ -51,6 +51,12 @@ func (dj *mumbledj) OnConnect(e *gumble.ConnectEvent) {
dj.audioStream = gumble_ffmpeg.New(dj.client)
dj.audioStream.Volume = dj.conf.Volume.DefaultVolume
if dj.conf.General.PlayerCommand == "ffmpeg" || dj.conf.General.PlayerCommand == "avconv" {
dj.audioStream.Command = dj.conf.General.PlayerCommand
} else {
fmt.Println("Invalid PlayerCommand configuration value. Only \"ffmpeg\" and \"avconv\" are supported. Defaulting to ffmpeg...")
}
dj.client.AudioEncoder.SetApplication(gopus.Audio)
dj.client.Self.SetComment(dj.conf.General.DefaultComment)

View file

@ -25,6 +25,7 @@ type DjConfig struct {
MaxSongPerPlaylist int
AutomaticShuffleOn bool
AnnounceNewTrack bool
PlayerCommand string
}
Cache struct {
Enabled bool