Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added script which displays metadata about the current track.

  • Loading branch information...
commit 5028c59513500a47b792cf2f7870dba753889c81 1 parent 775da5b
@njh authored
Showing with 16 additions and 0 deletions.
  1. +16 −0 examples/metadata.rb
View
16 examples/metadata.rb
@@ -0,0 +1,16 @@
+#!/usr/bin/ruby
+#
+# Script to display the metadata hash for the currently playing track.
+#
+# Author:: Nicholas J Humfrey (mailto:njh@aelius.com)
+# Copyright:: Copyright (c) 2008 Nicholas J Humfrey
+# License:: Distributes under the same terms as Ruby
+#
+
+$:.unshift File.dirname(__FILE__)+'/../lib'
+
+require 'mpris'
+require 'pp'
+
+mpris = Mpris.new
+pp mpris.player.metadata
Please sign in to comment.
Something went wrong with that request. Please try again.