Git Product home page Git Product logo

go-musicbot's Introduction

Introduction

Go-musicbot is an IRC bot which responds which is built around downloading youtube videos, converting them to the MP3 format (using youtube-dl) and adding these MP3's to an MPD stream. It also supports basic functionality for MPD.

Features

  • Download youtube videos. A log is kept of all already downloaded files
  • Control Next, NowPlaying and UpdateDB functionality for MPD
  • Display a link to the associated radio stream
  • Maintain a rating for a song.
  • Remove song when rating drops to 0
  • Downloading of the complete playlist
  • Ability to request songs. Requests are placed in a queue.
  • Web UI with similar functionality exposed as the irc bot
  • Selective enabling of various functionality

Commands

Downloading a new link:

<@r3boot> !dj+ DBHipNYuAZk
< IrcBot> DBHipNYuAZk added to download queue

Downloading a playlist:

<@r3boot> !djlist https://www.youtube.com/watch?v=RkENy3t_fgQ&list=RDGMEMYH9CUrFO7CfLJpaD7U
< IrcBot> Added playlist to download queue

Press play on mpd

<@r3boot> !start
< IrcBot> Now playing: Mark Instinct - Bad Seed [HQ] [DOWNLOAD]-SYbGij3o0ec.mp3

Displaying current song:

<@r3boot> !np
< IrcBot> Now playing: Fear Factory - T-1000 (H-K) (duration: 4m34s; rating: 5/10)

Switching to next song:

<@r3boot> !next
< IrcBot> Now playing: Massive Attack - Special Cases (duration: 5m16s; rating: 5/10)

Displaying the URL for the radio:

<@r3boot> !radio
< IrcBot> Fed up with the youtube links of berm? Listen to http://radio.as65342.net:8000/2600nl.ogg.m3u

Increase the rating for the currently playing song

<@r3boot> !tune
< IrcBot> Rating for Dioxyde - Torschlüsspanik-_DhqHr6IY78.mp3 is 7/10 .. Party on!!!!

Decrease the rating for the currently playing song

<@r3boot> !boo
< IrcBot> Rating for Nirvana - Rape Me (Legendado)-n8aJG1f815Q.mp3 is 4/10 .. BOOO!!!!

Search for a song and play it if found

<@r3boot> !request hardcore vibes
< IrcBot> Added Dune - Hardcore Vibes to the queue

Show the current play queue

<@r3boot> !queue
< IrcBot> Current queue:
< IrcBot> 0) NOFX - Franco Un-American (Official Video)

Show help

<@r3boot> !help
< IrcBot> Available commands: dj+ <yt vid id>, djlist <yt list id>, request <query>, query, np, next, tune, boo, start, radio

Installation

First, fetch the code

go get -v github.com/r3boot/go-musicbot

Then, navigate to the repo and build & install the bot

cd ${GOPATH}/src/github.com/r3boot/go-musicbot
make && sudo make install

Configuration

Please see /etc/musicbot.yaml once the bot has been installed. In this file you will need to configure your IRC and MPD details. To connect the bot to multiple networks / channels, copy the configuration file to a new name and edit the configuration. Next run multiple instances of this bot.

Running the bot

To run the bot, enter the following command (as a non-root user):

/usr/local/bin/musicbot -f /etc/musicbot.yaml

Ratings

Every song can have a rating of 1..10. The default rating is 5. As soon as the rating of a song drops below 1, it will be removed from the playlist.

go-musicbot's People

Contributors

evert-arends avatar r3boot avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.