Fixed a badly constructed Wt::WdateTime from partial date times, ref #601

This commit is contained in:
emeric
2025-01-26 19:01:59 +01:00
parent 814eaf0a3e
commit aab5dbee2b
@@ -510,7 +510,7 @@ namespace lms::scanner
time = Wt::WTime{ *encodingTime.getHour(), *encodingTime.getMin(), *encodingTime.getSec() };
if (date.isValid())
track.modify()->setAddedTime(Wt::WDateTime{ date, time });
track.modify()->setAddedTime(time.isValid() ? Wt::WDateTime{ date, time } : Wt::WDateTime{ date });
}
db::MediaLibrary::pointer mediaLibrary{ db::MediaLibrary::find(dbSession, _mediaLibrary.id) }; // may be null if settings are updated in // => next scan will correct this