Exemple #1
0
char * http_post_current(json_value *data)
{
    char *uid = http_json_extract(data, "uid");

    songdata_song *entry = http_song_by_uid(uid);
    if(!entry)
	controller_jump_to_song(entry);
    free(uid);
}
Exemple #2
0
void controller_prev()
{
	songdata_song *ftmp = playlist->playing;

	if ( !ftmp )
		return;
	if ( ( conf->c_flags & C_LOOP ) && !ftmp->prev )
		ftmp = playlist->tail;
	else
		ftmp = ftmp->prev;
	controller_jump_to_song ( ftmp );
}
Exemple #3
0
void controller_next()
{
	songdata_song *ftmp = playlist->playing;

	if ( !ftmp )
		return;

	if ( ( conf->c_flags & C_LOOP ) && !ftmp->next )
		ftmp = playlist->head;
	else
		ftmp = ftmp->next;
	controller_jump_to_song ( ftmp );
}
Exemple #4
0
void controller_play_pause(void)
{
  if(engine_is_paused()){
    playlist->playing->flags &= ~F_PAUSED;
    engine_resume_playback();
  }else if(engine_is_playing()){
    playlist->playing->flags |= F_PAUSED;
    engine_pause_playback();
  }else{
    if ( !playlist->selected ){
      playlist->selected = songdata_next_valid ( playlist, playlist->top, KEY_DOWN );
    }
    controller_jump_to_song ( playlist->selected ); // Play
  }
  /* GUI stuff */
  gui_update_playlist();
  gui_update_info();
  gui_update_playback();
}