diff options
author | Qball Cow <qball@qballcow.nl> | 2007-08-19 20:23:11 +0000 |
---|---|---|
committer | Qball Cow <qball@qballcow.nl> | 2007-08-19 20:23:11 +0000 |
commit | f378b5509ed7faa5382286683b7c8ea96bc6c024 (patch) | |
tree | 73197df653afabbdc3a2fa4966228e5c08dd1723 | |
parent | ae2ecb4054180da4597958a79da6c9f6bcf7bebd (diff) | |
download | mpd-f378b5509ed7faa5382286683b7c8ea96bc6c024.tar.gz mpd-f378b5509ed7faa5382286683b7c8ea96bc6c024.tar.xz mpd-f378b5509ed7faa5382286683b7c8ea96bc6c024.zip |
some fixed
git-svn-id: https://svn.musicpd.org/mpd/branches/q-mpd@6767 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/storedPlaylist.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/storedPlaylist.c b/src/storedPlaylist.c index a62ee313c..3e2fdf827 100644 --- a/src/storedPlaylist.c +++ b/src/storedPlaylist.c @@ -144,7 +144,11 @@ StoredPlaylist *newStoredPlaylist(const char *utf8name, int fd, int ignoreExisti sp->fspath = xstrdup(filename); /* Increase stored playlist version id*/ - incrStoredPlaylistVersion(); + if(!ignoreExisting) + { + DEBUG("new stored playlist\n"); + incrStoredPlaylistVersion(); + } return sp; } @@ -308,6 +312,7 @@ static int moveSongInStoredPlaylist(int fd, StoredPlaylist *sp, int src, int des } } /* Increase stored playlist version id*/ + DEBUG("move stored playlist\n"); incrStoredPlaylistVersion(); return 0; @@ -335,6 +340,7 @@ int moveSongInStoredPlaylistByPath(int fd, const char *utf8path, int src, int de freeStoredPlaylist(sp); /* Increase stored playlist version id*/ + DEBUG("Move stored playlist\n"); incrStoredPlaylistVersion(); return 0; @@ -367,6 +373,7 @@ int removeAllFromStoredPlaylistByPath(int fd, const char *utf8path) while (fclose(file) != 0 && errno == EINTR); /* Increase stored playlist version id*/ + DEBUG("Remove all stored playlist\n"); incrStoredPlaylistVersion(); return 0; } @@ -382,8 +389,6 @@ static int removeOneSongFromStoredPlaylist(int fd, StoredPlaylist *sp, int pos) deleteNodeFromList(sp->list, node); - /* Increase stored playlist version id*/ - incrStoredPlaylistVersion(); return 0; } @@ -484,8 +489,6 @@ void appendPlaylistToStoredPlaylist(StoredPlaylist *sp, Playlist *playlist) int i; for (i = 0; i < playlist->length; i++) appendSongToStoredPlaylist(sp, playlist->songs[i]); - /* Increase stored playlist version id*/ - incrStoredPlaylistVersion(); } int renameStoredPlaylist(int fd, const char *utf8from, const char *utf8to) |