Add better error handling for Tag reader

This commit is contained in:
Jonas Kvinge
2024-07-01 02:06:39 +02:00
parent ad9f3ce078
commit 32baa95500
38 changed files with 1109 additions and 730 deletions

View File

@@ -278,8 +278,9 @@ void TrackSelectionDialog::SaveData(const QList<Data> &data) {
copy.set_track(new_metadata.track());
copy.set_year(new_metadata.year());
if (!TagReaderClient::Instance()->SaveFileBlocking(copy.url().toLocalFile(), copy)) {
qLog(Warning) << "Failed to write new auto-tags to" << copy.url().toLocalFile();
const TagReaderClient::Result result = TagReaderClient::Instance()->WriteFileBlocking(copy.url().toLocalFile(), copy, TagReaderClient::SaveType::Tags, TagReaderClient::SaveCoverOptions());
if (!result.success()) {
qLog(Error) << "Failed to write new auto-tags to" << copy.url().toLocalFile() << result.error;
}
}