aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-10-28 14:51:48 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-10-28 14:51:48 +0000
commitd79f3110b504e0ff4518717dfab4e2a87fe8c089 (patch)
treeab9464f789c454a46973f720e3e65160cff5fee2 /src
parent82625dbf1ae8cc12c8c4e59c1754756166497ab3 (diff)
downloadmpd-d79f3110b504e0ff4518717dfab4e2a87fe8c089.tar.gz
mpd-d79f3110b504e0ff4518717dfab4e2a87fe8c089.tar.xz
mpd-d79f3110b504e0ff4518717dfab4e2a87fe8c089.zip
when sending metadata to audiodevice, put filename in title if no tag data is found
git-svn-id: https://svn.musicpd.org/mpd/trunk@2381 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r--src/decode.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/decode.c b/src/decode.c
index 148ed02c5..2a3170c7b 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -158,6 +158,10 @@ int waitOnDecode(PlayerControl * pc, DecoderControl * dc, OutputBuffer * cb,
}
if((tag = metadataChunkToMpdTagDup(&(pc->fileMetadataChunk)))) {
+ /* lets put the filename in the title if no tag info */
+ if(!tag->title && !tag->artist && !tag->album) {
+ tag->title = strdup(pc->currentUrl);
+ }
sendMetadataToAudioDevice(tag);
freeMpdTag(tag);
}