aboutsummaryrefslogtreecommitdiffstats
path: root/src/player.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-04-12 04:08:12 +0000
committerEric Wong <normalperson@yhbt.net>2008-04-12 04:08:12 +0000
commit45ebb851f4d0bd136b7c246a6a1b71561a6e5800 (patch)
tree5200c82fbe3489507fe84cbf2b11645dc4a1ad1b /src/player.c
parent9cf66d0e8a7875026d7009d5df331fabf614ac55 (diff)
downloadmpd-45ebb851f4d0bd136b7c246a6a1b71561a6e5800.tar.gz
mpd-45ebb851f4d0bd136b7c246a6a1b71561a6e5800.tar.xz
mpd-45ebb851f4d0bd136b7c246a6a1b71561a6e5800.zip
Drop metadata updates from HTTP for now (input HTTP, and shout)
It is way more complicated than it should be; and locking it for thread-safety is too difficult. [merged r7183 from branches/ew] git-svn-id: https://svn.musicpd.org/mpd/trunk@7241 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/player.c33
1 files changed, 1 insertions, 32 deletions
diff --git a/src/player.c b/src/player.c
index 4071b5a57..109cbe936 100644
--- a/src/player.c
+++ b/src/player.c
@@ -95,15 +95,6 @@ static void * player_task(mpd_unused void *unused)
return NULL;
}
-static void resetPlayerMetadata(void)
-{
- PlayerControl *pc = &(getPlayerData()->playerControl);
-
- if (pc->metadataState == PLAYER_METADATA_STATE_READ) {
- pc->metadataState = PLAYER_METADATA_STATE_WRITE;
- }
-}
-
void playerInit(void)
{
pthread_attr_t attr;
@@ -130,7 +121,6 @@ static void set_current_song(Song *song)
PlayerControl *pc = &(getPlayerData()->playerControl);
pc->fileTime = song->tag ? song->tag->time : 0;
- copyMpdTagToMetadataChunk(song->tag, &(pc->fileMetadataChunk));
get_song_url(pc->utf8url, song);
}
@@ -143,7 +133,6 @@ int playerPlay(int fd, Song * song)
set_current_song(song);
- resetPlayerMetadata();
pc->play = 1;
/* FIXME: _nb() variant is probably wrong here, and everywhere... */
do { wakeup_player_nb(); } while (pc->play);
@@ -346,7 +335,6 @@ int playerSeek(int fd, Song * song, float seek_time)
set_current_song(song);
if (pc->error == PLAYER_ERROR_NOERROR) {
- resetPlayerMetadata();
pc->seekWhere = seek_time;
pc->seek = 1;
/* FIXME: _nb() is probably wrong here, too */
@@ -415,24 +403,5 @@ int getPlayerChannels(void)
/* this actually creates a dupe of the current metadata */
Song *playerCurrentDecodeSong(void)
{
- static Song *song;
- static MetadataChunk *prev;
- Song *ret = NULL;
- PlayerControl *pc = &(getPlayerData()->playerControl);
-
- if (pc->metadataState == PLAYER_METADATA_STATE_READ) {
- if (prev)
- free(prev);
- prev = xmalloc(sizeof(MetadataChunk));
- memcpy(prev, &(pc->metadataChunk), sizeof(MetadataChunk));
- if (song)
- freeJustSong(song);
- song = newNullSong();
- song->url = xstrdup(pc->currentUrl);
- song->tag = metadataChunkToMpdTagDup(prev);
- ret = song;
- resetPlayerMetadata();
- }
-
- return ret;
+ return NULL;
}