diff options
Diffstat (limited to 'src/Song.cxx')
-rw-r--r-- | src/Song.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Song.cxx b/src/Song.cxx index 2ef690fb0..eb4c2e53e 100644 --- a/src/Song.cxx +++ b/src/Song.cxx @@ -79,6 +79,14 @@ song_replace_uri(struct song *old_song, const char *uri) } struct song * +song_detached_new(const char *uri) +{ + assert(uri != nullptr); + + return song_alloc(uri, &detached_root); +} + +struct song * song_dup_detached(const struct song *src) { assert(src != nullptr); @@ -86,7 +94,7 @@ song_dup_detached(const struct song *src) struct song *song; if (song_in_database(src)) { char *uri = song_get_uri(src); - song = song_alloc(uri, &detached_root); + song = song_detached_new(uri); g_free(uri); } else song = song_alloc(src->uri, nullptr); |