1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2025-09-07 10:42:44 +00:00

Make model code compileable

This disables some application level logic, but I'm going to rewrite
that using Lager anyway.
This commit is contained in:
Chris Josten 2021-03-20 16:29:31 +01:00
parent 0358418926
commit b9b08ab384
551 changed files with 8943 additions and 8809 deletions

View file

@ -34,5 +34,45 @@ namespace DTO {
ImageOrientationClass::ImageOrientationClass() {}
} // NS DTO
namespace Support {
using ImageOrientation = Jellyfin::DTO::ImageOrientation;
template <>
ImageOrientation fromJsonValue<ImageOrientation>(const QJsonValue &source) {
if (!source.isString()) return ImageOrientation::EnumNotSet;
QString str = source.toString();
if (str == QStringLiteral("TopLeft")) {
return ImageOrientation::TopLeft;
}
if (str == QStringLiteral("TopRight")) {
return ImageOrientation::TopRight;
}
if (str == QStringLiteral("BottomRight")) {
return ImageOrientation::BottomRight;
}
if (str == QStringLiteral("BottomLeft")) {
return ImageOrientation::BottomLeft;
}
if (str == QStringLiteral("LeftTop")) {
return ImageOrientation::LeftTop;
}
if (str == QStringLiteral("RightTop")) {
return ImageOrientation::RightTop;
}
if (str == QStringLiteral("RightBottom")) {
return ImageOrientation::RightBottom;
}
if (str == QStringLiteral("LeftBottom")) {
return ImageOrientation::LeftBottom;
}
return ImageOrientation::EnumNotSet;
}
} // NS Jellyfin
} // NS DTO