Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The listplaylist command removes whitespaces at the beginning of a filename #1961

Closed
jcorporation opened this issue Jan 10, 2024 · 1 comment

Comments

@jcorporation
Copy link
Member

Bug report

Describe the bug

The listplaylist command removes in its output the whitespace from the beginning of a filename. In the playlist file itself the filename is correct.

The space is in this example is between Soundtracks/Matrix - Soundtrack Collection/The Animatrix/ and 08.

$ telnet localhost 6600 
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
OK MPD 0.24.0
listplaylist Animatrix
file: Soundtracks/Matrix - Soundtrack Collection/The Animatrix/08 - Junkie XL (ft. Saffron) - Beauty Never Fades (Animatrix Edit).mp3
file: Soundtracks/Matrix - Soundtrack Collection/The Animatrix/02 - FreexLand - Big Wednesday.mp3
file: Soundtracks/Matrix - Soundtrack Collection/The Animatrix/03 - Layo & Bushwacka! - Blind Tiger.mp3
file: Soundtracks/Matrix - Soundtrack Collection/The Animatrix/10 - Juno Reactor - Conga Fury (Animatrix Mix).mp3
file: Soundtracks/Matrix - Soundtrack Collection/The Animatrix/07 - Death in Vegas - Hands Around My Throat.mp3
file: Soundtracks/Matrix - Soundtrack Collection/The Animatrix/05 - Meat Beat Manifesto - Martenot Waves.mp3
file: Soundtracks/Matrix - Soundtrack Collection/The Animatrix/11 - Junkie XL & Don Davis - Red Pill, Blue Pill.mp3
file: Soundtracks/Matrix - Soundtrack Collection/The Animatrix/06 - Photek - Ren 2.mp3
file: Soundtracks/Matrix - Soundtrack Collection/The Animatrix/09 - Overseer - Supermoves (Animatrix Remix).mp3
file: Soundtracks/Matrix - Soundtrack Collection/The Animatrix/12 - Tech Itch & Don Davis - The Real.mp3
file: Soundtracks/Matrix - Soundtrack Collection/The Animatrix/04 - Supreme Beings of Leisure - Under the Gun.mp3
file: Soundtracks/Matrix - Soundtrack Collection/The Animatrix/01 - Peace Orchestra - Who Am I  (Animatrix Edit).mp3
OK
close
Connection closed by foreign host.
$ head -1 /var/lib/mpd/playlists/Animatrix.m3u 
Soundtracks/Matrix - Soundtrack Collection/The Animatrix/ 08 - Junkie XL (ft. Saffron) - Beauty Never Fades (Animatrix Edit).mp3

Expected Behavior

The playlist is correctly listed.

Actual Behavior

A whitespace at the start of a filename is removed.

Version

Music Player Daemon 0.24 (v0.23.15-1119-g6a43c8ccc)
Copyright 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright 2008-2021 Max Kellermann <max.kellermann@gmail.com>
This is free software; see the source for copying conditions.  There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Database plugins:
 simple proxy

Storage plugins:
 local udisks curl

Neighbor plugins:
 udisks

