rsked/mpdclient.cc
/// Adds a named playlist to the end of the queue. May throw.
/// @returns id of the added URI
///
Adds a named playlist to the end of the queue. May throw.
Adds a named playlist to the end of the queue . May throw .
void Mpd_client::enqueue_playlist( const std::string &plname )
{
    connect();
    assert_connected();
    bool ok = mpd_run_load( m_conn, plname.c_str() );
    if (not ok) {
        enum mpd_server_error serr;
        auto err=diag_error("Mpd_client::enqueue_playlist: ",serr);
        if ((MPD_ERROR_SERVER==err) and (MPD_SERVER_ERROR_NO_EXIST==serr)) {
            LOG_ERROR(Lgr) << "Playlist '" << plname << "' was not found";
        }
        m_last_err = Mpd_err::NoExist;
        throw Mpd_queue_exception();
    }
}
void Mpd_client :: enqueue_playlist ( const std :: string & plname ) { connect ( ) ; assert_connected ( ) ; bool ok = mpd_run_load ( m_conn , plname . c_str ( ) ) ; if ( not ok ) { enum mpd_server_error serr ; auto err = diag_error ( " " , serr ) ; if ( ( MPD_ERROR_SERVER == err ) and ( MPD_SERVER_ERROR_NO_EXIST == serr ) ) { LOG_ERROR ( Lgr ) << " " << plname << " " ; } m_last_err = Mpd_err :: NoExist ; throw Mpd_queue_exception ( ) ; } }
Adds a named playlist to the end of the queue.
Adds a named playlist to the end of the queue .