diff --git a/helper.c b/helper.c index 9a8c0a3..db3ad27 100644 --- a/helper.c +++ b/helper.c @@ -297,7 +297,7 @@ void hp_submit(void) track->album = NULL; } -void hp_love(bool on) +void hp_love_current(bool on) { for (unsigned i = 0; i < G_N_ELEMENTS(services); i++) { struct service *s = &services[i]; @@ -307,6 +307,16 @@ void hp_love(bool on) } } +void hp_love(const char *artist, const char *title, bool on) +{ + for (unsigned i = 0; i < G_N_ELEMENTS(services); i++) { + struct service *s = &services[i]; + if (!s->on) + continue; + sr_session_love(s->session, artist, title, on); + } +} + void hp_stop(void) { for (unsigned i = 0; i < G_N_ELEMENTS(services); i++) { diff --git a/helper.h b/helper.h index 7becd52..ef4e5d0 100644 --- a/helper.h +++ b/helper.h @@ -17,7 +17,8 @@ extern "C" { void hp_init(void); void hp_deinit(void); void hp_submit(void); -void hp_love(bool on); +void hp_love_current(bool on); +void hp_love(const char *artist, const char *title, bool on); void hp_stop(void); void hp_next(void);