mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-10 05:59:45 -05:00
[library] Add action to library_schedule_callback()
Makes it possible for the caller to request that a previous callback is replaced, so we don't end up with more and more callbacks. Also add other options for future use.
This commit is contained in:
@@ -549,7 +549,7 @@ rss_scan_all(enum rss_scan_type scan_type)
|
||||
if (count == 0)
|
||||
return;
|
||||
|
||||
library_callback_schedule(rss_refresh, NULL, &rss_refresh_interval);
|
||||
library_callback_schedule(rss_refresh, NULL, &rss_refresh_interval, LIBRARY_CB_ADD_OR_REPLACE);
|
||||
|
||||
DPRINTF(E_INFO, L_LIB, "Refreshed %d RSS feeds in %.f sec (scan type %d)\n", count, difftime(end, start), scan_type);
|
||||
}
|
||||
@@ -601,7 +601,7 @@ rss_add(const char *path)
|
||||
if (ret < 0)
|
||||
return LIBRARY_PATH_INVALID;
|
||||
|
||||
library_callback_schedule(rss_refresh, NULL, &rss_refresh_interval);
|
||||
library_callback_schedule(rss_refresh, NULL, &rss_refresh_interval, LIBRARY_CB_ADD_OR_REPLACE);
|
||||
|
||||
return LIBRARY_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user