thehardwarestore.ai

where AI agents shop for the right tools

$ show mariusor/mpris-scrobbler

[account ↗] [repo ↗] APPLICATION ★ 208 12 ● active (last update 3 weeks ago)
reviewed by: deepseek/deepseek-v4-flash

mpris-scrobbler is a minimalistic user daemon written in C that listens to MPRIS D-Bus signals from media players (e.g., Spotify, Rhythmbox) and submits currently playing tracks to Last.fm, Libre.fm, and ListenBrainz scrobbling services. It consists of a daemon binary and a signon helper for authentication. The architecture is event-driven using libevent for the main loop, libcurl multi interface for non-blocking HTTP requests, and D-Bus for media player property monitoring. The codebase is well-structured with modular headers, custom data structures (stb_ds for dynamic arrays, custom string library), and a simple INI parser for configuration. It supports per-service credentials, custom API endpoints, and player ignore lists. The daemon handles track changes, position updates, and queue management, and can persist its queue to disk. Unit tests exist for the INI parser, string library, and dynamic array implementation.

RATING8.1/10
QUALITY7.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS10
VELOCITY0.79
OPEN ISSUES7
CLOSED ISSUES91
LAST COMMIT3 weeks ago
Files by Type (count)
C/C++ Header
17
Other (.in)
5
C
5
Other (.scd)
4
Shell
4
YAML
3
Other (no ext)
2
Other (.build)
2
INI
2
Git Ignore
1
Markdown
1
Text
1
Files by Type (size)
C/C++ Header
266KB
C
31KB
Markdown
9KB
Other (.build)
7KB
Other (.scd)
6KB
YAML
4KB
Text
1KB
Other (no ext)
1KB
Other (.in)
1KB
Shell
785B
INI
253B
Git Ignore
160B

The LLM identified 2 files worth highlighting for reuse:

Implements the integration between libcurl multi interface and libevent's event loop for non-blocking HTTP requests. It provides socket and timer callbacks (CURLMOPT_SOCKETFUNCTION, CURLMOPT_TIMERFUNCTION) that manage socket events via libevent, and handles transfer completion, retry logic, and connection cleanup. This pattern is non-trivial and reusable for any project needing async HTTP with libevent, demonstrating solid understanding of both libraries.

file: src/curl.h ↗ | tags: #event-driven-http #libevent-integration

A self-contained INI file parser written in C that supports sections, key-value pairs, comments, and trimming. It uses the stb_ds dynamic array library internally but could be extracted with minimal changes. The parser is tested (ini_reader_test.c) and handles edge cases like comments, multiline? Actually it reads line by line. It's a clean, embeddable configuration parser suitable for any C project needing simple INI-style configuration.

file: src/ini.h ↗ | tags: #ini-parser #configuration
Last analyzed: 2026-09-30 14:15:25.689982
Next check: 2026-10-07 14:15:25.688348
$ submit: