mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-06 10:32:44 +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
|
@ -169,7 +169,7 @@ void DeviceProfile::setFromJson(QJsonObject source) {
|
|||
|
||||
}
|
||||
|
||||
QJsonObject DeviceProfile::toJson() {
|
||||
QJsonObject DeviceProfile::toJson() const {
|
||||
QJsonObject result;
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||
|
@ -652,10 +652,15 @@ namespace Support {
|
|||
using DeviceProfile = Jellyfin::DTO::DeviceProfile;
|
||||
|
||||
template <>
|
||||
DeviceProfile fromJsonValue<DeviceProfile>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
DeviceProfile fromJsonValue(const QJsonValue &source, convertType<DeviceProfile>) {
|
||||
if (!source.isObject()) throw ParseException("Expected JSON Object");
|
||||
return DeviceProfile::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
template<>
|
||||
QJsonValue toJsonValue(const DeviceProfile &source, convertType<DeviceProfile>) {
|
||||
return source.toJson();
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue