+ UcxBuffer *buf = ucx_buffer_new(NULL, 256, UCX_BUFFER_AUTOEXTEND);
+
+ FILE *f = popen("which mpv", "r");
+ if(f) {
+ char *bin = get_which_output(f, buf);
+ if(bin) {
+ PlayerInfo *playerInfo = malloc(sizeof(PlayerInfo));
+ playerInfo->bin = strdup(bin);
+ playerInfo->type = strdup("mpv");
+ AppAddTimeOut(0, finish_bin_search, playerInfo);
+
+ ucx_buffer_free(buf);
+ return NULL;
+ }
+ }
+
+ f = popen("which mplayer", "r");
+ if(f) {
+ char *bin = get_which_output(f, buf);
+ if(bin) {
+ PlayerInfo *playerInfo = malloc(sizeof(PlayerInfo));
+ playerInfo->bin = strdup(bin);
+ playerInfo->type = strdup("mplayer");
+ AppAddTimeOut(0, finish_bin_search, playerInfo);
+ }
+ }