mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-07 18:42: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
|
@ -82,7 +82,7 @@ void ClientCapabilitiesDto::setFromJson(QJsonObject source) {
|
|||
|
||||
}
|
||||
|
||||
QJsonObject ClientCapabilitiesDto::toJson() {
|
||||
QJsonObject ClientCapabilitiesDto::toJson() const {
|
||||
QJsonObject result;
|
||||
result["PlayableMediaTypes"] = Jellyfin::Support::toJsonValue<QStringList>(m_playableMediaTypes);
|
||||
result["SupportedCommands"] = Jellyfin::Support::toJsonValue<QList<GeneralCommandType>>(m_supportedCommands);
|
||||
|
@ -201,10 +201,15 @@ namespace Support {
|
|||
using ClientCapabilitiesDto = Jellyfin::DTO::ClientCapabilitiesDto;
|
||||
|
||||
template <>
|
||||
ClientCapabilitiesDto fromJsonValue<ClientCapabilitiesDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
ClientCapabilitiesDto fromJsonValue(const QJsonValue &source, convertType<ClientCapabilitiesDto>) {
|
||||
if (!source.isObject()) throw ParseException("Expected JSON Object");
|
||||
return ClientCapabilitiesDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
template<>
|
||||
QJsonValue toJsonValue(const ClientCapabilitiesDto &source, convertType<ClientCapabilitiesDto>) {
|
||||
return source.toJson();
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue