Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 683 Bytes

README.md

File metadata and controls

36 lines (24 loc) · 683 Bytes

libnp builds.sr.ht status

A tiny cross-platform library for extracting information about the music/image/video that is Now Playing on the system.

Supported OS:

  • Windows (using GlobalSystemMediaTransportControlsSessionManager)
  • Linux (using DBus/MPRIS)

Building

cmake .
cmake --build .

Usage

See include/np.h and np/main.c for an example.

The general idea is:

np_init();

struct np_info *info = np_info_get();
if (info) {
    // do something with info->track, ...

    np_info_destroy(info);
}

np_destroy();

License

MIT