Sha256: ca02e2672e0fdcc87c7bb3b4e64ea7a698148ed8d54025953b178de6d3001804
Contents?: true
Size: 502 Bytes
Versions: 1
Compression:
Stored size: 502 Bytes
Contents
# frozen_string_literal: true require 'bundler' Bundler.setup :default 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mpd_client-0.3.0 | examples/range.rb |