PictureFlow: Eliminate 'prompt' launch parameter

This was added in commit d553bb1 and
doesn’t seem to be used anymore.

Return PLUGIN_OK since an error message
is already produced.

Change-Id: I5eaf7e7eb7c850a6fa9c3d2717c440e335f5efd1
This commit is contained in:
Christian Soffke 2023-01-15 13:35:32 +01:00
parent 1b383ef480
commit 6129bfbb95

View file

@ -652,7 +652,7 @@ static inline void buf_ctx_unlock(void)
buf_ctx_locked = false; buf_ctx_locked = false;
} }
static bool check_database(bool prompt) static bool check_database(void)
{ {
bool needwarn = true; bool needwarn = true;
int spin = 5; int spin = 5;
@ -670,9 +670,7 @@ static bool check_database(bool prompt)
needwarn = false; needwarn = false;
rb->splash(0, ID2P(LANG_TAGCACHE_BUSY)); rb->splash(0, ID2P(LANG_TAGCACHE_BUSY));
} }
else if (!prompt) else
return false;
else if (rb->action_userabort(HZ/5))
return false; return false;
rb->yield(); rb->yield();
@ -4952,17 +4950,12 @@ enum plugin_status plugin_start(const void *parameter)
void * buf; void * buf;
size_t buf_size; size_t buf_size;
bool prompt = (parameter && (((char *) parameter)[0] == ACTIVITY_MAINMENU));
bool file_id3 = (parameter && (((char *) parameter)[0] == '/')); bool file_id3 = (parameter && (((char *) parameter)[0] == '/'));
if (!check_database(prompt)) if (!check_database())
{ {
if (prompt)
return PLUGIN_OK;
else
error_wait("Please enable database"); error_wait("Please enable database");
return PLUGIN_OK;
return PLUGIN_ERROR;
} }
atexit(cleanup); atexit(cleanup);