2012-02-20 21:47:14 +00:00
|
|
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
2009-04-10 21:07:03 +00:00
|
|
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
|
|
|
|
|
|
|
#include "audiolink.hh"
|
2023-07-13 06:49:41 +00:00
|
|
|
#include "globalbroadcaster.hh"
|
2009-04-10 21:07:03 +00:00
|
|
|
|
2009-05-14 20:38:17 +00:00
|
|
|
std::string addAudioLink( std::string const & url, std::string const & dictionaryId )
|
2009-04-10 21:07:03 +00:00
|
|
|
{
|
2023-07-26 15:03:03 +00:00
|
|
|
return addAudioLink( QString::fromStdString( url ), dictionaryId );
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string addAudioLink( QString const & url, std::string const & dictionaryId )
|
|
|
|
{
|
2024-10-24 13:32:21 +00:00
|
|
|
if ( url.isEmpty() ) {
|
2023-07-13 06:49:41 +00:00
|
|
|
return {};
|
2024-10-10 07:13:23 +00:00
|
|
|
}
|
2024-10-24 13:32:21 +00:00
|
|
|
GlobalBroadcaster::instance()->pronounce_engine.sendAudio( dictionaryId, url );
|
|
|
|
return "";
|
2009-04-10 21:07:03 +00:00
|
|
|
}
|