From 5e4be9e495677a6728e3161e39a05a081a5bff9a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 8 Oct 2008 11:05:25 +0200 Subject: 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. --- src/playlist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/playlist.c') diff --git a/src/playlist.c b/src/playlist.c index 624636c0c..823720aef 100644 --- a/src/playlist.c +++ b/src/playlist.c @@ -561,7 +561,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; } @@ -581,7 +581,7 @@ int addToStoredPlaylist(const char *url, const char *utf8file) if (!isValidRemoteUtf8Url(url)) return ACK_ERROR_NO_EXIST; - song = newSong(url, NULL); + song = song_remote_new(url); if (song) { int ret = appendSongToStoredPlaylistByPath(utf8file, song); freeJustSong(song); -- cgit v1.2.3