DetachedSong, db/LightSong, db/simple/Song: use std::chrono::system_clock::time_point
This commit is contained in:
@@ -107,7 +107,7 @@ UpdateWalk::UpdateContainerFile(Directory &directory,
|
||||
*contdir);
|
||||
|
||||
// shouldn't be necessary but it's there..
|
||||
song->mtime = std::chrono::system_clock::to_time_t(info.mtime);
|
||||
song->mtime = info.mtime;
|
||||
|
||||
FormatDefault(update_domain, "added %s/%s",
|
||||
contdir->GetPath(), song->uri);
|
||||
|
||||
@@ -51,9 +51,7 @@ UpdateWalk::UpdateSongFile2(Directory &directory,
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(song != nullptr &&
|
||||
std::chrono::system_clock::to_time_t(info.mtime) == song->mtime &&
|
||||
!walk_discard) &&
|
||||
if (!(song != nullptr && info.mtime == song->mtime && !walk_discard) &&
|
||||
UpdateContainerFile(directory, name, suffix, info)) {
|
||||
if (song != nullptr)
|
||||
editor.LockDeleteSong(directory, song);
|
||||
@@ -80,7 +78,7 @@ UpdateWalk::UpdateSongFile2(Directory &directory,
|
||||
modified = true;
|
||||
FormatDefault(update_domain, "added %s/%s",
|
||||
directory.GetPath(), name);
|
||||
} else if (std::chrono::system_clock::to_time_t(info.mtime) != song->mtime || walk_discard) {
|
||||
} else if (info.mtime != song->mtime || walk_discard) {
|
||||
FormatDefault(update_domain, "updating %s/%s",
|
||||
directory.GetPath(), name);
|
||||
if (!song->UpdateFile(storage)) {
|
||||
|
||||
Reference in New Issue
Block a user