PlaylistFile: fold spl_move_index() into handle_playlistmove()

This commit is contained in:
Max Kellermann
2021-10-25 12:11:45 +02:00
parent a6173e0eae
commit ade847bc89
3 changed files with 11 additions and 29 deletions

View File

@@ -321,19 +321,6 @@ PlaylistFileEditor::Save()
idle_add(IDLE_STORED_PLAYLIST);
}
void
spl_move_index(const char *utf8path, unsigned src, unsigned dest)
{
if (src == dest)
/* this doesn't check whether the playlist exists, but
what the hell.. */
return;
PlaylistFileEditor editor(utf8path, PlaylistFileEditor::LoadMode::YES);
editor.MoveIndex(src, dest);
editor.Save();
}
void
spl_clear(const char *utf8path)
{
@@ -372,14 +359,6 @@ spl_delete(const char *name_utf8)
idle_add(IDLE_STORED_PLAYLIST);
}
void
spl_remove_index(const char *utf8path, unsigned pos)
{
PlaylistFileEditor editor(utf8path, PlaylistFileEditor::LoadMode::YES);
editor.RemoveIndex(pos);
editor.Save();
}
void
spl_append_song(const char *utf8path, const DetachedSong &song)
try {