Skip to content

Commit

Permalink
Merge pull request #4826 from uklotzde/lp1979864-modplug
Browse files Browse the repository at this point in the history
lp1979864: Fix synchronization time stamps of ModPlug files
  • Loading branch information
daschuer authored Jun 26, 2022
2 parents df85a74 + 1b811cd commit 1cd826a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
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

0 comments on commit 1cd826a

Please sign in to comment.