Sha256: 7b59067fc42acae268261dcf1dbab94f7b448411de2ed16a56445e53bb3f3735
Contents?: true
Size: 487 Bytes
Versions: 2
Compression:
Stored size: 487 Bytes
Contents
require 'bundler' Bundler.setup :default require 'pp' require 'logger' require 'mpd_client' MPDClient.log = Logger.new($stderr) client = MPDClient.new client.connect('localhost', 6600) # Get id of the first song in the playllist song = client.playlistinfo(1).first pp "#{song['artist']} - #{song['title']}" song_id = song['id'] # Specifies the portion of the song that shall be played client.rangeid(song_id, [60,70]) # Play the playlist at song 1 client.play(1) pp client.status
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mpd_client-0.0.6 | examples/rangeid.rb |
mpd_client-0.0.5 | examples/rangeid.rb |