summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/playlist_catalog.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/apps/playlist_catalog.c b/apps/playlist_catalog.c
index 5e8cf02c96..01899f737f 100644
--- a/apps/playlist_catalog.c
+++ b/apps/playlist_catalog.c
@@ -431,16 +431,19 @@ exit:
close(fd);
return result;
}
-
+static bool in_cat_viewer = false;
bool catalog_view_playlists(void)
{
- if (initialize_catalog() == -1)
+ bool retval = true;
+ if (in_cat_viewer)
return false;
-
- if (display_playlists(NULL, true) == -1)
+
+ if (initialize_catalog() == -1)
return false;
-
- return true;
+ in_cat_viewer = true;
+ retval = (display_playlists(NULL, true) != -1);
+ in_cat_viewer = false;
+ return retval;
}
bool catalog_add_to_a_playlist(const char* sel, int sel_attr,