rsked/mpdclient.cc
/// Determine if the given URI is playing. Will return true if
/// mpd is on the right URI, but play is paused or stopped.
/// @returns true if the current song matches the given URI
///
Determine if the given URI is playing. Will return true if
mpd is on the right URI, but play is paused or stopped.
Determine if the given URI is playing . Will return true if mpd is on the right URI but play is paused or stopped .
bool Mpd_client::verify_playing_uri( const std::string &uri)
{
    connect();
    assert_connected();
    mpd_song *song = mpd_run_current_song(m_conn);
    if (!song) { return false; }
    if (const char* puri=mpd_song_get_uri(song)) {
        return (uri == puri);
    }
    return false;
}
bool Mpd_client :: verify_playing_uri ( const std :: string & uri ) { connect ( ) ; assert_connected ( ) ; mpd_song * song = mpd_run_current_song ( m_conn ) ; if ( ! song ) { return false ; } if ( const char * puri = mpd_song_get_uri ( song ) ) { return ( uri == puri ) ; } return false ; }
Determine if the given URI is playing.
Determine if the given URI is playing .