Coder Social home page Coder Social logo

suyooo / nodecg-nowplaying Goto Github PK

View Code? Open in Web Editor NEW
12.0 5.0 3.0 1.45 MB

A bundle for https://github.com/nodecg/nodecg showing the currently playing song.

Home Page: http://suyo.be

License: GNU General Public License v3.0

HTML 25.02% JavaScript 66.17% CSS 8.81%

nodecg-nowplaying's Introduction

nodecg-nowplaying

This NodeCG bundle shows the currently playing song, and optionally a message.

To set up, follow the regular process of adding a bundle, but you also need to set up your preferred method:

  • If you run NodeCG locally, tell your music player/script to dump the current song to bundles/nowplaying/view/nowplaying.txt (I use SFMT for this).
  • If you want to get the current song from Last.fm, add your API key in the config gile (see below). You can get it from last.fm/api.

The panel on the dashboard allows you to set:

  • A Last.fm song source. If this field is empty on update, the local file (view/nowplaying.txt) will be used.
  • An optional message. If the message field is empty on update, no second line will be shown and only the song title is displayed.
  • Whether automatic display should be on. If enabled on update, the song display will show for X seconds every time the title changes.

Configuration File

Create the configuration file in cfg/nowplaying.json. Default values are the ones shown below.

{
  "titletime": 10,
  "msgtime": 5,
  "update": 1,
  "apikey": null
}
  • titletime is the time in seconds the music title should be displayed before switching the the message, if one is set.
  • msgtime is the time in seconds the message is shown before switching back.
  • update is the interval between checking the file or requesting the current song from the API, in seconds.
  • apikey is your last.fm API key.

You may also want to edit view/nowplaying.css and change the top value of .musiccontainer so it aligns nicely with your layout.

nodecg-nowplaying's People

Contributors

suyooo avatar thesupremecommander avatar

Stargazers

 avatar Grant J. Butler avatar Szymon Borecki avatar  avatar  avatar Nejat Seçkin Oral avatar  avatar Ramón Núñez avatar Jerzerak avatar Dominique Hostettler avatar Matthew McNamara avatar Elliot DeNolf avatar

Watchers

Elliot DeNolf avatar James Cloos avatar  avatar Alchemist 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.