aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-06-09 02:50:44 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-06-09 02:50:44 +0000
commitd217505dc63a1789ace5699699f056368fb3ecc3 (patch)
treee0dab49564fb91a93865be0402e71e2985c9cc8a /src/playlist.c
parent304639c9a6cebe8fa34e6bc2bbf64bc1ce3ec8d1 (diff)
downloadmpd-d217505dc63a1789ace5699699f056368fb3ecc3.tar.gz
mpd-d217505dc63a1789ace5699699f056368fb3ecc3.tar.xz
mpd-d217505dc63a1789ace5699699f056368fb3ecc3.zip
implemented songid commands: playlistid, playid, seekid, deleteid, moveid, swapid
git-svn-id: https://svn.musicpd.org/mpd/trunk@1408 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/playlist.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/playlist.c b/src/playlist.c
index e7eb1827d..31dc31fc5 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -1081,12 +1081,10 @@ int moveSongInPlaylist(FILE * fp, int from, int to) {
return 0;
}
-int moveSongInPlaylistById(FILE * fp, int id1, int id2) {
+int moveSongInPlaylistById(FILE * fp, int id1, int to) {
checkSongId(id1);
- checkSongId(id2);
- return moveSongInPlaylist(fp, playlist.idToNum[id1],
- playlist.idToNum[id2]);
+ return moveSongInPlaylist(fp, playlist.idToNum[id1], to);
}
void orderPlaylist() {
@@ -1461,3 +1459,7 @@ int seekSongInPlaylistById(FILE * fp, int id, float time) {
return seekSongInPlaylist(fp, playlist.idToNum[id], time);
}
+
+int getPlaylistSongId(int song) {
+ return playlist.numToId[song];
+}