Add some more debugging output for deciding when to scrobble a song

This commit is contained in:
David Sansome 2011-03-29 21:12:49 +00:00
parent e8101273f0
commit e5bc2be85f
2 changed files with 4 additions and 0 deletions

View File

@ -297,6 +297,7 @@ void Player::SeekTo(int seconds) {
engine_->Seek(nanosec);
// If we seek the track we don't want to submit it to last.fm
qDebug() << "Track seeked to" << nanosec << "ns - not scrobbling";
playlists_->active()->set_scrobbled(true);
emit Seeked(nanosec / 1000);

View File

@ -995,6 +995,7 @@ void MainWindow::UpdateTrackPosition() {
// Time to scrobble?
if (!playlists_->active()->has_scrobbled() && position >= scrobble_point) {
qDebug() << "Scrobbling at" << scrobble_point;
#ifdef HAVE_LIBLASTFM
radio_model_->RadioModel::Service<LastFMService>()->Scrobble();
#endif
@ -1011,6 +1012,8 @@ void MainWindow::UpdateTrackPosition() {
// Update the tray icon every 10 seconds
if (position % 10 == 0) {
qDebug() << "position" << position << "scrobble point" << scrobble_point
<< "has_scrobbled" << playlists_->active()->has_scrobbled();
tray_icon_->SetProgress(double(position) / length * 100);
}
}