Decoders plugins:
 [mad] mp3 mp2
 [vorbis] ogg oga
 [oggflac] ogg oga
 [flac] flac
 [dsdiff] dff
 [dsf] dsf
 [ffmpeg] 264 265 302 3g2 3gp 4xm 669 722 aa aa3 aac aax ac3 ace acm act adf adp ads adx aea afc aiff aix al alias_pix alp amf amr amrnb amrwb ams anm ans apc ape apl apm apng aptx aptxhd aqt argo_asf argo_brp argo_cvg art asc asf asf_o ass ast au avc avi avif avr avs avs2 avs3 bcstm bethsoftvid bfi bfstm bin bink binka bit bitpacked bmp_pipe bmv boa bonk brender_pix brstm c2 c93 caf cdata cdg cdxl cgi cif cine codec2raw concat cri_pipe dash dat data daud dav dbm dds_pipe dfa dff dfpwm dif digi dirac diz dmf dnxhd dpx_pipe dsf dsicin dsm dss dst dtk dtm dts dtshd dv dvbsub dvbtxt dxa ea eac3 ec3 exr_pipe f32be f32le f4v f64be f64le fap far ffmetadata film_cpk fits flac flic flm flv frm fsb fwse g722 g723_1 g726 g726le g729 gdm gdv gem_pipe genh gif gif_pipe gsm gxf h261 h263 h264 h265 h26l hca hcom hdr_pipe hevc hls hnm ice ico idcin idf idx iff ifv ilbc image2 image2pipe imf imx ipmovie ipu ircam ism isma ismv iss it iv8 ivf ivr j2b j2k j2k_pipe jacosub jpeg_pipe jpegls_pipe jpegxl_pipe jv kux kvag laf libgme lmlm4 loas lrc lvf lxf m15 m2a m4a m4b m4v mac mca mcc mdl med mgsts microdvd mj2 mjpeg mjpg mk3d mka mks mkv mlp mlv mm mmcmp mmf mms mo3 mod mods moflex mov mp2 mp3 mp4 mpa mpc mpc8 mpeg mpegts mpegtsraw mpegvideo mpl2 mpo mptm msbc msf msnwctcp msp mt2 mtaf mtm mtv musx mv mvi mxf mxg nfo nist nsp nst nsv nut nuv obu ogg okt oma omg paf pam_pipe pbm_pipe pcx_pipe pfm_pipe pgm_pipe pgmyuv_pipe pgx_pipe phm_pipe photocd_pipe pictor_pipe pjs plm pmp png_pipe pp_bnk ppm ppm_pipe psd_pipe psm psp psxstr pt36 ptm pva pvf qcif qcp qdraw_pipe qoi_pipe r3d rco rcv rgb rka rl2 rm roq rpl rsd rso rt rtp rtsp s16be s24be s24le s32be s32le s337m s3m sami sap sb sbc sbg scc scd sdns sdp sdr2 sds sdx ser sf sfx sfx2 sga sgi_pipe shn sln smi smk smush sol son sox spdif sph srt ss2 st26 stk stl stm stp str sub sunrast_pipe sup svag svg_pipe svs sw swf tak tco tedcaptions thd thp tiertexseq tiff_pipe tmv tta txd txt ty ty+ u16be u24be u24le u32be u32le ub ul ult umx uw v v210 vag vb vbn_pipe vc1 vidc viv vividas vmd voc vpk vqe vqf vql vt vtt w64 wa wav way wc3movie webm webm_dash_manifest webp_pipe wow wsaud wsd wsvqa wtv wv wve xa xbin xbm_pipe xl xm xmd xmv xpk xpm_pipe xvag xwd_pipe xwma y4m yop yuv yuv10 rtp:// rtsp:// rtsps://
 [pcm]

Filters:
 libsamplerate

Tag plugins:
 id3tag

Output plugins:
 null fifo pipe alsa httpd snapcast recorder

Encoder plugins:
 null vorbis lame wave flac

Input plugins:
 file io_uring alsa curl ffmpeg

Playlist plugins:
 extm3u m3u pls xspf asx rss flac cue embcue

Protocols:
 file:// alsa:// ftp:// ftps:// gopher:// hls+http:// hls+https:// http:// https:// mmsh:// mmst:// rtmp:// rtmpe:// rtmps:// rtmpt:// rtmpte:// rtmpts:// rtp:// rtsp:// rtsps:// scp:// sftp:// smb:// srtp://

Other features:
 dbus udisks epoll icu inotify ipv6 tcp un

Configuration

music_directory		"/home/juergen/musik/"
playlist_directory		"/var/lib/mpd/playlists"
database {
        plugin          "simple"
        path            "/var/lib/mpd/tag_cache"
        cache_directory "/var/lib/mpd/cache"
}
log_file			"/var/log/mpd/mpd.log"
pid_file			"/run/mpd/pid"
state_file			"/var/lib/mpd/state"
sticker_file                   "/var/lib/mpd/sticker.sql"
user				"mpd"
bind_to_address		"any"
bind_to_address		"/run/mpd/socket"
log_level			"verbose"
metadata_to_use "artist,album,albumartist,title,track,name,genre,date,originaldate,composer,performer,disc,musicbrainz_artistid, musicbrainz_albumid, musicbrainz_albumartistid, musicbrainz_trackid, musicbrainz_releasetrackid, musicbrainz_workid"
input {
        plugin "curl"
		verify_peer "yes"
		verify_host "yes"
}
input {
        enabled    "no"
        plugin     "qobuz"
}
input {
        enabled      "no"
        plugin       "tidal"
}
decoder {
        plugin                  "hybrid_dsd"
        enabled                 "no"
}
audio_output {
	type		"alsa"
	name		"My ALSA Device Local Soundcard"
}
audio_output {
	type		"httpd"
	name		"http"
	port		"8000"
	format		"44100:16:1"
	always_on	"yes"
}
audio_output {
	type		"null"
	name		"My Null Output 1"
}
audio_output {
	type		"null"
	name		"My Null Output 2"
}
audio_output {
	type		"null"
	name		"My Null Output 3"
}
filesystem_charset		"UTF-8"
neighbors {
    plugin "udisks"
}

Log

Log shows no error.

client: [36] opened from 127.0.0.1:44090
client: [36] process command "listplaylist Animatrix"
client: [36] command returned 0
@MaxKellermann
Copy link
Member

@smithjd15 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants