diff --git a/README.md b/README.md index 0af6bb0..bcab76a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -MumbleDJ [![Circle CI](https://circleci.com/gh/MichaelOultram/mumbledj/tree/master.svg?style=svg)](https://circleci.com/gh/MichaelOultram/mumbledj/tree/master) +MumbleDJ ======== **A Mumble bot that plays music fetched from YouTube videos and Soundcloud tracks.** @@ -62,6 +62,9 @@ Command | Description | Arguments | Admin | Example **cachesize** | Outputs the total file size of the cache in MB. | None | Yes | `!cachesize` **kill** | Safely cleans the bot environment and disconnects from the server. Please use this command to stop the bot instead of force closing, as the kill command deletes any remaining songs in the `~/.mumbledj/songs` directory. | None | Yes | `!kill` + + + ## INSTALLATION ###YOUTUBE API KEYS diff --git a/service.go b/service.go index a8e400c..097c412 100644 --- a/service.go +++ b/service.go @@ -54,6 +54,8 @@ type Playlist interface { var services []Service +// FindServiceAndAdd tries the given url with each service +// and adds the song/playlist with the correct service func FindServiceAndAdd(user *gumble.User, url string) error { var urlService Service diff --git a/service_youtube.go b/service_youtube.go index 06c9543..7a05e36 100644 --- a/service_youtube.go +++ b/service_youtube.go @@ -32,17 +32,9 @@ var youtubeVideoPatterns = []string{ `https?:\/\/www.youtube.com\/v\/([\w-]+)(\?t=\d*m?\d*s?)?`, } -// ------ -// TYPES -// ------ - // YouTube implements the Service interface type YouTube struct{} -// --------------- -// YOUTUBE SERVICE -// --------------- - // URLRegex checks to see if service will accept URL func (yt YouTube) URLRegex(url string) bool { return RegexpFromURL(url, append(youtubeVideoPatterns, []string{youtubePlaylistPattern}...)) != nil