summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorAlessandro Ghedini <alessandro@ghedini.me>2014-11-08 23:03:04 +0100
committerwm4 <wm4@nowhere>2014-11-09 15:31:48 +0100
commit5f175b0bdc046b35303466ef2b3f3cd7ee7ca0be (patch)
treed0f6c9c59d2cc49e21d7e907779c522e055eafb7 /player/command.c
parente4403523131a69a92a8418bb3714090a408680c7 (diff)
downloadmpv-5f175b0bdc046b35303466ef2b3f3cd7ee7ca0be.tar.bz2
mpv-5f175b0bdc046b35303466ef2b3f3cd7ee7ca0be.tar.xz
command: send property-change event on playlist change
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c
index 1968e6d5e5..1bc8ab78d5 100644
--- a/player/command.c
+++ b/player/command.c
@@ -4147,6 +4147,7 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd)
mp_write_watch_later_conf(mpctx);
mp_set_playlist_entry(mpctx, entry);
}
+ mp_notify_property(mpctx, "playlist");
break;
}
@@ -4165,6 +4166,7 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd)
mp_check_playlist_resume(mpctx, mpctx->playlist);
mp_set_playlist_entry(mpctx, e ? e : mpctx->playlist->first);
}
+ mp_notify_property(mpctx, "playlist");
} else {
MP_ERR(mpctx, "Unable to load playlist %s.\n", filename);
return -1;
@@ -4185,6 +4187,7 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd)
}
playlist_remove(mpctx->playlist, e);
}
+ mp_notify_property(mpctx, "playlist");
break;
}
@@ -4199,6 +4202,7 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd)
if (mpctx->playlist->current == e)
mpctx->stop_play = PT_CURRENT_ENTRY;
playlist_remove(mpctx->playlist, e);
+ mp_notify_property(mpctx, "playlist");
break;
}
@@ -4210,6 +4214,7 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd)
if (!e1)
return -1;
playlist_move(mpctx->playlist, e1, e2);
+ mp_notify_property(mpctx, "playlist");
break;
}