From da753196af6593b2d6e94f691c9d1287b3ea093b Mon Sep 17 00:00:00 2001 From: David Vaughan Date: Sun, 4 Feb 2024 10:58:09 -0800 Subject: player: change insert_next to insert_at Change the `playlist_insert_next` function to `playlist_insert_at` (ie, insert at the location of an entry, rather than after it, and rename to be clearer that it doesn't have anything to do with the currently-playing entry). Also, replace calls to `playlist_add` with calls to `playlist_insert_at`, since the former has become redundant. --- options/parse_commandline.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'options') diff --git a/options/parse_commandline.c b/options/parse_commandline.c index ad91b8d61a..ded8531da8 100644 --- a/options/parse_commandline.c +++ b/options/parse_commandline.c @@ -103,10 +103,10 @@ static void process_non_option(struct playlist *files, const char *arg) // Glob filenames on Windows (cmd.exe doesn't do this automatically) if (glob(arg, 0, NULL, &gg)) { - playlist_add_file(files, arg); + playlist_append_file(files, arg); } else { for (int i = 0; i < gg.gl_pathc; i++) - playlist_add_file(files, gg.gl_pathv[i]); + playlist_append_file(files, gg.gl_pathv[i]); globfree(&gg); } @@ -114,7 +114,7 @@ static void process_non_option(struct playlist *files, const char *arg) #else static void process_non_option(struct playlist *files, const char *arg) { - playlist_add_file(files, arg); + playlist_append_file(files, arg); } #endif -- cgit v1.2.3