Sha256: 2aeb3be3645b2aef37704941036fda3a0f93affc742182be69ee96d5bea6e41e

Contents?: true

Size: 515 Bytes

Versions: 3

Compression:

Stored size: 515 Bytes

Contents

# frozen_string_literal: true

require 'bundler'
Bundler.setup :default

require 'pp'
require 'logger'
require 'mpd_client'

MPD::Client.log = Logger.new($stderr)

client = MPD::Client.new
client.connect('localhost', 6600)

# delete all songs from the current playlist, except for the firts ten
client.delete([10])

# move the first three songs after the fifth number in the playlist
client.move([0, 3], 5)

# print songs form 5 to 10
client.playlistinfo([5, 10]).each { |s| puts "#{s['artist']} - #{s['title']}" }

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
o-mpd_client-0.2.0.1 examples/range.rb
mpd_client-0.2.0 examples/range.rb
mpd_client-0.1.0 examples/range.rb