mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2024-11-22 09:15:18 +00:00
Fix sending of DeviceProfileInfo
Due to some errors within DeviceProfile and how nullables were serialized, an invalid request was made and the /Sessions/Capabilities/Full would give an 400 response back. Besides that, ApiClient would generate a DeviceProfile before all properties from QML were read. This has been fixed by implementing QQmlParserStatus and only generating the device profile after all properties are set.
This commit is contained in:
parent
8a9cb73686
commit
357ac89330
|
@ -45,8 +45,17 @@ QJsonObject {{className}}::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
{{#each properties as |property|}}
|
{{#each properties as |property|}}
|
||||||
result["{{property.originalName}}"] = {{supportNamespace}}::toJsonValue<{{property.typeNameWithQualifiers}}>({{property.memberName}});
|
{{#if property.isNullable}}
|
||||||
|
|
||||||
|
|
||||||
|
if (!({{property.nullableCheck}})) {
|
||||||
|
result["{{property.originalName}}"] = {{supportNamespace}}::toJsonValue<{{property.typeNameWithQualifiers}}>({{property.memberName}});
|
||||||
|
}
|
||||||
|
|
||||||
|
{{#else}}
|
||||||
|
|
||||||
|
result["{{property.originalName}}"] = {{supportNamespace}}::toJsonValue<{{property.typeNameWithQualifiers}}>({{property.memberName}});
|
||||||
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -29,6 +29,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
#include <QHostInfo>
|
#include <QHostInfo>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QQmlListProperty>
|
#include <QQmlListProperty>
|
||||||
|
#include <QQmlParserStatus>
|
||||||
#include <QScopedPointer>
|
#include <QScopedPointer>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QSysInfo>
|
#include <QSysInfo>
|
||||||
|
@ -85,10 +86,11 @@ class ApiClientPrivate;
|
||||||
*
|
*
|
||||||
* These steps might change. I'm considering decoupling CredentialsManager from this class to clean some code up.
|
* These steps might change. I'm considering decoupling CredentialsManager from this class to clean some code up.
|
||||||
*/
|
*/
|
||||||
class ApiClient : public QObject {
|
class ApiClient : public QObject, public QQmlParserStatus {
|
||||||
friend class WebSocket;
|
friend class WebSocket;
|
||||||
friend class PlaybackManager;
|
friend class PlaybackManager;
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_INTERFACES(QQmlParserStatus)
|
||||||
Q_DECLARE_PRIVATE(ApiClient);
|
Q_DECLARE_PRIVATE(ApiClient);
|
||||||
public:
|
public:
|
||||||
explicit ApiClient(QObject *parent = nullptr);
|
explicit ApiClient(QObject *parent = nullptr);
|
||||||
|
@ -240,6 +242,9 @@ protected slots:
|
||||||
void credManagerUsersListed(const QString &server, QStringList users);
|
void credManagerUsersListed(const QString &server, QStringList users);
|
||||||
void credManagerTokenRetrieved(const QString &server, const QString &user, const QString &token);
|
void credManagerTokenRetrieved(const QString &server, const QString &user, const QString &token);
|
||||||
|
|
||||||
|
void classBegin() override;
|
||||||
|
void componentComplete() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* @brief Adds default headers to each request, like authentication headers etc.
|
* @brief Adds default headers to each request, like authentication headers etc.
|
||||||
|
|
|
@ -686,21 +686,30 @@ MetaTypeInfo getType(ref const string name, const ref Node node, const ref Node
|
||||||
info.needsLocalImport = true;
|
info.needsLocalImport = true;
|
||||||
info.typeName = type;
|
info.typeName = type;
|
||||||
if (type in allSchemas) {
|
if (type in allSchemas) {
|
||||||
if ("type" in allSchemas[type]
|
if ("enum" in allSchemas[type]) {
|
||||||
&& allSchemas[type]["type"].as!string == "object") {
|
info.isTypeNullable = true;
|
||||||
|
info.typeNullableCheck = "== " ~ info.typeName ~ "::EnumNotSet";
|
||||||
|
info.typeNullableSetter = "= " ~ info.typeName ~ "::EnumNotSet";
|
||||||
|
} else if ("type" in allSchemas[type]
|
||||||
|
&& allSchemas[type]["type"].as!string == "object") {
|
||||||
|
writefln("Type %s is an object", type);
|
||||||
info.needsPointer = true;
|
info.needsPointer = true;
|
||||||
info.isTypeNullable = true;
|
info.isTypeNullable = true;
|
||||||
info.typeNullableCheck = ".isNull()";
|
info.typeNullableCheck = ".isNull()";
|
||||||
info.typeNullableSetter = ".clear()";
|
info.typeNullableSetter = ".clear()";
|
||||||
} else if ("enum" in allSchemas[type]) {
|
|
||||||
info.isTypeNullable = true;
|
|
||||||
info.typeNullableCheck = "== " ~ info.typeName ~ "::EnumNotSet";
|
|
||||||
info.typeNullableSetter = "= " ~ info.typeName ~ "::EnumNotSet";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Type is an enumeration
|
||||||
|
if ("enum" in node) {
|
||||||
|
info.isTypeNullable = true;
|
||||||
|
info.typeNullableCheck = "== " ~ info.typeName ~ "::EnumNotSet";
|
||||||
|
info.typeNullableSetter = "= " ~ info.typeName ~ "::EnumNotSet";
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
// No type information specified. As a fallback, use a QVariant.
|
// No type information specified. As a fallback, use a QVariant.
|
||||||
if (!("type" in node)) {
|
if (!("type" in node)) {
|
||||||
info.typeName = "QVariant";
|
info.typeName = "QVariant";
|
||||||
|
|
|
@ -51,7 +51,7 @@ public:
|
||||||
bool online = true;
|
bool online = true;
|
||||||
QSharedPointer<DTO::DeviceProfile> deviceProfile;
|
QSharedPointer<DTO::DeviceProfile> deviceProfile;
|
||||||
QSharedPointer<DTO::ClientCapabilitiesDto> clientCapabilities;
|
QSharedPointer<DTO::ClientCapabilitiesDto> clientCapabilities;
|
||||||
QVariantList supportedCommands;
|
QList<DTO::GeneralCommandType> supportedCommands;
|
||||||
|
|
||||||
bool authenticated = false;
|
bool authenticated = false;
|
||||||
|
|
||||||
|
@ -60,6 +60,8 @@ public:
|
||||||
*/
|
*/
|
||||||
QUuid retrieveDeviceId() const;
|
QUuid retrieveDeviceId() const;
|
||||||
|
|
||||||
|
bool componentBeingParsed = false;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ApiClient::ApiClient(QObject *parent)
|
ApiClient::ApiClient(QObject *parent)
|
||||||
|
@ -73,7 +75,6 @@ ApiClient::ApiClient(QObject *parent)
|
||||||
connect(d->credManager, &CredentialsManager::serversListed, this, &ApiClient::credManagerServersListed);
|
connect(d->credManager, &CredentialsManager::serversListed, this, &ApiClient::credManagerServersListed);
|
||||||
connect(d->credManager, &CredentialsManager::usersListed, this, &ApiClient::credManagerUsersListed);
|
connect(d->credManager, &CredentialsManager::usersListed, this, &ApiClient::credManagerUsersListed);
|
||||||
connect(d->credManager, &CredentialsManager::tokenRetrieved, this, &ApiClient::credManagerTokenRetrieved);
|
connect(d->credManager, &CredentialsManager::tokenRetrieved, this, &ApiClient::credManagerTokenRetrieved);
|
||||||
generateDeviceProfile();
|
|
||||||
connect(d->settings, &ViewModel::Settings::maxStreamingBitRateChanged, this, [d](qint32 newBitrate){
|
connect(d->settings, &ViewModel::Settings::maxStreamingBitRateChanged, this, [d](qint32 newBitrate){
|
||||||
d->deviceProfile->setMaxStreamingBitrate(newBitrate);
|
d->deviceProfile->setMaxStreamingBitrate(newBitrate);
|
||||||
});
|
});
|
||||||
|
@ -148,13 +149,29 @@ ViewModel::Settings *ApiClient::settings() const {
|
||||||
|
|
||||||
QVariantList ApiClient::supportedCommands() const {
|
QVariantList ApiClient::supportedCommands() const {
|
||||||
Q_D(const ApiClient);
|
Q_D(const ApiClient);
|
||||||
return d->supportedCommands;
|
QVariantList result;
|
||||||
|
result.reserve(d->supportedCommands.size());
|
||||||
|
for(auto it = d->supportedCommands.begin(); it != d->supportedCommands.end(); it++) {
|
||||||
|
result.append(QVariant::fromValue<DTO::GeneralCommandType>(*it));
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ApiClient::setSupportedCommands(QVariantList newSupportedCommands) {
|
void ApiClient::setSupportedCommands(QVariantList newSupportedCommands) {
|
||||||
Q_D(ApiClient);
|
Q_D(ApiClient);
|
||||||
d->supportedCommands = newSupportedCommands;
|
d->supportedCommands.clear();
|
||||||
|
d->supportedCommands.reserve(newSupportedCommands.size());
|
||||||
|
for (int i = 0; i < newSupportedCommands.size(); i++) {
|
||||||
|
if (newSupportedCommands[i].canConvert<DTO::GeneralCommandType>()) {
|
||||||
|
d->supportedCommands.append(newSupportedCommands[i].value<DTO::GeneralCommandType>());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
qDebug() << "Supported commands changed: " << d->supportedCommands;
|
||||||
emit supportedCommandsChanged();
|
emit supportedCommandsChanged();
|
||||||
|
|
||||||
|
if (!d->componentBeingParsed) {
|
||||||
|
this->generateDeviceProfile();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
QSharedPointer<DTO::DeviceProfile> ApiClient::deviceProfile() const {
|
QSharedPointer<DTO::DeviceProfile> ApiClient::deviceProfile() const {
|
||||||
Q_D(const ApiClient);
|
Q_D(const ApiClient);
|
||||||
|
@ -169,6 +186,22 @@ const QJsonObject ApiClient::clientCapabilities() const {
|
||||||
Q_D(const ApiClient);
|
Q_D(const ApiClient);
|
||||||
return d->clientCapabilities->toJson();
|
return d->clientCapabilities->toJson();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// QQMLParserStatus implementation
|
||||||
|
void ApiClient::classBegin() {
|
||||||
|
Q_D(ApiClient);
|
||||||
|
d->componentBeingParsed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ApiClient::componentComplete() {
|
||||||
|
Q_D(ApiClient);
|
||||||
|
d->componentBeingParsed = false;
|
||||||
|
|
||||||
|
// Generate the device profile after all properties have been parsed.
|
||||||
|
generateDeviceProfile();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// BASE HTTP METHODS //
|
// BASE HTTP METHODS //
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -397,18 +430,10 @@ void ApiClient::generateDeviceProfile() {
|
||||||
deviceProfile->setMaxStreamingBitrate(d->settings->maxStreamingBitRate());
|
deviceProfile->setMaxStreamingBitrate(d->settings->maxStreamingBitRate());
|
||||||
d->deviceProfile = deviceProfile;
|
d->deviceProfile = deviceProfile;
|
||||||
|
|
||||||
QList<DTO::GeneralCommandType> supportedCommands;
|
|
||||||
supportedCommands.reserve(d->supportedCommands.size());
|
|
||||||
for (int i = 0; i < d->supportedCommands.size(); i++) {
|
|
||||||
if (d->supportedCommands[i].canConvert<DTO::GeneralCommandType>()) {
|
|
||||||
supportedCommands.append(d->supportedCommands[i].value<DTO::GeneralCommandType>());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
QSharedPointer<DTO::ClientCapabilitiesDto> clientCapabilities = QSharedPointer<DTO::ClientCapabilitiesDto>::create();
|
QSharedPointer<DTO::ClientCapabilitiesDto> clientCapabilities = QSharedPointer<DTO::ClientCapabilitiesDto>::create();
|
||||||
clientCapabilities->setPlayableMediaTypes({"Audio", "Video", "Photo"});
|
clientCapabilities->setPlayableMediaTypes({"Audio", "Video", "Photo"});
|
||||||
clientCapabilities->setDeviceProfile(deviceProfile);
|
clientCapabilities->setDeviceProfile(deviceProfile);
|
||||||
clientCapabilities->setSupportedCommands(supportedCommands);
|
clientCapabilities->setSupportedCommands(d->supportedCommands);
|
||||||
clientCapabilities->setAppStoreUrl("https://chris.netsoj.nl/projects/harbour-sailfin");
|
clientCapabilities->setAppStoreUrl("https://chris.netsoj.nl/projects/harbour-sailfin");
|
||||||
clientCapabilities->setIconUrl("https://chris.netsoj.nl/static/img/logo.png");
|
clientCapabilities->setIconUrl("https://chris.netsoj.nl/static/img/logo.png");
|
||||||
clientCapabilities->setSupportsPersistentIdentifier(true);
|
clientCapabilities->setSupportsPersistentIdentifier(true);
|
||||||
|
|
|
@ -69,12 +69,12 @@ void AccessSchedule::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject AccessSchedule::toJson() const {
|
QJsonObject AccessSchedule::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["Id"] = Jellyfin::Support::toJsonValue<qint32>(m_jellyfinId);
|
result["Id"] = Jellyfin::Support::toJsonValue<qint32>(m_jellyfinId);
|
||||||
result["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
result["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
||||||
result["DayOfWeek"] = Jellyfin::Support::toJsonValue<DynamicDayOfWeek>(m_dayOfWeek);
|
result["DayOfWeek"] = Jellyfin::Support::toJsonValue<DynamicDayOfWeek>(m_dayOfWeek);
|
||||||
result["StartHour"] = Jellyfin::Support::toJsonValue<double>(m_startHour);
|
result["StartHour"] = Jellyfin::Support::toJsonValue<double>(m_startHour);
|
||||||
result["EndHour"] = Jellyfin::Support::toJsonValue<double>(m_endHour);
|
result["EndHour"] = Jellyfin::Support::toJsonValue<double>(m_endHour);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,17 +84,41 @@ void ActivityLogEntry::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject ActivityLogEntry::toJson() const {
|
QJsonObject ActivityLogEntry::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["Id"] = Jellyfin::Support::toJsonValue<qint64>(m_jellyfinId);
|
result["Id"] = Jellyfin::Support::toJsonValue<qint64>(m_jellyfinId);
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Overview"] = Jellyfin::Support::toJsonValue<QString>(m_overview);
|
if (!(m_name.isNull())) {
|
||||||
result["ShortOverview"] = Jellyfin::Support::toJsonValue<QString>(m_shortOverview);
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
result["Type"] = Jellyfin::Support::toJsonValue<QString>(m_type);
|
}
|
||||||
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
|
||||||
|
|
||||||
|
if (!(m_overview.isNull())) {
|
||||||
|
result["Overview"] = Jellyfin::Support::toJsonValue<QString>(m_overview);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_shortOverview.isNull())) {
|
||||||
|
result["ShortOverview"] = Jellyfin::Support::toJsonValue<QString>(m_shortOverview);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_type.isNull())) {
|
||||||
|
result["Type"] = Jellyfin::Support::toJsonValue<QString>(m_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_itemId.isNull())) {
|
||||||
|
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
||||||
|
}
|
||||||
|
|
||||||
result["Date"] = Jellyfin::Support::toJsonValue<QDateTime>(m_date);
|
result["Date"] = Jellyfin::Support::toJsonValue<QDateTime>(m_date);
|
||||||
result["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
result["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
||||||
result["UserPrimaryImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_userPrimaryImageTag);
|
|
||||||
result["Severity"] = Jellyfin::Support::toJsonValue<LogLevel>(m_severity);
|
|
||||||
|
|
||||||
|
if (!(m_userPrimaryImageTag.isNull())) {
|
||||||
|
result["UserPrimaryImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_userPrimaryImageTag);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["Severity"] = Jellyfin::Support::toJsonValue<LogLevel>(m_severity);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,10 +63,14 @@ void ActivityLogEntryQueryResult::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject ActivityLogEntryQueryResult::toJson() const {
|
QJsonObject ActivityLogEntryQueryResult::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Items"] = Jellyfin::Support::toJsonValue<QList<ActivityLogEntry>>(m_items);
|
|
||||||
|
|
||||||
|
if (!(m_items.size() == 0)) {
|
||||||
|
result["Items"] = Jellyfin::Support::toJsonValue<QList<ActivityLogEntry>>(m_items);
|
||||||
|
}
|
||||||
|
|
||||||
result["TotalRecordCount"] = Jellyfin::Support::toJsonValue<qint32>(m_totalRecordCount);
|
result["TotalRecordCount"] = Jellyfin::Support::toJsonValue<qint32>(m_totalRecordCount);
|
||||||
result["StartIndex"] = Jellyfin::Support::toJsonValue<qint32>(m_startIndex);
|
result["StartIndex"] = Jellyfin::Support::toJsonValue<qint32>(m_startIndex);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,8 +57,8 @@ void AddVirtualFolderDto::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject AddVirtualFolderDto::toJson() const {
|
QJsonObject AddVirtualFolderDto::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["LibraryOptions"] = Jellyfin::Support::toJsonValue<QSharedPointer<LibraryOptions>>(m_libraryOptions);
|
|
||||||
|
|
||||||
|
result["LibraryOptions"] = Jellyfin::Support::toJsonValue<QSharedPointer<LibraryOptions>>(m_libraryOptions);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,19 +93,67 @@ void AlbumInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject AlbumInfo::toJson() const {
|
QJsonObject AlbumInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
|
||||||
result["MetadataLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_metadataLanguage);
|
if (!(m_name.isNull())) {
|
||||||
result["MetadataCountryCode"] = Jellyfin::Support::toJsonValue<QString>(m_metadataCountryCode);
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
result["ProviderIds"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_providerIds);
|
}
|
||||||
result["Year"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_year);
|
|
||||||
result["IndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_indexNumber);
|
|
||||||
result["ParentIndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_parentIndexNumber);
|
if (!(m_path.isNull())) {
|
||||||
result["PremiereDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_premiereDate);
|
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_metadataLanguage.isNull())) {
|
||||||
|
result["MetadataLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_metadataLanguage);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_metadataCountryCode.isNull())) {
|
||||||
|
result["MetadataCountryCode"] = Jellyfin::Support::toJsonValue<QString>(m_metadataCountryCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_providerIds.isEmpty())) {
|
||||||
|
result["ProviderIds"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_providerIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_year.has_value())) {
|
||||||
|
result["Year"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_year);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_indexNumber.has_value())) {
|
||||||
|
result["IndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_indexNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_parentIndexNumber.has_value())) {
|
||||||
|
result["ParentIndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_parentIndexNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_premiereDate.isNull())) {
|
||||||
|
result["PremiereDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_premiereDate);
|
||||||
|
}
|
||||||
|
|
||||||
result["IsAutomated"] = Jellyfin::Support::toJsonValue<bool>(m_isAutomated);
|
result["IsAutomated"] = Jellyfin::Support::toJsonValue<bool>(m_isAutomated);
|
||||||
result["AlbumArtists"] = Jellyfin::Support::toJsonValue<QStringList>(m_albumArtists);
|
|
||||||
result["ArtistProviderIds"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_artistProviderIds);
|
if (!(m_albumArtists.size() == 0)) {
|
||||||
result["SongInfos"] = Jellyfin::Support::toJsonValue<QList<SongInfo>>(m_songInfos);
|
result["AlbumArtists"] = Jellyfin::Support::toJsonValue<QStringList>(m_albumArtists);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_artistProviderIds.isEmpty())) {
|
||||||
|
result["ArtistProviderIds"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_artistProviderIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_songInfos.size() == 0)) {
|
||||||
|
result["SongInfos"] = Jellyfin::Support::toJsonValue<QList<SongInfo>>(m_songInfos);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,11 +66,15 @@ void AlbumInfoRemoteSearchQuery::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject AlbumInfoRemoteSearchQuery::toJson() const {
|
QJsonObject AlbumInfoRemoteSearchQuery::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["SearchInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<AlbumInfo>>(m_searchInfo);
|
result["SearchInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<AlbumInfo>>(m_searchInfo);
|
||||||
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
||||||
result["SearchProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_searchProviderName);
|
|
||||||
result["IncludeDisabledProviders"] = Jellyfin::Support::toJsonValue<bool>(m_includeDisabledProviders);
|
|
||||||
|
|
||||||
|
if (!(m_searchProviderName.isNull())) {
|
||||||
|
result["SearchProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_searchProviderName);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["IncludeDisabledProviders"] = Jellyfin::Support::toJsonValue<bool>(m_includeDisabledProviders);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,10 +63,10 @@ void AllThemeMediaResult::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject AllThemeMediaResult::toJson() const {
|
QJsonObject AllThemeMediaResult::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["ThemeVideosResult"] = Jellyfin::Support::toJsonValue<QSharedPointer<ThemeMediaResult>>(m_themeVideosResult);
|
result["ThemeVideosResult"] = Jellyfin::Support::toJsonValue<QSharedPointer<ThemeMediaResult>>(m_themeVideosResult);
|
||||||
result["ThemeSongsResult"] = Jellyfin::Support::toJsonValue<QSharedPointer<ThemeMediaResult>>(m_themeSongsResult);
|
result["ThemeSongsResult"] = Jellyfin::Support::toJsonValue<QSharedPointer<ThemeMediaResult>>(m_themeSongsResult);
|
||||||
result["SoundtrackSongsResult"] = Jellyfin::Support::toJsonValue<QSharedPointer<ThemeMediaResult>>(m_soundtrackSongsResult);
|
result["SoundtrackSongsResult"] = Jellyfin::Support::toJsonValue<QSharedPointer<ThemeMediaResult>>(m_soundtrackSongsResult);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,17 +87,57 @@ void ArtistInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject ArtistInfo::toJson() const {
|
QJsonObject ArtistInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
|
||||||
result["MetadataLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_metadataLanguage);
|
if (!(m_name.isNull())) {
|
||||||
result["MetadataCountryCode"] = Jellyfin::Support::toJsonValue<QString>(m_metadataCountryCode);
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
result["ProviderIds"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_providerIds);
|
}
|
||||||
result["Year"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_year);
|
|
||||||
result["IndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_indexNumber);
|
|
||||||
result["ParentIndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_parentIndexNumber);
|
if (!(m_path.isNull())) {
|
||||||
result["PremiereDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_premiereDate);
|
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_metadataLanguage.isNull())) {
|
||||||
|
result["MetadataLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_metadataLanguage);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_metadataCountryCode.isNull())) {
|
||||||
|
result["MetadataCountryCode"] = Jellyfin::Support::toJsonValue<QString>(m_metadataCountryCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_providerIds.isEmpty())) {
|
||||||
|
result["ProviderIds"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_providerIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_year.has_value())) {
|
||||||
|
result["Year"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_year);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_indexNumber.has_value())) {
|
||||||
|
result["IndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_indexNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_parentIndexNumber.has_value())) {
|
||||||
|
result["ParentIndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_parentIndexNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_premiereDate.isNull())) {
|
||||||
|
result["PremiereDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_premiereDate);
|
||||||
|
}
|
||||||
|
|
||||||
result["IsAutomated"] = Jellyfin::Support::toJsonValue<bool>(m_isAutomated);
|
result["IsAutomated"] = Jellyfin::Support::toJsonValue<bool>(m_isAutomated);
|
||||||
result["SongInfos"] = Jellyfin::Support::toJsonValue<QList<SongInfo>>(m_songInfos);
|
|
||||||
|
if (!(m_songInfos.size() == 0)) {
|
||||||
|
result["SongInfos"] = Jellyfin::Support::toJsonValue<QList<SongInfo>>(m_songInfos);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,11 +66,15 @@ void ArtistInfoRemoteSearchQuery::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject ArtistInfoRemoteSearchQuery::toJson() const {
|
QJsonObject ArtistInfoRemoteSearchQuery::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["SearchInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<ArtistInfo>>(m_searchInfo);
|
result["SearchInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<ArtistInfo>>(m_searchInfo);
|
||||||
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
||||||
result["SearchProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_searchProviderName);
|
|
||||||
result["IncludeDisabledProviders"] = Jellyfin::Support::toJsonValue<bool>(m_includeDisabledProviders);
|
|
||||||
|
|
||||||
|
if (!(m_searchProviderName.isNull())) {
|
||||||
|
result["SearchProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_searchProviderName);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["IncludeDisabledProviders"] = Jellyfin::Support::toJsonValue<bool>(m_includeDisabledProviders);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,9 +63,21 @@ void AuthenticateUserByName::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject AuthenticateUserByName::toJson() const {
|
QJsonObject AuthenticateUserByName::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Username"] = Jellyfin::Support::toJsonValue<QString>(m_username);
|
|
||||||
result["Pw"] = Jellyfin::Support::toJsonValue<QString>(m_pw);
|
|
||||||
result["Password"] = Jellyfin::Support::toJsonValue<QString>(m_password);
|
if (!(m_username.isNull())) {
|
||||||
|
result["Username"] = Jellyfin::Support::toJsonValue<QString>(m_username);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_pw.isNull())) {
|
||||||
|
result["Pw"] = Jellyfin::Support::toJsonValue<QString>(m_pw);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_password.isNull())) {
|
||||||
|
result["Password"] = Jellyfin::Support::toJsonValue<QString>(m_password);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,18 +90,46 @@ void AuthenticationInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject AuthenticationInfo::toJson() const {
|
QJsonObject AuthenticationInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["Id"] = Jellyfin::Support::toJsonValue<qint64>(m_jellyfinId);
|
result["Id"] = Jellyfin::Support::toJsonValue<qint64>(m_jellyfinId);
|
||||||
result["AccessToken"] = Jellyfin::Support::toJsonValue<QString>(m_accessToken);
|
|
||||||
result["DeviceId"] = Jellyfin::Support::toJsonValue<QString>(m_deviceId);
|
if (!(m_accessToken.isNull())) {
|
||||||
result["AppName"] = Jellyfin::Support::toJsonValue<QString>(m_appName);
|
result["AccessToken"] = Jellyfin::Support::toJsonValue<QString>(m_accessToken);
|
||||||
result["AppVersion"] = Jellyfin::Support::toJsonValue<QString>(m_appVersion);
|
}
|
||||||
result["DeviceName"] = Jellyfin::Support::toJsonValue<QString>(m_deviceName);
|
|
||||||
|
|
||||||
|
if (!(m_deviceId.isNull())) {
|
||||||
|
result["DeviceId"] = Jellyfin::Support::toJsonValue<QString>(m_deviceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_appName.isNull())) {
|
||||||
|
result["AppName"] = Jellyfin::Support::toJsonValue<QString>(m_appName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_appVersion.isNull())) {
|
||||||
|
result["AppVersion"] = Jellyfin::Support::toJsonValue<QString>(m_appVersion);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_deviceName.isNull())) {
|
||||||
|
result["DeviceName"] = Jellyfin::Support::toJsonValue<QString>(m_deviceName);
|
||||||
|
}
|
||||||
|
|
||||||
result["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
result["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
||||||
result["IsActive"] = Jellyfin::Support::toJsonValue<bool>(m_isActive);
|
result["IsActive"] = Jellyfin::Support::toJsonValue<bool>(m_isActive);
|
||||||
result["DateCreated"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateCreated);
|
result["DateCreated"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateCreated);
|
||||||
result["DateRevoked"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateRevoked);
|
|
||||||
|
if (!(m_dateRevoked.isNull())) {
|
||||||
|
result["DateRevoked"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateRevoked);
|
||||||
|
}
|
||||||
|
|
||||||
result["DateLastActivity"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateLastActivity);
|
result["DateLastActivity"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateLastActivity);
|
||||||
result["UserName"] = Jellyfin::Support::toJsonValue<QString>(m_userName);
|
|
||||||
|
if (!(m_userName.isNull())) {
|
||||||
|
result["UserName"] = Jellyfin::Support::toJsonValue<QString>(m_userName);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,10 +63,14 @@ void AuthenticationInfoQueryResult::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject AuthenticationInfoQueryResult::toJson() const {
|
QJsonObject AuthenticationInfoQueryResult::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Items"] = Jellyfin::Support::toJsonValue<QList<AuthenticationInfo>>(m_items);
|
|
||||||
|
|
||||||
|
if (!(m_items.size() == 0)) {
|
||||||
|
result["Items"] = Jellyfin::Support::toJsonValue<QList<AuthenticationInfo>>(m_items);
|
||||||
|
}
|
||||||
|
|
||||||
result["TotalRecordCount"] = Jellyfin::Support::toJsonValue<qint32>(m_totalRecordCount);
|
result["TotalRecordCount"] = Jellyfin::Support::toJsonValue<qint32>(m_totalRecordCount);
|
||||||
result["StartIndex"] = Jellyfin::Support::toJsonValue<qint32>(m_startIndex);
|
result["StartIndex"] = Jellyfin::Support::toJsonValue<qint32>(m_startIndex);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,10 +66,18 @@ void AuthenticationResult::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject AuthenticationResult::toJson() const {
|
QJsonObject AuthenticationResult::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["User"] = Jellyfin::Support::toJsonValue<QSharedPointer<UserDto>>(m_user);
|
result["User"] = Jellyfin::Support::toJsonValue<QSharedPointer<UserDto>>(m_user);
|
||||||
result["SessionInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<SessionInfo>>(m_sessionInfo);
|
result["SessionInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<SessionInfo>>(m_sessionInfo);
|
||||||
result["AccessToken"] = Jellyfin::Support::toJsonValue<QString>(m_accessToken);
|
|
||||||
result["ServerId"] = Jellyfin::Support::toJsonValue<QString>(m_serverId);
|
if (!(m_accessToken.isNull())) {
|
||||||
|
result["AccessToken"] = Jellyfin::Support::toJsonValue<QString>(m_accessToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_serverId.isNull())) {
|
||||||
|
result["ServerId"] = Jellyfin::Support::toJsonValue<QString>(m_serverId);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,18 +87,38 @@ void BaseItem::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject BaseItem::toJson() const {
|
QJsonObject BaseItem::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Size"] = Jellyfin::Support::toJsonValue<std::optional<qint64>>(m_size);
|
|
||||||
result["Container"] = Jellyfin::Support::toJsonValue<QString>(m_container);
|
|
||||||
|
if (!(!m_size.has_value())) {
|
||||||
|
result["Size"] = Jellyfin::Support::toJsonValue<std::optional<qint64>>(m_size);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_container.isNull())) {
|
||||||
|
result["Container"] = Jellyfin::Support::toJsonValue<QString>(m_container);
|
||||||
|
}
|
||||||
|
|
||||||
result["DateLastSaved"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateLastSaved);
|
result["DateLastSaved"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateLastSaved);
|
||||||
result["RemoteTrailers"] = Jellyfin::Support::toJsonValue<QList<MediaUrl>>(m_remoteTrailers);
|
|
||||||
|
if (!(m_remoteTrailers.size() == 0)) {
|
||||||
|
result["RemoteTrailers"] = Jellyfin::Support::toJsonValue<QList<MediaUrl>>(m_remoteTrailers);
|
||||||
|
}
|
||||||
|
|
||||||
result["IsHD"] = Jellyfin::Support::toJsonValue<bool>(m_isHD);
|
result["IsHD"] = Jellyfin::Support::toJsonValue<bool>(m_isHD);
|
||||||
result["IsShortcut"] = Jellyfin::Support::toJsonValue<bool>(m_isShortcut);
|
result["IsShortcut"] = Jellyfin::Support::toJsonValue<bool>(m_isShortcut);
|
||||||
result["ShortcutPath"] = Jellyfin::Support::toJsonValue<QString>(m_shortcutPath);
|
|
||||||
|
if (!(m_shortcutPath.isNull())) {
|
||||||
|
result["ShortcutPath"] = Jellyfin::Support::toJsonValue<QString>(m_shortcutPath);
|
||||||
|
}
|
||||||
|
|
||||||
result["Width"] = Jellyfin::Support::toJsonValue<qint32>(m_width);
|
result["Width"] = Jellyfin::Support::toJsonValue<qint32>(m_width);
|
||||||
result["Height"] = Jellyfin::Support::toJsonValue<qint32>(m_height);
|
result["Height"] = Jellyfin::Support::toJsonValue<qint32>(m_height);
|
||||||
result["ExtraIds"] = Jellyfin::Support::toJsonValue<QStringList>(m_extraIds);
|
|
||||||
result["SupportsExternalTransfer"] = Jellyfin::Support::toJsonValue<bool>(m_supportsExternalTransfer);
|
|
||||||
|
|
||||||
|
if (!(m_extraIds.size() == 0)) {
|
||||||
|
result["ExtraIds"] = Jellyfin::Support::toJsonValue<QStringList>(m_extraIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["SupportsExternalTransfer"] = Jellyfin::Support::toJsonValue<bool>(m_supportsExternalTransfer);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -507,158 +507,718 @@ void BaseItemDto::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject BaseItemDto::toJson() const {
|
QJsonObject BaseItemDto::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["OriginalTitle"] = Jellyfin::Support::toJsonValue<QString>(m_originalTitle);
|
|
||||||
result["ServerId"] = Jellyfin::Support::toJsonValue<QString>(m_serverId);
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_originalTitle.isNull())) {
|
||||||
|
result["OriginalTitle"] = Jellyfin::Support::toJsonValue<QString>(m_originalTitle);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_serverId.isNull())) {
|
||||||
|
result["ServerId"] = Jellyfin::Support::toJsonValue<QString>(m_serverId);
|
||||||
|
}
|
||||||
|
|
||||||
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||||
result["Etag"] = Jellyfin::Support::toJsonValue<QString>(m_etag);
|
|
||||||
result["SourceType"] = Jellyfin::Support::toJsonValue<QString>(m_sourceType);
|
if (!(m_etag.isNull())) {
|
||||||
result["PlaylistItemId"] = Jellyfin::Support::toJsonValue<QString>(m_playlistItemId);
|
result["Etag"] = Jellyfin::Support::toJsonValue<QString>(m_etag);
|
||||||
result["DateCreated"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateCreated);
|
}
|
||||||
result["DateLastMediaAdded"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateLastMediaAdded);
|
|
||||||
result["ExtraType"] = Jellyfin::Support::toJsonValue<QString>(m_extraType);
|
|
||||||
result["AirsBeforeSeasonNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_airsBeforeSeasonNumber);
|
if (!(m_sourceType.isNull())) {
|
||||||
result["AirsAfterSeasonNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_airsAfterSeasonNumber);
|
result["SourceType"] = Jellyfin::Support::toJsonValue<QString>(m_sourceType);
|
||||||
result["AirsBeforeEpisodeNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_airsBeforeEpisodeNumber);
|
}
|
||||||
result["CanDelete"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_canDelete);
|
|
||||||
result["CanDownload"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_canDownload);
|
|
||||||
result["HasSubtitles"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_hasSubtitles);
|
if (!(m_playlistItemId.isNull())) {
|
||||||
result["PreferredMetadataLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_preferredMetadataLanguage);
|
result["PlaylistItemId"] = Jellyfin::Support::toJsonValue<QString>(m_playlistItemId);
|
||||||
result["PreferredMetadataCountryCode"] = Jellyfin::Support::toJsonValue<QString>(m_preferredMetadataCountryCode);
|
}
|
||||||
result["SupportsSync"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_supportsSync);
|
|
||||||
result["Container"] = Jellyfin::Support::toJsonValue<QString>(m_container);
|
|
||||||
result["SortName"] = Jellyfin::Support::toJsonValue<QString>(m_sortName);
|
if (!(m_dateCreated.isNull())) {
|
||||||
result["ForcedSortName"] = Jellyfin::Support::toJsonValue<QString>(m_forcedSortName);
|
result["DateCreated"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateCreated);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_dateLastMediaAdded.isNull())) {
|
||||||
|
result["DateLastMediaAdded"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateLastMediaAdded);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_extraType.isNull())) {
|
||||||
|
result["ExtraType"] = Jellyfin::Support::toJsonValue<QString>(m_extraType);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_airsBeforeSeasonNumber.has_value())) {
|
||||||
|
result["AirsBeforeSeasonNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_airsBeforeSeasonNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_airsAfterSeasonNumber.has_value())) {
|
||||||
|
result["AirsAfterSeasonNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_airsAfterSeasonNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_airsBeforeEpisodeNumber.has_value())) {
|
||||||
|
result["AirsBeforeEpisodeNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_airsBeforeEpisodeNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_canDelete.has_value())) {
|
||||||
|
result["CanDelete"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_canDelete);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_canDownload.has_value())) {
|
||||||
|
result["CanDownload"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_canDownload);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_hasSubtitles.has_value())) {
|
||||||
|
result["HasSubtitles"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_hasSubtitles);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_preferredMetadataLanguage.isNull())) {
|
||||||
|
result["PreferredMetadataLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_preferredMetadataLanguage);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_preferredMetadataCountryCode.isNull())) {
|
||||||
|
result["PreferredMetadataCountryCode"] = Jellyfin::Support::toJsonValue<QString>(m_preferredMetadataCountryCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_supportsSync.has_value())) {
|
||||||
|
result["SupportsSync"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_supportsSync);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_container.isNull())) {
|
||||||
|
result["Container"] = Jellyfin::Support::toJsonValue<QString>(m_container);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_sortName.isNull())) {
|
||||||
|
result["SortName"] = Jellyfin::Support::toJsonValue<QString>(m_sortName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_forcedSortName.isNull())) {
|
||||||
|
result["ForcedSortName"] = Jellyfin::Support::toJsonValue<QString>(m_forcedSortName);
|
||||||
|
}
|
||||||
|
|
||||||
result["Video3DFormat"] = Jellyfin::Support::toJsonValue<Video3DFormat>(m_video3DFormat);
|
result["Video3DFormat"] = Jellyfin::Support::toJsonValue<Video3DFormat>(m_video3DFormat);
|
||||||
result["PremiereDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_premiereDate);
|
|
||||||
result["ExternalUrls"] = Jellyfin::Support::toJsonValue<QList<ExternalUrl>>(m_externalUrls);
|
if (!(m_premiereDate.isNull())) {
|
||||||
result["MediaSources"] = Jellyfin::Support::toJsonValue<QList<MediaSourceInfo>>(m_mediaSources);
|
result["PremiereDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_premiereDate);
|
||||||
result["CriticRating"] = Jellyfin::Support::toJsonValue<std::optional<float>>(m_criticRating);
|
}
|
||||||
result["ProductionLocations"] = Jellyfin::Support::toJsonValue<QStringList>(m_productionLocations);
|
|
||||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
|
||||||
result["EnableMediaSourceDisplay"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_enableMediaSourceDisplay);
|
if (!(m_externalUrls.size() == 0)) {
|
||||||
result["OfficialRating"] = Jellyfin::Support::toJsonValue<QString>(m_officialRating);
|
result["ExternalUrls"] = Jellyfin::Support::toJsonValue<QList<ExternalUrl>>(m_externalUrls);
|
||||||
result["CustomRating"] = Jellyfin::Support::toJsonValue<QString>(m_customRating);
|
}
|
||||||
result["ChannelId"] = Jellyfin::Support::toJsonValue<QString>(m_channelId);
|
|
||||||
result["ChannelName"] = Jellyfin::Support::toJsonValue<QString>(m_channelName);
|
|
||||||
result["Overview"] = Jellyfin::Support::toJsonValue<QString>(m_overview);
|
if (!(m_mediaSources.size() == 0)) {
|
||||||
result["Taglines"] = Jellyfin::Support::toJsonValue<QStringList>(m_taglines);
|
result["MediaSources"] = Jellyfin::Support::toJsonValue<QList<MediaSourceInfo>>(m_mediaSources);
|
||||||
result["Genres"] = Jellyfin::Support::toJsonValue<QStringList>(m_genres);
|
}
|
||||||
result["CommunityRating"] = Jellyfin::Support::toJsonValue<std::optional<float>>(m_communityRating);
|
|
||||||
result["CumulativeRunTimeTicks"] = Jellyfin::Support::toJsonValue<std::optional<qint64>>(m_cumulativeRunTimeTicks);
|
|
||||||
result["RunTimeTicks"] = Jellyfin::Support::toJsonValue<std::optional<qint64>>(m_runTimeTicks);
|
if (!(!m_criticRating.has_value())) {
|
||||||
|
result["CriticRating"] = Jellyfin::Support::toJsonValue<std::optional<float>>(m_criticRating);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_productionLocations.size() == 0)) {
|
||||||
|
result["ProductionLocations"] = Jellyfin::Support::toJsonValue<QStringList>(m_productionLocations);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_path.isNull())) {
|
||||||
|
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_enableMediaSourceDisplay.has_value())) {
|
||||||
|
result["EnableMediaSourceDisplay"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_enableMediaSourceDisplay);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_officialRating.isNull())) {
|
||||||
|
result["OfficialRating"] = Jellyfin::Support::toJsonValue<QString>(m_officialRating);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_customRating.isNull())) {
|
||||||
|
result["CustomRating"] = Jellyfin::Support::toJsonValue<QString>(m_customRating);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_channelId.isNull())) {
|
||||||
|
result["ChannelId"] = Jellyfin::Support::toJsonValue<QString>(m_channelId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_channelName.isNull())) {
|
||||||
|
result["ChannelName"] = Jellyfin::Support::toJsonValue<QString>(m_channelName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_overview.isNull())) {
|
||||||
|
result["Overview"] = Jellyfin::Support::toJsonValue<QString>(m_overview);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_taglines.size() == 0)) {
|
||||||
|
result["Taglines"] = Jellyfin::Support::toJsonValue<QStringList>(m_taglines);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_genres.size() == 0)) {
|
||||||
|
result["Genres"] = Jellyfin::Support::toJsonValue<QStringList>(m_genres);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_communityRating.has_value())) {
|
||||||
|
result["CommunityRating"] = Jellyfin::Support::toJsonValue<std::optional<float>>(m_communityRating);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_cumulativeRunTimeTicks.has_value())) {
|
||||||
|
result["CumulativeRunTimeTicks"] = Jellyfin::Support::toJsonValue<std::optional<qint64>>(m_cumulativeRunTimeTicks);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_runTimeTicks.has_value())) {
|
||||||
|
result["RunTimeTicks"] = Jellyfin::Support::toJsonValue<std::optional<qint64>>(m_runTimeTicks);
|
||||||
|
}
|
||||||
|
|
||||||
result["PlayAccess"] = Jellyfin::Support::toJsonValue<PlayAccess>(m_playAccess);
|
result["PlayAccess"] = Jellyfin::Support::toJsonValue<PlayAccess>(m_playAccess);
|
||||||
result["AspectRatio"] = Jellyfin::Support::toJsonValue<QString>(m_aspectRatio);
|
|
||||||
result["ProductionYear"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_productionYear);
|
if (!(m_aspectRatio.isNull())) {
|
||||||
result["IsPlaceHolder"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isPlaceHolder);
|
result["AspectRatio"] = Jellyfin::Support::toJsonValue<QString>(m_aspectRatio);
|
||||||
result["Number"] = Jellyfin::Support::toJsonValue<QString>(m_number);
|
}
|
||||||
result["ChannelNumber"] = Jellyfin::Support::toJsonValue<QString>(m_channelNumber);
|
|
||||||
result["IndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_indexNumber);
|
|
||||||
result["IndexNumberEnd"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_indexNumberEnd);
|
if (!(!m_productionYear.has_value())) {
|
||||||
result["ParentIndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_parentIndexNumber);
|
result["ProductionYear"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_productionYear);
|
||||||
result["RemoteTrailers"] = Jellyfin::Support::toJsonValue<QList<MediaUrl>>(m_remoteTrailers);
|
}
|
||||||
result["ProviderIds"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_providerIds);
|
|
||||||
result["IsHD"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isHD);
|
|
||||||
result["IsFolder"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isFolder);
|
if (!(!m_isPlaceHolder.has_value())) {
|
||||||
result["ParentId"] = Jellyfin::Support::toJsonValue<QString>(m_parentId);
|
result["IsPlaceHolder"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isPlaceHolder);
|
||||||
result["Type"] = Jellyfin::Support::toJsonValue<QString>(m_type);
|
}
|
||||||
result["People"] = Jellyfin::Support::toJsonValue<QList<BaseItemPerson>>(m_people);
|
|
||||||
result["Studios"] = Jellyfin::Support::toJsonValue<QList<NameGuidPair>>(m_studios);
|
|
||||||
result["GenreItems"] = Jellyfin::Support::toJsonValue<QList<NameGuidPair>>(m_genreItems);
|
if (!(m_number.isNull())) {
|
||||||
result["ParentLogoItemId"] = Jellyfin::Support::toJsonValue<QString>(m_parentLogoItemId);
|
result["Number"] = Jellyfin::Support::toJsonValue<QString>(m_number);
|
||||||
result["ParentBackdropItemId"] = Jellyfin::Support::toJsonValue<QString>(m_parentBackdropItemId);
|
}
|
||||||
result["ParentBackdropImageTags"] = Jellyfin::Support::toJsonValue<QStringList>(m_parentBackdropImageTags);
|
|
||||||
result["LocalTrailerCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_localTrailerCount);
|
|
||||||
|
if (!(m_channelNumber.isNull())) {
|
||||||
|
result["ChannelNumber"] = Jellyfin::Support::toJsonValue<QString>(m_channelNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_indexNumber.has_value())) {
|
||||||
|
result["IndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_indexNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_indexNumberEnd.has_value())) {
|
||||||
|
result["IndexNumberEnd"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_indexNumberEnd);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_parentIndexNumber.has_value())) {
|
||||||
|
result["ParentIndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_parentIndexNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_remoteTrailers.size() == 0)) {
|
||||||
|
result["RemoteTrailers"] = Jellyfin::Support::toJsonValue<QList<MediaUrl>>(m_remoteTrailers);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_providerIds.isEmpty())) {
|
||||||
|
result["ProviderIds"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_providerIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_isHD.has_value())) {
|
||||||
|
result["IsHD"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isHD);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_isFolder.has_value())) {
|
||||||
|
result["IsFolder"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isFolder);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_parentId.isNull())) {
|
||||||
|
result["ParentId"] = Jellyfin::Support::toJsonValue<QString>(m_parentId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_type.isNull())) {
|
||||||
|
result["Type"] = Jellyfin::Support::toJsonValue<QString>(m_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_people.size() == 0)) {
|
||||||
|
result["People"] = Jellyfin::Support::toJsonValue<QList<BaseItemPerson>>(m_people);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_studios.size() == 0)) {
|
||||||
|
result["Studios"] = Jellyfin::Support::toJsonValue<QList<NameGuidPair>>(m_studios);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_genreItems.size() == 0)) {
|
||||||
|
result["GenreItems"] = Jellyfin::Support::toJsonValue<QList<NameGuidPair>>(m_genreItems);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_parentLogoItemId.isNull())) {
|
||||||
|
result["ParentLogoItemId"] = Jellyfin::Support::toJsonValue<QString>(m_parentLogoItemId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_parentBackdropItemId.isNull())) {
|
||||||
|
result["ParentBackdropItemId"] = Jellyfin::Support::toJsonValue<QString>(m_parentBackdropItemId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_parentBackdropImageTags.size() == 0)) {
|
||||||
|
result["ParentBackdropImageTags"] = Jellyfin::Support::toJsonValue<QStringList>(m_parentBackdropImageTags);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_localTrailerCount.has_value())) {
|
||||||
|
result["LocalTrailerCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_localTrailerCount);
|
||||||
|
}
|
||||||
|
|
||||||
result["UserData"] = Jellyfin::Support::toJsonValue<QSharedPointer<UserItemDataDto>>(m_userData);
|
result["UserData"] = Jellyfin::Support::toJsonValue<QSharedPointer<UserItemDataDto>>(m_userData);
|
||||||
result["RecursiveItemCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_recursiveItemCount);
|
|
||||||
result["ChildCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_childCount);
|
if (!(!m_recursiveItemCount.has_value())) {
|
||||||
result["SeriesName"] = Jellyfin::Support::toJsonValue<QString>(m_seriesName);
|
result["RecursiveItemCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_recursiveItemCount);
|
||||||
result["SeriesId"] = Jellyfin::Support::toJsonValue<QString>(m_seriesId);
|
}
|
||||||
result["SeasonId"] = Jellyfin::Support::toJsonValue<QString>(m_seasonId);
|
|
||||||
result["SpecialFeatureCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_specialFeatureCount);
|
|
||||||
result["DisplayPreferencesId"] = Jellyfin::Support::toJsonValue<QString>(m_displayPreferencesId);
|
if (!(!m_childCount.has_value())) {
|
||||||
result["Status"] = Jellyfin::Support::toJsonValue<QString>(m_status);
|
result["ChildCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_childCount);
|
||||||
result["AirTime"] = Jellyfin::Support::toJsonValue<QString>(m_airTime);
|
}
|
||||||
result["AirDays"] = Jellyfin::Support::toJsonValue<QList<DayOfWeek>>(m_airDays);
|
|
||||||
result["Tags"] = Jellyfin::Support::toJsonValue<QStringList>(m_tags);
|
|
||||||
result["PrimaryImageAspectRatio"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_primaryImageAspectRatio);
|
if (!(m_seriesName.isNull())) {
|
||||||
result["Artists"] = Jellyfin::Support::toJsonValue<QStringList>(m_artists);
|
result["SeriesName"] = Jellyfin::Support::toJsonValue<QString>(m_seriesName);
|
||||||
result["ArtistItems"] = Jellyfin::Support::toJsonValue<QList<NameGuidPair>>(m_artistItems);
|
}
|
||||||
result["Album"] = Jellyfin::Support::toJsonValue<QString>(m_album);
|
|
||||||
result["CollectionType"] = Jellyfin::Support::toJsonValue<QString>(m_collectionType);
|
|
||||||
result["DisplayOrder"] = Jellyfin::Support::toJsonValue<QString>(m_displayOrder);
|
if (!(m_seriesId.isNull())) {
|
||||||
result["AlbumId"] = Jellyfin::Support::toJsonValue<QString>(m_albumId);
|
result["SeriesId"] = Jellyfin::Support::toJsonValue<QString>(m_seriesId);
|
||||||
result["AlbumPrimaryImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_albumPrimaryImageTag);
|
}
|
||||||
result["SeriesPrimaryImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_seriesPrimaryImageTag);
|
|
||||||
result["AlbumArtist"] = Jellyfin::Support::toJsonValue<QString>(m_albumArtist);
|
|
||||||
result["AlbumArtists"] = Jellyfin::Support::toJsonValue<QList<NameGuidPair>>(m_albumArtists);
|
if (!(m_seasonId.isNull())) {
|
||||||
result["SeasonName"] = Jellyfin::Support::toJsonValue<QString>(m_seasonName);
|
result["SeasonId"] = Jellyfin::Support::toJsonValue<QString>(m_seasonId);
|
||||||
result["MediaStreams"] = Jellyfin::Support::toJsonValue<QList<MediaStream>>(m_mediaStreams);
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_specialFeatureCount.has_value())) {
|
||||||
|
result["SpecialFeatureCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_specialFeatureCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_displayPreferencesId.isNull())) {
|
||||||
|
result["DisplayPreferencesId"] = Jellyfin::Support::toJsonValue<QString>(m_displayPreferencesId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_status.isNull())) {
|
||||||
|
result["Status"] = Jellyfin::Support::toJsonValue<QString>(m_status);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_airTime.isNull())) {
|
||||||
|
result["AirTime"] = Jellyfin::Support::toJsonValue<QString>(m_airTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_airDays.size() == 0)) {
|
||||||
|
result["AirDays"] = Jellyfin::Support::toJsonValue<QList<DayOfWeek>>(m_airDays);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_tags.size() == 0)) {
|
||||||
|
result["Tags"] = Jellyfin::Support::toJsonValue<QStringList>(m_tags);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_primaryImageAspectRatio.has_value())) {
|
||||||
|
result["PrimaryImageAspectRatio"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_primaryImageAspectRatio);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_artists.size() == 0)) {
|
||||||
|
result["Artists"] = Jellyfin::Support::toJsonValue<QStringList>(m_artists);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_artistItems.size() == 0)) {
|
||||||
|
result["ArtistItems"] = Jellyfin::Support::toJsonValue<QList<NameGuidPair>>(m_artistItems);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_album.isNull())) {
|
||||||
|
result["Album"] = Jellyfin::Support::toJsonValue<QString>(m_album);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_collectionType.isNull())) {
|
||||||
|
result["CollectionType"] = Jellyfin::Support::toJsonValue<QString>(m_collectionType);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_displayOrder.isNull())) {
|
||||||
|
result["DisplayOrder"] = Jellyfin::Support::toJsonValue<QString>(m_displayOrder);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_albumId.isNull())) {
|
||||||
|
result["AlbumId"] = Jellyfin::Support::toJsonValue<QString>(m_albumId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_albumPrimaryImageTag.isNull())) {
|
||||||
|
result["AlbumPrimaryImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_albumPrimaryImageTag);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_seriesPrimaryImageTag.isNull())) {
|
||||||
|
result["SeriesPrimaryImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_seriesPrimaryImageTag);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_albumArtist.isNull())) {
|
||||||
|
result["AlbumArtist"] = Jellyfin::Support::toJsonValue<QString>(m_albumArtist);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_albumArtists.size() == 0)) {
|
||||||
|
result["AlbumArtists"] = Jellyfin::Support::toJsonValue<QList<NameGuidPair>>(m_albumArtists);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_seasonName.isNull())) {
|
||||||
|
result["SeasonName"] = Jellyfin::Support::toJsonValue<QString>(m_seasonName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_mediaStreams.size() == 0)) {
|
||||||
|
result["MediaStreams"] = Jellyfin::Support::toJsonValue<QList<MediaStream>>(m_mediaStreams);
|
||||||
|
}
|
||||||
|
|
||||||
result["VideoType"] = Jellyfin::Support::toJsonValue<VideoType>(m_videoType);
|
result["VideoType"] = Jellyfin::Support::toJsonValue<VideoType>(m_videoType);
|
||||||
result["PartCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_partCount);
|
|
||||||
result["MediaSourceCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_mediaSourceCount);
|
if (!(!m_partCount.has_value())) {
|
||||||
result["ImageTags"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_imageTags);
|
result["PartCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_partCount);
|
||||||
result["BackdropImageTags"] = Jellyfin::Support::toJsonValue<QStringList>(m_backdropImageTags);
|
}
|
||||||
result["ScreenshotImageTags"] = Jellyfin::Support::toJsonValue<QStringList>(m_screenshotImageTags);
|
|
||||||
result["ParentLogoImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_parentLogoImageTag);
|
|
||||||
result["ParentArtItemId"] = Jellyfin::Support::toJsonValue<QString>(m_parentArtItemId);
|
if (!(!m_mediaSourceCount.has_value())) {
|
||||||
result["ParentArtImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_parentArtImageTag);
|
result["MediaSourceCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_mediaSourceCount);
|
||||||
result["SeriesThumbImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_seriesThumbImageTag);
|
}
|
||||||
result["ImageBlurHashes"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_imageBlurHashes);
|
|
||||||
result["SeriesStudio"] = Jellyfin::Support::toJsonValue<QString>(m_seriesStudio);
|
|
||||||
result["ParentThumbItemId"] = Jellyfin::Support::toJsonValue<QString>(m_parentThumbItemId);
|
if (!(m_imageTags.isEmpty())) {
|
||||||
result["ParentThumbImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_parentThumbImageTag);
|
result["ImageTags"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_imageTags);
|
||||||
result["ParentPrimaryImageItemId"] = Jellyfin::Support::toJsonValue<QString>(m_parentPrimaryImageItemId);
|
}
|
||||||
result["ParentPrimaryImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_parentPrimaryImageTag);
|
|
||||||
result["Chapters"] = Jellyfin::Support::toJsonValue<QList<ChapterInfo>>(m_chapters);
|
|
||||||
|
if (!(m_backdropImageTags.size() == 0)) {
|
||||||
|
result["BackdropImageTags"] = Jellyfin::Support::toJsonValue<QStringList>(m_backdropImageTags);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_screenshotImageTags.size() == 0)) {
|
||||||
|
result["ScreenshotImageTags"] = Jellyfin::Support::toJsonValue<QStringList>(m_screenshotImageTags);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_parentLogoImageTag.isNull())) {
|
||||||
|
result["ParentLogoImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_parentLogoImageTag);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_parentArtItemId.isNull())) {
|
||||||
|
result["ParentArtItemId"] = Jellyfin::Support::toJsonValue<QString>(m_parentArtItemId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_parentArtImageTag.isNull())) {
|
||||||
|
result["ParentArtImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_parentArtImageTag);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_seriesThumbImageTag.isNull())) {
|
||||||
|
result["SeriesThumbImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_seriesThumbImageTag);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_imageBlurHashes.isEmpty())) {
|
||||||
|
result["ImageBlurHashes"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_imageBlurHashes);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_seriesStudio.isNull())) {
|
||||||
|
result["SeriesStudio"] = Jellyfin::Support::toJsonValue<QString>(m_seriesStudio);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_parentThumbItemId.isNull())) {
|
||||||
|
result["ParentThumbItemId"] = Jellyfin::Support::toJsonValue<QString>(m_parentThumbItemId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_parentThumbImageTag.isNull())) {
|
||||||
|
result["ParentThumbImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_parentThumbImageTag);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_parentPrimaryImageItemId.isNull())) {
|
||||||
|
result["ParentPrimaryImageItemId"] = Jellyfin::Support::toJsonValue<QString>(m_parentPrimaryImageItemId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_parentPrimaryImageTag.isNull())) {
|
||||||
|
result["ParentPrimaryImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_parentPrimaryImageTag);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_chapters.size() == 0)) {
|
||||||
|
result["Chapters"] = Jellyfin::Support::toJsonValue<QList<ChapterInfo>>(m_chapters);
|
||||||
|
}
|
||||||
|
|
||||||
result["LocationType"] = Jellyfin::Support::toJsonValue<LocationType>(m_locationType);
|
result["LocationType"] = Jellyfin::Support::toJsonValue<LocationType>(m_locationType);
|
||||||
result["IsoType"] = Jellyfin::Support::toJsonValue<IsoType>(m_isoType);
|
result["IsoType"] = Jellyfin::Support::toJsonValue<IsoType>(m_isoType);
|
||||||
result["MediaType"] = Jellyfin::Support::toJsonValue<QString>(m_mediaType);
|
|
||||||
result["EndDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_endDate);
|
if (!(m_mediaType.isNull())) {
|
||||||
result["LockedFields"] = Jellyfin::Support::toJsonValue<QList<MetadataField>>(m_lockedFields);
|
result["MediaType"] = Jellyfin::Support::toJsonValue<QString>(m_mediaType);
|
||||||
result["TrailerCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_trailerCount);
|
}
|
||||||
result["MovieCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_movieCount);
|
|
||||||
result["SeriesCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_seriesCount);
|
|
||||||
result["ProgramCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_programCount);
|
if (!(m_endDate.isNull())) {
|
||||||
result["EpisodeCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_episodeCount);
|
result["EndDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_endDate);
|
||||||
result["SongCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_songCount);
|
}
|
||||||
result["AlbumCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_albumCount);
|
|
||||||
result["ArtistCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_artistCount);
|
|
||||||
result["MusicVideoCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_musicVideoCount);
|
if (!(m_lockedFields.size() == 0)) {
|
||||||
result["LockData"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_lockData);
|
result["LockedFields"] = Jellyfin::Support::toJsonValue<QList<MetadataField>>(m_lockedFields);
|
||||||
result["Width"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_width);
|
}
|
||||||
result["Height"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_height);
|
|
||||||
result["CameraMake"] = Jellyfin::Support::toJsonValue<QString>(m_cameraMake);
|
|
||||||
result["CameraModel"] = Jellyfin::Support::toJsonValue<QString>(m_cameraModel);
|
if (!(!m_trailerCount.has_value())) {
|
||||||
result["Software"] = Jellyfin::Support::toJsonValue<QString>(m_software);
|
result["TrailerCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_trailerCount);
|
||||||
result["ExposureTime"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_exposureTime);
|
}
|
||||||
result["FocalLength"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_focalLength);
|
|
||||||
|
|
||||||
|
if (!(!m_movieCount.has_value())) {
|
||||||
|
result["MovieCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_movieCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_seriesCount.has_value())) {
|
||||||
|
result["SeriesCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_seriesCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_programCount.has_value())) {
|
||||||
|
result["ProgramCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_programCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_episodeCount.has_value())) {
|
||||||
|
result["EpisodeCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_episodeCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_songCount.has_value())) {
|
||||||
|
result["SongCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_songCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_albumCount.has_value())) {
|
||||||
|
result["AlbumCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_albumCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_artistCount.has_value())) {
|
||||||
|
result["ArtistCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_artistCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_musicVideoCount.has_value())) {
|
||||||
|
result["MusicVideoCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_musicVideoCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_lockData.has_value())) {
|
||||||
|
result["LockData"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_lockData);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_width.has_value())) {
|
||||||
|
result["Width"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_width);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_height.has_value())) {
|
||||||
|
result["Height"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_height);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_cameraMake.isNull())) {
|
||||||
|
result["CameraMake"] = Jellyfin::Support::toJsonValue<QString>(m_cameraMake);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_cameraModel.isNull())) {
|
||||||
|
result["CameraModel"] = Jellyfin::Support::toJsonValue<QString>(m_cameraModel);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_software.isNull())) {
|
||||||
|
result["Software"] = Jellyfin::Support::toJsonValue<QString>(m_software);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_exposureTime.has_value())) {
|
||||||
|
result["ExposureTime"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_exposureTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_focalLength.has_value())) {
|
||||||
|
result["FocalLength"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_focalLength);
|
||||||
|
}
|
||||||
|
|
||||||
result["ImageOrientation"] = Jellyfin::Support::toJsonValue<ImageOrientation>(m_imageOrientation);
|
result["ImageOrientation"] = Jellyfin::Support::toJsonValue<ImageOrientation>(m_imageOrientation);
|
||||||
result["Aperture"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_aperture);
|
|
||||||
result["ShutterSpeed"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_shutterSpeed);
|
if (!(!m_aperture.has_value())) {
|
||||||
result["Latitude"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_latitude);
|
result["Aperture"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_aperture);
|
||||||
result["Longitude"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_longitude);
|
}
|
||||||
result["Altitude"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_altitude);
|
|
||||||
result["IsoSpeedRating"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_isoSpeedRating);
|
|
||||||
result["SeriesTimerId"] = Jellyfin::Support::toJsonValue<QString>(m_seriesTimerId);
|
if (!(!m_shutterSpeed.has_value())) {
|
||||||
result["ProgramId"] = Jellyfin::Support::toJsonValue<QString>(m_programId);
|
result["ShutterSpeed"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_shutterSpeed);
|
||||||
result["ChannelPrimaryImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_channelPrimaryImageTag);
|
}
|
||||||
result["StartDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_startDate);
|
|
||||||
result["CompletionPercentage"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_completionPercentage);
|
|
||||||
result["IsRepeat"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isRepeat);
|
if (!(!m_latitude.has_value())) {
|
||||||
result["EpisodeTitle"] = Jellyfin::Support::toJsonValue<QString>(m_episodeTitle);
|
result["Latitude"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_latitude);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_longitude.has_value())) {
|
||||||
|
result["Longitude"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_longitude);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_altitude.has_value())) {
|
||||||
|
result["Altitude"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_altitude);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_isoSpeedRating.has_value())) {
|
||||||
|
result["IsoSpeedRating"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_isoSpeedRating);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_seriesTimerId.isNull())) {
|
||||||
|
result["SeriesTimerId"] = Jellyfin::Support::toJsonValue<QString>(m_seriesTimerId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_programId.isNull())) {
|
||||||
|
result["ProgramId"] = Jellyfin::Support::toJsonValue<QString>(m_programId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_channelPrimaryImageTag.isNull())) {
|
||||||
|
result["ChannelPrimaryImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_channelPrimaryImageTag);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_startDate.isNull())) {
|
||||||
|
result["StartDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_startDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_completionPercentage.has_value())) {
|
||||||
|
result["CompletionPercentage"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_completionPercentage);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_isRepeat.has_value())) {
|
||||||
|
result["IsRepeat"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isRepeat);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_episodeTitle.isNull())) {
|
||||||
|
result["EpisodeTitle"] = Jellyfin::Support::toJsonValue<QString>(m_episodeTitle);
|
||||||
|
}
|
||||||
|
|
||||||
result["ChannelType"] = Jellyfin::Support::toJsonValue<ChannelType>(m_channelType);
|
result["ChannelType"] = Jellyfin::Support::toJsonValue<ChannelType>(m_channelType);
|
||||||
result["Audio"] = Jellyfin::Support::toJsonValue<ProgramAudio>(m_audio);
|
result["Audio"] = Jellyfin::Support::toJsonValue<ProgramAudio>(m_audio);
|
||||||
result["IsMovie"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isMovie);
|
|
||||||
result["IsSports"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isSports);
|
|
||||||
result["IsSeries"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isSeries);
|
|
||||||
result["IsLive"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isLive);
|
|
||||||
result["IsNews"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isNews);
|
|
||||||
result["IsKids"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isKids);
|
|
||||||
result["IsPremiere"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isPremiere);
|
|
||||||
result["TimerId"] = Jellyfin::Support::toJsonValue<QString>(m_timerId);
|
|
||||||
result["CurrentProgram"] = Jellyfin::Support::toJsonValue<QSharedPointer<BaseItemDto>>(m_currentProgram);
|
|
||||||
|
|
||||||
|
if (!(!m_isMovie.has_value())) {
|
||||||
|
result["IsMovie"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isMovie);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_isSports.has_value())) {
|
||||||
|
result["IsSports"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isSports);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_isSeries.has_value())) {
|
||||||
|
result["IsSeries"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isSeries);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_isLive.has_value())) {
|
||||||
|
result["IsLive"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isLive);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_isNews.has_value())) {
|
||||||
|
result["IsNews"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isNews);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_isKids.has_value())) {
|
||||||
|
result["IsKids"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isKids);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_isPremiere.has_value())) {
|
||||||
|
result["IsPremiere"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isPremiere);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_timerId.isNull())) {
|
||||||
|
result["TimerId"] = Jellyfin::Support::toJsonValue<QString>(m_timerId);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["CurrentProgram"] = Jellyfin::Support::toJsonValue<QSharedPointer<BaseItemDto>>(m_currentProgram);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,10 +63,14 @@ void BaseItemDtoQueryResult::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject BaseItemDtoQueryResult::toJson() const {
|
QJsonObject BaseItemDtoQueryResult::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Items"] = Jellyfin::Support::toJsonValue<QList<BaseItemDto>>(m_items);
|
|
||||||
|
|
||||||
|
if (!(m_items.size() == 0)) {
|
||||||
|
result["Items"] = Jellyfin::Support::toJsonValue<QList<BaseItemDto>>(m_items);
|
||||||
|
}
|
||||||
|
|
||||||
result["TotalRecordCount"] = Jellyfin::Support::toJsonValue<qint32>(m_totalRecordCount);
|
result["TotalRecordCount"] = Jellyfin::Support::toJsonValue<qint32>(m_totalRecordCount);
|
||||||
result["StartIndex"] = Jellyfin::Support::toJsonValue<qint32>(m_startIndex);
|
result["StartIndex"] = Jellyfin::Support::toJsonValue<qint32>(m_startIndex);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,12 +72,36 @@ void BaseItemPerson::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject BaseItemPerson::toJson() const {
|
QJsonObject BaseItemPerson::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
|
||||||
result["Role"] = Jellyfin::Support::toJsonValue<QString>(m_role);
|
if (!(m_name.isNull())) {
|
||||||
result["Type"] = Jellyfin::Support::toJsonValue<QString>(m_type);
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
result["PrimaryImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_primaryImageTag);
|
}
|
||||||
result["ImageBlurHashes"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_imageBlurHashes);
|
|
||||||
|
|
||||||
|
if (!(m_jellyfinId.isNull())) {
|
||||||
|
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_role.isNull())) {
|
||||||
|
result["Role"] = Jellyfin::Support::toJsonValue<QString>(m_role);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_type.isNull())) {
|
||||||
|
result["Type"] = Jellyfin::Support::toJsonValue<QString>(m_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_primaryImageTag.isNull())) {
|
||||||
|
result["PrimaryImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_primaryImageTag);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_imageBlurHashes.isEmpty())) {
|
||||||
|
result["ImageBlurHashes"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_imageBlurHashes);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,17 +87,57 @@ void BookInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject BookInfo::toJson() const {
|
QJsonObject BookInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
|
||||||
result["MetadataLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_metadataLanguage);
|
if (!(m_name.isNull())) {
|
||||||
result["MetadataCountryCode"] = Jellyfin::Support::toJsonValue<QString>(m_metadataCountryCode);
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
result["ProviderIds"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_providerIds);
|
}
|
||||||
result["Year"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_year);
|
|
||||||
result["IndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_indexNumber);
|
|
||||||
result["ParentIndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_parentIndexNumber);
|
if (!(m_path.isNull())) {
|
||||||
result["PremiereDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_premiereDate);
|
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_metadataLanguage.isNull())) {
|
||||||
|
result["MetadataLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_metadataLanguage);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_metadataCountryCode.isNull())) {
|
||||||
|
result["MetadataCountryCode"] = Jellyfin::Support::toJsonValue<QString>(m_metadataCountryCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_providerIds.isEmpty())) {
|
||||||
|
result["ProviderIds"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_providerIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_year.has_value())) {
|
||||||
|
result["Year"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_year);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_indexNumber.has_value())) {
|
||||||
|
result["IndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_indexNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_parentIndexNumber.has_value())) {
|
||||||
|
result["ParentIndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_parentIndexNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_premiereDate.isNull())) {
|
||||||
|
result["PremiereDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_premiereDate);
|
||||||
|
}
|
||||||
|
|
||||||
result["IsAutomated"] = Jellyfin::Support::toJsonValue<bool>(m_isAutomated);
|
result["IsAutomated"] = Jellyfin::Support::toJsonValue<bool>(m_isAutomated);
|
||||||
result["SeriesName"] = Jellyfin::Support::toJsonValue<QString>(m_seriesName);
|
|
||||||
|
if (!(m_seriesName.isNull())) {
|
||||||
|
result["SeriesName"] = Jellyfin::Support::toJsonValue<QString>(m_seriesName);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,11 +66,15 @@ void BookInfoRemoteSearchQuery::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject BookInfoRemoteSearchQuery::toJson() const {
|
QJsonObject BookInfoRemoteSearchQuery::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["SearchInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<BookInfo>>(m_searchInfo);
|
result["SearchInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<BookInfo>>(m_searchInfo);
|
||||||
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
||||||
result["SearchProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_searchProviderName);
|
|
||||||
result["IncludeDisabledProviders"] = Jellyfin::Support::toJsonValue<bool>(m_includeDisabledProviders);
|
|
||||||
|
|
||||||
|
if (!(m_searchProviderName.isNull())) {
|
||||||
|
result["SearchProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_searchProviderName);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["IncludeDisabledProviders"] = Jellyfin::Support::toJsonValue<bool>(m_includeDisabledProviders);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,17 +84,53 @@ void BoxSetInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject BoxSetInfo::toJson() const {
|
QJsonObject BoxSetInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
|
||||||
result["MetadataLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_metadataLanguage);
|
|
||||||
result["MetadataCountryCode"] = Jellyfin::Support::toJsonValue<QString>(m_metadataCountryCode);
|
|
||||||
result["ProviderIds"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_providerIds);
|
|
||||||
result["Year"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_year);
|
|
||||||
result["IndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_indexNumber);
|
|
||||||
result["ParentIndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_parentIndexNumber);
|
|
||||||
result["PremiereDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_premiereDate);
|
|
||||||
result["IsAutomated"] = Jellyfin::Support::toJsonValue<bool>(m_isAutomated);
|
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_path.isNull())) {
|
||||||
|
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_metadataLanguage.isNull())) {
|
||||||
|
result["MetadataLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_metadataLanguage);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_metadataCountryCode.isNull())) {
|
||||||
|
result["MetadataCountryCode"] = Jellyfin::Support::toJsonValue<QString>(m_metadataCountryCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_providerIds.isEmpty())) {
|
||||||
|
result["ProviderIds"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_providerIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_year.has_value())) {
|
||||||
|
result["Year"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_year);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_indexNumber.has_value())) {
|
||||||
|
result["IndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_indexNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_parentIndexNumber.has_value())) {
|
||||||
|
result["ParentIndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_parentIndexNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_premiereDate.isNull())) {
|
||||||
|
result["PremiereDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_premiereDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["IsAutomated"] = Jellyfin::Support::toJsonValue<bool>(m_isAutomated);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,11 +66,15 @@ void BoxSetInfoRemoteSearchQuery::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject BoxSetInfoRemoteSearchQuery::toJson() const {
|
QJsonObject BoxSetInfoRemoteSearchQuery::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["SearchInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<BoxSetInfo>>(m_searchInfo);
|
result["SearchInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<BoxSetInfo>>(m_searchInfo);
|
||||||
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
||||||
result["SearchProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_searchProviderName);
|
|
||||||
result["IncludeDisabledProviders"] = Jellyfin::Support::toJsonValue<bool>(m_includeDisabledProviders);
|
|
||||||
|
|
||||||
|
if (!(m_searchProviderName.isNull())) {
|
||||||
|
result["SearchProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_searchProviderName);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["IncludeDisabledProviders"] = Jellyfin::Support::toJsonValue<bool>(m_includeDisabledProviders);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,8 +60,16 @@ void BrandingOptions::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject BrandingOptions::toJson() const {
|
QJsonObject BrandingOptions::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["LoginDisclaimer"] = Jellyfin::Support::toJsonValue<QString>(m_loginDisclaimer);
|
|
||||||
result["CustomCss"] = Jellyfin::Support::toJsonValue<QString>(m_customCss);
|
|
||||||
|
if (!(m_loginDisclaimer.isNull())) {
|
||||||
|
result["LoginDisclaimer"] = Jellyfin::Support::toJsonValue<QString>(m_loginDisclaimer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_customCss.isNull())) {
|
||||||
|
result["CustomCss"] = Jellyfin::Support::toJsonValue<QString>(m_customCss);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,11 +66,11 @@ void BufferRequestDto::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject BufferRequestDto::toJson() const {
|
QJsonObject BufferRequestDto::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["When"] = Jellyfin::Support::toJsonValue<QDateTime>(m_when);
|
result["When"] = Jellyfin::Support::toJsonValue<QDateTime>(m_when);
|
||||||
result["PositionTicks"] = Jellyfin::Support::toJsonValue<qint64>(m_positionTicks);
|
result["PositionTicks"] = Jellyfin::Support::toJsonValue<qint64>(m_positionTicks);
|
||||||
result["IsPlaying"] = Jellyfin::Support::toJsonValue<bool>(m_isPlaying);
|
result["IsPlaying"] = Jellyfin::Support::toJsonValue<bool>(m_isPlaying);
|
||||||
result["PlaylistItemId"] = Jellyfin::Support::toJsonValue<QString>(m_playlistItemId);
|
result["PlaylistItemId"] = Jellyfin::Support::toJsonValue<QString>(m_playlistItemId);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,19 +90,47 @@ void ChannelFeatures::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject ChannelFeatures::toJson() const {
|
QJsonObject ChannelFeatures::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_jellyfinId.isNull())) {
|
||||||
|
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||||
|
}
|
||||||
|
|
||||||
result["CanSearch"] = Jellyfin::Support::toJsonValue<bool>(m_canSearch);
|
result["CanSearch"] = Jellyfin::Support::toJsonValue<bool>(m_canSearch);
|
||||||
result["MediaTypes"] = Jellyfin::Support::toJsonValue<QList<ChannelMediaType>>(m_mediaTypes);
|
|
||||||
result["ContentTypes"] = Jellyfin::Support::toJsonValue<QList<ChannelMediaContentType>>(m_contentTypes);
|
if (!(m_mediaTypes.size() == 0)) {
|
||||||
result["MaxPageSize"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxPageSize);
|
result["MediaTypes"] = Jellyfin::Support::toJsonValue<QList<ChannelMediaType>>(m_mediaTypes);
|
||||||
result["AutoRefreshLevels"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_autoRefreshLevels);
|
}
|
||||||
result["DefaultSortFields"] = Jellyfin::Support::toJsonValue<QList<ChannelItemSortField>>(m_defaultSortFields);
|
|
||||||
|
|
||||||
|
if (!(m_contentTypes.size() == 0)) {
|
||||||
|
result["ContentTypes"] = Jellyfin::Support::toJsonValue<QList<ChannelMediaContentType>>(m_contentTypes);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_maxPageSize.has_value())) {
|
||||||
|
result["MaxPageSize"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxPageSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_autoRefreshLevels.has_value())) {
|
||||||
|
result["AutoRefreshLevels"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_autoRefreshLevels);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_defaultSortFields.size() == 0)) {
|
||||||
|
result["DefaultSortFields"] = Jellyfin::Support::toJsonValue<QList<ChannelItemSortField>>(m_defaultSortFields);
|
||||||
|
}
|
||||||
|
|
||||||
result["SupportsSortOrderToggle"] = Jellyfin::Support::toJsonValue<bool>(m_supportsSortOrderToggle);
|
result["SupportsSortOrderToggle"] = Jellyfin::Support::toJsonValue<bool>(m_supportsSortOrderToggle);
|
||||||
result["SupportsLatestMedia"] = Jellyfin::Support::toJsonValue<bool>(m_supportsLatestMedia);
|
result["SupportsLatestMedia"] = Jellyfin::Support::toJsonValue<bool>(m_supportsLatestMedia);
|
||||||
result["CanFilter"] = Jellyfin::Support::toJsonValue<bool>(m_canFilter);
|
result["CanFilter"] = Jellyfin::Support::toJsonValue<bool>(m_canFilter);
|
||||||
result["SupportsContentDownloading"] = Jellyfin::Support::toJsonValue<bool>(m_supportsContentDownloading);
|
result["SupportsContentDownloading"] = Jellyfin::Support::toJsonValue<bool>(m_supportsContentDownloading);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,10 +66,26 @@ void ChannelMappingOptionsDto::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject ChannelMappingOptionsDto::toJson() const {
|
QJsonObject ChannelMappingOptionsDto::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["TunerChannels"] = Jellyfin::Support::toJsonValue<QList<TunerChannelMapping>>(m_tunerChannels);
|
|
||||||
result["ProviderChannels"] = Jellyfin::Support::toJsonValue<QList<NameIdPair>>(m_providerChannels);
|
|
||||||
result["Mappings"] = Jellyfin::Support::toJsonValue<QList<NameValuePair>>(m_mappings);
|
if (!(m_tunerChannels.size() == 0)) {
|
||||||
result["ProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_providerName);
|
result["TunerChannels"] = Jellyfin::Support::toJsonValue<QList<TunerChannelMapping>>(m_tunerChannels);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_providerChannels.size() == 0)) {
|
||||||
|
result["ProviderChannels"] = Jellyfin::Support::toJsonValue<QList<NameIdPair>>(m_providerChannels);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_mappings.size() == 0)) {
|
||||||
|
result["Mappings"] = Jellyfin::Support::toJsonValue<QList<NameValuePair>>(m_mappings);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_providerName.isNull())) {
|
||||||
|
result["ProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_providerName);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,11 +69,23 @@ void ChapterInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject ChapterInfo::toJson() const {
|
QJsonObject ChapterInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["StartPositionTicks"] = Jellyfin::Support::toJsonValue<qint64>(m_startPositionTicks);
|
result["StartPositionTicks"] = Jellyfin::Support::toJsonValue<qint64>(m_startPositionTicks);
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["ImagePath"] = Jellyfin::Support::toJsonValue<QString>(m_imagePath);
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_imagePath.isNull())) {
|
||||||
|
result["ImagePath"] = Jellyfin::Support::toJsonValue<QString>(m_imagePath);
|
||||||
|
}
|
||||||
|
|
||||||
result["ImageDateModified"] = Jellyfin::Support::toJsonValue<QDateTime>(m_imageDateModified);
|
result["ImageDateModified"] = Jellyfin::Support::toJsonValue<QDateTime>(m_imageDateModified);
|
||||||
result["ImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_imageTag);
|
|
||||||
|
if (!(m_imageTag.isNull())) {
|
||||||
|
result["ImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_imageTag);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,16 +84,36 @@ void ClientCapabilities::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject ClientCapabilities::toJson() const {
|
QJsonObject ClientCapabilities::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["PlayableMediaTypes"] = Jellyfin::Support::toJsonValue<QStringList>(m_playableMediaTypes);
|
|
||||||
result["SupportedCommands"] = Jellyfin::Support::toJsonValue<QList<GeneralCommandType>>(m_supportedCommands);
|
|
||||||
|
if (!(m_playableMediaTypes.size() == 0)) {
|
||||||
|
result["PlayableMediaTypes"] = Jellyfin::Support::toJsonValue<QStringList>(m_playableMediaTypes);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_supportedCommands.size() == 0)) {
|
||||||
|
result["SupportedCommands"] = Jellyfin::Support::toJsonValue<QList<GeneralCommandType>>(m_supportedCommands);
|
||||||
|
}
|
||||||
|
|
||||||
result["SupportsMediaControl"] = Jellyfin::Support::toJsonValue<bool>(m_supportsMediaControl);
|
result["SupportsMediaControl"] = Jellyfin::Support::toJsonValue<bool>(m_supportsMediaControl);
|
||||||
result["SupportsContentUploading"] = Jellyfin::Support::toJsonValue<bool>(m_supportsContentUploading);
|
result["SupportsContentUploading"] = Jellyfin::Support::toJsonValue<bool>(m_supportsContentUploading);
|
||||||
result["MessageCallbackUrl"] = Jellyfin::Support::toJsonValue<QString>(m_messageCallbackUrl);
|
|
||||||
|
if (!(m_messageCallbackUrl.isNull())) {
|
||||||
|
result["MessageCallbackUrl"] = Jellyfin::Support::toJsonValue<QString>(m_messageCallbackUrl);
|
||||||
|
}
|
||||||
|
|
||||||
result["SupportsPersistentIdentifier"] = Jellyfin::Support::toJsonValue<bool>(m_supportsPersistentIdentifier);
|
result["SupportsPersistentIdentifier"] = Jellyfin::Support::toJsonValue<bool>(m_supportsPersistentIdentifier);
|
||||||
result["SupportsSync"] = Jellyfin::Support::toJsonValue<bool>(m_supportsSync);
|
result["SupportsSync"] = Jellyfin::Support::toJsonValue<bool>(m_supportsSync);
|
||||||
result["DeviceProfile"] = Jellyfin::Support::toJsonValue<QSharedPointer<DeviceProfile>>(m_deviceProfile);
|
result["DeviceProfile"] = Jellyfin::Support::toJsonValue<QSharedPointer<DeviceProfile>>(m_deviceProfile);
|
||||||
result["AppStoreUrl"] = Jellyfin::Support::toJsonValue<QString>(m_appStoreUrl);
|
|
||||||
result["IconUrl"] = Jellyfin::Support::toJsonValue<QString>(m_iconUrl);
|
if (!(m_appStoreUrl.isNull())) {
|
||||||
|
result["AppStoreUrl"] = Jellyfin::Support::toJsonValue<QString>(m_appStoreUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_iconUrl.isNull())) {
|
||||||
|
result["IconUrl"] = Jellyfin::Support::toJsonValue<QString>(m_iconUrl);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,16 +84,36 @@ void ClientCapabilitiesDto::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject ClientCapabilitiesDto::toJson() const {
|
QJsonObject ClientCapabilitiesDto::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["PlayableMediaTypes"] = Jellyfin::Support::toJsonValue<QStringList>(m_playableMediaTypes);
|
|
||||||
result["SupportedCommands"] = Jellyfin::Support::toJsonValue<QList<GeneralCommandType>>(m_supportedCommands);
|
|
||||||
|
if (!(m_playableMediaTypes.size() == 0)) {
|
||||||
|
result["PlayableMediaTypes"] = Jellyfin::Support::toJsonValue<QStringList>(m_playableMediaTypes);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_supportedCommands.size() == 0)) {
|
||||||
|
result["SupportedCommands"] = Jellyfin::Support::toJsonValue<QList<GeneralCommandType>>(m_supportedCommands);
|
||||||
|
}
|
||||||
|
|
||||||
result["SupportsMediaControl"] = Jellyfin::Support::toJsonValue<bool>(m_supportsMediaControl);
|
result["SupportsMediaControl"] = Jellyfin::Support::toJsonValue<bool>(m_supportsMediaControl);
|
||||||
result["SupportsContentUploading"] = Jellyfin::Support::toJsonValue<bool>(m_supportsContentUploading);
|
result["SupportsContentUploading"] = Jellyfin::Support::toJsonValue<bool>(m_supportsContentUploading);
|
||||||
result["MessageCallbackUrl"] = Jellyfin::Support::toJsonValue<QString>(m_messageCallbackUrl);
|
|
||||||
|
if (!(m_messageCallbackUrl.isNull())) {
|
||||||
|
result["MessageCallbackUrl"] = Jellyfin::Support::toJsonValue<QString>(m_messageCallbackUrl);
|
||||||
|
}
|
||||||
|
|
||||||
result["SupportsPersistentIdentifier"] = Jellyfin::Support::toJsonValue<bool>(m_supportsPersistentIdentifier);
|
result["SupportsPersistentIdentifier"] = Jellyfin::Support::toJsonValue<bool>(m_supportsPersistentIdentifier);
|
||||||
result["SupportsSync"] = Jellyfin::Support::toJsonValue<bool>(m_supportsSync);
|
result["SupportsSync"] = Jellyfin::Support::toJsonValue<bool>(m_supportsSync);
|
||||||
result["DeviceProfile"] = Jellyfin::Support::toJsonValue<QSharedPointer<DeviceProfile>>(m_deviceProfile);
|
result["DeviceProfile"] = Jellyfin::Support::toJsonValue<QSharedPointer<DeviceProfile>>(m_deviceProfile);
|
||||||
result["AppStoreUrl"] = Jellyfin::Support::toJsonValue<QString>(m_appStoreUrl);
|
|
||||||
result["IconUrl"] = Jellyfin::Support::toJsonValue<QString>(m_iconUrl);
|
if (!(m_appStoreUrl.isNull())) {
|
||||||
|
result["AppStoreUrl"] = Jellyfin::Support::toJsonValue<QString>(m_appStoreUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_iconUrl.isNull())) {
|
||||||
|
result["IconUrl"] = Jellyfin::Support::toJsonValue<QString>(m_iconUrl);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,11 +69,27 @@ void CodecProfile::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject CodecProfile::toJson() const {
|
QJsonObject CodecProfile::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["Type"] = Jellyfin::Support::toJsonValue<CodecType>(m_type);
|
result["Type"] = Jellyfin::Support::toJsonValue<CodecType>(m_type);
|
||||||
result["Conditions"] = Jellyfin::Support::toJsonValue<QList<ProfileCondition>>(m_conditions);
|
|
||||||
result["ApplyConditions"] = Jellyfin::Support::toJsonValue<QList<ProfileCondition>>(m_applyConditions);
|
if (!(m_conditions.size() == 0)) {
|
||||||
result["Codec"] = Jellyfin::Support::toJsonValue<QString>(m_codec);
|
result["Conditions"] = Jellyfin::Support::toJsonValue<QList<ProfileCondition>>(m_conditions);
|
||||||
result["Container"] = Jellyfin::Support::toJsonValue<QString>(m_container);
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_applyConditions.size() == 0)) {
|
||||||
|
result["ApplyConditions"] = Jellyfin::Support::toJsonValue<QList<ProfileCondition>>(m_applyConditions);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_codec.isNull())) {
|
||||||
|
result["Codec"] = Jellyfin::Support::toJsonValue<QString>(m_codec);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_container.isNull())) {
|
||||||
|
result["Container"] = Jellyfin::Support::toJsonValue<QString>(m_container);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,8 +57,8 @@ void CollectionCreationResult::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject CollectionCreationResult::toJson() const {
|
QJsonObject CollectionCreationResult::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
|
||||||
|
|
||||||
|
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -75,13 +75,33 @@ void ConfigurationPageInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject ConfigurationPageInfo::toJson() const {
|
QJsonObject ConfigurationPageInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
result["EnableInMainMenu"] = Jellyfin::Support::toJsonValue<bool>(m_enableInMainMenu);
|
result["EnableInMainMenu"] = Jellyfin::Support::toJsonValue<bool>(m_enableInMainMenu);
|
||||||
result["MenuSection"] = Jellyfin::Support::toJsonValue<QString>(m_menuSection);
|
|
||||||
result["MenuIcon"] = Jellyfin::Support::toJsonValue<QString>(m_menuIcon);
|
if (!(m_menuSection.isNull())) {
|
||||||
result["DisplayName"] = Jellyfin::Support::toJsonValue<QString>(m_displayName);
|
result["MenuSection"] = Jellyfin::Support::toJsonValue<QString>(m_menuSection);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_menuIcon.isNull())) {
|
||||||
|
result["MenuIcon"] = Jellyfin::Support::toJsonValue<QString>(m_menuIcon);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_displayName.isNull())) {
|
||||||
|
result["DisplayName"] = Jellyfin::Support::toJsonValue<QString>(m_displayName);
|
||||||
|
}
|
||||||
|
|
||||||
result["ConfigurationPageType"] = Jellyfin::Support::toJsonValue<ConfigurationPageType>(m_configurationPageType);
|
result["ConfigurationPageType"] = Jellyfin::Support::toJsonValue<ConfigurationPageType>(m_configurationPageType);
|
||||||
result["PluginId"] = Jellyfin::Support::toJsonValue<QString>(m_pluginId);
|
|
||||||
|
if (!(m_pluginId.isNull())) {
|
||||||
|
result["PluginId"] = Jellyfin::Support::toJsonValue<QString>(m_pluginId);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,9 +63,17 @@ void ContainerProfile::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject ContainerProfile::toJson() const {
|
QJsonObject ContainerProfile::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["Type"] = Jellyfin::Support::toJsonValue<DlnaProfileType>(m_type);
|
result["Type"] = Jellyfin::Support::toJsonValue<DlnaProfileType>(m_type);
|
||||||
result["Conditions"] = Jellyfin::Support::toJsonValue<QList<ProfileCondition>>(m_conditions);
|
|
||||||
result["Container"] = Jellyfin::Support::toJsonValue<QString>(m_container);
|
if (!(m_conditions.size() == 0)) {
|
||||||
|
result["Conditions"] = Jellyfin::Support::toJsonValue<QList<ProfileCondition>>(m_conditions);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_container.isNull())) {
|
||||||
|
result["Container"] = Jellyfin::Support::toJsonValue<QString>(m_container);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,10 +63,18 @@ void ControlResponse::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject ControlResponse::toJson() const {
|
QJsonObject ControlResponse::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Headers"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_headers);
|
|
||||||
result["Xml"] = Jellyfin::Support::toJsonValue<QString>(m_xml);
|
|
||||||
result["IsSuccessful"] = Jellyfin::Support::toJsonValue<bool>(m_isSuccessful);
|
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_headers.isEmpty())) {
|
||||||
|
result["Headers"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_headers);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_xml.isNull())) {
|
||||||
|
result["Xml"] = Jellyfin::Support::toJsonValue<QString>(m_xml);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["IsSuccessful"] = Jellyfin::Support::toJsonValue<bool>(m_isSuccessful);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,10 +66,26 @@ void CountryInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject CountryInfo::toJson() const {
|
QJsonObject CountryInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["DisplayName"] = Jellyfin::Support::toJsonValue<QString>(m_displayName);
|
|
||||||
result["TwoLetterISORegionName"] = Jellyfin::Support::toJsonValue<QString>(m_twoLetterISORegionName);
|
if (!(m_name.isNull())) {
|
||||||
result["ThreeLetterISORegionName"] = Jellyfin::Support::toJsonValue<QString>(m_threeLetterISORegionName);
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_displayName.isNull())) {
|
||||||
|
result["DisplayName"] = Jellyfin::Support::toJsonValue<QString>(m_displayName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_twoLetterISORegionName.isNull())) {
|
||||||
|
result["TwoLetterISORegionName"] = Jellyfin::Support::toJsonValue<QString>(m_twoLetterISORegionName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_threeLetterISORegionName.isNull())) {
|
||||||
|
result["ThreeLetterISORegionName"] = Jellyfin::Support::toJsonValue<QString>(m_threeLetterISORegionName);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,10 +66,26 @@ void CreatePlaylistDto::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject CreatePlaylistDto::toJson() const {
|
QJsonObject CreatePlaylistDto::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Ids"] = Jellyfin::Support::toJsonValue<QStringList>(m_ids);
|
|
||||||
result["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
if (!(m_name.isNull())) {
|
||||||
result["MediaType"] = Jellyfin::Support::toJsonValue<QString>(m_mediaType);
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_ids.size() == 0)) {
|
||||||
|
result["Ids"] = Jellyfin::Support::toJsonValue<QStringList>(m_ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_userId.isNull())) {
|
||||||
|
result["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_mediaType.isNull())) {
|
||||||
|
result["MediaType"] = Jellyfin::Support::toJsonValue<QString>(m_mediaType);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,8 +60,16 @@ void CreateUserByName::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject CreateUserByName::toJson() const {
|
QJsonObject CreateUserByName::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Password"] = Jellyfin::Support::toJsonValue<QString>(m_password);
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_password.isNull())) {
|
||||||
|
result["Password"] = Jellyfin::Support::toJsonValue<QString>(m_password);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,11 +69,31 @@ void CultureDto::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject CultureDto::toJson() const {
|
QJsonObject CultureDto::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["DisplayName"] = Jellyfin::Support::toJsonValue<QString>(m_displayName);
|
|
||||||
result["TwoLetterISOLanguageName"] = Jellyfin::Support::toJsonValue<QString>(m_twoLetterISOLanguageName);
|
if (!(m_name.isNull())) {
|
||||||
result["ThreeLetterISOLanguageName"] = Jellyfin::Support::toJsonValue<QString>(m_threeLetterISOLanguageName);
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
result["ThreeLetterISOLanguageNames"] = Jellyfin::Support::toJsonValue<QStringList>(m_threeLetterISOLanguageNames);
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_displayName.isNull())) {
|
||||||
|
result["DisplayName"] = Jellyfin::Support::toJsonValue<QString>(m_displayName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_twoLetterISOLanguageName.isNull())) {
|
||||||
|
result["TwoLetterISOLanguageName"] = Jellyfin::Support::toJsonValue<QString>(m_twoLetterISOLanguageName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_threeLetterISOLanguageName.isNull())) {
|
||||||
|
result["ThreeLetterISOLanguageName"] = Jellyfin::Support::toJsonValue<QString>(m_threeLetterISOLanguageName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_threeLetterISOLanguageNames.size() == 0)) {
|
||||||
|
result["ThreeLetterISOLanguageNames"] = Jellyfin::Support::toJsonValue<QStringList>(m_threeLetterISOLanguageNames);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,11 @@ void DefaultDirectoryBrowserInfoDto::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject DefaultDirectoryBrowserInfoDto::toJson() const {
|
QJsonObject DefaultDirectoryBrowserInfoDto::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
|
||||||
|
|
||||||
|
if (!(m_path.isNull())) {
|
||||||
|
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,15 +81,51 @@ void DeviceIdentification::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject DeviceIdentification::toJson() const {
|
QJsonObject DeviceIdentification::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["FriendlyName"] = Jellyfin::Support::toJsonValue<QString>(m_friendlyName);
|
|
||||||
result["ModelNumber"] = Jellyfin::Support::toJsonValue<QString>(m_modelNumber);
|
|
||||||
result["SerialNumber"] = Jellyfin::Support::toJsonValue<QString>(m_serialNumber);
|
if (!(m_friendlyName.isNull())) {
|
||||||
result["ModelName"] = Jellyfin::Support::toJsonValue<QString>(m_modelName);
|
result["FriendlyName"] = Jellyfin::Support::toJsonValue<QString>(m_friendlyName);
|
||||||
result["ModelDescription"] = Jellyfin::Support::toJsonValue<QString>(m_modelDescription);
|
}
|
||||||
result["ModelUrl"] = Jellyfin::Support::toJsonValue<QString>(m_modelUrl);
|
|
||||||
result["Manufacturer"] = Jellyfin::Support::toJsonValue<QString>(m_manufacturer);
|
|
||||||
result["ManufacturerUrl"] = Jellyfin::Support::toJsonValue<QString>(m_manufacturerUrl);
|
if (!(m_modelNumber.isNull())) {
|
||||||
result["Headers"] = Jellyfin::Support::toJsonValue<QList<HttpHeaderInfo>>(m_headers);
|
result["ModelNumber"] = Jellyfin::Support::toJsonValue<QString>(m_modelNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_serialNumber.isNull())) {
|
||||||
|
result["SerialNumber"] = Jellyfin::Support::toJsonValue<QString>(m_serialNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_modelName.isNull())) {
|
||||||
|
result["ModelName"] = Jellyfin::Support::toJsonValue<QString>(m_modelName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_modelDescription.isNull())) {
|
||||||
|
result["ModelDescription"] = Jellyfin::Support::toJsonValue<QString>(m_modelDescription);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_modelUrl.isNull())) {
|
||||||
|
result["ModelUrl"] = Jellyfin::Support::toJsonValue<QString>(m_modelUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_manufacturer.isNull())) {
|
||||||
|
result["Manufacturer"] = Jellyfin::Support::toJsonValue<QString>(m_manufacturer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_manufacturerUrl.isNull())) {
|
||||||
|
result["ManufacturerUrl"] = Jellyfin::Support::toJsonValue<QString>(m_manufacturerUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_headers.size() == 0)) {
|
||||||
|
result["Headers"] = Jellyfin::Support::toJsonValue<QList<HttpHeaderInfo>>(m_headers);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,15 +81,39 @@ void DeviceInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject DeviceInfo::toJson() const {
|
QJsonObject DeviceInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
|
||||||
result["LastUserName"] = Jellyfin::Support::toJsonValue<QString>(m_lastUserName);
|
if (!(m_name.isNull())) {
|
||||||
result["AppName"] = Jellyfin::Support::toJsonValue<QString>(m_appName);
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
result["AppVersion"] = Jellyfin::Support::toJsonValue<QString>(m_appVersion);
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_jellyfinId.isNull())) {
|
||||||
|
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_lastUserName.isNull())) {
|
||||||
|
result["LastUserName"] = Jellyfin::Support::toJsonValue<QString>(m_lastUserName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_appName.isNull())) {
|
||||||
|
result["AppName"] = Jellyfin::Support::toJsonValue<QString>(m_appName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_appVersion.isNull())) {
|
||||||
|
result["AppVersion"] = Jellyfin::Support::toJsonValue<QString>(m_appVersion);
|
||||||
|
}
|
||||||
|
|
||||||
result["LastUserId"] = Jellyfin::Support::toJsonValue<QString>(m_lastUserId);
|
result["LastUserId"] = Jellyfin::Support::toJsonValue<QString>(m_lastUserId);
|
||||||
result["DateLastActivity"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateLastActivity);
|
result["DateLastActivity"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateLastActivity);
|
||||||
result["Capabilities"] = Jellyfin::Support::toJsonValue<QSharedPointer<ClientCapabilities>>(m_capabilities);
|
result["Capabilities"] = Jellyfin::Support::toJsonValue<QSharedPointer<ClientCapabilities>>(m_capabilities);
|
||||||
result["IconUrl"] = Jellyfin::Support::toJsonValue<QString>(m_iconUrl);
|
|
||||||
|
if (!(m_iconUrl.isNull())) {
|
||||||
|
result["IconUrl"] = Jellyfin::Support::toJsonValue<QString>(m_iconUrl);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,10 +63,14 @@ void DeviceInfoQueryResult::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject DeviceInfoQueryResult::toJson() const {
|
QJsonObject DeviceInfoQueryResult::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Items"] = Jellyfin::Support::toJsonValue<QList<DeviceInfo>>(m_items);
|
|
||||||
|
|
||||||
|
if (!(m_items.size() == 0)) {
|
||||||
|
result["Items"] = Jellyfin::Support::toJsonValue<QList<DeviceInfo>>(m_items);
|
||||||
|
}
|
||||||
|
|
||||||
result["TotalRecordCount"] = Jellyfin::Support::toJsonValue<qint32>(m_totalRecordCount);
|
result["TotalRecordCount"] = Jellyfin::Support::toJsonValue<qint32>(m_totalRecordCount);
|
||||||
result["StartIndex"] = Jellyfin::Support::toJsonValue<qint32>(m_startIndex);
|
result["StartIndex"] = Jellyfin::Support::toJsonValue<qint32>(m_startIndex);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,11 @@ void DeviceOptions::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject DeviceOptions::toJson() const {
|
QJsonObject DeviceOptions::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["CustomName"] = Jellyfin::Support::toJsonValue<QString>(m_customName);
|
|
||||||
|
|
||||||
|
if (!(m_customName.isNull())) {
|
||||||
|
result["CustomName"] = Jellyfin::Support::toJsonValue<QString>(m_customName);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,45 +171,157 @@ void DeviceProfile::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject DeviceProfile::toJson() const {
|
QJsonObject DeviceProfile::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_jellyfinId.isNull())) {
|
||||||
|
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||||
|
}
|
||||||
|
|
||||||
result["Identification"] = Jellyfin::Support::toJsonValue<QSharedPointer<DeviceIdentification>>(m_identification);
|
result["Identification"] = Jellyfin::Support::toJsonValue<QSharedPointer<DeviceIdentification>>(m_identification);
|
||||||
result["FriendlyName"] = Jellyfin::Support::toJsonValue<QString>(m_friendlyName);
|
|
||||||
result["Manufacturer"] = Jellyfin::Support::toJsonValue<QString>(m_manufacturer);
|
if (!(m_friendlyName.isNull())) {
|
||||||
result["ManufacturerUrl"] = Jellyfin::Support::toJsonValue<QString>(m_manufacturerUrl);
|
result["FriendlyName"] = Jellyfin::Support::toJsonValue<QString>(m_friendlyName);
|
||||||
result["ModelName"] = Jellyfin::Support::toJsonValue<QString>(m_modelName);
|
}
|
||||||
result["ModelDescription"] = Jellyfin::Support::toJsonValue<QString>(m_modelDescription);
|
|
||||||
result["ModelNumber"] = Jellyfin::Support::toJsonValue<QString>(m_modelNumber);
|
|
||||||
result["ModelUrl"] = Jellyfin::Support::toJsonValue<QString>(m_modelUrl);
|
if (!(m_manufacturer.isNull())) {
|
||||||
result["SerialNumber"] = Jellyfin::Support::toJsonValue<QString>(m_serialNumber);
|
result["Manufacturer"] = Jellyfin::Support::toJsonValue<QString>(m_manufacturer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_manufacturerUrl.isNull())) {
|
||||||
|
result["ManufacturerUrl"] = Jellyfin::Support::toJsonValue<QString>(m_manufacturerUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_modelName.isNull())) {
|
||||||
|
result["ModelName"] = Jellyfin::Support::toJsonValue<QString>(m_modelName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_modelDescription.isNull())) {
|
||||||
|
result["ModelDescription"] = Jellyfin::Support::toJsonValue<QString>(m_modelDescription);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_modelNumber.isNull())) {
|
||||||
|
result["ModelNumber"] = Jellyfin::Support::toJsonValue<QString>(m_modelNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_modelUrl.isNull())) {
|
||||||
|
result["ModelUrl"] = Jellyfin::Support::toJsonValue<QString>(m_modelUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_serialNumber.isNull())) {
|
||||||
|
result["SerialNumber"] = Jellyfin::Support::toJsonValue<QString>(m_serialNumber);
|
||||||
|
}
|
||||||
|
|
||||||
result["EnableAlbumArtInDidl"] = Jellyfin::Support::toJsonValue<bool>(m_enableAlbumArtInDidl);
|
result["EnableAlbumArtInDidl"] = Jellyfin::Support::toJsonValue<bool>(m_enableAlbumArtInDidl);
|
||||||
result["EnableSingleAlbumArtLimit"] = Jellyfin::Support::toJsonValue<bool>(m_enableSingleAlbumArtLimit);
|
result["EnableSingleAlbumArtLimit"] = Jellyfin::Support::toJsonValue<bool>(m_enableSingleAlbumArtLimit);
|
||||||
result["EnableSingleSubtitleLimit"] = Jellyfin::Support::toJsonValue<bool>(m_enableSingleSubtitleLimit);
|
result["EnableSingleSubtitleLimit"] = Jellyfin::Support::toJsonValue<bool>(m_enableSingleSubtitleLimit);
|
||||||
result["SupportedMediaTypes"] = Jellyfin::Support::toJsonValue<QString>(m_supportedMediaTypes);
|
|
||||||
result["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
if (!(m_supportedMediaTypes.isNull())) {
|
||||||
result["AlbumArtPn"] = Jellyfin::Support::toJsonValue<QString>(m_albumArtPn);
|
result["SupportedMediaTypes"] = Jellyfin::Support::toJsonValue<QString>(m_supportedMediaTypes);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_userId.isNull())) {
|
||||||
|
result["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_albumArtPn.isNull())) {
|
||||||
|
result["AlbumArtPn"] = Jellyfin::Support::toJsonValue<QString>(m_albumArtPn);
|
||||||
|
}
|
||||||
|
|
||||||
result["MaxAlbumArtWidth"] = Jellyfin::Support::toJsonValue<qint32>(m_maxAlbumArtWidth);
|
result["MaxAlbumArtWidth"] = Jellyfin::Support::toJsonValue<qint32>(m_maxAlbumArtWidth);
|
||||||
result["MaxAlbumArtHeight"] = Jellyfin::Support::toJsonValue<qint32>(m_maxAlbumArtHeight);
|
result["MaxAlbumArtHeight"] = Jellyfin::Support::toJsonValue<qint32>(m_maxAlbumArtHeight);
|
||||||
result["MaxIconWidth"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxIconWidth);
|
|
||||||
result["MaxIconHeight"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxIconHeight);
|
if (!(!m_maxIconWidth.has_value())) {
|
||||||
result["MaxStreamingBitrate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxStreamingBitrate);
|
result["MaxIconWidth"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxIconWidth);
|
||||||
result["MaxStaticBitrate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxStaticBitrate);
|
}
|
||||||
result["MusicStreamingTranscodingBitrate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_musicStreamingTranscodingBitrate);
|
|
||||||
result["MaxStaticMusicBitrate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxStaticMusicBitrate);
|
|
||||||
result["SonyAggregationFlags"] = Jellyfin::Support::toJsonValue<QString>(m_sonyAggregationFlags);
|
if (!(!m_maxIconHeight.has_value())) {
|
||||||
result["ProtocolInfo"] = Jellyfin::Support::toJsonValue<QString>(m_protocolInfo);
|
result["MaxIconHeight"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxIconHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_maxStreamingBitrate.has_value())) {
|
||||||
|
result["MaxStreamingBitrate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxStreamingBitrate);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_maxStaticBitrate.has_value())) {
|
||||||
|
result["MaxStaticBitrate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxStaticBitrate);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_musicStreamingTranscodingBitrate.has_value())) {
|
||||||
|
result["MusicStreamingTranscodingBitrate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_musicStreamingTranscodingBitrate);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_maxStaticMusicBitrate.has_value())) {
|
||||||
|
result["MaxStaticMusicBitrate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxStaticMusicBitrate);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_sonyAggregationFlags.isNull())) {
|
||||||
|
result["SonyAggregationFlags"] = Jellyfin::Support::toJsonValue<QString>(m_sonyAggregationFlags);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_protocolInfo.isNull())) {
|
||||||
|
result["ProtocolInfo"] = Jellyfin::Support::toJsonValue<QString>(m_protocolInfo);
|
||||||
|
}
|
||||||
|
|
||||||
result["TimelineOffsetSeconds"] = Jellyfin::Support::toJsonValue<qint32>(m_timelineOffsetSeconds);
|
result["TimelineOffsetSeconds"] = Jellyfin::Support::toJsonValue<qint32>(m_timelineOffsetSeconds);
|
||||||
result["RequiresPlainVideoItems"] = Jellyfin::Support::toJsonValue<bool>(m_requiresPlainVideoItems);
|
result["RequiresPlainVideoItems"] = Jellyfin::Support::toJsonValue<bool>(m_requiresPlainVideoItems);
|
||||||
result["RequiresPlainFolders"] = Jellyfin::Support::toJsonValue<bool>(m_requiresPlainFolders);
|
result["RequiresPlainFolders"] = Jellyfin::Support::toJsonValue<bool>(m_requiresPlainFolders);
|
||||||
result["EnableMSMediaReceiverRegistrar"] = Jellyfin::Support::toJsonValue<bool>(m_enableMSMediaReceiverRegistrar);
|
result["EnableMSMediaReceiverRegistrar"] = Jellyfin::Support::toJsonValue<bool>(m_enableMSMediaReceiverRegistrar);
|
||||||
result["IgnoreTranscodeByteRangeRequests"] = Jellyfin::Support::toJsonValue<bool>(m_ignoreTranscodeByteRangeRequests);
|
result["IgnoreTranscodeByteRangeRequests"] = Jellyfin::Support::toJsonValue<bool>(m_ignoreTranscodeByteRangeRequests);
|
||||||
result["XmlRootAttributes"] = Jellyfin::Support::toJsonValue<QList<XmlAttribute>>(m_xmlRootAttributes);
|
|
||||||
result["DirectPlayProfiles"] = Jellyfin::Support::toJsonValue<QList<DirectPlayProfile>>(m_directPlayProfiles);
|
if (!(m_xmlRootAttributes.size() == 0)) {
|
||||||
result["TranscodingProfiles"] = Jellyfin::Support::toJsonValue<QList<TranscodingProfile>>(m_transcodingProfiles);
|
result["XmlRootAttributes"] = Jellyfin::Support::toJsonValue<QList<XmlAttribute>>(m_xmlRootAttributes);
|
||||||
result["ContainerProfiles"] = Jellyfin::Support::toJsonValue<QList<ContainerProfile>>(m_containerProfiles);
|
}
|
||||||
result["CodecProfiles"] = Jellyfin::Support::toJsonValue<QList<CodecProfile>>(m_codecProfiles);
|
|
||||||
result["ResponseProfiles"] = Jellyfin::Support::toJsonValue<QList<ResponseProfile>>(m_responseProfiles);
|
|
||||||
result["SubtitleProfiles"] = Jellyfin::Support::toJsonValue<QList<SubtitleProfile>>(m_subtitleProfiles);
|
if (!(m_directPlayProfiles.size() == 0)) {
|
||||||
|
result["DirectPlayProfiles"] = Jellyfin::Support::toJsonValue<QList<DirectPlayProfile>>(m_directPlayProfiles);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_transcodingProfiles.size() == 0)) {
|
||||||
|
result["TranscodingProfiles"] = Jellyfin::Support::toJsonValue<QList<TranscodingProfile>>(m_transcodingProfiles);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_containerProfiles.size() == 0)) {
|
||||||
|
result["ContainerProfiles"] = Jellyfin::Support::toJsonValue<QList<ContainerProfile>>(m_containerProfiles);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_codecProfiles.size() == 0)) {
|
||||||
|
result["CodecProfiles"] = Jellyfin::Support::toJsonValue<QList<CodecProfile>>(m_codecProfiles);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_responseProfiles.size() == 0)) {
|
||||||
|
result["ResponseProfiles"] = Jellyfin::Support::toJsonValue<QList<ResponseProfile>>(m_responseProfiles);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_subtitleProfiles.size() == 0)) {
|
||||||
|
result["SubtitleProfiles"] = Jellyfin::Support::toJsonValue<QList<SubtitleProfile>>(m_subtitleProfiles);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,10 +63,18 @@ void DeviceProfileInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject DeviceProfileInfo::toJson() const {
|
QJsonObject DeviceProfileInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Type"] = Jellyfin::Support::toJsonValue<DeviceProfileType>(m_type);
|
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_jellyfinId.isNull())) {
|
||||||
|
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["Type"] = Jellyfin::Support::toJsonValue<DeviceProfileType>(m_type);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,11 +66,23 @@ void DirectPlayProfile::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject DirectPlayProfile::toJson() const {
|
QJsonObject DirectPlayProfile::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Container"] = Jellyfin::Support::toJsonValue<QString>(m_container);
|
|
||||||
result["AudioCodec"] = Jellyfin::Support::toJsonValue<QString>(m_audioCodec);
|
|
||||||
result["VideoCodec"] = Jellyfin::Support::toJsonValue<QString>(m_videoCodec);
|
|
||||||
result["Type"] = Jellyfin::Support::toJsonValue<DlnaProfileType>(m_type);
|
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_container.isNull())) {
|
||||||
|
result["Container"] = Jellyfin::Support::toJsonValue<QString>(m_container);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_audioCodec.isNull())) {
|
||||||
|
result["AudioCodec"] = Jellyfin::Support::toJsonValue<QString>(m_audioCodec);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_videoCodec.isNull())) {
|
||||||
|
result["VideoCodec"] = Jellyfin::Support::toJsonValue<QString>(m_videoCodec);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["Type"] = Jellyfin::Support::toJsonValue<DlnaProfileType>(m_type);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,20 +96,44 @@ void DisplayPreferencesDto::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject DisplayPreferencesDto::toJson() const {
|
QJsonObject DisplayPreferencesDto::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
|
||||||
result["ViewType"] = Jellyfin::Support::toJsonValue<QString>(m_viewType);
|
|
||||||
result["SortBy"] = Jellyfin::Support::toJsonValue<QString>(m_sortBy);
|
if (!(m_jellyfinId.isNull())) {
|
||||||
result["IndexBy"] = Jellyfin::Support::toJsonValue<QString>(m_indexBy);
|
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_viewType.isNull())) {
|
||||||
|
result["ViewType"] = Jellyfin::Support::toJsonValue<QString>(m_viewType);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_sortBy.isNull())) {
|
||||||
|
result["SortBy"] = Jellyfin::Support::toJsonValue<QString>(m_sortBy);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_indexBy.isNull())) {
|
||||||
|
result["IndexBy"] = Jellyfin::Support::toJsonValue<QString>(m_indexBy);
|
||||||
|
}
|
||||||
|
|
||||||
result["RememberIndexing"] = Jellyfin::Support::toJsonValue<bool>(m_rememberIndexing);
|
result["RememberIndexing"] = Jellyfin::Support::toJsonValue<bool>(m_rememberIndexing);
|
||||||
result["PrimaryImageHeight"] = Jellyfin::Support::toJsonValue<qint32>(m_primaryImageHeight);
|
result["PrimaryImageHeight"] = Jellyfin::Support::toJsonValue<qint32>(m_primaryImageHeight);
|
||||||
result["PrimaryImageWidth"] = Jellyfin::Support::toJsonValue<qint32>(m_primaryImageWidth);
|
result["PrimaryImageWidth"] = Jellyfin::Support::toJsonValue<qint32>(m_primaryImageWidth);
|
||||||
result["CustomPrefs"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_customPrefs);
|
|
||||||
|
if (!(m_customPrefs.isEmpty())) {
|
||||||
|
result["CustomPrefs"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_customPrefs);
|
||||||
|
}
|
||||||
|
|
||||||
result["ScrollDirection"] = Jellyfin::Support::toJsonValue<ScrollDirection>(m_scrollDirection);
|
result["ScrollDirection"] = Jellyfin::Support::toJsonValue<ScrollDirection>(m_scrollDirection);
|
||||||
result["ShowBackdrop"] = Jellyfin::Support::toJsonValue<bool>(m_showBackdrop);
|
result["ShowBackdrop"] = Jellyfin::Support::toJsonValue<bool>(m_showBackdrop);
|
||||||
result["RememberSorting"] = Jellyfin::Support::toJsonValue<bool>(m_rememberSorting);
|
result["RememberSorting"] = Jellyfin::Support::toJsonValue<bool>(m_rememberSorting);
|
||||||
result["SortOrder"] = Jellyfin::Support::toJsonValue<SortOrder>(m_sortOrder);
|
result["SortOrder"] = Jellyfin::Support::toJsonValue<SortOrder>(m_sortOrder);
|
||||||
result["ShowSidebar"] = Jellyfin::Support::toJsonValue<bool>(m_showSidebar);
|
result["ShowSidebar"] = Jellyfin::Support::toJsonValue<bool>(m_showSidebar);
|
||||||
result["Client"] = Jellyfin::Support::toJsonValue<QString>(m_client);
|
|
||||||
|
if (!(m_client.isNull())) {
|
||||||
|
result["Client"] = Jellyfin::Support::toJsonValue<QString>(m_client);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,9 +60,9 @@ void EndPointInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject EndPointInfo::toJson() const {
|
QJsonObject EndPointInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["IsLocal"] = Jellyfin::Support::toJsonValue<bool>(m_isLocal);
|
result["IsLocal"] = Jellyfin::Support::toJsonValue<bool>(m_isLocal);
|
||||||
result["IsInNetwork"] = Jellyfin::Support::toJsonValue<bool>(m_isInNetwork);
|
result["IsInNetwork"] = Jellyfin::Support::toJsonValue<bool>(m_isInNetwork);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,10 +66,22 @@ void ExternalIdInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject ExternalIdInfo::toJson() const {
|
QJsonObject ExternalIdInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Key"] = Jellyfin::Support::toJsonValue<QString>(m_key);
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_key.isNull())) {
|
||||||
|
result["Key"] = Jellyfin::Support::toJsonValue<QString>(m_key);
|
||||||
|
}
|
||||||
|
|
||||||
result["Type"] = Jellyfin::Support::toJsonValue<ExternalIdMediaType>(m_type);
|
result["Type"] = Jellyfin::Support::toJsonValue<ExternalIdMediaType>(m_type);
|
||||||
result["UrlFormatString"] = Jellyfin::Support::toJsonValue<QString>(m_urlFormatString);
|
|
||||||
|
if (!(m_urlFormatString.isNull())) {
|
||||||
|
result["UrlFormatString"] = Jellyfin::Support::toJsonValue<QString>(m_urlFormatString);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,8 +60,16 @@ void ExternalUrl::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject ExternalUrl::toJson() const {
|
QJsonObject ExternalUrl::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Url"] = Jellyfin::Support::toJsonValue<QString>(m_url);
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_url.isNull())) {
|
||||||
|
result["Url"] = Jellyfin::Support::toJsonValue<QString>(m_url);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,10 +63,18 @@ void FileSystemEntryInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject FileSystemEntryInfo::toJson() const {
|
QJsonObject FileSystemEntryInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
|
||||||
result["Type"] = Jellyfin::Support::toJsonValue<FileSystemEntryType>(m_type);
|
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_path.isNull())) {
|
||||||
|
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["Type"] = Jellyfin::Support::toJsonValue<FileSystemEntryType>(m_type);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,11 +66,15 @@ void FontFile::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject FontFile::toJson() const {
|
QJsonObject FontFile::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
result["Size"] = Jellyfin::Support::toJsonValue<qint64>(m_size);
|
result["Size"] = Jellyfin::Support::toJsonValue<qint64>(m_size);
|
||||||
result["DateCreated"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateCreated);
|
result["DateCreated"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateCreated);
|
||||||
result["DateModified"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateModified);
|
result["DateModified"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateModified);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,8 +57,8 @@ void ForgotPasswordDto::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject ForgotPasswordDto::toJson() const {
|
QJsonObject ForgotPasswordDto::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["EnteredUsername"] = Jellyfin::Support::toJsonValue<QString>(m_enteredUsername);
|
|
||||||
|
|
||||||
|
result["EnteredUsername"] = Jellyfin::Support::toJsonValue<QString>(m_enteredUsername);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,9 +63,17 @@ void ForgotPasswordResult::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject ForgotPasswordResult::toJson() const {
|
QJsonObject ForgotPasswordResult::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["Action"] = Jellyfin::Support::toJsonValue<ForgotPasswordAction>(m_action);
|
result["Action"] = Jellyfin::Support::toJsonValue<ForgotPasswordAction>(m_action);
|
||||||
result["PinFile"] = Jellyfin::Support::toJsonValue<QString>(m_pinFile);
|
|
||||||
result["PinExpirationDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_pinExpirationDate);
|
if (!(m_pinFile.isNull())) {
|
||||||
|
result["PinFile"] = Jellyfin::Support::toJsonValue<QString>(m_pinFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_pinExpirationDate.isNull())) {
|
||||||
|
result["PinExpirationDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_pinExpirationDate);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,9 +63,13 @@ void GeneralCommand::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject GeneralCommand::toJson() const {
|
QJsonObject GeneralCommand::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<GeneralCommandType>(m_name);
|
result["Name"] = Jellyfin::Support::toJsonValue<GeneralCommandType>(m_name);
|
||||||
result["ControllingUserId"] = Jellyfin::Support::toJsonValue<QString>(m_controllingUserId);
|
result["ControllingUserId"] = Jellyfin::Support::toJsonValue<QString>(m_controllingUserId);
|
||||||
result["Arguments"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_arguments);
|
|
||||||
|
if (!(m_arguments.isEmpty())) {
|
||||||
|
result["Arguments"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_arguments);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,33 +135,129 @@ void GetProgramsDto::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject GetProgramsDto::toJson() const {
|
QJsonObject GetProgramsDto::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["ChannelIds"] = Jellyfin::Support::toJsonValue<QStringList>(m_channelIds);
|
|
||||||
|
|
||||||
|
if (!(m_channelIds.size() == 0)) {
|
||||||
|
result["ChannelIds"] = Jellyfin::Support::toJsonValue<QStringList>(m_channelIds);
|
||||||
|
}
|
||||||
|
|
||||||
result["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
result["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
||||||
result["MinStartDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_minStartDate);
|
|
||||||
result["HasAired"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_hasAired);
|
if (!(m_minStartDate.isNull())) {
|
||||||
result["IsAiring"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isAiring);
|
result["MinStartDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_minStartDate);
|
||||||
result["MaxStartDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_maxStartDate);
|
}
|
||||||
result["MinEndDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_minEndDate);
|
|
||||||
result["MaxEndDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_maxEndDate);
|
|
||||||
result["IsMovie"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isMovie);
|
if (!(!m_hasAired.has_value())) {
|
||||||
result["IsSeries"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isSeries);
|
result["HasAired"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_hasAired);
|
||||||
result["IsNews"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isNews);
|
}
|
||||||
result["IsKids"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isKids);
|
|
||||||
result["IsSports"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isSports);
|
|
||||||
result["StartIndex"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_startIndex);
|
if (!(!m_isAiring.has_value())) {
|
||||||
result["Limit"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_limit);
|
result["IsAiring"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isAiring);
|
||||||
result["SortBy"] = Jellyfin::Support::toJsonValue<QString>(m_sortBy);
|
}
|
||||||
result["SortOrder"] = Jellyfin::Support::toJsonValue<QString>(m_sortOrder);
|
|
||||||
result["Genres"] = Jellyfin::Support::toJsonValue<QStringList>(m_genres);
|
|
||||||
result["GenreIds"] = Jellyfin::Support::toJsonValue<QStringList>(m_genreIds);
|
if (!(m_maxStartDate.isNull())) {
|
||||||
result["EnableImages"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_enableImages);
|
result["MaxStartDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_maxStartDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_minEndDate.isNull())) {
|
||||||
|
result["MinEndDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_minEndDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_maxEndDate.isNull())) {
|
||||||
|
result["MaxEndDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_maxEndDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_isMovie.has_value())) {
|
||||||
|
result["IsMovie"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isMovie);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_isSeries.has_value())) {
|
||||||
|
result["IsSeries"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isSeries);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_isNews.has_value())) {
|
||||||
|
result["IsNews"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isNews);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_isKids.has_value())) {
|
||||||
|
result["IsKids"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isKids);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_isSports.has_value())) {
|
||||||
|
result["IsSports"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isSports);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_startIndex.has_value())) {
|
||||||
|
result["StartIndex"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_startIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_limit.has_value())) {
|
||||||
|
result["Limit"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_limit);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_sortBy.isNull())) {
|
||||||
|
result["SortBy"] = Jellyfin::Support::toJsonValue<QString>(m_sortBy);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_sortOrder.isNull())) {
|
||||||
|
result["SortOrder"] = Jellyfin::Support::toJsonValue<QString>(m_sortOrder);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_genres.size() == 0)) {
|
||||||
|
result["Genres"] = Jellyfin::Support::toJsonValue<QStringList>(m_genres);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_genreIds.size() == 0)) {
|
||||||
|
result["GenreIds"] = Jellyfin::Support::toJsonValue<QStringList>(m_genreIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_enableImages.has_value())) {
|
||||||
|
result["EnableImages"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_enableImages);
|
||||||
|
}
|
||||||
|
|
||||||
result["EnableTotalRecordCount"] = Jellyfin::Support::toJsonValue<bool>(m_enableTotalRecordCount);
|
result["EnableTotalRecordCount"] = Jellyfin::Support::toJsonValue<bool>(m_enableTotalRecordCount);
|
||||||
result["ImageTypeLimit"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_imageTypeLimit);
|
|
||||||
result["EnableImageTypes"] = Jellyfin::Support::toJsonValue<QList<ImageType>>(m_enableImageTypes);
|
if (!(!m_imageTypeLimit.has_value())) {
|
||||||
result["EnableUserData"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_enableUserData);
|
result["ImageTypeLimit"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_imageTypeLimit);
|
||||||
result["SeriesTimerId"] = Jellyfin::Support::toJsonValue<QString>(m_seriesTimerId);
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_enableImageTypes.size() == 0)) {
|
||||||
|
result["EnableImageTypes"] = Jellyfin::Support::toJsonValue<QList<ImageType>>(m_enableImageTypes);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_enableUserData.has_value())) {
|
||||||
|
result["EnableUserData"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_enableUserData);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_seriesTimerId.isNull())) {
|
||||||
|
result["SeriesTimerId"] = Jellyfin::Support::toJsonValue<QString>(m_seriesTimerId);
|
||||||
|
}
|
||||||
|
|
||||||
result["LibrarySeriesId"] = Jellyfin::Support::toJsonValue<QString>(m_librarySeriesId);
|
result["LibrarySeriesId"] = Jellyfin::Support::toJsonValue<QString>(m_librarySeriesId);
|
||||||
result["Fields"] = Jellyfin::Support::toJsonValue<QList<ItemFields>>(m_fields);
|
|
||||||
|
if (!(m_fields.size() == 0)) {
|
||||||
|
result["Fields"] = Jellyfin::Support::toJsonValue<QList<ItemFields>>(m_fields);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,12 +69,20 @@ void GroupInfoDto::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject GroupInfoDto::toJson() const {
|
QJsonObject GroupInfoDto::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["GroupId"] = Jellyfin::Support::toJsonValue<QString>(m_groupId);
|
|
||||||
result["GroupName"] = Jellyfin::Support::toJsonValue<QString>(m_groupName);
|
|
||||||
result["State"] = Jellyfin::Support::toJsonValue<GroupStateType>(m_state);
|
|
||||||
result["Participants"] = Jellyfin::Support::toJsonValue<QStringList>(m_participants);
|
|
||||||
result["LastUpdatedAt"] = Jellyfin::Support::toJsonValue<QDateTime>(m_lastUpdatedAt);
|
|
||||||
|
|
||||||
|
result["GroupId"] = Jellyfin::Support::toJsonValue<QString>(m_groupId);
|
||||||
|
|
||||||
|
if (!(m_groupName.isNull())) {
|
||||||
|
result["GroupName"] = Jellyfin::Support::toJsonValue<QString>(m_groupName);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["State"] = Jellyfin::Support::toJsonValue<GroupStateType>(m_state);
|
||||||
|
|
||||||
|
if (!(m_participants.size() == 0)) {
|
||||||
|
result["Participants"] = Jellyfin::Support::toJsonValue<QStringList>(m_participants);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["LastUpdatedAt"] = Jellyfin::Support::toJsonValue<QDateTime>(m_lastUpdatedAt);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,9 +60,9 @@ void GuideInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject GuideInfo::toJson() const {
|
QJsonObject GuideInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["StartDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_startDate);
|
result["StartDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_startDate);
|
||||||
result["EndDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_endDate);
|
result["EndDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_endDate);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,10 +63,18 @@ void HttpHeaderInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject HttpHeaderInfo::toJson() const {
|
QJsonObject HttpHeaderInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Value"] = Jellyfin::Support::toJsonValue<QString>(m_value);
|
|
||||||
result["Match"] = Jellyfin::Support::toJsonValue<HeaderMatchType>(m_match);
|
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_value.isNull())) {
|
||||||
|
result["Value"] = Jellyfin::Support::toJsonValue<QString>(m_value);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["Match"] = Jellyfin::Support::toJsonValue<HeaderMatchType>(m_match);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,8 +57,8 @@ void IgnoreWaitRequestDto::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject IgnoreWaitRequestDto::toJson() const {
|
QJsonObject IgnoreWaitRequestDto::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["IgnoreWait"] = Jellyfin::Support::toJsonValue<bool>(m_ignoreWait);
|
|
||||||
|
|
||||||
|
result["IgnoreWait"] = Jellyfin::Support::toJsonValue<bool>(m_ignoreWait);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,11 +69,27 @@ void ImageByNameInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject ImageByNameInfo::toJson() const {
|
QJsonObject ImageByNameInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Theme"] = Jellyfin::Support::toJsonValue<QString>(m_theme);
|
|
||||||
result["Context"] = Jellyfin::Support::toJsonValue<QString>(m_context);
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_theme.isNull())) {
|
||||||
|
result["Theme"] = Jellyfin::Support::toJsonValue<QString>(m_theme);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_context.isNull())) {
|
||||||
|
result["Context"] = Jellyfin::Support::toJsonValue<QString>(m_context);
|
||||||
|
}
|
||||||
|
|
||||||
result["FileLength"] = Jellyfin::Support::toJsonValue<qint64>(m_fileLength);
|
result["FileLength"] = Jellyfin::Support::toJsonValue<qint64>(m_fileLength);
|
||||||
result["Format"] = Jellyfin::Support::toJsonValue<QString>(m_format);
|
|
||||||
|
if (!(m_format.isNull())) {
|
||||||
|
result["Format"] = Jellyfin::Support::toJsonValue<QString>(m_format);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,15 +78,39 @@ void ImageInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject ImageInfo::toJson() const {
|
QJsonObject ImageInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["ImageType"] = Jellyfin::Support::toJsonValue<ImageType>(m_imageType);
|
|
||||||
result["ImageIndex"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_imageIndex);
|
|
||||||
result["ImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_imageTag);
|
|
||||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
|
||||||
result["BlurHash"] = Jellyfin::Support::toJsonValue<QString>(m_blurHash);
|
|
||||||
result["Height"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_height);
|
|
||||||
result["Width"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_width);
|
|
||||||
result["Size"] = Jellyfin::Support::toJsonValue<qint64>(m_size);
|
|
||||||
|
|
||||||
|
result["ImageType"] = Jellyfin::Support::toJsonValue<ImageType>(m_imageType);
|
||||||
|
|
||||||
|
if (!(!m_imageIndex.has_value())) {
|
||||||
|
result["ImageIndex"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_imageIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_imageTag.isNull())) {
|
||||||
|
result["ImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_imageTag);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_path.isNull())) {
|
||||||
|
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_blurHash.isNull())) {
|
||||||
|
result["BlurHash"] = Jellyfin::Support::toJsonValue<QString>(m_blurHash);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_height.has_value())) {
|
||||||
|
result["Height"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_height);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_width.has_value())) {
|
||||||
|
result["Width"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_width);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["Size"] = Jellyfin::Support::toJsonValue<qint64>(m_size);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,10 +63,10 @@ void ImageOption::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject ImageOption::toJson() const {
|
QJsonObject ImageOption::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["Type"] = Jellyfin::Support::toJsonValue<ImageType>(m_type);
|
result["Type"] = Jellyfin::Support::toJsonValue<ImageType>(m_type);
|
||||||
result["Limit"] = Jellyfin::Support::toJsonValue<qint32>(m_limit);
|
result["Limit"] = Jellyfin::Support::toJsonValue<qint32>(m_limit);
|
||||||
result["MinWidth"] = Jellyfin::Support::toJsonValue<qint32>(m_minWidth);
|
result["MinWidth"] = Jellyfin::Support::toJsonValue<qint32>(m_minWidth);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,8 +60,16 @@ void ImageProviderInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject ImageProviderInfo::toJson() const {
|
QJsonObject ImageProviderInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["SupportedImages"] = Jellyfin::Support::toJsonValue<QList<ImageType>>(m_supportedImages);
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_supportedImages.size() == 0)) {
|
||||||
|
result["SupportedImages"] = Jellyfin::Support::toJsonValue<QList<ImageType>>(m_supportedImages);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,12 +72,28 @@ void InstallationInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject InstallationInfo::toJson() const {
|
QJsonObject InstallationInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["Guid"] = Jellyfin::Support::toJsonValue<QString>(m_guid);
|
result["Guid"] = Jellyfin::Support::toJsonValue<QString>(m_guid);
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
result["Version"] = Jellyfin::Support::toJsonValue<QSharedPointer<Version>>(m_version);
|
result["Version"] = Jellyfin::Support::toJsonValue<QSharedPointer<Version>>(m_version);
|
||||||
result["Changelog"] = Jellyfin::Support::toJsonValue<QString>(m_changelog);
|
|
||||||
result["SourceUrl"] = Jellyfin::Support::toJsonValue<QString>(m_sourceUrl);
|
if (!(m_changelog.isNull())) {
|
||||||
result["Checksum"] = Jellyfin::Support::toJsonValue<QString>(m_checksum);
|
result["Changelog"] = Jellyfin::Support::toJsonValue<QString>(m_changelog);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_sourceUrl.isNull())) {
|
||||||
|
result["SourceUrl"] = Jellyfin::Support::toJsonValue<QString>(m_sourceUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_checksum.isNull())) {
|
||||||
|
result["Checksum"] = Jellyfin::Support::toJsonValue<QString>(m_checksum);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,13 +75,29 @@ void IPlugin::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject IPlugin::toJson() const {
|
QJsonObject IPlugin::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Description"] = Jellyfin::Support::toJsonValue<QString>(m_description);
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_description.isNull())) {
|
||||||
|
result["Description"] = Jellyfin::Support::toJsonValue<QString>(m_description);
|
||||||
|
}
|
||||||
|
|
||||||
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||||
result["Version"] = Jellyfin::Support::toJsonValue<QSharedPointer<Version>>(m_version);
|
result["Version"] = Jellyfin::Support::toJsonValue<QSharedPointer<Version>>(m_version);
|
||||||
result["AssemblyFilePath"] = Jellyfin::Support::toJsonValue<QString>(m_assemblyFilePath);
|
|
||||||
|
if (!(m_assemblyFilePath.isNull())) {
|
||||||
|
result["AssemblyFilePath"] = Jellyfin::Support::toJsonValue<QString>(m_assemblyFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
result["CanUninstall"] = Jellyfin::Support::toJsonValue<bool>(m_canUninstall);
|
result["CanUninstall"] = Jellyfin::Support::toJsonValue<bool>(m_canUninstall);
|
||||||
result["DataFolderPath"] = Jellyfin::Support::toJsonValue<QString>(m_dataFolderPath);
|
|
||||||
|
if (!(m_dataFolderPath.isNull())) {
|
||||||
|
result["DataFolderPath"] = Jellyfin::Support::toJsonValue<QString>(m_dataFolderPath);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,6 +90,7 @@ void ItemCounts::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject ItemCounts::toJson() const {
|
QJsonObject ItemCounts::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["MovieCount"] = Jellyfin::Support::toJsonValue<qint32>(m_movieCount);
|
result["MovieCount"] = Jellyfin::Support::toJsonValue<qint32>(m_movieCount);
|
||||||
result["SeriesCount"] = Jellyfin::Support::toJsonValue<qint32>(m_seriesCount);
|
result["SeriesCount"] = Jellyfin::Support::toJsonValue<qint32>(m_seriesCount);
|
||||||
result["EpisodeCount"] = Jellyfin::Support::toJsonValue<qint32>(m_episodeCount);
|
result["EpisodeCount"] = Jellyfin::Support::toJsonValue<qint32>(m_episodeCount);
|
||||||
|
@ -102,7 +103,6 @@ QJsonObject ItemCounts::toJson() const {
|
||||||
result["BoxSetCount"] = Jellyfin::Support::toJsonValue<qint32>(m_boxSetCount);
|
result["BoxSetCount"] = Jellyfin::Support::toJsonValue<qint32>(m_boxSetCount);
|
||||||
result["BookCount"] = Jellyfin::Support::toJsonValue<qint32>(m_bookCount);
|
result["BookCount"] = Jellyfin::Support::toJsonValue<qint32>(m_bookCount);
|
||||||
result["ItemCount"] = Jellyfin::Support::toJsonValue<qint32>(m_itemCount);
|
result["ItemCount"] = Jellyfin::Support::toJsonValue<qint32>(m_itemCount);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,8 +57,8 @@ void JoinGroupRequestDto::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject JoinGroupRequestDto::toJson() const {
|
QJsonObject JoinGroupRequestDto::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["GroupId"] = Jellyfin::Support::toJsonValue<QString>(m_groupId);
|
|
||||||
|
|
||||||
|
result["GroupId"] = Jellyfin::Support::toJsonValue<QString>(m_groupId);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,9 +60,13 @@ void LibraryOptionInfoDto::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject LibraryOptionInfoDto::toJson() const {
|
QJsonObject LibraryOptionInfoDto::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["DefaultEnabled"] = Jellyfin::Support::toJsonValue<bool>(m_defaultEnabled);
|
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["DefaultEnabled"] = Jellyfin::Support::toJsonValue<bool>(m_defaultEnabled);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -129,31 +129,75 @@ void LibraryOptions::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject LibraryOptions::toJson() const {
|
QJsonObject LibraryOptions::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["EnablePhotos"] = Jellyfin::Support::toJsonValue<bool>(m_enablePhotos);
|
result["EnablePhotos"] = Jellyfin::Support::toJsonValue<bool>(m_enablePhotos);
|
||||||
result["EnableRealtimeMonitor"] = Jellyfin::Support::toJsonValue<bool>(m_enableRealtimeMonitor);
|
result["EnableRealtimeMonitor"] = Jellyfin::Support::toJsonValue<bool>(m_enableRealtimeMonitor);
|
||||||
result["EnableChapterImageExtraction"] = Jellyfin::Support::toJsonValue<bool>(m_enableChapterImageExtraction);
|
result["EnableChapterImageExtraction"] = Jellyfin::Support::toJsonValue<bool>(m_enableChapterImageExtraction);
|
||||||
result["ExtractChapterImagesDuringLibraryScan"] = Jellyfin::Support::toJsonValue<bool>(m_extractChapterImagesDuringLibraryScan);
|
result["ExtractChapterImagesDuringLibraryScan"] = Jellyfin::Support::toJsonValue<bool>(m_extractChapterImagesDuringLibraryScan);
|
||||||
result["PathInfos"] = Jellyfin::Support::toJsonValue<QList<MediaPathInfo>>(m_pathInfos);
|
|
||||||
|
if (!(m_pathInfos.size() == 0)) {
|
||||||
|
result["PathInfos"] = Jellyfin::Support::toJsonValue<QList<MediaPathInfo>>(m_pathInfos);
|
||||||
|
}
|
||||||
|
|
||||||
result["SaveLocalMetadata"] = Jellyfin::Support::toJsonValue<bool>(m_saveLocalMetadata);
|
result["SaveLocalMetadata"] = Jellyfin::Support::toJsonValue<bool>(m_saveLocalMetadata);
|
||||||
result["EnableInternetProviders"] = Jellyfin::Support::toJsonValue<bool>(m_enableInternetProviders);
|
result["EnableInternetProviders"] = Jellyfin::Support::toJsonValue<bool>(m_enableInternetProviders);
|
||||||
result["EnableAutomaticSeriesGrouping"] = Jellyfin::Support::toJsonValue<bool>(m_enableAutomaticSeriesGrouping);
|
result["EnableAutomaticSeriesGrouping"] = Jellyfin::Support::toJsonValue<bool>(m_enableAutomaticSeriesGrouping);
|
||||||
result["EnableEmbeddedTitles"] = Jellyfin::Support::toJsonValue<bool>(m_enableEmbeddedTitles);
|
result["EnableEmbeddedTitles"] = Jellyfin::Support::toJsonValue<bool>(m_enableEmbeddedTitles);
|
||||||
result["EnableEmbeddedEpisodeInfos"] = Jellyfin::Support::toJsonValue<bool>(m_enableEmbeddedEpisodeInfos);
|
result["EnableEmbeddedEpisodeInfos"] = Jellyfin::Support::toJsonValue<bool>(m_enableEmbeddedEpisodeInfos);
|
||||||
result["AutomaticRefreshIntervalDays"] = Jellyfin::Support::toJsonValue<qint32>(m_automaticRefreshIntervalDays);
|
result["AutomaticRefreshIntervalDays"] = Jellyfin::Support::toJsonValue<qint32>(m_automaticRefreshIntervalDays);
|
||||||
result["PreferredMetadataLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_preferredMetadataLanguage);
|
|
||||||
result["MetadataCountryCode"] = Jellyfin::Support::toJsonValue<QString>(m_metadataCountryCode);
|
if (!(m_preferredMetadataLanguage.isNull())) {
|
||||||
result["SeasonZeroDisplayName"] = Jellyfin::Support::toJsonValue<QString>(m_seasonZeroDisplayName);
|
result["PreferredMetadataLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_preferredMetadataLanguage);
|
||||||
result["MetadataSavers"] = Jellyfin::Support::toJsonValue<QStringList>(m_metadataSavers);
|
}
|
||||||
result["DisabledLocalMetadataReaders"] = Jellyfin::Support::toJsonValue<QStringList>(m_disabledLocalMetadataReaders);
|
|
||||||
result["LocalMetadataReaderOrder"] = Jellyfin::Support::toJsonValue<QStringList>(m_localMetadataReaderOrder);
|
|
||||||
result["DisabledSubtitleFetchers"] = Jellyfin::Support::toJsonValue<QStringList>(m_disabledSubtitleFetchers);
|
if (!(m_metadataCountryCode.isNull())) {
|
||||||
result["SubtitleFetcherOrder"] = Jellyfin::Support::toJsonValue<QStringList>(m_subtitleFetcherOrder);
|
result["MetadataCountryCode"] = Jellyfin::Support::toJsonValue<QString>(m_metadataCountryCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_seasonZeroDisplayName.isNull())) {
|
||||||
|
result["SeasonZeroDisplayName"] = Jellyfin::Support::toJsonValue<QString>(m_seasonZeroDisplayName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_metadataSavers.size() == 0)) {
|
||||||
|
result["MetadataSavers"] = Jellyfin::Support::toJsonValue<QStringList>(m_metadataSavers);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_disabledLocalMetadataReaders.size() == 0)) {
|
||||||
|
result["DisabledLocalMetadataReaders"] = Jellyfin::Support::toJsonValue<QStringList>(m_disabledLocalMetadataReaders);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_localMetadataReaderOrder.size() == 0)) {
|
||||||
|
result["LocalMetadataReaderOrder"] = Jellyfin::Support::toJsonValue<QStringList>(m_localMetadataReaderOrder);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_disabledSubtitleFetchers.size() == 0)) {
|
||||||
|
result["DisabledSubtitleFetchers"] = Jellyfin::Support::toJsonValue<QStringList>(m_disabledSubtitleFetchers);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_subtitleFetcherOrder.size() == 0)) {
|
||||||
|
result["SubtitleFetcherOrder"] = Jellyfin::Support::toJsonValue<QStringList>(m_subtitleFetcherOrder);
|
||||||
|
}
|
||||||
|
|
||||||
result["SkipSubtitlesIfEmbeddedSubtitlesPresent"] = Jellyfin::Support::toJsonValue<bool>(m_skipSubtitlesIfEmbeddedSubtitlesPresent);
|
result["SkipSubtitlesIfEmbeddedSubtitlesPresent"] = Jellyfin::Support::toJsonValue<bool>(m_skipSubtitlesIfEmbeddedSubtitlesPresent);
|
||||||
result["SkipSubtitlesIfAudioTrackMatches"] = Jellyfin::Support::toJsonValue<bool>(m_skipSubtitlesIfAudioTrackMatches);
|
result["SkipSubtitlesIfAudioTrackMatches"] = Jellyfin::Support::toJsonValue<bool>(m_skipSubtitlesIfAudioTrackMatches);
|
||||||
result["SubtitleDownloadLanguages"] = Jellyfin::Support::toJsonValue<QStringList>(m_subtitleDownloadLanguages);
|
|
||||||
|
if (!(m_subtitleDownloadLanguages.size() == 0)) {
|
||||||
|
result["SubtitleDownloadLanguages"] = Jellyfin::Support::toJsonValue<QStringList>(m_subtitleDownloadLanguages);
|
||||||
|
}
|
||||||
|
|
||||||
result["RequirePerfectSubtitleMatch"] = Jellyfin::Support::toJsonValue<bool>(m_requirePerfectSubtitleMatch);
|
result["RequirePerfectSubtitleMatch"] = Jellyfin::Support::toJsonValue<bool>(m_requirePerfectSubtitleMatch);
|
||||||
result["SaveSubtitlesWithMedia"] = Jellyfin::Support::toJsonValue<bool>(m_saveSubtitlesWithMedia);
|
result["SaveSubtitlesWithMedia"] = Jellyfin::Support::toJsonValue<bool>(m_saveSubtitlesWithMedia);
|
||||||
result["TypeOptions"] = Jellyfin::Support::toJsonValue<QList<TypeOptions>>(m_typeOptions);
|
|
||||||
|
if (!(m_typeOptions.size() == 0)) {
|
||||||
|
result["TypeOptions"] = Jellyfin::Support::toJsonValue<QList<TypeOptions>>(m_typeOptions);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,10 +66,26 @@ void LibraryOptionsResultDto::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject LibraryOptionsResultDto::toJson() const {
|
QJsonObject LibraryOptionsResultDto::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["MetadataSavers"] = Jellyfin::Support::toJsonValue<QList<LibraryOptionInfoDto>>(m_metadataSavers);
|
|
||||||
result["MetadataReaders"] = Jellyfin::Support::toJsonValue<QList<LibraryOptionInfoDto>>(m_metadataReaders);
|
|
||||||
result["SubtitleFetchers"] = Jellyfin::Support::toJsonValue<QList<LibraryOptionInfoDto>>(m_subtitleFetchers);
|
if (!(m_metadataSavers.size() == 0)) {
|
||||||
result["TypeOptions"] = Jellyfin::Support::toJsonValue<QList<LibraryTypeOptionsDto>>(m_typeOptions);
|
result["MetadataSavers"] = Jellyfin::Support::toJsonValue<QList<LibraryOptionInfoDto>>(m_metadataSavers);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_metadataReaders.size() == 0)) {
|
||||||
|
result["MetadataReaders"] = Jellyfin::Support::toJsonValue<QList<LibraryOptionInfoDto>>(m_metadataReaders);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_subtitleFetchers.size() == 0)) {
|
||||||
|
result["SubtitleFetchers"] = Jellyfin::Support::toJsonValue<QList<LibraryOptionInfoDto>>(m_subtitleFetchers);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_typeOptions.size() == 0)) {
|
||||||
|
result["TypeOptions"] = Jellyfin::Support::toJsonValue<QList<LibraryTypeOptionsDto>>(m_typeOptions);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,11 +69,31 @@ void LibraryTypeOptionsDto::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject LibraryTypeOptionsDto::toJson() const {
|
QJsonObject LibraryTypeOptionsDto::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Type"] = Jellyfin::Support::toJsonValue<QString>(m_type);
|
|
||||||
result["MetadataFetchers"] = Jellyfin::Support::toJsonValue<QList<LibraryOptionInfoDto>>(m_metadataFetchers);
|
|
||||||
result["ImageFetchers"] = Jellyfin::Support::toJsonValue<QList<LibraryOptionInfoDto>>(m_imageFetchers);
|
if (!(m_type.isNull())) {
|
||||||
result["SupportedImageTypes"] = Jellyfin::Support::toJsonValue<QList<ImageType>>(m_supportedImageTypes);
|
result["Type"] = Jellyfin::Support::toJsonValue<QString>(m_type);
|
||||||
result["DefaultImageOptions"] = Jellyfin::Support::toJsonValue<QList<ImageOption>>(m_defaultImageOptions);
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_metadataFetchers.size() == 0)) {
|
||||||
|
result["MetadataFetchers"] = Jellyfin::Support::toJsonValue<QList<LibraryOptionInfoDto>>(m_metadataFetchers);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_imageFetchers.size() == 0)) {
|
||||||
|
result["ImageFetchers"] = Jellyfin::Support::toJsonValue<QList<LibraryOptionInfoDto>>(m_imageFetchers);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_supportedImageTypes.size() == 0)) {
|
||||||
|
result["SupportedImageTypes"] = Jellyfin::Support::toJsonValue<QList<ImageType>>(m_supportedImageTypes);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_defaultImageOptions.size() == 0)) {
|
||||||
|
result["DefaultImageOptions"] = Jellyfin::Support::toJsonValue<QList<ImageOption>>(m_defaultImageOptions);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,14 +75,38 @@ void LibraryUpdateInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject LibraryUpdateInfo::toJson() const {
|
QJsonObject LibraryUpdateInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["FoldersAddedTo"] = Jellyfin::Support::toJsonValue<QStringList>(m_foldersAddedTo);
|
|
||||||
result["FoldersRemovedFrom"] = Jellyfin::Support::toJsonValue<QStringList>(m_foldersRemovedFrom);
|
|
||||||
result["ItemsAdded"] = Jellyfin::Support::toJsonValue<QStringList>(m_itemsAdded);
|
|
||||||
result["ItemsRemoved"] = Jellyfin::Support::toJsonValue<QStringList>(m_itemsRemoved);
|
|
||||||
result["ItemsUpdated"] = Jellyfin::Support::toJsonValue<QStringList>(m_itemsUpdated);
|
|
||||||
result["CollectionFolders"] = Jellyfin::Support::toJsonValue<QStringList>(m_collectionFolders);
|
|
||||||
result["IsEmpty"] = Jellyfin::Support::toJsonValue<bool>(m_isEmpty);
|
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_foldersAddedTo.size() == 0)) {
|
||||||
|
result["FoldersAddedTo"] = Jellyfin::Support::toJsonValue<QStringList>(m_foldersAddedTo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_foldersRemovedFrom.size() == 0)) {
|
||||||
|
result["FoldersRemovedFrom"] = Jellyfin::Support::toJsonValue<QStringList>(m_foldersRemovedFrom);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_itemsAdded.size() == 0)) {
|
||||||
|
result["ItemsAdded"] = Jellyfin::Support::toJsonValue<QStringList>(m_itemsAdded);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_itemsRemoved.size() == 0)) {
|
||||||
|
result["ItemsRemoved"] = Jellyfin::Support::toJsonValue<QStringList>(m_itemsRemoved);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_itemsUpdated.size() == 0)) {
|
||||||
|
result["ItemsUpdated"] = Jellyfin::Support::toJsonValue<QStringList>(m_itemsUpdated);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_collectionFolders.size() == 0)) {
|
||||||
|
result["CollectionFolders"] = Jellyfin::Support::toJsonValue<QStringList>(m_collectionFolders);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["IsEmpty"] = Jellyfin::Support::toJsonValue<bool>(m_isEmpty);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -108,24 +108,92 @@ void ListingsProviderInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject ListingsProviderInfo::toJson() const {
|
QJsonObject ListingsProviderInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
|
||||||
result["Type"] = Jellyfin::Support::toJsonValue<QString>(m_type);
|
|
||||||
result["Username"] = Jellyfin::Support::toJsonValue<QString>(m_username);
|
if (!(m_jellyfinId.isNull())) {
|
||||||
result["Password"] = Jellyfin::Support::toJsonValue<QString>(m_password);
|
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||||
result["ListingsId"] = Jellyfin::Support::toJsonValue<QString>(m_listingsId);
|
}
|
||||||
result["ZipCode"] = Jellyfin::Support::toJsonValue<QString>(m_zipCode);
|
|
||||||
result["Country"] = Jellyfin::Support::toJsonValue<QString>(m_country);
|
|
||||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
if (!(m_type.isNull())) {
|
||||||
result["EnabledTuners"] = Jellyfin::Support::toJsonValue<QStringList>(m_enabledTuners);
|
result["Type"] = Jellyfin::Support::toJsonValue<QString>(m_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_username.isNull())) {
|
||||||
|
result["Username"] = Jellyfin::Support::toJsonValue<QString>(m_username);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_password.isNull())) {
|
||||||
|
result["Password"] = Jellyfin::Support::toJsonValue<QString>(m_password);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_listingsId.isNull())) {
|
||||||
|
result["ListingsId"] = Jellyfin::Support::toJsonValue<QString>(m_listingsId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_zipCode.isNull())) {
|
||||||
|
result["ZipCode"] = Jellyfin::Support::toJsonValue<QString>(m_zipCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_country.isNull())) {
|
||||||
|
result["Country"] = Jellyfin::Support::toJsonValue<QString>(m_country);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_path.isNull())) {
|
||||||
|
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_enabledTuners.size() == 0)) {
|
||||||
|
result["EnabledTuners"] = Jellyfin::Support::toJsonValue<QStringList>(m_enabledTuners);
|
||||||
|
}
|
||||||
|
|
||||||
result["EnableAllTuners"] = Jellyfin::Support::toJsonValue<bool>(m_enableAllTuners);
|
result["EnableAllTuners"] = Jellyfin::Support::toJsonValue<bool>(m_enableAllTuners);
|
||||||
result["NewsCategories"] = Jellyfin::Support::toJsonValue<QStringList>(m_newsCategories);
|
|
||||||
result["SportsCategories"] = Jellyfin::Support::toJsonValue<QStringList>(m_sportsCategories);
|
if (!(m_newsCategories.size() == 0)) {
|
||||||
result["KidsCategories"] = Jellyfin::Support::toJsonValue<QStringList>(m_kidsCategories);
|
result["NewsCategories"] = Jellyfin::Support::toJsonValue<QStringList>(m_newsCategories);
|
||||||
result["MovieCategories"] = Jellyfin::Support::toJsonValue<QStringList>(m_movieCategories);
|
}
|
||||||
result["ChannelMappings"] = Jellyfin::Support::toJsonValue<QList<NameValuePair>>(m_channelMappings);
|
|
||||||
result["MoviePrefix"] = Jellyfin::Support::toJsonValue<QString>(m_moviePrefix);
|
|
||||||
result["PreferredLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_preferredLanguage);
|
if (!(m_sportsCategories.size() == 0)) {
|
||||||
result["UserAgent"] = Jellyfin::Support::toJsonValue<QString>(m_userAgent);
|
result["SportsCategories"] = Jellyfin::Support::toJsonValue<QStringList>(m_sportsCategories);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_kidsCategories.size() == 0)) {
|
||||||
|
result["KidsCategories"] = Jellyfin::Support::toJsonValue<QStringList>(m_kidsCategories);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_movieCategories.size() == 0)) {
|
||||||
|
result["MovieCategories"] = Jellyfin::Support::toJsonValue<QStringList>(m_movieCategories);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_channelMappings.size() == 0)) {
|
||||||
|
result["ChannelMappings"] = Jellyfin::Support::toJsonValue<QList<NameValuePair>>(m_channelMappings);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_moviePrefix.isNull())) {
|
||||||
|
result["MoviePrefix"] = Jellyfin::Support::toJsonValue<QString>(m_moviePrefix);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_preferredLanguage.isNull())) {
|
||||||
|
result["PreferredLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_preferredLanguage);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_userAgent.isNull())) {
|
||||||
|
result["UserAgent"] = Jellyfin::Support::toJsonValue<QString>(m_userAgent);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,8 +57,8 @@ void LiveStreamResponse::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject LiveStreamResponse::toJson() const {
|
QJsonObject LiveStreamResponse::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["MediaSource"] = Jellyfin::Support::toJsonValue<QSharedPointer<MediaSourceInfo>>(m_mediaSource);
|
|
||||||
|
|
||||||
|
result["MediaSource"] = Jellyfin::Support::toJsonValue<QSharedPointer<MediaSourceInfo>>(m_mediaSource);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,9 +63,17 @@ void LiveTvInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject LiveTvInfo::toJson() const {
|
QJsonObject LiveTvInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Services"] = Jellyfin::Support::toJsonValue<QList<LiveTvServiceInfo>>(m_services);
|
|
||||||
|
|
||||||
|
if (!(m_services.size() == 0)) {
|
||||||
|
result["Services"] = Jellyfin::Support::toJsonValue<QList<LiveTvServiceInfo>>(m_services);
|
||||||
|
}
|
||||||
|
|
||||||
result["IsEnabled"] = Jellyfin::Support::toJsonValue<bool>(m_isEnabled);
|
result["IsEnabled"] = Jellyfin::Support::toJsonValue<bool>(m_isEnabled);
|
||||||
result["EnabledUsers"] = Jellyfin::Support::toJsonValue<QStringList>(m_enabledUsers);
|
|
||||||
|
if (!(m_enabledUsers.size() == 0)) {
|
||||||
|
result["EnabledUsers"] = Jellyfin::Support::toJsonValue<QStringList>(m_enabledUsers);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,14 +78,34 @@ void LiveTvServiceInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject LiveTvServiceInfo::toJson() const {
|
QJsonObject LiveTvServiceInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["HomePageUrl"] = Jellyfin::Support::toJsonValue<QString>(m_homePageUrl);
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_homePageUrl.isNull())) {
|
||||||
|
result["HomePageUrl"] = Jellyfin::Support::toJsonValue<QString>(m_homePageUrl);
|
||||||
|
}
|
||||||
|
|
||||||
result["Status"] = Jellyfin::Support::toJsonValue<LiveTvServiceStatus>(m_status);
|
result["Status"] = Jellyfin::Support::toJsonValue<LiveTvServiceStatus>(m_status);
|
||||||
result["StatusMessage"] = Jellyfin::Support::toJsonValue<QString>(m_statusMessage);
|
|
||||||
result["Version"] = Jellyfin::Support::toJsonValue<QString>(m_version);
|
if (!(m_statusMessage.isNull())) {
|
||||||
|
result["StatusMessage"] = Jellyfin::Support::toJsonValue<QString>(m_statusMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_version.isNull())) {
|
||||||
|
result["Version"] = Jellyfin::Support::toJsonValue<QString>(m_version);
|
||||||
|
}
|
||||||
|
|
||||||
result["HasUpdateAvailable"] = Jellyfin::Support::toJsonValue<bool>(m_hasUpdateAvailable);
|
result["HasUpdateAvailable"] = Jellyfin::Support::toJsonValue<bool>(m_hasUpdateAvailable);
|
||||||
result["IsVisible"] = Jellyfin::Support::toJsonValue<bool>(m_isVisible);
|
result["IsVisible"] = Jellyfin::Support::toJsonValue<bool>(m_isVisible);
|
||||||
result["Tuners"] = Jellyfin::Support::toJsonValue<QStringList>(m_tuners);
|
|
||||||
|
if (!(m_tuners.size() == 0)) {
|
||||||
|
result["Tuners"] = Jellyfin::Support::toJsonValue<QStringList>(m_tuners);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,8 +60,16 @@ void LocalizationOption::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject LocalizationOption::toJson() const {
|
QJsonObject LocalizationOption::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Value"] = Jellyfin::Support::toJsonValue<QString>(m_value);
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_value.isNull())) {
|
||||||
|
result["Value"] = Jellyfin::Support::toJsonValue<QString>(m_value);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,10 +66,14 @@ void LogFile::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject LogFile::toJson() const {
|
QJsonObject LogFile::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["DateCreated"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateCreated);
|
result["DateCreated"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateCreated);
|
||||||
result["DateModified"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateModified);
|
result["DateModified"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateModified);
|
||||||
result["Size"] = Jellyfin::Support::toJsonValue<qint64>(m_size);
|
result["Size"] = Jellyfin::Support::toJsonValue<qint64>(m_size);
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,13 +75,37 @@ void MediaAttachment::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject MediaAttachment::toJson() const {
|
QJsonObject MediaAttachment::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Codec"] = Jellyfin::Support::toJsonValue<QString>(m_codec);
|
|
||||||
result["CodecTag"] = Jellyfin::Support::toJsonValue<QString>(m_codecTag);
|
|
||||||
result["Comment"] = Jellyfin::Support::toJsonValue<QString>(m_comment);
|
if (!(m_codec.isNull())) {
|
||||||
|
result["Codec"] = Jellyfin::Support::toJsonValue<QString>(m_codec);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_codecTag.isNull())) {
|
||||||
|
result["CodecTag"] = Jellyfin::Support::toJsonValue<QString>(m_codecTag);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_comment.isNull())) {
|
||||||
|
result["Comment"] = Jellyfin::Support::toJsonValue<QString>(m_comment);
|
||||||
|
}
|
||||||
|
|
||||||
result["Index"] = Jellyfin::Support::toJsonValue<qint32>(m_index);
|
result["Index"] = Jellyfin::Support::toJsonValue<qint32>(m_index);
|
||||||
result["FileName"] = Jellyfin::Support::toJsonValue<QString>(m_fileName);
|
|
||||||
result["MimeType"] = Jellyfin::Support::toJsonValue<QString>(m_mimeType);
|
if (!(m_fileName.isNull())) {
|
||||||
result["DeliveryUrl"] = Jellyfin::Support::toJsonValue<QString>(m_deliveryUrl);
|
result["FileName"] = Jellyfin::Support::toJsonValue<QString>(m_fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_mimeType.isNull())) {
|
||||||
|
result["MimeType"] = Jellyfin::Support::toJsonValue<QString>(m_mimeType);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_deliveryUrl.isNull())) {
|
||||||
|
result["DeliveryUrl"] = Jellyfin::Support::toJsonValue<QString>(m_deliveryUrl);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,8 +60,16 @@ void MediaEncoderPathDto::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject MediaEncoderPathDto::toJson() const {
|
QJsonObject MediaEncoderPathDto::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
|
||||||
result["PathType"] = Jellyfin::Support::toJsonValue<QString>(m_pathType);
|
|
||||||
|
if (!(m_path.isNull())) {
|
||||||
|
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_pathType.isNull())) {
|
||||||
|
result["PathType"] = Jellyfin::Support::toJsonValue<QString>(m_pathType);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,10 +63,14 @@ void MediaPathDto::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject MediaPathDto::toJson() const {
|
QJsonObject MediaPathDto::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
|
||||||
result["PathInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<MediaPathInfo>>(m_pathInfo);
|
|
||||||
|
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
|
||||||
|
if (!(m_path.isNull())) {
|
||||||
|
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["PathInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<MediaPathInfo>>(m_pathInfo);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,8 +60,16 @@ void MediaPathInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject MediaPathInfo::toJson() const {
|
QJsonObject MediaPathInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
|
||||||
result["NetworkPath"] = Jellyfin::Support::toJsonValue<QString>(m_networkPath);
|
|
||||||
|
if (!(m_path.isNull())) {
|
||||||
|
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_networkPath.isNull())) {
|
||||||
|
result["NetworkPath"] = Jellyfin::Support::toJsonValue<QString>(m_networkPath);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,18 +180,51 @@ void MediaSourceInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject MediaSourceInfo::toJson() const {
|
QJsonObject MediaSourceInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["Protocol"] = Jellyfin::Support::toJsonValue<MediaProtocol>(m_protocol);
|
result["Protocol"] = Jellyfin::Support::toJsonValue<MediaProtocol>(m_protocol);
|
||||||
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
|
||||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
if (!(m_jellyfinId.isNull())) {
|
||||||
result["EncoderPath"] = Jellyfin::Support::toJsonValue<QString>(m_encoderPath);
|
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_path.isNull())) {
|
||||||
|
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_encoderPath.isNull())) {
|
||||||
|
result["EncoderPath"] = Jellyfin::Support::toJsonValue<QString>(m_encoderPath);
|
||||||
|
}
|
||||||
|
|
||||||
result["EncoderProtocol"] = Jellyfin::Support::toJsonValue<MediaProtocol>(m_encoderProtocol);
|
result["EncoderProtocol"] = Jellyfin::Support::toJsonValue<MediaProtocol>(m_encoderProtocol);
|
||||||
result["Type"] = Jellyfin::Support::toJsonValue<MediaSourceType>(m_type);
|
result["Type"] = Jellyfin::Support::toJsonValue<MediaSourceType>(m_type);
|
||||||
result["Container"] = Jellyfin::Support::toJsonValue<QString>(m_container);
|
|
||||||
result["Size"] = Jellyfin::Support::toJsonValue<std::optional<qint64>>(m_size);
|
if (!(m_container.isNull())) {
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
result["Container"] = Jellyfin::Support::toJsonValue<QString>(m_container);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_size.has_value())) {
|
||||||
|
result["Size"] = Jellyfin::Support::toJsonValue<std::optional<qint64>>(m_size);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
result["IsRemote"] = Jellyfin::Support::toJsonValue<bool>(m_isRemote);
|
result["IsRemote"] = Jellyfin::Support::toJsonValue<bool>(m_isRemote);
|
||||||
result["ETag"] = Jellyfin::Support::toJsonValue<QString>(m_eTag);
|
|
||||||
result["RunTimeTicks"] = Jellyfin::Support::toJsonValue<std::optional<qint64>>(m_runTimeTicks);
|
if (!(m_eTag.isNull())) {
|
||||||
|
result["ETag"] = Jellyfin::Support::toJsonValue<QString>(m_eTag);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_runTimeTicks.has_value())) {
|
||||||
|
result["RunTimeTicks"] = Jellyfin::Support::toJsonValue<std::optional<qint64>>(m_runTimeTicks);
|
||||||
|
}
|
||||||
|
|
||||||
result["ReadAtNativeFramerate"] = Jellyfin::Support::toJsonValue<bool>(m_readAtNativeFramerate);
|
result["ReadAtNativeFramerate"] = Jellyfin::Support::toJsonValue<bool>(m_readAtNativeFramerate);
|
||||||
result["IgnoreDts"] = Jellyfin::Support::toJsonValue<bool>(m_ignoreDts);
|
result["IgnoreDts"] = Jellyfin::Support::toJsonValue<bool>(m_ignoreDts);
|
||||||
result["IgnoreIndex"] = Jellyfin::Support::toJsonValue<bool>(m_ignoreIndex);
|
result["IgnoreIndex"] = Jellyfin::Support::toJsonValue<bool>(m_ignoreIndex);
|
||||||
|
@ -201,27 +234,82 @@ QJsonObject MediaSourceInfo::toJson() const {
|
||||||
result["SupportsDirectPlay"] = Jellyfin::Support::toJsonValue<bool>(m_supportsDirectPlay);
|
result["SupportsDirectPlay"] = Jellyfin::Support::toJsonValue<bool>(m_supportsDirectPlay);
|
||||||
result["IsInfiniteStream"] = Jellyfin::Support::toJsonValue<bool>(m_isInfiniteStream);
|
result["IsInfiniteStream"] = Jellyfin::Support::toJsonValue<bool>(m_isInfiniteStream);
|
||||||
result["RequiresOpening"] = Jellyfin::Support::toJsonValue<bool>(m_requiresOpening);
|
result["RequiresOpening"] = Jellyfin::Support::toJsonValue<bool>(m_requiresOpening);
|
||||||
result["OpenToken"] = Jellyfin::Support::toJsonValue<QString>(m_openToken);
|
|
||||||
|
if (!(m_openToken.isNull())) {
|
||||||
|
result["OpenToken"] = Jellyfin::Support::toJsonValue<QString>(m_openToken);
|
||||||
|
}
|
||||||
|
|
||||||
result["RequiresClosing"] = Jellyfin::Support::toJsonValue<bool>(m_requiresClosing);
|
result["RequiresClosing"] = Jellyfin::Support::toJsonValue<bool>(m_requiresClosing);
|
||||||
result["LiveStreamId"] = Jellyfin::Support::toJsonValue<QString>(m_liveStreamId);
|
|
||||||
result["BufferMs"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_bufferMs);
|
if (!(m_liveStreamId.isNull())) {
|
||||||
|
result["LiveStreamId"] = Jellyfin::Support::toJsonValue<QString>(m_liveStreamId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_bufferMs.has_value())) {
|
||||||
|
result["BufferMs"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_bufferMs);
|
||||||
|
}
|
||||||
|
|
||||||
result["RequiresLooping"] = Jellyfin::Support::toJsonValue<bool>(m_requiresLooping);
|
result["RequiresLooping"] = Jellyfin::Support::toJsonValue<bool>(m_requiresLooping);
|
||||||
result["SupportsProbing"] = Jellyfin::Support::toJsonValue<bool>(m_supportsProbing);
|
result["SupportsProbing"] = Jellyfin::Support::toJsonValue<bool>(m_supportsProbing);
|
||||||
result["VideoType"] = Jellyfin::Support::toJsonValue<VideoType>(m_videoType);
|
result["VideoType"] = Jellyfin::Support::toJsonValue<VideoType>(m_videoType);
|
||||||
result["IsoType"] = Jellyfin::Support::toJsonValue<IsoType>(m_isoType);
|
result["IsoType"] = Jellyfin::Support::toJsonValue<IsoType>(m_isoType);
|
||||||
result["Video3DFormat"] = Jellyfin::Support::toJsonValue<Video3DFormat>(m_video3DFormat);
|
result["Video3DFormat"] = Jellyfin::Support::toJsonValue<Video3DFormat>(m_video3DFormat);
|
||||||
result["MediaStreams"] = Jellyfin::Support::toJsonValue<QList<MediaStream>>(m_mediaStreams);
|
|
||||||
result["MediaAttachments"] = Jellyfin::Support::toJsonValue<QList<MediaAttachment>>(m_mediaAttachments);
|
if (!(m_mediaStreams.size() == 0)) {
|
||||||
result["Formats"] = Jellyfin::Support::toJsonValue<QStringList>(m_formats);
|
result["MediaStreams"] = Jellyfin::Support::toJsonValue<QList<MediaStream>>(m_mediaStreams);
|
||||||
result["Bitrate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_bitrate);
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_mediaAttachments.size() == 0)) {
|
||||||
|
result["MediaAttachments"] = Jellyfin::Support::toJsonValue<QList<MediaAttachment>>(m_mediaAttachments);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_formats.size() == 0)) {
|
||||||
|
result["Formats"] = Jellyfin::Support::toJsonValue<QStringList>(m_formats);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_bitrate.has_value())) {
|
||||||
|
result["Bitrate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_bitrate);
|
||||||
|
}
|
||||||
|
|
||||||
result["Timestamp"] = Jellyfin::Support::toJsonValue<TransportStreamTimestamp>(m_timestamp);
|
result["Timestamp"] = Jellyfin::Support::toJsonValue<TransportStreamTimestamp>(m_timestamp);
|
||||||
result["RequiredHttpHeaders"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_requiredHttpHeaders);
|
|
||||||
result["TranscodingUrl"] = Jellyfin::Support::toJsonValue<QString>(m_transcodingUrl);
|
if (!(m_requiredHttpHeaders.isEmpty())) {
|
||||||
result["TranscodingSubProtocol"] = Jellyfin::Support::toJsonValue<QString>(m_transcodingSubProtocol);
|
result["RequiredHttpHeaders"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_requiredHttpHeaders);
|
||||||
result["TranscodingContainer"] = Jellyfin::Support::toJsonValue<QString>(m_transcodingContainer);
|
}
|
||||||
result["AnalyzeDurationMs"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_analyzeDurationMs);
|
|
||||||
result["DefaultAudioStreamIndex"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_defaultAudioStreamIndex);
|
|
||||||
result["DefaultSubtitleStreamIndex"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_defaultSubtitleStreamIndex);
|
if (!(m_transcodingUrl.isNull())) {
|
||||||
|
result["TranscodingUrl"] = Jellyfin::Support::toJsonValue<QString>(m_transcodingUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_transcodingSubProtocol.isNull())) {
|
||||||
|
result["TranscodingSubProtocol"] = Jellyfin::Support::toJsonValue<QString>(m_transcodingSubProtocol);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_transcodingContainer.isNull())) {
|
||||||
|
result["TranscodingContainer"] = Jellyfin::Support::toJsonValue<QString>(m_transcodingContainer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_analyzeDurationMs.has_value())) {
|
||||||
|
result["AnalyzeDurationMs"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_analyzeDurationMs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_defaultAudioStreamIndex.has_value())) {
|
||||||
|
result["DefaultAudioStreamIndex"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_defaultAudioStreamIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_defaultSubtitleStreamIndex.has_value())) {
|
||||||
|
result["DefaultSubtitleStreamIndex"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_defaultSubtitleStreamIndex);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -195,53 +195,205 @@ void MediaStream::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject MediaStream::toJson() const {
|
QJsonObject MediaStream::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Codec"] = Jellyfin::Support::toJsonValue<QString>(m_codec);
|
|
||||||
result["CodecTag"] = Jellyfin::Support::toJsonValue<QString>(m_codecTag);
|
|
||||||
result["Language"] = Jellyfin::Support::toJsonValue<QString>(m_language);
|
if (!(m_codec.isNull())) {
|
||||||
result["ColorRange"] = Jellyfin::Support::toJsonValue<QString>(m_colorRange);
|
result["Codec"] = Jellyfin::Support::toJsonValue<QString>(m_codec);
|
||||||
result["ColorSpace"] = Jellyfin::Support::toJsonValue<QString>(m_colorSpace);
|
}
|
||||||
result["ColorTransfer"] = Jellyfin::Support::toJsonValue<QString>(m_colorTransfer);
|
|
||||||
result["ColorPrimaries"] = Jellyfin::Support::toJsonValue<QString>(m_colorPrimaries);
|
|
||||||
result["Comment"] = Jellyfin::Support::toJsonValue<QString>(m_comment);
|
if (!(m_codecTag.isNull())) {
|
||||||
result["TimeBase"] = Jellyfin::Support::toJsonValue<QString>(m_timeBase);
|
result["CodecTag"] = Jellyfin::Support::toJsonValue<QString>(m_codecTag);
|
||||||
result["CodecTimeBase"] = Jellyfin::Support::toJsonValue<QString>(m_codecTimeBase);
|
}
|
||||||
result["Title"] = Jellyfin::Support::toJsonValue<QString>(m_title);
|
|
||||||
result["VideoRange"] = Jellyfin::Support::toJsonValue<QString>(m_videoRange);
|
|
||||||
result["localizedUndefined"] = Jellyfin::Support::toJsonValue<QString>(m_localizedUndefined);
|
if (!(m_language.isNull())) {
|
||||||
result["localizedDefault"] = Jellyfin::Support::toJsonValue<QString>(m_localizedDefault);
|
result["Language"] = Jellyfin::Support::toJsonValue<QString>(m_language);
|
||||||
result["localizedForced"] = Jellyfin::Support::toJsonValue<QString>(m_localizedForced);
|
}
|
||||||
result["DisplayTitle"] = Jellyfin::Support::toJsonValue<QString>(m_displayTitle);
|
|
||||||
result["NalLengthSize"] = Jellyfin::Support::toJsonValue<QString>(m_nalLengthSize);
|
|
||||||
|
if (!(m_colorRange.isNull())) {
|
||||||
|
result["ColorRange"] = Jellyfin::Support::toJsonValue<QString>(m_colorRange);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_colorSpace.isNull())) {
|
||||||
|
result["ColorSpace"] = Jellyfin::Support::toJsonValue<QString>(m_colorSpace);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_colorTransfer.isNull())) {
|
||||||
|
result["ColorTransfer"] = Jellyfin::Support::toJsonValue<QString>(m_colorTransfer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_colorPrimaries.isNull())) {
|
||||||
|
result["ColorPrimaries"] = Jellyfin::Support::toJsonValue<QString>(m_colorPrimaries);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_comment.isNull())) {
|
||||||
|
result["Comment"] = Jellyfin::Support::toJsonValue<QString>(m_comment);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_timeBase.isNull())) {
|
||||||
|
result["TimeBase"] = Jellyfin::Support::toJsonValue<QString>(m_timeBase);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_codecTimeBase.isNull())) {
|
||||||
|
result["CodecTimeBase"] = Jellyfin::Support::toJsonValue<QString>(m_codecTimeBase);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_title.isNull())) {
|
||||||
|
result["Title"] = Jellyfin::Support::toJsonValue<QString>(m_title);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_videoRange.isNull())) {
|
||||||
|
result["VideoRange"] = Jellyfin::Support::toJsonValue<QString>(m_videoRange);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_localizedUndefined.isNull())) {
|
||||||
|
result["localizedUndefined"] = Jellyfin::Support::toJsonValue<QString>(m_localizedUndefined);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_localizedDefault.isNull())) {
|
||||||
|
result["localizedDefault"] = Jellyfin::Support::toJsonValue<QString>(m_localizedDefault);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_localizedForced.isNull())) {
|
||||||
|
result["localizedForced"] = Jellyfin::Support::toJsonValue<QString>(m_localizedForced);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_displayTitle.isNull())) {
|
||||||
|
result["DisplayTitle"] = Jellyfin::Support::toJsonValue<QString>(m_displayTitle);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_nalLengthSize.isNull())) {
|
||||||
|
result["NalLengthSize"] = Jellyfin::Support::toJsonValue<QString>(m_nalLengthSize);
|
||||||
|
}
|
||||||
|
|
||||||
result["IsInterlaced"] = Jellyfin::Support::toJsonValue<bool>(m_isInterlaced);
|
result["IsInterlaced"] = Jellyfin::Support::toJsonValue<bool>(m_isInterlaced);
|
||||||
result["IsAVC"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isAVC);
|
|
||||||
result["ChannelLayout"] = Jellyfin::Support::toJsonValue<QString>(m_channelLayout);
|
if (!(!m_isAVC.has_value())) {
|
||||||
result["BitRate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_bitRate);
|
result["IsAVC"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isAVC);
|
||||||
result["BitDepth"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_bitDepth);
|
}
|
||||||
result["RefFrames"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_refFrames);
|
|
||||||
result["PacketLength"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_packetLength);
|
|
||||||
result["Channels"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_channels);
|
if (!(m_channelLayout.isNull())) {
|
||||||
result["SampleRate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_sampleRate);
|
result["ChannelLayout"] = Jellyfin::Support::toJsonValue<QString>(m_channelLayout);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_bitRate.has_value())) {
|
||||||
|
result["BitRate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_bitRate);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_bitDepth.has_value())) {
|
||||||
|
result["BitDepth"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_bitDepth);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_refFrames.has_value())) {
|
||||||
|
result["RefFrames"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_refFrames);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_packetLength.has_value())) {
|
||||||
|
result["PacketLength"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_packetLength);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_channels.has_value())) {
|
||||||
|
result["Channels"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_channels);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_sampleRate.has_value())) {
|
||||||
|
result["SampleRate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_sampleRate);
|
||||||
|
}
|
||||||
|
|
||||||
result["IsDefault"] = Jellyfin::Support::toJsonValue<bool>(m_isDefault);
|
result["IsDefault"] = Jellyfin::Support::toJsonValue<bool>(m_isDefault);
|
||||||
result["IsForced"] = Jellyfin::Support::toJsonValue<bool>(m_isForced);
|
result["IsForced"] = Jellyfin::Support::toJsonValue<bool>(m_isForced);
|
||||||
result["Height"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_height);
|
|
||||||
result["Width"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_width);
|
if (!(!m_height.has_value())) {
|
||||||
result["AverageFrameRate"] = Jellyfin::Support::toJsonValue<std::optional<float>>(m_averageFrameRate);
|
result["Height"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_height);
|
||||||
result["RealFrameRate"] = Jellyfin::Support::toJsonValue<std::optional<float>>(m_realFrameRate);
|
}
|
||||||
result["Profile"] = Jellyfin::Support::toJsonValue<QString>(m_profile);
|
|
||||||
|
|
||||||
|
if (!(!m_width.has_value())) {
|
||||||
|
result["Width"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_width);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_averageFrameRate.has_value())) {
|
||||||
|
result["AverageFrameRate"] = Jellyfin::Support::toJsonValue<std::optional<float>>(m_averageFrameRate);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_realFrameRate.has_value())) {
|
||||||
|
result["RealFrameRate"] = Jellyfin::Support::toJsonValue<std::optional<float>>(m_realFrameRate);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_profile.isNull())) {
|
||||||
|
result["Profile"] = Jellyfin::Support::toJsonValue<QString>(m_profile);
|
||||||
|
}
|
||||||
|
|
||||||
result["Type"] = Jellyfin::Support::toJsonValue<MediaStreamType>(m_type);
|
result["Type"] = Jellyfin::Support::toJsonValue<MediaStreamType>(m_type);
|
||||||
result["AspectRatio"] = Jellyfin::Support::toJsonValue<QString>(m_aspectRatio);
|
|
||||||
|
if (!(m_aspectRatio.isNull())) {
|
||||||
|
result["AspectRatio"] = Jellyfin::Support::toJsonValue<QString>(m_aspectRatio);
|
||||||
|
}
|
||||||
|
|
||||||
result["Index"] = Jellyfin::Support::toJsonValue<qint32>(m_index);
|
result["Index"] = Jellyfin::Support::toJsonValue<qint32>(m_index);
|
||||||
result["Score"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_score);
|
|
||||||
|
if (!(!m_score.has_value())) {
|
||||||
|
result["Score"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_score);
|
||||||
|
}
|
||||||
|
|
||||||
result["IsExternal"] = Jellyfin::Support::toJsonValue<bool>(m_isExternal);
|
result["IsExternal"] = Jellyfin::Support::toJsonValue<bool>(m_isExternal);
|
||||||
result["DeliveryMethod"] = Jellyfin::Support::toJsonValue<SubtitleDeliveryMethod>(m_deliveryMethod);
|
result["DeliveryMethod"] = Jellyfin::Support::toJsonValue<SubtitleDeliveryMethod>(m_deliveryMethod);
|
||||||
result["DeliveryUrl"] = Jellyfin::Support::toJsonValue<QString>(m_deliveryUrl);
|
|
||||||
result["IsExternalUrl"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isExternalUrl);
|
if (!(m_deliveryUrl.isNull())) {
|
||||||
|
result["DeliveryUrl"] = Jellyfin::Support::toJsonValue<QString>(m_deliveryUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_isExternalUrl.has_value())) {
|
||||||
|
result["IsExternalUrl"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isExternalUrl);
|
||||||
|
}
|
||||||
|
|
||||||
result["IsTextSubtitleStream"] = Jellyfin::Support::toJsonValue<bool>(m_isTextSubtitleStream);
|
result["IsTextSubtitleStream"] = Jellyfin::Support::toJsonValue<bool>(m_isTextSubtitleStream);
|
||||||
result["SupportsExternalStream"] = Jellyfin::Support::toJsonValue<bool>(m_supportsExternalStream);
|
result["SupportsExternalStream"] = Jellyfin::Support::toJsonValue<bool>(m_supportsExternalStream);
|
||||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
|
||||||
result["PixelFormat"] = Jellyfin::Support::toJsonValue<QString>(m_pixelFormat);
|
if (!(m_path.isNull())) {
|
||||||
result["Level"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_level);
|
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||||
result["IsAnamorphic"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isAnamorphic);
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_pixelFormat.isNull())) {
|
||||||
|
result["PixelFormat"] = Jellyfin::Support::toJsonValue<QString>(m_pixelFormat);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_level.has_value())) {
|
||||||
|
result["Level"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_level);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_isAnamorphic.has_value())) {
|
||||||
|
result["IsAnamorphic"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isAnamorphic);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,8 +60,16 @@ void MediaUpdateInfoDto::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject MediaUpdateInfoDto::toJson() const {
|
QJsonObject MediaUpdateInfoDto::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
|
||||||
result["UpdateType"] = Jellyfin::Support::toJsonValue<QString>(m_updateType);
|
|
||||||
|
if (!(m_path.isNull())) {
|
||||||
|
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_updateType.isNull())) {
|
||||||
|
result["UpdateType"] = Jellyfin::Support::toJsonValue<QString>(m_updateType);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,8 +60,16 @@ void MediaUrl::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject MediaUrl::toJson() const {
|
QJsonObject MediaUrl::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Url"] = Jellyfin::Support::toJsonValue<QString>(m_url);
|
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
|
if (!(m_url.isNull())) {
|
||||||
|
result["Url"] = Jellyfin::Support::toJsonValue<QString>(m_url);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,12 +72,36 @@ void MetadataEditorInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject MetadataEditorInfo::toJson() const {
|
QJsonObject MetadataEditorInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["ParentalRatingOptions"] = Jellyfin::Support::toJsonValue<QList<ParentalRating>>(m_parentalRatingOptions);
|
|
||||||
result["Countries"] = Jellyfin::Support::toJsonValue<QList<CountryInfo>>(m_countries);
|
|
||||||
result["Cultures"] = Jellyfin::Support::toJsonValue<QList<CultureDto>>(m_cultures);
|
if (!(m_parentalRatingOptions.size() == 0)) {
|
||||||
result["ExternalIdInfos"] = Jellyfin::Support::toJsonValue<QList<ExternalIdInfo>>(m_externalIdInfos);
|
result["ParentalRatingOptions"] = Jellyfin::Support::toJsonValue<QList<ParentalRating>>(m_parentalRatingOptions);
|
||||||
result["ContentType"] = Jellyfin::Support::toJsonValue<QString>(m_contentType);
|
}
|
||||||
result["ContentTypeOptions"] = Jellyfin::Support::toJsonValue<QList<NameValuePair>>(m_contentTypeOptions);
|
|
||||||
|
|
||||||
|
if (!(m_countries.size() == 0)) {
|
||||||
|
result["Countries"] = Jellyfin::Support::toJsonValue<QList<CountryInfo>>(m_countries);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_cultures.size() == 0)) {
|
||||||
|
result["Cultures"] = Jellyfin::Support::toJsonValue<QList<CultureDto>>(m_cultures);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_externalIdInfos.size() == 0)) {
|
||||||
|
result["ExternalIdInfos"] = Jellyfin::Support::toJsonValue<QList<ExternalIdInfo>>(m_externalIdInfos);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_contentType.isNull())) {
|
||||||
|
result["ContentType"] = Jellyfin::Support::toJsonValue<QString>(m_contentType);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_contentTypeOptions.size() == 0)) {
|
||||||
|
result["ContentTypeOptions"] = Jellyfin::Support::toJsonValue<QList<NameValuePair>>(m_contentTypeOptions);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,13 +75,41 @@ void MetadataOptions::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject MetadataOptions::toJson() const {
|
QJsonObject MetadataOptions::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["ItemType"] = Jellyfin::Support::toJsonValue<QString>(m_itemType);
|
|
||||||
result["DisabledMetadataSavers"] = Jellyfin::Support::toJsonValue<QStringList>(m_disabledMetadataSavers);
|
|
||||||
result["LocalMetadataReaderOrder"] = Jellyfin::Support::toJsonValue<QStringList>(m_localMetadataReaderOrder);
|
if (!(m_itemType.isNull())) {
|
||||||
result["DisabledMetadataFetchers"] = Jellyfin::Support::toJsonValue<QStringList>(m_disabledMetadataFetchers);
|
result["ItemType"] = Jellyfin::Support::toJsonValue<QString>(m_itemType);
|
||||||
result["MetadataFetcherOrder"] = Jellyfin::Support::toJsonValue<QStringList>(m_metadataFetcherOrder);
|
}
|
||||||
result["DisabledImageFetchers"] = Jellyfin::Support::toJsonValue<QStringList>(m_disabledImageFetchers);
|
|
||||||
result["ImageFetcherOrder"] = Jellyfin::Support::toJsonValue<QStringList>(m_imageFetcherOrder);
|
|
||||||
|
if (!(m_disabledMetadataSavers.size() == 0)) {
|
||||||
|
result["DisabledMetadataSavers"] = Jellyfin::Support::toJsonValue<QStringList>(m_disabledMetadataSavers);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_localMetadataReaderOrder.size() == 0)) {
|
||||||
|
result["LocalMetadataReaderOrder"] = Jellyfin::Support::toJsonValue<QStringList>(m_localMetadataReaderOrder);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_disabledMetadataFetchers.size() == 0)) {
|
||||||
|
result["DisabledMetadataFetchers"] = Jellyfin::Support::toJsonValue<QStringList>(m_disabledMetadataFetchers);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_metadataFetcherOrder.size() == 0)) {
|
||||||
|
result["MetadataFetcherOrder"] = Jellyfin::Support::toJsonValue<QStringList>(m_metadataFetcherOrder);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_disabledImageFetchers.size() == 0)) {
|
||||||
|
result["DisabledImageFetchers"] = Jellyfin::Support::toJsonValue<QStringList>(m_disabledImageFetchers);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_imageFetcherOrder.size() == 0)) {
|
||||||
|
result["ImageFetcherOrder"] = Jellyfin::Support::toJsonValue<QStringList>(m_imageFetcherOrder);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,9 +60,9 @@ void MovePlaylistItemRequestDto::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject MovePlaylistItemRequestDto::toJson() const {
|
QJsonObject MovePlaylistItemRequestDto::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["PlaylistItemId"] = Jellyfin::Support::toJsonValue<QString>(m_playlistItemId);
|
result["PlaylistItemId"] = Jellyfin::Support::toJsonValue<QString>(m_playlistItemId);
|
||||||
result["NewIndex"] = Jellyfin::Support::toJsonValue<qint32>(m_newIndex);
|
result["NewIndex"] = Jellyfin::Support::toJsonValue<qint32>(m_newIndex);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,17 +84,53 @@ void MovieInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject MovieInfo::toJson() const {
|
QJsonObject MovieInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
|
||||||
result["MetadataLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_metadataLanguage);
|
|
||||||
result["MetadataCountryCode"] = Jellyfin::Support::toJsonValue<QString>(m_metadataCountryCode);
|
|
||||||
result["ProviderIds"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_providerIds);
|
|
||||||
result["Year"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_year);
|
|
||||||
result["IndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_indexNumber);
|
|
||||||
result["ParentIndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_parentIndexNumber);
|
|
||||||
result["PremiereDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_premiereDate);
|
|
||||||
result["IsAutomated"] = Jellyfin::Support::toJsonValue<bool>(m_isAutomated);
|
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_path.isNull())) {
|
||||||
|
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_metadataLanguage.isNull())) {
|
||||||
|
result["MetadataLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_metadataLanguage);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_metadataCountryCode.isNull())) {
|
||||||
|
result["MetadataCountryCode"] = Jellyfin::Support::toJsonValue<QString>(m_metadataCountryCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_providerIds.isEmpty())) {
|
||||||
|
result["ProviderIds"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_providerIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_year.has_value())) {
|
||||||
|
result["Year"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_year);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_indexNumber.has_value())) {
|
||||||
|
result["IndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_indexNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_parentIndexNumber.has_value())) {
|
||||||
|
result["ParentIndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_parentIndexNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_premiereDate.isNull())) {
|
||||||
|
result["PremiereDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_premiereDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["IsAutomated"] = Jellyfin::Support::toJsonValue<bool>(m_isAutomated);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,11 +66,15 @@ void MovieInfoRemoteSearchQuery::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject MovieInfoRemoteSearchQuery::toJson() const {
|
QJsonObject MovieInfoRemoteSearchQuery::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["SearchInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<MovieInfo>>(m_searchInfo);
|
result["SearchInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<MovieInfo>>(m_searchInfo);
|
||||||
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
||||||
result["SearchProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_searchProviderName);
|
|
||||||
result["IncludeDisabledProviders"] = Jellyfin::Support::toJsonValue<bool>(m_includeDisabledProviders);
|
|
||||||
|
|
||||||
|
if (!(m_searchProviderName.isNull())) {
|
||||||
|
result["SearchProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_searchProviderName);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["IncludeDisabledProviders"] = Jellyfin::Support::toJsonValue<bool>(m_includeDisabledProviders);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,17 +87,57 @@ void MusicVideoInfo::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject MusicVideoInfo::toJson() const {
|
QJsonObject MusicVideoInfo::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
|
||||||
result["MetadataLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_metadataLanguage);
|
if (!(m_name.isNull())) {
|
||||||
result["MetadataCountryCode"] = Jellyfin::Support::toJsonValue<QString>(m_metadataCountryCode);
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
result["ProviderIds"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_providerIds);
|
}
|
||||||
result["Year"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_year);
|
|
||||||
result["IndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_indexNumber);
|
|
||||||
result["ParentIndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_parentIndexNumber);
|
if (!(m_path.isNull())) {
|
||||||
result["PremiereDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_premiereDate);
|
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_metadataLanguage.isNull())) {
|
||||||
|
result["MetadataLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_metadataLanguage);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_metadataCountryCode.isNull())) {
|
||||||
|
result["MetadataCountryCode"] = Jellyfin::Support::toJsonValue<QString>(m_metadataCountryCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_providerIds.isEmpty())) {
|
||||||
|
result["ProviderIds"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_providerIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_year.has_value())) {
|
||||||
|
result["Year"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_year);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_indexNumber.has_value())) {
|
||||||
|
result["IndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_indexNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_parentIndexNumber.has_value())) {
|
||||||
|
result["ParentIndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_parentIndexNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_premiereDate.isNull())) {
|
||||||
|
result["PremiereDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_premiereDate);
|
||||||
|
}
|
||||||
|
|
||||||
result["IsAutomated"] = Jellyfin::Support::toJsonValue<bool>(m_isAutomated);
|
result["IsAutomated"] = Jellyfin::Support::toJsonValue<bool>(m_isAutomated);
|
||||||
result["Artists"] = Jellyfin::Support::toJsonValue<QStringList>(m_artists);
|
|
||||||
|
if (!(m_artists.size() == 0)) {
|
||||||
|
result["Artists"] = Jellyfin::Support::toJsonValue<QStringList>(m_artists);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,11 +66,15 @@ void MusicVideoInfoRemoteSearchQuery::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject MusicVideoInfoRemoteSearchQuery::toJson() const {
|
QJsonObject MusicVideoInfoRemoteSearchQuery::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
|
|
||||||
result["SearchInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<MusicVideoInfo>>(m_searchInfo);
|
result["SearchInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<MusicVideoInfo>>(m_searchInfo);
|
||||||
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
||||||
result["SearchProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_searchProviderName);
|
|
||||||
result["IncludeDisabledProviders"] = Jellyfin::Support::toJsonValue<bool>(m_includeDisabledProviders);
|
|
||||||
|
|
||||||
|
if (!(m_searchProviderName.isNull())) {
|
||||||
|
result["SearchProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_searchProviderName);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["IncludeDisabledProviders"] = Jellyfin::Support::toJsonValue<bool>(m_includeDisabledProviders);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,9 +60,13 @@ void NameGuidPair::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject NameGuidPair::toJson() const {
|
QJsonObject NameGuidPair::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,8 +60,16 @@ void NameIdPair::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject NameIdPair::toJson() const {
|
QJsonObject NameIdPair::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_jellyfinId.isNull())) {
|
||||||
|
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,8 +60,16 @@ void NameValuePair::setFromJson(QJsonObject source) {
|
||||||
|
|
||||||
QJsonObject NameValuePair::toJson() const {
|
QJsonObject NameValuePair::toJson() const {
|
||||||
QJsonObject result;
|
QJsonObject result;
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
|
||||||
result["Value"] = Jellyfin::Support::toJsonValue<QString>(m_value);
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_value.isNull())) {
|
||||||
|
result["Value"] = Jellyfin::Support::toJsonValue<QString>(m_value);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue