Disable adding files that cannot be played

Summary: Dropping a directory into Rage added everything before this patch, complaining about some files and definitely not playing them. This adds `emotion_object_extension_may_play_get()` checks.

Test Plan:
Drop a non-playable file and a directory containing non-playable files.

The file(s) get(s) added (but cannot be played, obviously) before this patch and after this they're ignored.

Reviewers: raster

Projects: #rage

Differential Revision: https://phab.enlightenment.org/D3162
v-0.4.0
Markus Törnqvist 7 years ago committed by Carsten Haitzler (Rasterman)
parent b4b380ce1f
commit e5edb6748b
  1. 3
      src/bin/dnd.c

@ -154,6 +154,8 @@ _cb_recurse(void *data, Eio_File *f EINA_UNUSED, const Eina_File_Direct_Info *in
struct _recurse_data *d = data;
if (info->type == EINA_FILE_DIR)
return;
else if (!emotion_object_extension_may_play_get(info->path))
return;
d->list = eina_list_sorted_insert(d->list, EINA_COMPARE_CB(_pathcmp), _escape_parse(info->path));
}
@ -190,6 +192,7 @@ _cb_drop(void *data, Evas_Object *o EINA_UNUSED, Elm_Selection_Data *ev)
free(esc);
continue;
}
else if (!emotion_object_extension_may_play_get(esc)) continue;
playlist = eina_list_sorted_insert(playlist, EINA_COMPARE_CB(_pathcmp), esc);
}

Loading…
Cancel
Save