diff options
Diffstat (limited to 'plugins/hotkeys')
-rw-r--r-- | plugins/hotkeys/hotkeys.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/plugins/hotkeys/hotkeys.c b/plugins/hotkeys/hotkeys.c index 9ad4aead..f1deaac8 100644 --- a/plugins/hotkeys/hotkeys.c +++ b/plugins/hotkeys/hotkeys.c @@ -745,6 +745,15 @@ action_toggle_stop_after_current_cb (struct DB_plugin_action_s *action, int ctx) return 0; } +int +action_toggle_stop_after_album_cb (struct DB_plugin_action_s *action, int ctx) { + int var = deadbeef->conf_get_int ("playlist.stop_after_album", 0); + var = 1 - var; + deadbeef->conf_set_int ("playlist.stop_after_album", var); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); + return 0; +} + static DB_plugin_action_t action_reload_metadata = { .title = "Reload Metadata", .name = "reload_metadata", @@ -1058,10 +1067,18 @@ static DB_plugin_action_t action_toggle_stop_after_current = { .next = &action_volume_down }; +static DB_plugin_action_t action_toggle_stop_after_album = { + .title = "Playback/Toggle Stop After Current Album", + .name = "toggle_stop_after_album", + .flags = DB_ACTION_COMMON, + .callback2 = action_toggle_stop_after_album_cb, + .next = &action_toggle_stop_after_current +}; + static DB_plugin_action_t * hotkeys_get_actions (DB_playItem_t *it) { - return &action_toggle_stop_after_current; + return &action_toggle_stop_after_album; } // define plugin interface |