mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-05 18:22:46 +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:
parent
0358418926
commit
b9b08ab384
551 changed files with 8943 additions and 8809 deletions
|
@ -32,28 +32,29 @@
|
|||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
BoxSetInfoRemoteSearchQuery::BoxSetInfoRemoteSearchQuery(QObject *parent) {}
|
||||
BoxSetInfoRemoteSearchQuery::BoxSetInfoRemoteSearchQuery() {}
|
||||
|
||||
BoxSetInfoRemoteSearchQuery BoxSetInfoRemoteSearchQuery::fromJson(QJsonObject source) {BoxSetInfoRemoteSearchQuery instance;
|
||||
instance->setFromJson(source, false);
|
||||
BoxSetInfoRemoteSearchQuery BoxSetInfoRemoteSearchQuery::fromJson(QJsonObject source) {
|
||||
BoxSetInfoRemoteSearchQuery instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void BoxSetInfoRemoteSearchQuery::setFromJson(QJsonObject source) {
|
||||
m_searchInfo = fromJsonValue<QSharedPointer<BoxSetInfo>>(source["SearchInfo"]);
|
||||
m_itemId = fromJsonValue<QUuid>(source["ItemId"]);
|
||||
m_searchProviderName = fromJsonValue<QString>(source["SearchProviderName"]);
|
||||
m_includeDisabledProviders = fromJsonValue<bool>(source["IncludeDisabledProviders"]);
|
||||
m_searchInfo = Jellyfin::Support::fromJsonValue<QSharedPointer<BoxSetInfo>>(source["SearchInfo"]);
|
||||
m_itemId = Jellyfin::Support::fromJsonValue<QUuid>(source["ItemId"]);
|
||||
m_searchProviderName = Jellyfin::Support::fromJsonValue<QString>(source["SearchProviderName"]);
|
||||
m_includeDisabledProviders = Jellyfin::Support::fromJsonValue<bool>(source["IncludeDisabledProviders"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject BoxSetInfoRemoteSearchQuery::toJson() {
|
||||
QJsonObject result;
|
||||
result["SearchInfo"] = toJsonValue<QSharedPointer<BoxSetInfo>>(m_searchInfo);
|
||||
result["ItemId"] = toJsonValue<QUuid>(m_itemId);
|
||||
result["SearchProviderName"] = toJsonValue<QString>(m_searchProviderName);
|
||||
result["IncludeDisabledProviders"] = toJsonValue<bool>(m_includeDisabledProviders);
|
||||
result["SearchInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<BoxSetInfo>>(m_searchInfo);
|
||||
result["ItemId"] = Jellyfin::Support::toJsonValue<QUuid>(m_itemId);
|
||||
result["SearchProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_searchProviderName);
|
||||
result["IncludeDisabledProviders"] = Jellyfin::Support::toJsonValue<bool>(m_includeDisabledProviders);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -79,6 +80,17 @@ void BoxSetInfoRemoteSearchQuery::setIncludeDisabledProviders(bool newIncludeDis
|
|||
m_includeDisabledProviders = newIncludeDisabledProviders;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using BoxSetInfoRemoteSearchQuery = Jellyfin::DTO::BoxSetInfoRemoteSearchQuery;
|
||||
|
||||
template <>
|
||||
BoxSetInfoRemoteSearchQuery fromJsonValue<BoxSetInfoRemoteSearchQuery>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return BoxSetInfoRemoteSearchQuery::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue