diff options
Diffstat (limited to 'apps/tagtree.c')
-rw-r--r-- | apps/tagtree.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/apps/tagtree.c b/apps/tagtree.c index de75223e0b..2962d57dac 100644 --- a/apps/tagtree.c +++ b/apps/tagtree.c | |||
@@ -954,7 +954,7 @@ static bool show_search_progress(bool init, int count) | |||
954 | } | 954 | } |
955 | 955 | ||
956 | /* Update progress every 1/10 of a second */ | 956 | /* Update progress every 1/10 of a second */ |
957 | if (current_tick - last_tick > HZ/10) | 957 | if (TIME_AFTER(current_tick, last_tick + HZ/10)) |
958 | { | 958 | { |
959 | splashf(0, str(LANG_PLAYLIST_SEARCH_MSG), count, str(LANG_OFF_ABORT)); | 959 | splashf(0, str(LANG_PLAYLIST_SEARCH_MSG), count, str(LANG_OFF_ABORT)); |
960 | if (action_userabort(TIMEOUT_NOBLOCK)) | 960 | if (action_userabort(TIMEOUT_NOBLOCK)) |
@@ -1060,25 +1060,17 @@ static int retrieve_entries(struct tree_context *c, int offset, bool init) | |||
1060 | bool sort = false; | 1060 | bool sort = false; |
1061 | int sort_limit; | 1061 | int sort_limit; |
1062 | int strip; | 1062 | int strip; |
1063 | 1063 | ||
1064 | if (init && (tagcache_is_busy() | 1064 | /* Show search progress straight away if the disk needs to spin up, |
1065 | #ifdef HAVE_TC_RAMCACHE | 1065 | otherwise show it after the normal 1/2 second delay */ |
1066 | || !tagcache_is_ramcache() | 1066 | show_search_progress( |
1067 | #endif | ||
1068 | ) ) | ||
1069 | { | ||
1070 | /* Show search progress straight away if the disk needs to spin up, | ||
1071 | otherwise show it after the normal 1/2 second delay */ | ||
1072 | show_search_progress( | ||
1073 | !tagcache_is_busy() && | ||
1074 | #ifdef HAVE_DISK_STORAGE | 1067 | #ifdef HAVE_DISK_STORAGE |
1075 | storage_disk_is_active() | 1068 | storage_disk_is_active() |
1076 | #else | 1069 | #else |
1077 | true | 1070 | true |
1078 | #endif | 1071 | #endif |
1079 | , 0); | 1072 | , 0); |
1080 | } | 1073 | |
1081 | |||
1082 | if (c->currtable == ALLSUBENTRIES) | 1074 | if (c->currtable == ALLSUBENTRIES) |
1083 | { | 1075 | { |
1084 | tag = tag_title; | 1076 | tag = tag_title; |
@@ -1249,7 +1241,7 @@ static int retrieve_entries(struct tree_context *c, int offset, bool init) | |||
1249 | if (init && !tcs.ramsearch) | 1241 | if (init && !tcs.ramsearch) |
1250 | { | 1242 | { |
1251 | if (!show_search_progress(false, total_count)) | 1243 | if (!show_search_progress(false, total_count)) |
1252 | { | 1244 | { /* user aborted */ |
1253 | tagcache_search_finish(&tcs); | 1245 | tagcache_search_finish(&tcs); |
1254 | return current_entry_count; | 1246 | return current_entry_count; |
1255 | } | 1247 | } |
@@ -1304,6 +1296,7 @@ static int retrieve_entries(struct tree_context *c, int offset, bool init) | |||
1304 | } | 1296 | } |
1305 | 1297 | ||
1306 | return total_count; | 1298 | return total_count; |
1299 | |||
1307 | } | 1300 | } |
1308 | 1301 | ||
1309 | static int load_root(struct tree_context *c) | 1302 | static int load_root(struct tree_context *c) |
@@ -1647,9 +1640,16 @@ bool tagtree_insert_selection_playlist(int position, bool queue) | |||
1647 | char buf[MAX_PATH]; | 1640 | char buf[MAX_PATH]; |
1648 | int dirlevel = tc->dirlevel; | 1641 | int dirlevel = tc->dirlevel; |
1649 | 1642 | ||
1650 | /* We need to set the table to allsubentries. */ | 1643 | show_search_progress( |
1651 | show_search_progress(!tagcache_is_busy(), 0); | 1644 | #ifdef HAVE_DISK_STORAGE |
1645 | storage_disk_is_active() | ||
1646 | #else | ||
1647 | true | ||
1648 | #endif | ||
1649 | , 0); | ||
1650 | |||
1652 | 1651 | ||
1652 | /* We need to set the table to allsubentries. */ | ||
1653 | dptr = tagtree_get_entry(tc, tc->selected_item); | 1653 | dptr = tagtree_get_entry(tc, tc->selected_item); |
1654 | 1654 | ||
1655 | /* Insert a single track? */ | 1655 | /* Insert a single track? */ |