Adding support for partial dates (only year or month), fixes #477
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include "database/User.hpp"
|
||||
|
||||
#include "IdTypeTraits.hpp"
|
||||
#include "PartialDateTimeTraits.hpp"
|
||||
#include "PathTraits.hpp"
|
||||
#include "SqlQuery.hpp"
|
||||
#include "StringViewTraits.hpp"
|
||||
@@ -450,6 +451,16 @@ namespace lms::db
|
||||
_trackLyrics.insert(getDboPtr(lyrics));
|
||||
}
|
||||
|
||||
std::optional<int> Track::getYear() const
|
||||
{
|
||||
return _date.getYear();
|
||||
}
|
||||
|
||||
std::optional<int> Track::getOriginalYear() const
|
||||
{
|
||||
return _originalDate.getYear();
|
||||
}
|
||||
|
||||
bool Track::hasLyrics() const
|
||||
{
|
||||
return !_trackLyrics.empty();
|
||||
|
||||
Reference in New Issue
Block a user