int addToPlaylist(FILE * fp, char * url) { Song * song; DEBUG("add to playlist: %s\n",url); if((song = getSongFromDB(url))) { } else if(isValidRemoteUtf8Url(url) && (song = newSong(url, SONG_TYPE_URL, NULL))) { } else { commandError(fp, ACK_ERROR_NO_EXIST, "\"%s\" is not in the music db or is " "not a valid url\n", url); return -1; } return addSongToPlaylist(fp,song); }
int directoryAddSongToPlaylist(FILE * fp, Song * song, void * data) { return addSongToPlaylist(fp, song); }