Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

at master 26 lines 635 B view raw
1# frozen_string_literal: true 2# 3# Plugin example — listens to track-change events and prints a one-line log. 4# 5# ruby -Ilib examples/plugin.rb 6 7require "rockbox" 8 9class ConsoleScrobbler < Rockbox::Plugin 10 def name; "console-scrobbler" end 11 def version; "0.1.0" end 12 def description; "Logs every track change to stdout" end 13 14 def install(ctx) 15 ctx.events.on(:track_changed) do |track| 16 puts "#{Time.now.iso8601} #{track.artist}#{track.title}" 17 end 18 end 19end 20 21client = Rockbox::Client.new 22client.use(ConsoleScrobbler.new) 23client.connect 24 25trap("INT") { client.disconnect; exit } 26sleep