Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to libdjinterop 0.16.0 #4143

Merged
merged 1 commit into from
Jul 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1797,8 +1797,8 @@ if(ENGINEPRIME)
# External project sources must be downloaded as an archive into DOWNLOAD_DIR
# from an URL to keep offline builds like for Fedora/RPM Fusion working!
ExternalProject_Add(libdjinterop
URL "https://github.com/xsco/libdjinterop/archive/0.15.2.tar.gz"
URL_HASH SHA256=66f64c0b38a53936ba1b471524905e35afd605bc05d29e7aa6fa7ea0005c7d54
URL "https://github.com/xsco/libdjinterop/archive/0.16.0.tar.gz"
URL_HASH SHA256=c998831fe4d3cc80c5c031491204244c9ed0c61575dd529260304b95d79db588
DOWNLOAD_DIR "${CMAKE_CURRENT_BINARY_DIR}/download/libdjinterop"
INSTALL_DIR ${DJINTEROP_INSTALL_DIR}
LIST_SEPARATOR "|"
Expand Down
8 changes: 5 additions & 3 deletions src/library/export/engineprimeexportjob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,10 @@ void exportMetadata(djinterop::database* pDatabase,
std::chrono::system_clock::time_point lastModifiedAt{
std::chrono::milliseconds{lastModifiedMillisSinceEpoch}};
snapshot.last_modified_at = lastModifiedAt;
snapshot.last_accessed_at = lastModifiedAt;
snapshot.bitrate = pTrack->getBitrate();
snapshot.rating = pTrack->getRating() * 20; // note rating is in range 0-100
snapshot.file_bytes = pTrack->getFileInfo().sizeInBytes();

// Frames used interchangeably with "samples" here.
const auto frameCount = static_cast<int64_t>(pTrack->getDuration() * pTrack->getSampleRate());
Expand All @@ -168,9 +170,9 @@ void exportMetadata(djinterop::database* pDatabase,

// Set main cue-point.
mixxx::audio::FramePos cuePlayPos = pTrack->getMainCuePosition();
// FIXME: What if the cuePlayPos is invalid?
snapshot.default_main_cue = cuePlayPos.value();
snapshot.adjusted_main_cue = cuePlayPos.value();
const auto cuePlayPosValue = cuePlayPos.isValid() ? cuePlayPos.value() : 0;
snapshot.default_main_cue = cuePlayPosValue;
snapshot.adjusted_main_cue = cuePlayPosValue;

// Fill in beat grid. For now, assume a constant average BPM across
// the whole track. Note that points in the track are specified as
Expand Down