From 0550c64226a6edfd9bc51b914fb4932840543354 Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Sun, 4 Dec 2022 05:38:50 +0100 Subject: [PATCH] Bookmarks: Fix autoload return from bookmark selection - Fix placement of parentheses from commit 780990 - Return cancel when play_bookmark fails or user declines to erase dynamic playlist after warning - Go back to Playlist Catalogue when user cancels out of screen Change-Id: Ibe8c315bdf8c6c9e696f68541b5d4d97dc0e778a --- apps/bookmark.c | 11 ++--------- apps/playlist_catalog.c | 2 ++ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/apps/bookmark.c b/apps/bookmark.c index a3671a076f..961a14043c 100644 --- a/apps/bookmark.c +++ b/apps/bookmark.c @@ -1213,18 +1213,11 @@ int bookmark_autoload(const char* file) if (bookmark != NULL) { if (!play_bookmark(bookmark)) - { - /* Selected bookmark not found. */ - splash(HZ*2, ID2P(LANG_NOTHING_TO_RESUME)); - } - - /* Act as if autoload was done even if it failed, since the - * user did make an active selection. - */ + return BOOKMARK_CANCEL; return BOOKMARK_DO_RESUME; } - return ret != (BOOKMARK_SUCCESS ? BOOKMARK_CANCEL : BOOKMARK_DONT_RESUME); + return (ret != BOOKMARK_SUCCESS) ? BOOKMARK_CANCEL : BOOKMARK_DONT_RESUME; } } diff --git a/apps/playlist_catalog.c b/apps/playlist_catalog.c index b160d6c3f4..56a90052da 100644 --- a/apps/playlist_catalog.c +++ b/apps/playlist_catalog.c @@ -217,6 +217,8 @@ restart: int res = bookmark_autoload(selected_playlist); if (res == BOOKMARK_DO_RESUME) result = 0; + else if (res == BOOKMARK_CANCEL) + goto restart; else { switch (playlist_viewer_ex(selected_playlist, &most_recent_selection)) {