Skip to content
This repository has been archived by the owner on Jul 9, 2019. It is now read-only.

radiodiodi/nowplaying

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Now Playing Server

Reads track info from file and serves it over websockets.

Configuration

create .env file to and define following variables:

  • FILEPATH, path to input file
  • HOST, websocket host address
  • PORT, port for incoming websocket connections

Input

The program watches changes in specified JSON file. It tries to parse JSON object with following fields:title (srt), artist (srt) and durationMs (int).

example input file:

{
    "title": "The Free Software Song",
    "artist": "Richard Stallman",
    "durationMs": 120000
}

Output

Output is trough web sockets and consist of a JSON object with following fields: title (str), artist (str) and unix timestamp end (str, milliseconds).

title and artist are escaped for html. New output may be sent before end is reached and it should be treated as the time when "now playing" should be cleared.

All fields might be null if data is missing.

About

Solution for reindeerpeter problems

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published