npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ampache-webamp

v0.1.0

Published

Ampache web interface

Downloads

2

Readme

Ampache Web Interface

Ampache web interface to make browsing, and playing your music a simple task

NOTE: This is still a work-in-progress!!

Only tested on Chrome, uses HTML5 Audio, probably won't work on any other browser

http://bahamas10.github.com/node-webamp/

Installation

First install Node, then install this program using NPM

npm install -g ampache-webamp

Usage

Create the necessary config file by running

webamp --init

This will create a json file at ~/.webamp/config.json that will be used to configure the local webserver settings, as well as store the ampache credentials. Modify this file to reflect your setup, and then run webamp to start the service.

$ webamp
[2012-11-04T02:33:50.165Z] Server running at http://localhost:8076/
[2012-11-04T02:33:50.193Z] You are running the latest version 0.0.22
[2012-11-04T02:33:50.336Z] Successfully Authenticated!
[2012-11-04T02:33:50.336Z] Populating cache
[2012-11-04T02:33:50.340Z] Loaded artists from local cache
[2012-11-04T02:33:50.362Z] Loaded albums from local cache
[2012-11-04T02:33:50.381Z] Calculating albums by artist
[2012-11-04T02:33:50.383Z] Finished albums by artist
[2012-11-04T02:33:50.615Z] Loaded songs from local cache
[2012-11-04T02:33:50.616Z] Calculating songs by album
[2012-11-04T02:33:50.625Z] Finished songs by album
[2012-11-04T02:33:50.625Z] All caches ready
[2012-11-04T02:33:51.084Z] 127.0.0.1 GET 200 /api/artists (15ms)
[2012-11-04T02:33:51.086Z] 127.0.0.1 GET 200 /api/conf (1ms)
[2012-11-04T02:33:51.088Z] 127.0.0.1 GET 200 /api/albums_by_artist (2ms)

Configuration

After running webamp --init you can view the configuration file at ~/.webamp/config.json

{
  "ampache": {
    "debug": false,
    "ping": 600000,
    "user": "user",
    "pass": "pass",
    "url": "http://example.com:1234/ampache/server/xml.server.php"
  },
  "web": {
    "log": true,
    "host": "localhost",
    "port": 8076
  },
  "cache": {
    "artwork": true
  }
}

Options

Most of the options are self explanatory, but for those that aren't

  • ampache.debug: (Optional) Enable debug messages for Ampache module
  • ampache.ping: (Optional) The time in milliseconds to between sending ping requests to Ampache (default: 10 minutes)
  • web.log: (Optional) Log a line for every request to the local webserver
  • cache.artwork: Cache album art locally (faster, but more bandwidth initially)

API

The design goal is that a request to / will return a nice looking web page, with all your music in a nice, easy to navigate format. All interactions on that page will use Ajax to hit the server at /api/... to pull JSON with relevant information.

Routes

/api/artists, /api/albums, /api/songs

Return an array of all of the artists/albums/songs in the cache (which is populated when the program starts)

/api/artists/:id, /api/albums/:id, /api/songs/:id

Return an object for the relevant song/album/artist by id in the cache

/api/artists/:id/new, /api/artists/:id/new, /api/artists/:id/new

Same as above, but force the info to come from Ampache and not the cache

/api/albums_by_artist, /api/songs_by_album

Return an object with an album or artist as the key, and a list of song or album ids (respectively)

/api/themes

An object representing the possible themes to use

/api/conf

An object representing non-private config variables

Known Issues

All issues are tracked in github

https://github.com/bahamas10/node-webamp/issues?state=open

FAQ

Audio doesn't work on Ubuntu with chromium

Webamp relies on HTML5 audio (for now), install the codecs with this

sudo apt-get install chromium-codecs-ffmpeg-extra

I updated my Ampache catalog and now the cache is wrong, how can I clear it?

To wipe all caches (including artwork) invoke webamp like this

webamp --clear

I botched my config file pretty bad, how can I regenerate it?

webamp --init

Credit

License

MIT License