Hi,
I noticed that mpinsert does not work when there are unicode characters
in the path of the song(s) to be added. Without -n, it just fails
silently, with -n I get this error:
Use of uninitialized value in print at /usr/bin/mpinsert line 107, <GEN0> line 38.
Greetings,
Frank
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.30-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages mpdtoys depends on:
ii libaudio-mpd-perl 0.19.7-1 Perl module to communicate with MP
ii perl 5.10.1-5 Larry Wall's Practical Extraction
mpdtoys recommends no packages.
Versions of packages mpdtoys suggests:
ii libproc-daemon-perl 0.03-2 Run Perl program as a daemon proce
pn libstring-approx-perl <none> (no description available)
ii libterm-readkey-perl 2.30-4 A perl module for simple terminal
ii mpd 0.15.3-1.1 Music Player Daemon
-- no debconf information
--
Frank Blendinger | fb(at)intoxicatedmind.net | GPG: 0x0BF2FE7A
Fingerprint: BB64 F2B8 DFD8 BF90 0F2E 892B 72CF 7A41 0BF2 FE7A
any updates on this issue?
As I really needed this feature, I came up with a short workaround
shellscript:
#!/bin/sh
curid=$(mpc playlist | grep "^>" | sed -e 's/>\([0-9]\+\).*$/\1/')
lastid=$(mpc playlist | tail -1 | sed -e 's/\( \|>\)\([0-9]\+\).*$/\2/')
output=$(cat - | mpc -v add)
songs=$(echo "$output" | wc -l)
i=1
while [ $i -le $songs ] ; do
mpc move $[$lastid + $i] $[$curid + $i]
let "i+=1"
done
echo "$output" | sed -e 's/^adding/queued/'
While playing with this, I noticed that mpinsert also has a really bad
performance:
% ms artist nin | wc -l
791
% time ms artist nin | mpinsert
[2@0] {move} Bad song index at /usr/share/perl5/Audio/MPD.pm line 154,
<GEN0> line 4743100.
mpc search artist nin 0,02s user 0,00s system 3% cpu 0,429 total
mpinsert 260,29s user 2,44s system 90% cpu 4:51,89 total
% time ms artist nin | mpdqueue.sh
mpc search artist nin 0,01s user 0,00s system 3% cpu 0,420 total
mpdqueue.sh 0,96s user 2,31s system 43% cpu 7,445 total
Greetings,
Frank