本文整理汇总了C++中lastfm::Track::artist方法的典型用法代码示例。如果您正苦于以下问题:C++ Track::artist方法的具体用法?C++ Track::artist怎么用?C++ Track::artist使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lastfm::Track
的用法示例。
在下文中一共展示了Track::artist方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: printCorrected
void
ScrobblerAdapter::announceTrackCorrections( const lastfm::Track &track )
{
static const lastfm::Track::Corrections orig = lastfm::Track::Original;
static const lastfm::Track::Corrections correct = lastfm::Track::Corrected;
QString trackName = i18nc( "%1 is artist, %2 is title", "%1 - %2",
track.artist().name(), track.title() );
QStringList lines;
lines << i18n( "Last.fm suggests that some tags of track <b>%1</b> should be "
"corrected:", trackName );
QString line;
line = printCorrected( Meta::valTitle, track.title( orig ), track.title( correct ) );
if( !line.isEmpty() )
lines << line;
line = printCorrected( Meta::valAlbum, track.album( orig ), track.album( correct ) );
if( !line.isEmpty() )
lines << line;
line = printCorrected( Meta::valArtist, track.artist( orig ), track.artist( correct ) );
if( !line.isEmpty() )
lines << line;
line = printCorrected( Meta::valAlbumArtist, track.albumArtist( orig ), track.albumArtist( correct ) );
if( !line.isEmpty() )
lines << line;
Amarok::Components::logger()->longMessage( lines.join( "<br>" ) );
}
示例2: UserSettings
bool
ScrobbleService::scrobblableTrack( const lastfm::Track& track ) const
{
return unicorn::UserSettings().value( "scrobblingOn", true ).toBool()
&& track.extra( "playerId" ) != "spt"
&& !track.artist().isNull()
&& ( unicorn::UserSettings().value( "podcasts", true ).toBool() || !track.isPodcast() )
&& !track.isVideo();
}
示例3: InitFromLastFM
void Song::InitFromLastFM(const lastfm::Track& track) {
d->valid_ = true;
d->filetype_ = Type_Stream;
d->title_ = track.title();
d->album_ = track.album();
d->artist_ = track.artist();
d->track_ = track.trackNumber();
set_length_nanosec(track.duration() * kNsecPerSec);
}
示例4: EmitTrack
void LastFmRadioStation::EmitTrack (const lastfm::Track& track)
{
qDebug () << Q_FUNC_INFO << track.url ();
const Media::AudioInfo info =
{
track.artist (),
track.album (),
track.title (),
QStringList (),
static_cast<qint32> (track.duration () / 1000),
0,
static_cast<qint32> (track.trackNumber ()),
QVariantMap ()
};
emit gotNewStream (track.url (), info);
}
示例5: onTrackSpooled
void MainWindow::onTrackSpooled(const lastfm::Track& track)
{
setWindowTitle(m_radio.station().rql());
ui->trackProgress->setMinimum(0);
ui->trackProgress->setMaximum(track.duration());
ui->album->setText(track.album());
ui->artist->setText(track.artist());
ui->title->setText(track.title());
m_trackGetInfoReply = track.getInfo();
connect(m_trackGetInfoReply, SIGNAL(finished()), SLOT(onGetInfoFinished()));
// send the now playing and cache the track so it can be submitted later
m_scrobSocket->start(track);
}
示例6: qHash
uint qHash(const lastfm::Track& track) {
return qHash(track.title()) ^
qHash(track.artist().name()) ^
qHash(track.album().title());
}