Mapper: convert IsInDatabase() check to assertion in map_song_detach()
This commit is contained in:
parent
746a47982b
commit
19a982cf69
@ -238,8 +238,9 @@ DetachedSong
|
|||||||
map_song_detach(const LightSong &song)
|
map_song_detach(const LightSong &song)
|
||||||
{
|
{
|
||||||
DetachedSong detached(song);
|
DetachedSong detached(song);
|
||||||
|
assert(detached.IsInDatabase());
|
||||||
|
|
||||||
if (detached.IsInDatabase() && !detached.HasRealURI()) {
|
if (!detached.HasRealURI()) {
|
||||||
const auto uri = song.GetURI();
|
const auto uri = song.GetURI();
|
||||||
detached.SetRealURI(PathTraitsUTF8::Build(music_dir_utf8.c_str(),
|
detached.SetRealURI(PathTraitsUTF8::Build(music_dir_utf8.c_str(),
|
||||||
uri.c_str()));
|
uri.c_str()));
|
||||||
|
Loading…
Reference in New Issue
Block a user