diff options
author | Max Kellermann <max@duempel.org> | 2008-10-08 11:05:25 +0200 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-10-11 19:21:47 -0700 |
commit | d24e17ebdd5eeb16c87b897a9ecb52a5704a52b3 (patch) | |
tree | d8baf242394faccf5c73ac18367c9a542a73bad7 /src/playlist.c | |
parent | 5f15ba96cf5fa641d34d4e98ae8e0972fa6fef0c (diff) | |
download | mpd-d24e17ebdd5eeb16c87b897a9ecb52a5704a52b3.tar.gz mpd-d24e17ebdd5eeb16c87b897a9ecb52a5704a52b3.tar.xz mpd-d24e17ebdd5eeb16c87b897a9ecb52a5704a52b3.zip |
song: replaced all song constructors
Provide separate constructors for creating a remote song, a local
song, and one for loading data from a song file. This way, we can add
more assertions.
Diffstat (limited to '')
-rw-r--r-- | src/playlist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/playlist.c b/src/playlist.c index 02800c2ba..22df8be5d 100644 --- a/src/playlist.c +++ b/src/playlist.c @@ -577,7 +577,7 @@ enum playlist_result addToPlaylist(const char *url, int *added_id) if ((song = getSongFromDB(url))) { } else if (!(isValidRemoteUtf8Url(url) && - (song = newSong(url, NULL)))) { + (song = song_remote_new(url)))) { return PLAYLIST_RESULT_NO_SUCH_SONG; } @@ -596,7 +596,7 @@ int addToStoredPlaylist(const char *url, const char *utf8file) if (!isValidRemoteUtf8Url(url)) return ACK_ERROR_NO_EXIST; - if ((song = newSong(url, NULL))) { + if ((song = song_remote_new(url))) { int ret = appendSongToStoredPlaylistByPath(utf8file, song); freeJustSong(song); return ret; |