mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-06 18:32:45 +00:00
WIP: HttpLoader seems to work, Model still borked
This commit is contained in:
parent
e421adf733
commit
729e343661
1412 changed files with 13967 additions and 33794 deletions
|
@ -61,7 +61,7 @@ void DeviceProfileInfo::setFromJson(QJsonObject source) {
|
|||
|
||||
}
|
||||
|
||||
QJsonObject DeviceProfileInfo::toJson() {
|
||||
QJsonObject DeviceProfileInfo::toJson() const {
|
||||
QJsonObject result;
|
||||
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
|
@ -110,10 +110,15 @@ namespace Support {
|
|||
using DeviceProfileInfo = Jellyfin::DTO::DeviceProfileInfo;
|
||||
|
||||
template <>
|
||||
DeviceProfileInfo fromJsonValue<DeviceProfileInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
DeviceProfileInfo fromJsonValue(const QJsonValue &source, convertType<DeviceProfileInfo>) {
|
||||
if (!source.isObject()) throw ParseException("Expected JSON Object");
|
||||
return DeviceProfileInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
template<>
|
||||
QJsonValue toJsonValue(const DeviceProfileInfo &source, convertType<DeviceProfileInfo>) {
|
||||
return source.toJson();
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue