Skip to content

Commit

Permalink
helper: reorganize 'love' stuff
Browse files Browse the repository at this point in the history
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
  • Loading branch information
felipec committed Aug 22, 2011
1 parent ac220da commit 33f42c1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
12 changes: 11 additions & 1 deletion helper.c
Expand Up @@ -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];
Expand All @@ -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++) {
Expand Down
3 changes: 2 additions & 1 deletion helper.h
Expand Up @@ -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);

Expand Down

0 comments on commit 33f42c1

Please sign in to comment.