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

Log export of track metadata into file #11691

Merged
merged 1 commit into from
Jun 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/sources/metadatasourcetaglib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -904,12 +904,10 @@ class SafelyWritableFile final {
std::pair<MetadataSource::ExportResult, QDateTime>
MetadataSourceTagLib::exportTrackMetadata(
const TrackMetadata& trackMetadata) const {
// NOTE(uklotzde): Log unconditionally (with debug level) to
// identify files in the log file that might have caused a
// crash while exporting metadata.
kLogger.debug() << "Exporting track metadata"
<< "into file" << m_fileName
<< "with type" << m_fileType;
// Modifying an external file is a potentially dangerous operation.
// If this operation unexpectedly crashes or corrupts data we need
// to identify the file that is affected.
kLogger.info() << "Exporting track metadata into file:" << m_fileName;

SafelyWritableFile safelyWritableFile(m_fileName, kExportTrackMetadataIntoTemporaryFile);
if (!safelyWritableFile.isReady()) {
Expand Down