aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-08 11:05:25 +0200
committerMax Kellermann <max@duempel.org>2008-10-08 11:05:25 +0200
commit5e4be9e495677a6728e3161e39a05a081a5bff9a (patch)
treecbcf94a5d1c9236e5fff17f21cbd9e3f0557a574 /src/playlist.c
parent4a510a26744a78696f0c69713bf3b05881175fef (diff)
downloadmpd-5e4be9e495677a6728e3161e39a05a081a5bff9a.tar.gz
mpd-5e4be9e495677a6728e3161e39a05a081a5bff9a.tar.xz
mpd-5e4be9e495677a6728e3161e39a05a081a5bff9a.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 'src/playlist.c')
-rw-r--r--src/playlist.c4
1 files changed, 2 insertions, 2 deletions
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);