From bf9787ac517fe19af5fd6ba918a66b220fcbc923 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 11 Jan 2022 18:21:04 +0000 Subject: deduplicate and freeze pathnames + metadata This ought to save some memory for dtas-player and dtas-readahead users with multiple instances of the same track(s) on their track list. --- lib/dtas/player.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/dtas/player.rb') diff --git a/lib/dtas/player.rb b/lib/dtas/player.rb index ff7440f..243f0b0 100644 --- a/lib/dtas/player.rb +++ b/lib/dtas/player.rb @@ -208,13 +208,13 @@ class DTAS::Player # :nodoc: command = msg.shift case command when "enq" - enq_handler(io, msg[0]) + enq_handler(io, -msg[0]) when "enq-cmd" - enq_handler(io, { "command" => msg[0]}) + enq_handler(io, { "command" => -msg[0]}) when "pause", "play", "play_pause" play_pause_handler(io, command) when "pwd" - io.emit(Dir.pwd) + io.emit(-Dir.pwd) else m = "dpc_#{command.tr('-', '_')}" __send__(m, io, msg) if respond_to?(m) -- cgit v1.2.3-24-ge0c7