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

gmusic-mpd

v0.3.0

Published

Helper script for GMusicProxy together with MPD

Downloads

9

Readme

GMusic-MPD

Helper script for GMusicProxy together with MPD. Adds Extended M3U data temporarily to the current playlist

You can use Google Play Music - All Access with the correct extended m3u data using Music Player Daemon.

This is not limited to GMusicProxy however. It depends on how the m3u data is written.

GMusicProxy

I'm assuming that you are using this application and have the --extended-m3u option set. You can also specify it in your gmusixproxy.cfg like this:

[email protected]
password=password
extended-m3u=true
daemon=true

But this tool only interfaces with the saved playlists on the system for the moment. So it doesn't connect with GMusicProxy.

Usage

Use this tool to load a playlist and grab the m3u data. And send it to MPD.

You need Iojs or Node. Then install globally with NPM.

npm install -g gmusic-mpd

Usage: gmusic-mpd [options] <playlist>

Options:

  -h, --help                   output usage information
  -V, --version                output the version number
  -d, --directory <directory>  The playlists directory, (ex: ~/.mpd/playlists)
  -e, --ext [extension]        The playlist extension [default: .m3u]
  -h, --host [host]            MPD Server Hostname or IP
  -p, --port [port]            MPD Server Port
  -c, --check                  List songs in the playlist
  -l, --list                   Display playlists in directory
  -r, --reload                 Clear and load the playlist
    --play [position]            Play the song in the playlist
  -f, --fetch <artist>         Download the playlist for an artist from GMusicProxy
    --gmusic <host:port>         The host and port of GMusicProxy
    --tracks <tracks>            Amount of songs to fetch

  --ifl                        Grabs the I'm feeling Lucky Playlist



Options

-d --directory

Always required. The directory of all the playlist files. Usually this is ~/.mpd/playlists. Look at your mpd.conf.

-e --ext

Default: .m3u. The extension of your playlist file.

-h --host

Default: localhost. The hostname or IP of your MPD server.

-p --port

Default: 6600. The MPD port.

Commands

-l --list

Lists all the playlists in the directory.


-r --reload

Clear the current playlist completely and load the specified playlist. It doesn't play yet.

--play [position]

Plays the first song or the song specified as the argument.


-f --fetch

Fetches the artist playlist from GMusicProxy and saves it to the playlist in the playlists directory.

--tracks

Default: 100. The amount of tracks for GMusicProxy to fetch.

--gmusic host:port

Default: localhost:9999. The address of the GMusicProxy service.


--ifl

Grabs the I'm Feeling Lucky playlist.

Examples

Set the tags

Done on localhost. Looks at the /var/lib/mpd/playlists/explosions in the sky.m3u file and compares the files in the current playlist and adds where it can.


gmusic-mpd -d /var/lib/mpd/playlists explosions in the sky

Reload and Play

Connects to the MPD server running on 192.168.1.100 and reloads and plays the first song in the Ratatat playlist.


gmusic-mpd -h 192.168.1.100 -d /var/lib/mpd/playlists -r --play ratatat

Fetch a playlist

You can download the playlist by searching for the artist and saving it in the playlists directory. If you specify the reload option it will also load the newly created playlist.

# Get a playlist for the artist Queen and save it
gmusic-mpd -d /var/lib/mpd/playlists queen -f Queen

# Get a 200 songs playlist and load the 5th track
gmusic-mpd -d /var/lib/mpd/playlists queen -f Queen -r --play 5 --tracks 200

I'm Feeling Lucky

You can grab automatic "I'm feeling lucky" playlist.

# Get IFL playlist and save it in lucky.m3u and play it
gmusic-mpd -d /var/lib/mpd/playlists --ifl -r --play