Sha256: da50f653094e9a97bddbfe16056a98d7a83303a3e3955b8804bb1e8db342e053
Contents?: true
Size: 523 Bytes
Versions: 3
Compression:
Stored size: 523 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) # 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
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
o-mpd_client-0.2.0.1 | examples/rangeid.rb |
mpd_client-0.2.0 | examples/rangeid.rb |
mpd_client-0.1.0 | examples/rangeid.rb |