summaryrefslogtreecommitdiff
path: root/plugins/shellexec
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/shellexec')
-rw-r--r--plugins/shellexec/shellexec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/shellexec/shellexec.c b/plugins/shellexec/shellexec.c
index 84a77bad..af1078c1 100644
--- a/plugins/shellexec/shellexec.c
+++ b/plugins/shellexec/shellexec.c
@@ -101,11 +101,13 @@ shx_callback (Shx_action_t *action, DB_playItem_t *it)
static DB_plugin_action_t *
shx_get_actions (DB_playItem_t *it)
{
+ int is_local = it ? deadbeef->is_local_file (it->fname) : 1;
+
Shx_action_t *action;
for (action = actions; action; action = (Shx_action_t *)action->parent.next)
{
- if (((action->shx_flags & SHX_ACTION_LOCAL_ONLY) && !deadbeef->is_local_file (it->fname)) ||
- ((action->shx_flags & SHX_ACTION_REMOTE_ONLY) && deadbeef->is_local_file (it->fname)))
+ if (((action->shx_flags & SHX_ACTION_LOCAL_ONLY) && !is_local) ||
+ ((action->shx_flags & SHX_ACTION_REMOTE_ONLY) && is_local))
action->parent.flags |= DB_ACTION_DISABLED;
else
action->parent.flags &= ~DB_ACTION_DISABLED;