diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-05-31 11:42:46 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-05-31 11:42:46 +0000 |
commit | 000e053ce73f6f87bc7c3797caceb1b60e467dcf (patch) | |
tree | 2411ee50bcd20c53cb8ed6f82bfb76ee5227d77b /src/playlist.c | |
parent | b4a91d574fb3ad8ffdacab792a46cc668010c7d6 (diff) | |
download | mpd-000e053ce73f6f87bc7c3797caceb1b60e467dcf.tar.gz mpd-000e053ce73f6f87bc7c3797caceb1b60e467dcf.tar.xz mpd-000e053ce73f6f87bc7c3797caceb1b60e467dcf.zip |
icynames are now copied to title of streams
git-svn-id: https://svn.musicpd.org/mpd/trunk@1258 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/playlist.c')
-rw-r--r-- | src/playlist.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/playlist.c b/src/playlist.c index 0c499f0ad..429bfe903 100644 --- a/src/playlist.c +++ b/src/playlist.c @@ -734,11 +734,34 @@ int playPlaylist(FILE * fp, int song, int stopOnError) { return playPlaylistOrderNumber(fp,i); } +void syncCurrentPlayerDecodeMetadata() { + long i = 0; + Song * songPlayer = playerCurrentDecodeSong(); + Song * song; + + if(!songPlayer) return; + + for(i=0; i<playlist.length; i++) { + song = playlist.songs[i]; + + if(song->type == SONG_TYPE_URL && + 0 == strcmp(song->utf8url, + songPlayer->utf8url)) + { + if(song->tag) freeMpdTag(song->tag); + song->tag = mpdTagDup(songPlayer->tag); + incrPlaylistVersion(); + } + } +} + void syncPlayerAndPlaylist() { if(playlist_state!=PLAYLIST_STATE_PLAY) return; if(getPlayerState()==PLAYER_STATE_STOP) playPlaylistIfPlayerStopped(); else syncPlaylistWithQueue(!playlist_queueError); + + syncCurrentPlayerDecodeMetadata(); } int currentSongInPlaylist(FILE * fp) { |