From 58bfc9ce23d286d584143b34bc5a46775ff9b1a7 Mon Sep 17 00:00:00 2001 From: MichaelOultram Date: Fri, 25 Sep 2015 17:33:13 +0100 Subject: [PATCH] Cleaning up comments --- README.md | 5 ++++- service.go | 2 ++ service_youtube.go | 8 -------- 3 files changed, 6 insertions(+), 9 deletions(-) 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