diff options
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/banshee/bansheeplaylistmodel.cpp | 2 | ||||
-rw-r--r-- | src/library/baseexternalplaylistmodel.cpp | 2 | ||||
-rw-r--r-- | src/library/baseexternaltrackmodel.cpp | 2 | ||||
-rw-r--r-- | src/library/basesqltablemodel.cpp | 2 | ||||
-rw-r--r-- | src/library/browse/browsetablemodel.cpp | 2 | ||||
-rw-r--r-- | src/library/dao/trackdao.cpp | 4 |
6 files changed, 8 insertions, 6 deletions
diff --git a/src/library/banshee/bansheeplaylistmodel.cpp b/src/library/banshee/bansheeplaylistmodel.cpp index a7f59eeeb9..a934774478 100644 --- a/src/library/banshee/bansheeplaylistmodel.cpp +++ b/src/library/banshee/bansheeplaylistmodel.cpp @@ -287,7 +287,7 @@ TrackPointer BansheePlaylistModel::getTrack(const QModelIndex& index) const { pTrack->setRating(getFieldString(index, CLM_RATING).toInt()); pTrack->setTrackNumber(getFieldString(index, CLM_TRACKNUMBER)); double bpm = getFieldString(index, CLM_BPM).toDouble(); - pTrack->trySetBpm(bpm, false); + pTrack->trySetBpm(bpm); pTrack->setBitrate(getFieldString(index, CLM_BITRATE).toInt()); pTrack->setComment(getFieldString(index, CLM_COMMENT)); pTrack->setComposer(getFieldString(index, CLM_COMPOSER)); diff --git a/src/library/baseexternalplaylistmodel.cpp b/src/library/baseexternalplaylistmodel.cpp index 366339f75a..5a5ddf27f8 100644 --- a/src/library/baseexternalplaylistmodel.cpp +++ b/src/library/baseexternalplaylistmodel.cpp @@ -65,7 +65,7 @@ TrackPointer BaseExternalPlaylistModel::getTrack(const QModelIndex& index) const float bpm = index.sibling( index.row(), fieldIndex("bpm")).data().toString().toFloat(); - pTrack->trySetBpm(bpm, false); + pTrack->trySetBpm(bpm); } return pTrack; } diff --git a/src/library/baseexternaltrackmodel.cpp b/src/library/baseexternaltrackmodel.cpp index 6cdcd15aeb..50bfda9d38 100644 --- a/src/library/baseexternaltrackmodel.cpp +++ b/src/library/baseexternaltrackmodel.cpp @@ -74,7 +74,7 @@ TrackPointer BaseExternalTrackModel::getTrack(const QModelIndex& index) const { pTrack->setAlbum(album); pTrack->setYear(year); pTrack->setGenre(genre); - pTrack->trySetBpm(bpm, false); + pTrack->trySetBpm(bpm); } } else { qWarning() << "Failed to load external track" << location; diff --git a/src/library/basesqltablemodel.cpp b/src/library/basesqltablemodel.cpp index 2648bbf367..8a72b702d9 100644 --- a/src/library/basesqltablemodel.cpp +++ b/src/library/basesqltablemodel.cpp @@ -702,7 +702,7 @@ bool BaseSqlTableModel::setTrackValueForColumn( } else if (fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_COMMENT) == column) { pTrack->setComment(value.toString()); } else if (fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_BPM) == column) { - pTrack->trySetBpm(static_cast<double>(value.toDouble()), false); + pTrack->trySetBpm(static_cast<double>(value.toDouble())); } else if (fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_PLAYED) == column) { // Update both the played flag and the number of times played pTrack->updatePlayCounter(value.toBool()); diff --git a/src/library/browse/browsetablemodel.cpp b/src/library/browse/browsetablemodel.cpp index 216550b6f7..1fa21fc59f 100644 --- a/src/library/browse/browsetablemodel.cpp +++ b/src/library/browse/browsetablemodel.cpp @@ -397,7 +397,7 @@ bool BrowseTableModel::setData( pTrack->setAlbum(value.toString()); break; case COLUMN_BPM: - pTrack->trySetBpm(value.toDouble(), false); + pTrack->trySetBpm(value.toDouble()); break; case COLUMN_KEY: pTrack->setKeyText(value.toString()); diff --git a/src/library/dao/trackdao.cpp b/src/library/dao/trackdao.cpp index 46b89082e2..681e1a4a03 100644 --- a/src/library/dao/trackdao.cpp +++ b/src/library/dao/trackdao.cpp @@ -1092,7 +1092,9 @@ bool setTrackBeats(const QSqlRecord& record, const int column, if (pBeats) { pTrack->trySetBeats(pBeats, bpmLocked); } else { - pTrack->trySetBpm(bpm, bpmLocked); + // Load a temorary beat grid without offset that will be replaced by the analyzer. + const auto pBeats = BeatFactory::makeBeatGrid(pTrack->getSampleRate(), bpm, 0.0); + pTrack->trySetBeats(pBeats, false); } return false; } |