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

lp1979864: Fix synchronization time stamps of ModPlug files #4826

Merged
merged 2 commits into from
Jun 26, 2022
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 src/sources/soundsourcemodplug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ SoundSourceModPlug::importTrackMetadataAndCoverImage(
audio::Bitrate(8),
Duration::fromMillis(ModPlug::ModPlug_GetLength(pModFile)),
});

return std::make_pair(ImportResult::Succeeded, QFileInfo(modFile).lastModified());
const auto sourceSynchronizedAt = getFileSynchronizedAt(modFile);
return std::make_pair(ImportResult::Succeeded, sourceSynchronizedAt);
}

// The modplug library currently does not support reading cover-art from
Expand Down
5 changes: 5 additions & 0 deletions src/sources/soundsourceproxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,11 @@ SoundSourceProxy::UpdateTrackFromSourceResult SoundSourceProxy::updateTrackFromS
importTrackMetadataAndCoverImage(
&trackMetadata,
pCoverImg);
VERIFY_OR_DEBUG_ASSERT(!sourceSynchronizedAt.isValid() ||
sourceSynchronizedAt.timeSpec() == Qt::UTC) {
qWarning() << "Converting source synchronization time to UTC:" << sourceSynchronizedAt;
sourceSynchronizedAt = sourceSynchronizedAt.toUTC();
}
if (metadataImportResult ==
mixxx::MetadataSource::ImportResult::Failed) {
kLogger.warning()
Expand Down