• Stars
    star
    136
  • Rank 267,628 (Top 6 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 7 years ago
  • Updated 13 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An implementation of the MPRIS protocol for MPD.

mpd-mpris

AUR version AUR version Flake is available Matrix chat

An implementation of the MPRIS protocol for MPD.


Installation

Probably needs Go v1.9 or newer.

go install github.com/natsukagami/mpd-mpris/cmd/mpd-mpris

For Arch Linux users.

Check out the AUR packages mpd-mpris and mpd-mpris-bin for the manually and pre-built versions respectively. A systemd user service file is also provided (enable with systemd --user enable mpd-mpris --now).

For Nix users

The repository provides the mpd-mpris package, overlay and a NixOS/home-manager module (services.mpd-mpris) as a flake.

# nix flake show github:natsukagami/mpd-mpris
github:natsukagami/mpd-mpris
├───devShells
│   ├───aarch64-darwin
│   │   └───default: development environment 'nix-shell'
│   ├───aarch64-linux
│   │   └───default: development environment 'nix-shell'
│   ├───x86_64-darwin
│   │   └───default: development environment 'nix-shell'
│   └───x86_64-linux
│       └───default: development environment 'nix-shell'
├───homeManagerModules:
│   └───default: home-manager module
├───nixosModules
│   └───default: NixOS module
├───overlays
│   └───default: Nixpkgs overlay
└───packages
    ├───aarch64-darwin
    │   └───default: package 'mpd-mpris'
    ├───aarch64-linux
    │   └───default: package 'mpd-mpris'
    ├───x86_64-darwin
    │   └───default: package 'mpd-mpris'
    └───x86_64-linux
        └───default: package 'mpd-mpris'

The mpd-mpris module has the following options:

  • services.mpd-mpris.enable: Enable the service.
  • services.mpd-mpris.package: Overrides the package. Defaults to pkgs.mpd-mpris (which uses the nixpkgs package without the overlay).
  • services.mpd-mpris.enableDefaultInstance: The module has a default instance that listens to the local mpd, enable this.

Per-instance configurations:

  • services.mpd-mpris.instances.{name}.host: The host to connect to. (-host flag)
  • services.mpd-mpris.instances.{name}.network: The network type. (-network flag)
  • services.mpd-mpris.instances.{name}.port: The port to connect to. (-port flag)
  • services.mpd-mpris.instances.{name}.passwordFile: The file containing the password to use. (-pwd-file flag)

Each instance will create a mpd-mpris-{name} service (with the default being mpd-mpris), with the MPRIS instance name org.mpris.MediaPlayer2.mpd.{name} (with the default being just org.mpris.MediaPlayer2.mpd). All per-instance configurations are available without the instances.{name} infix, and will apply to the default instance.

Running

# mpd-mpris --help
Usage of mpd-mpris:
  -host string
        The MPD host (default localhost)
  -instance-name string
        Set the MPRIS's interface as 'org.mpris.MediaPlayer2.mpd.{instance-name}'
  -network string
        The network used to dial to the mpd server. Check https://golang.org/pkg/net/#Dial for available values (most common are "tcp" and "unix") (default "tcp")
  -no-instance
        Set the MPRIS's interface as 'org.mpris.MediaPlayer2.mpd' instead of 'org.mpris.MediaPlayer2.mpd.instance#'
  -port int
        The MPD port. Only works if network is "tcp". If you use anything else, you should put the port inside addr yourself. (default 6600)
  -pwd string
        The MPD connection password. Leave empty for none.
  -pwd-file string
        Path to the file containing the mpd server password.

Will block for requests and log them down so you may want to run and forget.

Questions?

Join our Matrix channel at #mpd-mpris:matrix.org.

Implementation Status

  • Root Running
  • Player control
  • Track list
  • Playlist support

License

MIT

More Repositories

1

themis-web-interface

A web interface for Themis, written in Node.js
JavaScript
35
star
2

kjudge

A simple system for hosting competitive programming contests.
Go
22
star
3

youmubot

Public Youmubot system, modular (I hope!) and safe and fast...
Rust
10
star
4

nix-home

My personal home-manager scripts. Mirror of https://git.dtth.ch/nki/nix-home
Nix
10
star
5

go-osu-parser

A .osu file parser for Golang. A direct port of https://github.com/nojhamster/osu-parser.
Go
7
star
6

kagami-stream

uwu??
Rust
7
star
7

cv

My personal CV
Haskell
5
star
8

tet-school-2017

Editorials for HSGS Tet School 2017
C++
2
star
9

tree-sitter-hylo

A tree-sitter language description for the Hylo programming language.
JavaScript
2
star
10

gcj19-fsharp

Trying to solve Google Code Jam 2019 in F#!
F#
2
star
11

suicord-data

suicord :suisuisui:
Go
2
star
12

mpdstream-discord

A Discord bot that streams your MPD output to Discord channels.
TypeScript
2
star
13

natsukagami.github.io

HTML
1
star
14

pre-duyen-hai-2017

Kì thi Pre Duyên hải 2017 cho Dự tuyển.
TeX
1
star
15

i3blocks-mpris

MPRIS status for i3blocks
Rust
1
star
16

powerful-detector

A testcase automatic formatter for programming contests
JavaScript
1
star
17

kjudge-api-go

An pluggable API for automated judging systems. Written in Go for efficiency testing.
Go
1
star
18

kagami-notes

My source code for `https://blog.nkagami.me`. Using the Hugo generator.
HTML
1
star
19

hakkero-project

A mini web novel game where players strives to win by writing the best collaborative story they can come up with.
JavaScript
1
star
20

rust-codeforces-api

Codeforces API for Rust (with blocking reqwest)
Rust
1
star
21

themis-web-interface-rpc

A RPC "plugin" for themis-web-interface to launch over the network.
Go
1
star
22

osu-music-copy

A program that allows you to copy and organize your osu! music library with ease.
Go
1
star
23

express-brute-nedb

An express-brute store using nedb
JavaScript
1
star
24

hsgs-osu-collab-100kan

HSGS osu! collab [100 kanojo version]
1
star
25

codefun-chd-statements

An attempt to re-format codefun's `Cúp Huynh Đệ` statements to a more friendly GFM format.
1
star
26

gears-book

The book on writing structured concurrency in gears
Scala
1
star