rsked/mpdclient.cc
/// Add a URI or a single file to the end of the queue.
/// Note well: this will not handle directories!
/// Not currently used in rsked.
/// @returns id of the added URI
///
/// *  May throw.
///
Add a URI or a single file to the end of the queue.
Note well: this will not handle directories.
Not currently used in rsked.
Add a URI or a single file to the end of the queue . Note well : this will not handle directories . Not currently used in rsked .
int Mpd_client::enqueue_id( const std::string &uri )
{
    connect();
    assert_connected();
    int id = mpd_run_add_id( m_conn, uri.c_str() );
    if (-1 == id) {
        enum mpd_server_error serr;
        diag_error("Mpd_client::enqueue: ",serr);
        LOG_ERROR(Lgr) << "Failed to enqueue resource '" << uri << "'";
        m_last_err = Mpd_err::NoExist;
        throw Mpd_queue_exception();
    }
    return id;
}
int Mpd_client :: enqueue_id ( const std :: string & uri ) { connect ( ) ; assert_connected ( ) ; int id = mpd_run_add_id ( m_conn , uri . c_str ( ) ) ; if ( -1 == id ) { enum mpd_server_error serr ; diag_error ( " " , serr ) ; LOG_ERROR ( Lgr ) << " " << uri << " " ; m_last_err = Mpd_err :: NoExist ; throw Mpd_queue_exception ( ) ; } return id ; }
Add a URI or a single file to the end of the queue.
Add a URI or a single file to the end of the queue .