diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-12-10 22:21:50 +0100 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-12-10 22:21:50 +0100 |
commit | c997c23a56c41c7dcc7a8d6bcd1932cb30ad9435 (patch) | |
tree | e1097fe111e9479c1d05e0f8683905aca9ae4f45 | |
parent | a3e7fe803a8b7d2d9ca5e66c8de0978add5ccf99 (diff) |
gtkui: fixed progress dialog while loading playlists
-rw-r--r-- | plugins/gtkui/actionhandlers.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/plugins/gtkui/actionhandlers.c b/plugins/gtkui/actionhandlers.c index 7d08d98b..e6330973 100644 --- a/plugins/gtkui/actionhandlers.c +++ b/plugins/gtkui/actionhandlers.c @@ -662,13 +662,16 @@ load_playlist_thread (void *data) { char *fname = data; ddb_playlist_t *plt = deadbeef->plt_get_curr (); if (plt) { - deadbeef->plt_clear (plt); - int abort = 0; - DB_playItem_t *it = deadbeef->plt_load2 (0, plt, NULL, fname, &abort, NULL, NULL); - if (it) { - deadbeef->pl_item_unref (it); + if (!deadbeef->plt_add_files_begin (plt, 0)) { + deadbeef->plt_clear (plt); + int abort = 0; + DB_playItem_t *it = deadbeef->plt_load2 (0, plt, NULL, fname, &abort, NULL, NULL); + if (it) { + deadbeef->pl_item_unref (it); + } + deadbeef->plt_save_config (plt); + deadbeef->plt_add_files_end (plt, 0); } - deadbeef->plt_save_config (plt); deadbeef->plt_unref (plt); } g_free (fname); |