Logo Search packages:      
Sourcecode: libmpdclient version File versions  Download package

unsigned mpd_run_rescan ( struct mpd_connection connection,
const char *  path 
)

Like mpd_run_update(), but also rescans unmodified files.

Parameters:
connection the connection to MPD
path optional path to update; if NULL, then all of the music directory is updated
Returns:
a positive job id on success, 0 on error

Definition at line 98 of file database.c.

References mpd_recv_update_id(), mpd_response_finish(), mpd_run_rescan(), and mpd_send_rescan().

Referenced by mpd_run_rescan().

{
      unsigned id;

      if (!mpd_run_check(connection) || !mpd_send_rescan(connection, path))
            return 0;

      id = mpd_recv_update_id(connection);
      return id != 0 && mpd_response_finish(connection)
            ? id : 0;
}


Generated by  Doxygen 1.6.0   Back to index