diff --git a/CHANGELOG.md b/CHANGELOG.md index 869a69b..f60b243 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ MumbleDJ Changelog ================== +### February 14, 2016 -- `v2.8.15` +* Fixed an incorrectly formatted error message (thanks [@GabrielPlassard](https://github.com/GabrielPlassard)). + +### February 12, 2016 -- `v2.8.14` +* Audio is now downloaded using the `bestaudio` format. This prevents situations in which some audio would not play because an `.m4a` file was not available (thanks [@mpacella88](https://github.com/mpacella88)). + ### February 6, 2016 -- `v2.8.13` * Added `!version` command to display the version of MumbleDJ that is running (thanks [@zeblau](https://github.com/zeblau)). * Added `version` commandline argument to display the version of MumbleDJ that is running (thanks [@zeblau](https://github.com/zeblau)). diff --git a/service.go b/service.go index df36fa9..e2e8bb0 100644 --- a/service.go +++ b/service.go @@ -125,9 +125,10 @@ func FindServiceAndAdd(user *gumble.User, url string) error { if err := dj.queue.CurrentSong().Download(); err == nil { dj.queue.CurrentSong().Play() } else { + var failMessage = fmt.Sprintf(AUDIO_FAIL_MSG, dj.queue.CurrentSong().Title()) dj.queue.CurrentSong().Delete() dj.queue.OnSongFinished() - return errors.New(AUDIO_FAIL_MSG) + return errors.New(failMessage) } } return nil diff --git a/service_youtube.go b/service_youtube.go index 6e1818b..9d36bca 100644 --- a/service_youtube.go +++ b/service_youtube.go @@ -115,7 +115,7 @@ func (yt YouTube) NewSong(user *gumble.User, id, offset string, playlist Playlis offset: int(yt.parseTime(offset, `T\=(?P\d+D)?(?P\d+H)?(?P\d+M)?(?P\d+S)?`).Seconds()), duration: int(yt.parseTime(duration, `P(?P\d+D)?T(?P\d+H)?(?P\d+M)?(?P\d+S)?`).Seconds()), thumbnail: thumbnail, - format: "m4a", + format: "bestaudio", skippers: make([]string, 0), playlist: playlist, dontSkip: false, diff --git a/songqueue.go b/songqueue.go index 3fa0539..e723abe 100644 --- a/songqueue.go +++ b/songqueue.go @@ -118,7 +118,7 @@ func (q *SongQueue) PrepareAndPlayNextSong() { if err := q.CurrentSong().Download(); err == nil { q.CurrentSong().Play() } else { - dj.client.Self.Channel.Send(AUDIO_FAIL_MSG, false) + dj.client.Self.Channel.Send(fmt.Sprintf(AUDIO_FAIL_MSG, q.CurrentSong().Title()), false) q.OnSongFinished() } } diff --git a/strings.go b/strings.go index 20cf8d4..bcebd08 100644 --- a/strings.go +++ b/strings.go @@ -8,7 +8,7 @@ package main // Current version of the bot -const VERSION = "v2.8.13" +const VERSION = "v2.8.15" // Message shown to users when they request the version of the bot const DJ_VERSION = "MumbleDJ " + VERSION + "" @@ -63,7 +63,7 @@ const ADMIN_SONG_SKIP_MSG = "An admin has decided to skip the current song." const ADMIN_PLAYLIST_SKIP_MSG = "An admin has decided to skip the current playlist." // Message shown to users when the audio for a video could not be downloaded. -const AUDIO_FAIL_MSG = "The audio download for this video failed. %s has likely not generated the audio files for this %s yet. Skipping to the next song!" +const AUDIO_FAIL_MSG = "The audio download for this video failed. %s has likely not generated the audio files for this track yet. Skipping to the next song!" // Message shown to users when they supply an URL that does not contain a valid ID. const INVALID_ID_MSG = "The %s URL you supplied did not contain a valid ID."