mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-07 18: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:
parent
0358418926
commit
b9b08ab384
551 changed files with 8943 additions and 8809 deletions
|
@ -32,22 +32,23 @@
|
|||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
AddVirtualFolderDto::AddVirtualFolderDto(QObject *parent) {}
|
||||
AddVirtualFolderDto::AddVirtualFolderDto() {}
|
||||
|
||||
AddVirtualFolderDto AddVirtualFolderDto::fromJson(QJsonObject source) {AddVirtualFolderDto instance;
|
||||
instance->setFromJson(source, false);
|
||||
AddVirtualFolderDto AddVirtualFolderDto::fromJson(QJsonObject source) {
|
||||
AddVirtualFolderDto instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void AddVirtualFolderDto::setFromJson(QJsonObject source) {
|
||||
m_libraryOptions = fromJsonValue<QSharedPointer<LibraryOptions>>(source["LibraryOptions"]);
|
||||
m_libraryOptions = Jellyfin::Support::fromJsonValue<QSharedPointer<LibraryOptions>>(source["LibraryOptions"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject AddVirtualFolderDto::toJson() {
|
||||
QJsonObject result;
|
||||
result["LibraryOptions"] = toJsonValue<QSharedPointer<LibraryOptions>>(m_libraryOptions);
|
||||
result["LibraryOptions"] = Jellyfin::Support::toJsonValue<QSharedPointer<LibraryOptions>>(m_libraryOptions);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -58,6 +59,17 @@ void AddVirtualFolderDto::setLibraryOptions(QSharedPointer<LibraryOptions> newLi
|
|||
m_libraryOptions = newLibraryOptions;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using AddVirtualFolderDto = Jellyfin::DTO::AddVirtualFolderDto;
|
||||
|
||||
template <>
|
||||
AddVirtualFolderDto fromJsonValue<AddVirtualFolderDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return AddVirtualFolderDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue