Git Product home page Git Product logo

fmcord's Introduction

fmcord 1.1.0

Display your current Last.FM song on Discord using the RPC API: N|Solid

Dependencies

  • NodeJS >=8
  • npm (>=5)
  • Discord

Setup

  • Clone the repo git clone https://github.com/69/fmcord.git
  • Install the modules npm i
  • Open Discord
  • Copy config.json.example to config.json
  • Set your last.fm username in the config.json file
  • Start the RPC app node app.js

Useful links

Troubleshooting

It says the song is being updated but it isn't being displayed on my profile?

  • Go to Discord settings
  • Go to "Games"
  • Make sure "Display currently running game as a status message" is ticked

Invalid token function (or something similar)

  • Make sure your node is updated, you need at LEAST version 8.0.0!

How to run in the background

  • Install pm2 npm i pm2 -g
  • Start the app pm2 start app.js --name="fmcord"
  • Use pm2 log fmcord to view the logs
  • Restart the app using pm2 restart fmcord
  • To stop it, run pm2 stop fmcord

fmcord's People

Contributors

69 avatar jso8910 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fmcord's Issues

When a song is finished scrobbling, the application crashes.

I get this error:

events.js:183
      throw er; // Unhandled 'error' event
      ^

TypeError: Cannot read property 'name' of undefined
    at processLastPlay (/home/will/fmcord/node_modules/lastfm/lib/lastfm/recenttracks-stream.js:98:45)
    at module.exports.handleSuccess (/home/will/fmcord/node_modules/lastfm/lib/lastfm/recenttracks-stream.js:61:9)
    at emitOne (events.js:116:13)
    at module.exports.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (/home/will/fmcord/node_modules/lastfm/lib/lastfm/lastfm-request.js:123:14)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

Autostart on Windows

Any idea how to create a startup script with pm2 start app.js --name="fmcord" in it on Windows? Or any other "native" way to achieve the same goal.

Error: Cannot find module './util'

OS: KDE Neon
Node Version: 8.4.0
npm Version: 5.5.1

All dependencies installed successfully, except for util which throws a compiler error. util has not been updated in years, is unmaintained, and fails to build. If util is not required by any dependency, would it be feasible to rework fmcord to no longer require util?

util Github URL: https://github.com/defunctzombie/node-util

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.