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["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
result["Id"] = Jellyfin::Support::toJsonValue<qint32>(m_jellyfinId);
|
||||||
result["DayOfWeek"] = Jellyfin::Support::toJsonValue<DynamicDayOfWeek>(m_dayOfWeek);
|
result["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
||||||
result["StartHour"] = Jellyfin::Support::toJsonValue<double>(m_startHour);
|
result["DayOfWeek"] = Jellyfin::Support::toJsonValue<DynamicDayOfWeek>(m_dayOfWeek);
|
||||||
result["EndHour"] = Jellyfin::Support::toJsonValue<double>(m_endHour);
|
result["StartHour"] = Jellyfin::Support::toJsonValue<double>(m_startHour);
|
||||||
|
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["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
result["Id"] = Jellyfin::Support::toJsonValue<qint64>(m_jellyfinId);
|
||||||
result["Overview"] = Jellyfin::Support::toJsonValue<QString>(m_overview);
|
|
||||||
result["ShortOverview"] = Jellyfin::Support::toJsonValue<QString>(m_shortOverview);
|
if (!(m_name.isNull())) {
|
||||||
result["Type"] = Jellyfin::Support::toJsonValue<QString>(m_type);
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
}
|
||||||
result["Date"] = Jellyfin::Support::toJsonValue<QDateTime>(m_date);
|
|
||||||
result["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
|
||||||
result["UserPrimaryImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_userPrimaryImageTag);
|
if (!(m_overview.isNull())) {
|
||||||
result["Severity"] = Jellyfin::Support::toJsonValue<LogLevel>(m_severity);
|
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["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
||||||
|
|
||||||
|
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);
|
|
||||||
result["TotalRecordCount"] = Jellyfin::Support::toJsonValue<qint32>(m_totalRecordCount);
|
|
||||||
result["StartIndex"] = Jellyfin::Support::toJsonValue<qint32>(m_startIndex);
|
if (!(m_items.size() == 0)) {
|
||||||
|
result["Items"] = Jellyfin::Support::toJsonValue<QList<ActivityLogEntry>>(m_items);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["TotalRecordCount"] = Jellyfin::Support::toJsonValue<qint32>(m_totalRecordCount);
|
||||||
|
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,20 +93,68 @@ 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);
|
||||||
result["IsAutomated"] = Jellyfin::Support::toJsonValue<bool>(m_isAutomated);
|
}
|
||||||
result["AlbumArtists"] = Jellyfin::Support::toJsonValue<QStringList>(m_albumArtists);
|
|
||||||
result["ArtistProviderIds"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_artistProviderIds);
|
|
||||||
result["SongInfos"] = Jellyfin::Support::toJsonValue<QList<SongInfo>>(m_songInfos);
|
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);
|
||||||
|
|
||||||
|
if (!(m_albumArtists.size() == 0)) {
|
||||||
|
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["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
result["SearchInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<AlbumInfo>>(m_searchInfo);
|
||||||
result["SearchProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_searchProviderName);
|
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
||||||
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["ThemeSongsResult"] = Jellyfin::Support::toJsonValue<QSharedPointer<ThemeMediaResult>>(m_themeSongsResult);
|
result["ThemeVideosResult"] = Jellyfin::Support::toJsonValue<QSharedPointer<ThemeMediaResult>>(m_themeVideosResult);
|
||||||
result["SoundtrackSongsResult"] = Jellyfin::Support::toJsonValue<QSharedPointer<ThemeMediaResult>>(m_soundtrackSongsResult);
|
result["ThemeSongsResult"] = Jellyfin::Support::toJsonValue<QSharedPointer<ThemeMediaResult>>(m_themeSongsResult);
|
||||||
|
result["SoundtrackSongsResult"] = Jellyfin::Support::toJsonValue<QSharedPointer<ThemeMediaResult>>(m_soundtrackSongsResult);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,18 +87,58 @@ 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);
|
||||||
result["IsAutomated"] = Jellyfin::Support::toJsonValue<bool>(m_isAutomated);
|
}
|
||||||
result["SongInfos"] = Jellyfin::Support::toJsonValue<QList<SongInfo>>(m_songInfos);
|
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
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["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
result["SearchInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<ArtistInfo>>(m_searchInfo);
|
||||||
result["SearchProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_searchProviderName);
|
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
||||||
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,22 @@ 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,19 +90,47 @@ 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["AccessToken"] = Jellyfin::Support::toJsonValue<QString>(m_accessToken);
|
result["Id"] = Jellyfin::Support::toJsonValue<qint64>(m_jellyfinId);
|
||||||
result["DeviceId"] = Jellyfin::Support::toJsonValue<QString>(m_deviceId);
|
|
||||||
result["AppName"] = Jellyfin::Support::toJsonValue<QString>(m_appName);
|
if (!(m_accessToken.isNull())) {
|
||||||
result["AppVersion"] = Jellyfin::Support::toJsonValue<QString>(m_appVersion);
|
result["AccessToken"] = Jellyfin::Support::toJsonValue<QString>(m_accessToken);
|
||||||
result["DeviceName"] = Jellyfin::Support::toJsonValue<QString>(m_deviceName);
|
}
|
||||||
result["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
|
||||||
result["IsActive"] = Jellyfin::Support::toJsonValue<bool>(m_isActive);
|
|
||||||
result["DateCreated"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateCreated);
|
if (!(m_deviceId.isNull())) {
|
||||||
result["DateRevoked"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateRevoked);
|
result["DeviceId"] = Jellyfin::Support::toJsonValue<QString>(m_deviceId);
|
||||||
result["DateLastActivity"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateLastActivity);
|
}
|
||||||
result["UserName"] = Jellyfin::Support::toJsonValue<QString>(m_userName);
|
|
||||||
|
|
||||||
|
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["IsActive"] = Jellyfin::Support::toJsonValue<bool>(m_isActive);
|
||||||
|
result["DateCreated"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateCreated);
|
||||||
|
|
||||||
|
if (!(m_dateRevoked.isNull())) {
|
||||||
|
result["DateRevoked"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateRevoked);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["DateLastActivity"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateLastActivity);
|
||||||
|
|
||||||
|
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);
|
|
||||||
result["TotalRecordCount"] = Jellyfin::Support::toJsonValue<qint32>(m_totalRecordCount);
|
|
||||||
result["StartIndex"] = Jellyfin::Support::toJsonValue<qint32>(m_startIndex);
|
if (!(m_items.size() == 0)) {
|
||||||
|
result["Items"] = Jellyfin::Support::toJsonValue<QList<AuthenticationInfo>>(m_items);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["TotalRecordCount"] = Jellyfin::Support::toJsonValue<qint32>(m_totalRecordCount);
|
||||||
|
result["StartIndex"] = Jellyfin::Support::toJsonValue<qint32>(m_startIndex);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,11 +66,19 @@ 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["SessionInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<SessionInfo>>(m_sessionInfo);
|
result["User"] = Jellyfin::Support::toJsonValue<QSharedPointer<UserDto>>(m_user);
|
||||||
result["AccessToken"] = Jellyfin::Support::toJsonValue<QString>(m_accessToken);
|
result["SessionInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<SessionInfo>>(m_sessionInfo);
|
||||||
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);
|
|
||||||
result["DateLastSaved"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateLastSaved);
|
if (!(!m_size.has_value())) {
|
||||||
result["RemoteTrailers"] = Jellyfin::Support::toJsonValue<QList<MediaUrl>>(m_remoteTrailers);
|
result["Size"] = Jellyfin::Support::toJsonValue<std::optional<qint64>>(m_size);
|
||||||
result["IsHD"] = Jellyfin::Support::toJsonValue<bool>(m_isHD);
|
}
|
||||||
result["IsShortcut"] = Jellyfin::Support::toJsonValue<bool>(m_isShortcut);
|
|
||||||
result["ShortcutPath"] = Jellyfin::Support::toJsonValue<QString>(m_shortcutPath);
|
|
||||||
result["Width"] = Jellyfin::Support::toJsonValue<qint32>(m_width);
|
if (!(m_container.isNull())) {
|
||||||
result["Height"] = Jellyfin::Support::toJsonValue<qint32>(m_height);
|
result["Container"] = Jellyfin::Support::toJsonValue<QString>(m_container);
|
||||||
result["ExtraIds"] = Jellyfin::Support::toJsonValue<QStringList>(m_extraIds);
|
}
|
||||||
result["SupportsExternalTransfer"] = Jellyfin::Support::toJsonValue<bool>(m_supportsExternalTransfer);
|
|
||||||
|
result["DateLastSaved"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateLastSaved);
|
||||||
|
|
||||||
|
if (!(m_remoteTrailers.size() == 0)) {
|
||||||
|
result["RemoteTrailers"] = Jellyfin::Support::toJsonValue<QList<MediaUrl>>(m_remoteTrailers);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["IsHD"] = Jellyfin::Support::toJsonValue<bool>(m_isHD);
|
||||||
|
result["IsShortcut"] = Jellyfin::Support::toJsonValue<bool>(m_isShortcut);
|
||||||
|
|
||||||
|
if (!(m_shortcutPath.isNull())) {
|
||||||
|
result["ShortcutPath"] = Jellyfin::Support::toJsonValue<QString>(m_shortcutPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["Width"] = Jellyfin::Support::toJsonValue<qint32>(m_width);
|
||||||
|
result["Height"] = Jellyfin::Support::toJsonValue<qint32>(m_height);
|
||||||
|
|
||||||
|
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["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
result["Etag"] = Jellyfin::Support::toJsonValue<QString>(m_etag);
|
}
|
||||||
result["SourceType"] = Jellyfin::Support::toJsonValue<QString>(m_sourceType);
|
|
||||||
result["PlaylistItemId"] = Jellyfin::Support::toJsonValue<QString>(m_playlistItemId);
|
|
||||||
result["DateCreated"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateCreated);
|
if (!(m_originalTitle.isNull())) {
|
||||||
result["DateLastMediaAdded"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateLastMediaAdded);
|
result["OriginalTitle"] = Jellyfin::Support::toJsonValue<QString>(m_originalTitle);
|
||||||
result["ExtraType"] = Jellyfin::Support::toJsonValue<QString>(m_extraType);
|
}
|
||||||
result["AirsBeforeSeasonNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_airsBeforeSeasonNumber);
|
|
||||||
result["AirsAfterSeasonNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_airsAfterSeasonNumber);
|
|
||||||
result["AirsBeforeEpisodeNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_airsBeforeEpisodeNumber);
|
if (!(m_serverId.isNull())) {
|
||||||
result["CanDelete"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_canDelete);
|
result["ServerId"] = Jellyfin::Support::toJsonValue<QString>(m_serverId);
|
||||||
result["CanDownload"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_canDownload);
|
}
|
||||||
result["HasSubtitles"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_hasSubtitles);
|
|
||||||
result["PreferredMetadataLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_preferredMetadataLanguage);
|
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||||
result["PreferredMetadataCountryCode"] = Jellyfin::Support::toJsonValue<QString>(m_preferredMetadataCountryCode);
|
|
||||||
result["SupportsSync"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_supportsSync);
|
if (!(m_etag.isNull())) {
|
||||||
result["Container"] = Jellyfin::Support::toJsonValue<QString>(m_container);
|
result["Etag"] = Jellyfin::Support::toJsonValue<QString>(m_etag);
|
||||||
result["SortName"] = Jellyfin::Support::toJsonValue<QString>(m_sortName);
|
}
|
||||||
result["ForcedSortName"] = Jellyfin::Support::toJsonValue<QString>(m_forcedSortName);
|
|
||||||
result["Video3DFormat"] = Jellyfin::Support::toJsonValue<Video3DFormat>(m_video3DFormat);
|
|
||||||
result["PremiereDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_premiereDate);
|
if (!(m_sourceType.isNull())) {
|
||||||
result["ExternalUrls"] = Jellyfin::Support::toJsonValue<QList<ExternalUrl>>(m_externalUrls);
|
result["SourceType"] = Jellyfin::Support::toJsonValue<QString>(m_sourceType);
|
||||||
result["MediaSources"] = Jellyfin::Support::toJsonValue<QList<MediaSourceInfo>>(m_mediaSources);
|
}
|
||||||
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);
|
if (!(m_playlistItemId.isNull())) {
|
||||||
result["EnableMediaSourceDisplay"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_enableMediaSourceDisplay);
|
result["PlaylistItemId"] = Jellyfin::Support::toJsonValue<QString>(m_playlistItemId);
|
||||||
result["OfficialRating"] = Jellyfin::Support::toJsonValue<QString>(m_officialRating);
|
}
|
||||||
result["CustomRating"] = Jellyfin::Support::toJsonValue<QString>(m_customRating);
|
|
||||||
result["ChannelId"] = Jellyfin::Support::toJsonValue<QString>(m_channelId);
|
|
||||||
result["ChannelName"] = Jellyfin::Support::toJsonValue<QString>(m_channelName);
|
if (!(m_dateCreated.isNull())) {
|
||||||
result["Overview"] = Jellyfin::Support::toJsonValue<QString>(m_overview);
|
result["DateCreated"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateCreated);
|
||||||
result["Taglines"] = Jellyfin::Support::toJsonValue<QStringList>(m_taglines);
|
}
|
||||||
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);
|
if (!(m_dateLastMediaAdded.isNull())) {
|
||||||
result["RunTimeTicks"] = Jellyfin::Support::toJsonValue<std::optional<qint64>>(m_runTimeTicks);
|
result["DateLastMediaAdded"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateLastMediaAdded);
|
||||||
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);
|
|
||||||
result["IsPlaceHolder"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isPlaceHolder);
|
if (!(m_extraType.isNull())) {
|
||||||
result["Number"] = Jellyfin::Support::toJsonValue<QString>(m_number);
|
result["ExtraType"] = Jellyfin::Support::toJsonValue<QString>(m_extraType);
|
||||||
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);
|
|
||||||
result["ParentIndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_parentIndexNumber);
|
if (!(!m_airsBeforeSeasonNumber.has_value())) {
|
||||||
result["RemoteTrailers"] = Jellyfin::Support::toJsonValue<QList<MediaUrl>>(m_remoteTrailers);
|
result["AirsBeforeSeasonNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_airsBeforeSeasonNumber);
|
||||||
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);
|
|
||||||
result["ParentId"] = Jellyfin::Support::toJsonValue<QString>(m_parentId);
|
if (!(!m_airsAfterSeasonNumber.has_value())) {
|
||||||
result["Type"] = Jellyfin::Support::toJsonValue<QString>(m_type);
|
result["AirsAfterSeasonNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_airsAfterSeasonNumber);
|
||||||
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);
|
|
||||||
result["ParentLogoItemId"] = Jellyfin::Support::toJsonValue<QString>(m_parentLogoItemId);
|
if (!(!m_airsBeforeEpisodeNumber.has_value())) {
|
||||||
result["ParentBackdropItemId"] = Jellyfin::Support::toJsonValue<QString>(m_parentBackdropItemId);
|
result["AirsBeforeEpisodeNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_airsBeforeEpisodeNumber);
|
||||||
result["ParentBackdropImageTags"] = Jellyfin::Support::toJsonValue<QStringList>(m_parentBackdropImageTags);
|
}
|
||||||
result["LocalTrailerCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_localTrailerCount);
|
|
||||||
result["UserData"] = Jellyfin::Support::toJsonValue<QSharedPointer<UserItemDataDto>>(m_userData);
|
|
||||||
result["RecursiveItemCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_recursiveItemCount);
|
if (!(!m_canDelete.has_value())) {
|
||||||
result["ChildCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_childCount);
|
result["CanDelete"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_canDelete);
|
||||||
result["SeriesName"] = Jellyfin::Support::toJsonValue<QString>(m_seriesName);
|
}
|
||||||
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);
|
if (!(!m_canDownload.has_value())) {
|
||||||
result["DisplayPreferencesId"] = Jellyfin::Support::toJsonValue<QString>(m_displayPreferencesId);
|
result["CanDownload"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_canDownload);
|
||||||
result["Status"] = Jellyfin::Support::toJsonValue<QString>(m_status);
|
}
|
||||||
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);
|
if (!(!m_hasSubtitles.has_value())) {
|
||||||
result["PrimaryImageAspectRatio"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_primaryImageAspectRatio);
|
result["HasSubtitles"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_hasSubtitles);
|
||||||
result["Artists"] = Jellyfin::Support::toJsonValue<QStringList>(m_artists);
|
}
|
||||||
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);
|
if (!(m_preferredMetadataLanguage.isNull())) {
|
||||||
result["DisplayOrder"] = Jellyfin::Support::toJsonValue<QString>(m_displayOrder);
|
result["PreferredMetadataLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_preferredMetadataLanguage);
|
||||||
result["AlbumId"] = Jellyfin::Support::toJsonValue<QString>(m_albumId);
|
}
|
||||||
result["AlbumPrimaryImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_albumPrimaryImageTag);
|
|
||||||
result["SeriesPrimaryImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_seriesPrimaryImageTag);
|
|
||||||
result["AlbumArtist"] = Jellyfin::Support::toJsonValue<QString>(m_albumArtist);
|
if (!(m_preferredMetadataCountryCode.isNull())) {
|
||||||
result["AlbumArtists"] = Jellyfin::Support::toJsonValue<QList<NameGuidPair>>(m_albumArtists);
|
result["PreferredMetadataCountryCode"] = Jellyfin::Support::toJsonValue<QString>(m_preferredMetadataCountryCode);
|
||||||
result["SeasonName"] = Jellyfin::Support::toJsonValue<QString>(m_seasonName);
|
}
|
||||||
result["MediaStreams"] = Jellyfin::Support::toJsonValue<QList<MediaStream>>(m_mediaStreams);
|
|
||||||
result["VideoType"] = Jellyfin::Support::toJsonValue<VideoType>(m_videoType);
|
|
||||||
result["PartCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_partCount);
|
if (!(!m_supportsSync.has_value())) {
|
||||||
result["MediaSourceCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_mediaSourceCount);
|
result["SupportsSync"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_supportsSync);
|
||||||
result["ImageTags"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_imageTags);
|
}
|
||||||
result["BackdropImageTags"] = Jellyfin::Support::toJsonValue<QStringList>(m_backdropImageTags);
|
|
||||||
result["ScreenshotImageTags"] = Jellyfin::Support::toJsonValue<QStringList>(m_screenshotImageTags);
|
|
||||||
result["ParentLogoImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_parentLogoImageTag);
|
if (!(m_container.isNull())) {
|
||||||
result["ParentArtItemId"] = Jellyfin::Support::toJsonValue<QString>(m_parentArtItemId);
|
result["Container"] = Jellyfin::Support::toJsonValue<QString>(m_container);
|
||||||
result["ParentArtImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_parentArtImageTag);
|
}
|
||||||
result["SeriesThumbImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_seriesThumbImageTag);
|
|
||||||
result["ImageBlurHashes"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_imageBlurHashes);
|
|
||||||
result["SeriesStudio"] = Jellyfin::Support::toJsonValue<QString>(m_seriesStudio);
|
if (!(m_sortName.isNull())) {
|
||||||
result["ParentThumbItemId"] = Jellyfin::Support::toJsonValue<QString>(m_parentThumbItemId);
|
result["SortName"] = Jellyfin::Support::toJsonValue<QString>(m_sortName);
|
||||||
result["ParentThumbImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_parentThumbImageTag);
|
}
|
||||||
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_forcedSortName.isNull())) {
|
||||||
result["LocationType"] = Jellyfin::Support::toJsonValue<LocationType>(m_locationType);
|
result["ForcedSortName"] = Jellyfin::Support::toJsonValue<QString>(m_forcedSortName);
|
||||||
result["IsoType"] = Jellyfin::Support::toJsonValue<IsoType>(m_isoType);
|
}
|
||||||
result["MediaType"] = Jellyfin::Support::toJsonValue<QString>(m_mediaType);
|
|
||||||
result["EndDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_endDate);
|
result["Video3DFormat"] = Jellyfin::Support::toJsonValue<Video3DFormat>(m_video3DFormat);
|
||||||
result["LockedFields"] = Jellyfin::Support::toJsonValue<QList<MetadataField>>(m_lockedFields);
|
|
||||||
result["TrailerCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_trailerCount);
|
if (!(m_premiereDate.isNull())) {
|
||||||
result["MovieCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_movieCount);
|
result["PremiereDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_premiereDate);
|
||||||
result["SeriesCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_seriesCount);
|
}
|
||||||
result["ProgramCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_programCount);
|
|
||||||
result["EpisodeCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_episodeCount);
|
|
||||||
result["SongCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_songCount);
|
if (!(m_externalUrls.size() == 0)) {
|
||||||
result["AlbumCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_albumCount);
|
result["ExternalUrls"] = Jellyfin::Support::toJsonValue<QList<ExternalUrl>>(m_externalUrls);
|
||||||
result["ArtistCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_artistCount);
|
}
|
||||||
result["MusicVideoCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_musicVideoCount);
|
|
||||||
result["LockData"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_lockData);
|
|
||||||
result["Width"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_width);
|
if (!(m_mediaSources.size() == 0)) {
|
||||||
result["Height"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_height);
|
result["MediaSources"] = Jellyfin::Support::toJsonValue<QList<MediaSourceInfo>>(m_mediaSources);
|
||||||
result["CameraMake"] = Jellyfin::Support::toJsonValue<QString>(m_cameraMake);
|
}
|
||||||
result["CameraModel"] = Jellyfin::Support::toJsonValue<QString>(m_cameraModel);
|
|
||||||
result["Software"] = Jellyfin::Support::toJsonValue<QString>(m_software);
|
|
||||||
result["ExposureTime"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_exposureTime);
|
if (!(!m_criticRating.has_value())) {
|
||||||
result["FocalLength"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_focalLength);
|
result["CriticRating"] = Jellyfin::Support::toJsonValue<std::optional<float>>(m_criticRating);
|
||||||
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);
|
|
||||||
result["Latitude"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_latitude);
|
if (!(m_productionLocations.size() == 0)) {
|
||||||
result["Longitude"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_longitude);
|
result["ProductionLocations"] = Jellyfin::Support::toJsonValue<QStringList>(m_productionLocations);
|
||||||
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);
|
|
||||||
result["ProgramId"] = Jellyfin::Support::toJsonValue<QString>(m_programId);
|
if (!(m_path.isNull())) {
|
||||||
result["ChannelPrimaryImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_channelPrimaryImageTag);
|
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||||
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);
|
|
||||||
result["EpisodeTitle"] = Jellyfin::Support::toJsonValue<QString>(m_episodeTitle);
|
if (!(!m_enableMediaSourceDisplay.has_value())) {
|
||||||
result["ChannelType"] = Jellyfin::Support::toJsonValue<ChannelType>(m_channelType);
|
result["EnableMediaSourceDisplay"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_enableMediaSourceDisplay);
|
||||||
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);
|
if (!(m_officialRating.isNull())) {
|
||||||
result["IsLive"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isLive);
|
result["OfficialRating"] = Jellyfin::Support::toJsonValue<QString>(m_officialRating);
|
||||||
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);
|
if (!(m_customRating.isNull())) {
|
||||||
result["CurrentProgram"] = Jellyfin::Support::toJsonValue<QSharedPointer<BaseItemDto>>(m_currentProgram);
|
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);
|
||||||
|
|
||||||
|
if (!(m_aspectRatio.isNull())) {
|
||||||
|
result["AspectRatio"] = Jellyfin::Support::toJsonValue<QString>(m_aspectRatio);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_productionYear.has_value())) {
|
||||||
|
result["ProductionYear"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_productionYear);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_isPlaceHolder.has_value())) {
|
||||||
|
result["IsPlaceHolder"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isPlaceHolder);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_number.isNull())) {
|
||||||
|
result["Number"] = Jellyfin::Support::toJsonValue<QString>(m_number);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
if (!(!m_recursiveItemCount.has_value())) {
|
||||||
|
result["RecursiveItemCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_recursiveItemCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_childCount.has_value())) {
|
||||||
|
result["ChildCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_childCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_seriesName.isNull())) {
|
||||||
|
result["SeriesName"] = Jellyfin::Support::toJsonValue<QString>(m_seriesName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_seriesId.isNull())) {
|
||||||
|
result["SeriesId"] = Jellyfin::Support::toJsonValue<QString>(m_seriesId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_seasonId.isNull())) {
|
||||||
|
result["SeasonId"] = Jellyfin::Support::toJsonValue<QString>(m_seasonId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
if (!(!m_partCount.has_value())) {
|
||||||
|
result["PartCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_partCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_mediaSourceCount.has_value())) {
|
||||||
|
result["MediaSourceCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_mediaSourceCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_imageTags.isEmpty())) {
|
||||||
|
result["ImageTags"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_imageTags);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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["IsoType"] = Jellyfin::Support::toJsonValue<IsoType>(m_isoType);
|
||||||
|
|
||||||
|
if (!(m_mediaType.isNull())) {
|
||||||
|
result["MediaType"] = Jellyfin::Support::toJsonValue<QString>(m_mediaType);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_endDate.isNull())) {
|
||||||
|
result["EndDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_endDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_lockedFields.size() == 0)) {
|
||||||
|
result["LockedFields"] = Jellyfin::Support::toJsonValue<QList<MetadataField>>(m_lockedFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_trailerCount.has_value())) {
|
||||||
|
result["TrailerCount"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_trailerCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
if (!(!m_aperture.has_value())) {
|
||||||
|
result["Aperture"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_aperture);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_shutterSpeed.has_value())) {
|
||||||
|
result["ShutterSpeed"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_shutterSpeed);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_latitude.has_value())) {
|
||||||
|
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["Audio"] = Jellyfin::Support::toJsonValue<ProgramAudio>(m_audio);
|
||||||
|
|
||||||
|
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);
|
|
||||||
result["TotalRecordCount"] = Jellyfin::Support::toJsonValue<qint32>(m_totalRecordCount);
|
|
||||||
result["StartIndex"] = Jellyfin::Support::toJsonValue<qint32>(m_startIndex);
|
if (!(m_items.size() == 0)) {
|
||||||
|
result["Items"] = Jellyfin::Support::toJsonValue<QList<BaseItemDto>>(m_items);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["TotalRecordCount"] = Jellyfin::Support::toJsonValue<qint32>(m_totalRecordCount);
|
||||||
|
result["StartIndex"] = Jellyfin::Support::toJsonValue<qint32>(m_startIndex);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,13 +72,37 @@ 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,18 +87,58 @@ 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);
|
||||||
result["IsAutomated"] = Jellyfin::Support::toJsonValue<bool>(m_isAutomated);
|
}
|
||||||
result["SeriesName"] = Jellyfin::Support::toJsonValue<QString>(m_seriesName);
|
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
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["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
result["SearchInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<BookInfo>>(m_searchInfo);
|
||||||
result["SearchProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_searchProviderName);
|
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
||||||
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);
|
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);
|
||||||
result["IsAutomated"] = Jellyfin::Support::toJsonValue<bool>(m_isAutomated);
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
result["SearchInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<BoxSetInfo>>(m_searchInfo);
|
||||||
result["SearchProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_searchProviderName);
|
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
||||||
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,17 @@ 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["PositionTicks"] = Jellyfin::Support::toJsonValue<qint64>(m_positionTicks);
|
result["When"] = Jellyfin::Support::toJsonValue<QDateTime>(m_when);
|
||||||
result["IsPlaying"] = Jellyfin::Support::toJsonValue<bool>(m_isPlaying);
|
result["PositionTicks"] = Jellyfin::Support::toJsonValue<qint64>(m_positionTicks);
|
||||||
result["PlaylistItemId"] = Jellyfin::Support::toJsonValue<QString>(m_playlistItemId);
|
result["IsPlaying"] = Jellyfin::Support::toJsonValue<bool>(m_isPlaying);
|
||||||
|
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);
|
|
||||||
result["CanSearch"] = Jellyfin::Support::toJsonValue<bool>(m_canSearch);
|
if (!(m_name.isNull())) {
|
||||||
result["MediaTypes"] = Jellyfin::Support::toJsonValue<QList<ChannelMediaType>>(m_mediaTypes);
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
result["ContentTypes"] = Jellyfin::Support::toJsonValue<QList<ChannelMediaContentType>>(m_contentTypes);
|
}
|
||||||
result["MaxPageSize"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxPageSize);
|
|
||||||
result["AutoRefreshLevels"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_autoRefreshLevels);
|
|
||||||
result["DefaultSortFields"] = Jellyfin::Support::toJsonValue<QList<ChannelItemSortField>>(m_defaultSortFields);
|
if (!(m_jellyfinId.isNull())) {
|
||||||
result["SupportsSortOrderToggle"] = Jellyfin::Support::toJsonValue<bool>(m_supportsSortOrderToggle);
|
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||||
result["SupportsLatestMedia"] = Jellyfin::Support::toJsonValue<bool>(m_supportsLatestMedia);
|
}
|
||||||
result["CanFilter"] = Jellyfin::Support::toJsonValue<bool>(m_canFilter);
|
|
||||||
result["SupportsContentDownloading"] = Jellyfin::Support::toJsonValue<bool>(m_supportsContentDownloading);
|
result["CanSearch"] = Jellyfin::Support::toJsonValue<bool>(m_canSearch);
|
||||||
|
|
||||||
|
if (!(m_mediaTypes.size() == 0)) {
|
||||||
|
result["MediaTypes"] = Jellyfin::Support::toJsonValue<QList<ChannelMediaType>>(m_mediaTypes);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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["SupportsLatestMedia"] = Jellyfin::Support::toJsonValue<bool>(m_supportsLatestMedia);
|
||||||
|
result["CanFilter"] = Jellyfin::Support::toJsonValue<bool>(m_canFilter);
|
||||||
|
result["SupportsContentDownloading"] = Jellyfin::Support::toJsonValue<bool>(m_supportsContentDownloading);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,11 +66,27 @@ 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,12 +69,24 @@ 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["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
result["StartPositionTicks"] = Jellyfin::Support::toJsonValue<qint64>(m_startPositionTicks);
|
||||||
result["ImagePath"] = Jellyfin::Support::toJsonValue<QString>(m_imagePath);
|
|
||||||
result["ImageDateModified"] = Jellyfin::Support::toJsonValue<QDateTime>(m_imageDateModified);
|
if (!(m_name.isNull())) {
|
||||||
result["ImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_imageTag);
|
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);
|
||||||
|
|
||||||
|
if (!(m_imageTag.isNull())) {
|
||||||
|
result["ImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_imageTag);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,17 +84,37 @@ 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);
|
|
||||||
result["SupportsMediaControl"] = Jellyfin::Support::toJsonValue<bool>(m_supportsMediaControl);
|
if (!(m_playableMediaTypes.size() == 0)) {
|
||||||
result["SupportsContentUploading"] = Jellyfin::Support::toJsonValue<bool>(m_supportsContentUploading);
|
result["PlayableMediaTypes"] = Jellyfin::Support::toJsonValue<QStringList>(m_playableMediaTypes);
|
||||||
result["MessageCallbackUrl"] = Jellyfin::Support::toJsonValue<QString>(m_messageCallbackUrl);
|
}
|
||||||
result["SupportsPersistentIdentifier"] = Jellyfin::Support::toJsonValue<bool>(m_supportsPersistentIdentifier);
|
|
||||||
result["SupportsSync"] = Jellyfin::Support::toJsonValue<bool>(m_supportsSync);
|
|
||||||
result["DeviceProfile"] = Jellyfin::Support::toJsonValue<QSharedPointer<DeviceProfile>>(m_deviceProfile);
|
if (!(m_supportedCommands.size() == 0)) {
|
||||||
result["AppStoreUrl"] = Jellyfin::Support::toJsonValue<QString>(m_appStoreUrl);
|
result["SupportedCommands"] = Jellyfin::Support::toJsonValue<QList<GeneralCommandType>>(m_supportedCommands);
|
||||||
result["IconUrl"] = Jellyfin::Support::toJsonValue<QString>(m_iconUrl);
|
}
|
||||||
|
|
||||||
|
result["SupportsMediaControl"] = Jellyfin::Support::toJsonValue<bool>(m_supportsMediaControl);
|
||||||
|
result["SupportsContentUploading"] = Jellyfin::Support::toJsonValue<bool>(m_supportsContentUploading);
|
||||||
|
|
||||||
|
if (!(m_messageCallbackUrl.isNull())) {
|
||||||
|
result["MessageCallbackUrl"] = Jellyfin::Support::toJsonValue<QString>(m_messageCallbackUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["SupportsPersistentIdentifier"] = Jellyfin::Support::toJsonValue<bool>(m_supportsPersistentIdentifier);
|
||||||
|
result["SupportsSync"] = Jellyfin::Support::toJsonValue<bool>(m_supportsSync);
|
||||||
|
result["DeviceProfile"] = Jellyfin::Support::toJsonValue<QSharedPointer<DeviceProfile>>(m_deviceProfile);
|
||||||
|
|
||||||
|
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,17 +84,37 @@ 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);
|
|
||||||
result["SupportsMediaControl"] = Jellyfin::Support::toJsonValue<bool>(m_supportsMediaControl);
|
if (!(m_playableMediaTypes.size() == 0)) {
|
||||||
result["SupportsContentUploading"] = Jellyfin::Support::toJsonValue<bool>(m_supportsContentUploading);
|
result["PlayableMediaTypes"] = Jellyfin::Support::toJsonValue<QStringList>(m_playableMediaTypes);
|
||||||
result["MessageCallbackUrl"] = Jellyfin::Support::toJsonValue<QString>(m_messageCallbackUrl);
|
}
|
||||||
result["SupportsPersistentIdentifier"] = Jellyfin::Support::toJsonValue<bool>(m_supportsPersistentIdentifier);
|
|
||||||
result["SupportsSync"] = Jellyfin::Support::toJsonValue<bool>(m_supportsSync);
|
|
||||||
result["DeviceProfile"] = Jellyfin::Support::toJsonValue<QSharedPointer<DeviceProfile>>(m_deviceProfile);
|
if (!(m_supportedCommands.size() == 0)) {
|
||||||
result["AppStoreUrl"] = Jellyfin::Support::toJsonValue<QString>(m_appStoreUrl);
|
result["SupportedCommands"] = Jellyfin::Support::toJsonValue<QList<GeneralCommandType>>(m_supportedCommands);
|
||||||
result["IconUrl"] = Jellyfin::Support::toJsonValue<QString>(m_iconUrl);
|
}
|
||||||
|
|
||||||
|
result["SupportsMediaControl"] = Jellyfin::Support::toJsonValue<bool>(m_supportsMediaControl);
|
||||||
|
result["SupportsContentUploading"] = Jellyfin::Support::toJsonValue<bool>(m_supportsContentUploading);
|
||||||
|
|
||||||
|
if (!(m_messageCallbackUrl.isNull())) {
|
||||||
|
result["MessageCallbackUrl"] = Jellyfin::Support::toJsonValue<QString>(m_messageCallbackUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["SupportsPersistentIdentifier"] = Jellyfin::Support::toJsonValue<bool>(m_supportsPersistentIdentifier);
|
||||||
|
result["SupportsSync"] = Jellyfin::Support::toJsonValue<bool>(m_supportsSync);
|
||||||
|
result["DeviceProfile"] = Jellyfin::Support::toJsonValue<QSharedPointer<DeviceProfile>>(m_deviceProfile);
|
||||||
|
|
||||||
|
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,12 +69,28 @@ 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["Conditions"] = Jellyfin::Support::toJsonValue<QList<ProfileCondition>>(m_conditions);
|
result["Type"] = Jellyfin::Support::toJsonValue<CodecType>(m_type);
|
||||||
result["ApplyConditions"] = Jellyfin::Support::toJsonValue<QList<ProfileCondition>>(m_applyConditions);
|
|
||||||
result["Codec"] = Jellyfin::Support::toJsonValue<QString>(m_codec);
|
if (!(m_conditions.size() == 0)) {
|
||||||
result["Container"] = Jellyfin::Support::toJsonValue<QString>(m_container);
|
result["Conditions"] = Jellyfin::Support::toJsonValue<QList<ProfileCondition>>(m_conditions);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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,14 +75,34 @@ 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);
|
|
||||||
result["EnableInMainMenu"] = Jellyfin::Support::toJsonValue<bool>(m_enableInMainMenu);
|
|
||||||
result["MenuSection"] = Jellyfin::Support::toJsonValue<QString>(m_menuSection);
|
if (!(m_name.isNull())) {
|
||||||
result["MenuIcon"] = Jellyfin::Support::toJsonValue<QString>(m_menuIcon);
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
result["DisplayName"] = Jellyfin::Support::toJsonValue<QString>(m_displayName);
|
}
|
||||||
result["ConfigurationPageType"] = Jellyfin::Support::toJsonValue<ConfigurationPageType>(m_configurationPageType);
|
|
||||||
result["PluginId"] = Jellyfin::Support::toJsonValue<QString>(m_pluginId);
|
result["EnableInMainMenu"] = Jellyfin::Support::toJsonValue<bool>(m_enableInMainMenu);
|
||||||
|
|
||||||
|
if (!(m_menuSection.isNull())) {
|
||||||
|
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);
|
||||||
|
|
||||||
|
if (!(m_pluginId.isNull())) {
|
||||||
|
result["PluginId"] = Jellyfin::Support::toJsonValue<QString>(m_pluginId);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,10 +63,18 @@ 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["Conditions"] = Jellyfin::Support::toJsonValue<QList<ProfileCondition>>(m_conditions);
|
result["Type"] = Jellyfin::Support::toJsonValue<DlnaProfileType>(m_type);
|
||||||
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,11 +66,27 @@ 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,11 +66,27 @@ 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,9 +60,17 @@ 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,12 +69,32 @@ 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,8 +57,12 @@ 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,16 +81,52 @@ 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,16 +81,40 @@ 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);
|
}
|
||||||
result["LastUserId"] = Jellyfin::Support::toJsonValue<QString>(m_lastUserId);
|
|
||||||
result["DateLastActivity"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateLastActivity);
|
|
||||||
result["Capabilities"] = Jellyfin::Support::toJsonValue<QSharedPointer<ClientCapabilities>>(m_capabilities);
|
if (!(m_jellyfinId.isNull())) {
|
||||||
result["IconUrl"] = Jellyfin::Support::toJsonValue<QString>(m_iconUrl);
|
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["DateLastActivity"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateLastActivity);
|
||||||
|
result["Capabilities"] = Jellyfin::Support::toJsonValue<QSharedPointer<ClientCapabilities>>(m_capabilities);
|
||||||
|
|
||||||
|
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);
|
|
||||||
result["TotalRecordCount"] = Jellyfin::Support::toJsonValue<qint32>(m_totalRecordCount);
|
|
||||||
result["StartIndex"] = Jellyfin::Support::toJsonValue<qint32>(m_startIndex);
|
if (!(m_items.size() == 0)) {
|
||||||
|
result["Items"] = Jellyfin::Support::toJsonValue<QList<DeviceInfo>>(m_items);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["TotalRecordCount"] = Jellyfin::Support::toJsonValue<qint32>(m_totalRecordCount);
|
||||||
|
result["StartIndex"] = Jellyfin::Support::toJsonValue<qint32>(m_startIndex);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,8 +57,12 @@ 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,46 +171,158 @@ 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);
|
|
||||||
result["Identification"] = Jellyfin::Support::toJsonValue<QSharedPointer<DeviceIdentification>>(m_identification);
|
if (!(m_name.isNull())) {
|
||||||
result["FriendlyName"] = Jellyfin::Support::toJsonValue<QString>(m_friendlyName);
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
result["Manufacturer"] = Jellyfin::Support::toJsonValue<QString>(m_manufacturer);
|
}
|
||||||
result["ManufacturerUrl"] = Jellyfin::Support::toJsonValue<QString>(m_manufacturerUrl);
|
|
||||||
result["ModelName"] = Jellyfin::Support::toJsonValue<QString>(m_modelName);
|
|
||||||
result["ModelDescription"] = Jellyfin::Support::toJsonValue<QString>(m_modelDescription);
|
if (!(m_jellyfinId.isNull())) {
|
||||||
result["ModelNumber"] = Jellyfin::Support::toJsonValue<QString>(m_modelNumber);
|
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||||
result["ModelUrl"] = Jellyfin::Support::toJsonValue<QString>(m_modelUrl);
|
}
|
||||||
result["SerialNumber"] = Jellyfin::Support::toJsonValue<QString>(m_serialNumber);
|
|
||||||
result["EnableAlbumArtInDidl"] = Jellyfin::Support::toJsonValue<bool>(m_enableAlbumArtInDidl);
|
result["Identification"] = Jellyfin::Support::toJsonValue<QSharedPointer<DeviceIdentification>>(m_identification);
|
||||||
result["EnableSingleAlbumArtLimit"] = Jellyfin::Support::toJsonValue<bool>(m_enableSingleAlbumArtLimit);
|
|
||||||
result["EnableSingleSubtitleLimit"] = Jellyfin::Support::toJsonValue<bool>(m_enableSingleSubtitleLimit);
|
if (!(m_friendlyName.isNull())) {
|
||||||
result["SupportedMediaTypes"] = Jellyfin::Support::toJsonValue<QString>(m_supportedMediaTypes);
|
result["FriendlyName"] = Jellyfin::Support::toJsonValue<QString>(m_friendlyName);
|
||||||
result["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
}
|
||||||
result["AlbumArtPn"] = Jellyfin::Support::toJsonValue<QString>(m_albumArtPn);
|
|
||||||
result["MaxAlbumArtWidth"] = Jellyfin::Support::toJsonValue<qint32>(m_maxAlbumArtWidth);
|
|
||||||
result["MaxAlbumArtHeight"] = Jellyfin::Support::toJsonValue<qint32>(m_maxAlbumArtHeight);
|
if (!(m_manufacturer.isNull())) {
|
||||||
result["MaxIconWidth"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxIconWidth);
|
result["Manufacturer"] = Jellyfin::Support::toJsonValue<QString>(m_manufacturer);
|
||||||
result["MaxIconHeight"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxIconHeight);
|
}
|
||||||
result["MaxStreamingBitrate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxStreamingBitrate);
|
|
||||||
result["MaxStaticBitrate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxStaticBitrate);
|
|
||||||
result["MusicStreamingTranscodingBitrate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_musicStreamingTranscodingBitrate);
|
if (!(m_manufacturerUrl.isNull())) {
|
||||||
result["MaxStaticMusicBitrate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxStaticMusicBitrate);
|
result["ManufacturerUrl"] = Jellyfin::Support::toJsonValue<QString>(m_manufacturerUrl);
|
||||||
result["SonyAggregationFlags"] = Jellyfin::Support::toJsonValue<QString>(m_sonyAggregationFlags);
|
}
|
||||||
result["ProtocolInfo"] = Jellyfin::Support::toJsonValue<QString>(m_protocolInfo);
|
|
||||||
result["TimelineOffsetSeconds"] = Jellyfin::Support::toJsonValue<qint32>(m_timelineOffsetSeconds);
|
|
||||||
result["RequiresPlainVideoItems"] = Jellyfin::Support::toJsonValue<bool>(m_requiresPlainVideoItems);
|
if (!(m_modelName.isNull())) {
|
||||||
result["RequiresPlainFolders"] = Jellyfin::Support::toJsonValue<bool>(m_requiresPlainFolders);
|
result["ModelName"] = Jellyfin::Support::toJsonValue<QString>(m_modelName);
|
||||||
result["EnableMSMediaReceiverRegistrar"] = Jellyfin::Support::toJsonValue<bool>(m_enableMSMediaReceiverRegistrar);
|
}
|
||||||
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_modelDescription.isNull())) {
|
||||||
result["TranscodingProfiles"] = Jellyfin::Support::toJsonValue<QList<TranscodingProfile>>(m_transcodingProfiles);
|
result["ModelDescription"] = Jellyfin::Support::toJsonValue<QString>(m_modelDescription);
|
||||||
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_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["EnableSingleAlbumArtLimit"] = Jellyfin::Support::toJsonValue<bool>(m_enableSingleAlbumArtLimit);
|
||||||
|
result["EnableSingleSubtitleLimit"] = Jellyfin::Support::toJsonValue<bool>(m_enableSingleSubtitleLimit);
|
||||||
|
|
||||||
|
if (!(m_supportedMediaTypes.isNull())) {
|
||||||
|
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["MaxAlbumArtHeight"] = Jellyfin::Support::toJsonValue<qint32>(m_maxAlbumArtHeight);
|
||||||
|
|
||||||
|
if (!(!m_maxIconWidth.has_value())) {
|
||||||
|
result["MaxIconWidth"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxIconWidth);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(!m_maxIconHeight.has_value())) {
|
||||||
|
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["RequiresPlainVideoItems"] = Jellyfin::Support::toJsonValue<bool>(m_requiresPlainVideoItems);
|
||||||
|
result["RequiresPlainFolders"] = Jellyfin::Support::toJsonValue<bool>(m_requiresPlainFolders);
|
||||||
|
result["EnableMSMediaReceiverRegistrar"] = Jellyfin::Support::toJsonValue<bool>(m_enableMSMediaReceiverRegistrar);
|
||||||
|
result["IgnoreTranscodeByteRangeRequests"] = Jellyfin::Support::toJsonValue<bool>(m_ignoreTranscodeByteRangeRequests);
|
||||||
|
|
||||||
|
if (!(m_xmlRootAttributes.size() == 0)) {
|
||||||
|
result["XmlRootAttributes"] = Jellyfin::Support::toJsonValue<QList<XmlAttribute>>(m_xmlRootAttributes);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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);
|
if (!(m_container.isNull())) {
|
||||||
result["Type"] = Jellyfin::Support::toJsonValue<DlnaProfileType>(m_type);
|
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,21 +96,45 @@ 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);
|
||||||
result["RememberIndexing"] = Jellyfin::Support::toJsonValue<bool>(m_rememberIndexing);
|
}
|
||||||
result["PrimaryImageHeight"] = Jellyfin::Support::toJsonValue<qint32>(m_primaryImageHeight);
|
|
||||||
result["PrimaryImageWidth"] = Jellyfin::Support::toJsonValue<qint32>(m_primaryImageWidth);
|
|
||||||
result["CustomPrefs"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_customPrefs);
|
if (!(m_viewType.isNull())) {
|
||||||
result["ScrollDirection"] = Jellyfin::Support::toJsonValue<ScrollDirection>(m_scrollDirection);
|
result["ViewType"] = Jellyfin::Support::toJsonValue<QString>(m_viewType);
|
||||||
result["ShowBackdrop"] = Jellyfin::Support::toJsonValue<bool>(m_showBackdrop);
|
}
|
||||||
result["RememberSorting"] = Jellyfin::Support::toJsonValue<bool>(m_rememberSorting);
|
|
||||||
result["SortOrder"] = Jellyfin::Support::toJsonValue<SortOrder>(m_sortOrder);
|
|
||||||
result["ShowSidebar"] = Jellyfin::Support::toJsonValue<bool>(m_showSidebar);
|
if (!(m_sortBy.isNull())) {
|
||||||
result["Client"] = Jellyfin::Support::toJsonValue<QString>(m_client);
|
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["PrimaryImageHeight"] = Jellyfin::Support::toJsonValue<qint32>(m_primaryImageHeight);
|
||||||
|
result["PrimaryImageWidth"] = Jellyfin::Support::toJsonValue<qint32>(m_primaryImageWidth);
|
||||||
|
|
||||||
|
if (!(m_customPrefs.isEmpty())) {
|
||||||
|
result["CustomPrefs"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_customPrefs);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["ScrollDirection"] = Jellyfin::Support::toJsonValue<ScrollDirection>(m_scrollDirection);
|
||||||
|
result["ShowBackdrop"] = Jellyfin::Support::toJsonValue<bool>(m_showBackdrop);
|
||||||
|
result["RememberSorting"] = Jellyfin::Support::toJsonValue<bool>(m_rememberSorting);
|
||||||
|
result["SortOrder"] = Jellyfin::Support::toJsonValue<SortOrder>(m_sortOrder);
|
||||||
|
result["ShowSidebar"] = Jellyfin::Support::toJsonValue<bool>(m_showSidebar);
|
||||||
|
|
||||||
|
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["IsInNetwork"] = Jellyfin::Support::toJsonValue<bool>(m_isInNetwork);
|
result["IsLocal"] = Jellyfin::Support::toJsonValue<bool>(m_isLocal);
|
||||||
|
result["IsInNetwork"] = Jellyfin::Support::toJsonValue<bool>(m_isInNetwork);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,11 +66,23 @@ 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);
|
|
||||||
result["Type"] = Jellyfin::Support::toJsonValue<ExternalIdMediaType>(m_type);
|
if (!(m_name.isNull())) {
|
||||||
result["UrlFormatString"] = Jellyfin::Support::toJsonValue<QString>(m_urlFormatString);
|
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);
|
||||||
|
|
||||||
|
if (!(m_urlFormatString.isNull())) {
|
||||||
|
result["UrlFormatString"] = Jellyfin::Support::toJsonValue<QString>(m_urlFormatString);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,9 +60,17 @@ 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);
|
|
||||||
result["Size"] = Jellyfin::Support::toJsonValue<qint64>(m_size);
|
|
||||||
result["DateCreated"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateCreated);
|
if (!(m_name.isNull())) {
|
||||||
result["DateModified"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateModified);
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["Size"] = Jellyfin::Support::toJsonValue<qint64>(m_size);
|
||||||
|
result["DateCreated"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateCreated);
|
||||||
|
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,10 +63,18 @@ 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["PinFile"] = Jellyfin::Support::toJsonValue<QString>(m_pinFile);
|
result["Action"] = Jellyfin::Support::toJsonValue<ForgotPasswordAction>(m_action);
|
||||||
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,10 +63,14 @@ 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["ControllingUserId"] = Jellyfin::Support::toJsonValue<QString>(m_controllingUserId);
|
result["Name"] = Jellyfin::Support::toJsonValue<GeneralCommandType>(m_name);
|
||||||
result["Arguments"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_arguments);
|
result["ControllingUserId"] = Jellyfin::Support::toJsonValue<QString>(m_controllingUserId);
|
||||||
|
|
||||||
|
if (!(m_arguments.isEmpty())) {
|
||||||
|
result["Arguments"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_arguments);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -135,34 +135,130 @@ 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);
|
|
||||||
result["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
|
||||||
result["MinStartDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_minStartDate);
|
if (!(m_channelIds.size() == 0)) {
|
||||||
result["HasAired"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_hasAired);
|
result["ChannelIds"] = Jellyfin::Support::toJsonValue<QStringList>(m_channelIds);
|
||||||
result["IsAiring"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isAiring);
|
}
|
||||||
result["MaxStartDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_maxStartDate);
|
|
||||||
result["MinEndDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_minEndDate);
|
result["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
||||||
result["MaxEndDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_maxEndDate);
|
|
||||||
result["IsMovie"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isMovie);
|
if (!(m_minStartDate.isNull())) {
|
||||||
result["IsSeries"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isSeries);
|
result["MinStartDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_minStartDate);
|
||||||
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_hasAired.has_value())) {
|
||||||
result["Limit"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_limit);
|
result["HasAired"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_hasAired);
|
||||||
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_isAiring.has_value())) {
|
||||||
result["EnableImages"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_enableImages);
|
result["IsAiring"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isAiring);
|
||||||
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);
|
|
||||||
result["EnableUserData"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_enableUserData);
|
if (!(m_maxStartDate.isNull())) {
|
||||||
result["SeriesTimerId"] = Jellyfin::Support::toJsonValue<QString>(m_seriesTimerId);
|
result["MaxStartDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_maxStartDate);
|
||||||
result["LibrarySeriesId"] = Jellyfin::Support::toJsonValue<QString>(m_librarySeriesId);
|
}
|
||||||
result["Fields"] = Jellyfin::Support::toJsonValue<QList<ItemFields>>(m_fields);
|
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
if (!(!m_imageTypeLimit.has_value())) {
|
||||||
|
result["ImageTypeLimit"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_imageTypeLimit);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
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["GroupId"] = Jellyfin::Support::toJsonValue<QString>(m_groupId);
|
||||||
result["State"] = Jellyfin::Support::toJsonValue<GroupStateType>(m_state);
|
|
||||||
result["Participants"] = Jellyfin::Support::toJsonValue<QStringList>(m_participants);
|
if (!(m_groupName.isNull())) {
|
||||||
result["LastUpdatedAt"] = Jellyfin::Support::toJsonValue<QDateTime>(m_lastUpdatedAt);
|
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["EndDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_endDate);
|
result["StartDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_startDate);
|
||||||
|
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,12 +69,28 @@ 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["FileLength"] = Jellyfin::Support::toJsonValue<qint64>(m_fileLength);
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
result["Format"] = Jellyfin::Support::toJsonValue<QString>(m_format);
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
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["ImageType"] = Jellyfin::Support::toJsonValue<ImageType>(m_imageType);
|
||||||
result["ImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_imageTag);
|
|
||||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
if (!(!m_imageIndex.has_value())) {
|
||||||
result["BlurHash"] = Jellyfin::Support::toJsonValue<QString>(m_blurHash);
|
result["ImageIndex"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_imageIndex);
|
||||||
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);
|
|
||||||
|
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["Limit"] = Jellyfin::Support::toJsonValue<qint32>(m_limit);
|
result["Type"] = Jellyfin::Support::toJsonValue<ImageType>(m_type);
|
||||||
result["MinWidth"] = Jellyfin::Support::toJsonValue<qint32>(m_minWidth);
|
result["Limit"] = Jellyfin::Support::toJsonValue<qint32>(m_limit);
|
||||||
|
result["MinWidth"] = Jellyfin::Support::toJsonValue<qint32>(m_minWidth);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,9 +60,17 @@ 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,13 +72,29 @@ 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["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
result["Guid"] = Jellyfin::Support::toJsonValue<QString>(m_guid);
|
||||||
result["Version"] = Jellyfin::Support::toJsonValue<QSharedPointer<Version>>(m_version);
|
|
||||||
result["Changelog"] = Jellyfin::Support::toJsonValue<QString>(m_changelog);
|
if (!(m_name.isNull())) {
|
||||||
result["SourceUrl"] = Jellyfin::Support::toJsonValue<QString>(m_sourceUrl);
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
result["Checksum"] = Jellyfin::Support::toJsonValue<QString>(m_checksum);
|
}
|
||||||
|
|
||||||
|
result["Version"] = Jellyfin::Support::toJsonValue<QSharedPointer<Version>>(m_version);
|
||||||
|
|
||||||
|
if (!(m_changelog.isNull())) {
|
||||||
|
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,14 +75,30 @@ 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);
|
|
||||||
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
if (!(m_name.isNull())) {
|
||||||
result["Version"] = Jellyfin::Support::toJsonValue<QSharedPointer<Version>>(m_version);
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
result["AssemblyFilePath"] = Jellyfin::Support::toJsonValue<QString>(m_assemblyFilePath);
|
}
|
||||||
result["CanUninstall"] = Jellyfin::Support::toJsonValue<bool>(m_canUninstall);
|
|
||||||
result["DataFolderPath"] = Jellyfin::Support::toJsonValue<QString>(m_dataFolderPath);
|
|
||||||
|
if (!(m_description.isNull())) {
|
||||||
|
result["Description"] = Jellyfin::Support::toJsonValue<QString>(m_description);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||||
|
result["Version"] = Jellyfin::Support::toJsonValue<QSharedPointer<Version>>(m_version);
|
||||||
|
|
||||||
|
if (!(m_assemblyFilePath.isNull())) {
|
||||||
|
result["AssemblyFilePath"] = Jellyfin::Support::toJsonValue<QString>(m_assemblyFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["CanUninstall"] = Jellyfin::Support::toJsonValue<bool>(m_canUninstall);
|
||||||
|
|
||||||
|
if (!(m_dataFolderPath.isNull())) {
|
||||||
|
result["DataFolderPath"] = Jellyfin::Support::toJsonValue<QString>(m_dataFolderPath);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,19 +90,19 @@ 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["SeriesCount"] = Jellyfin::Support::toJsonValue<qint32>(m_seriesCount);
|
result["MovieCount"] = Jellyfin::Support::toJsonValue<qint32>(m_movieCount);
|
||||||
result["EpisodeCount"] = Jellyfin::Support::toJsonValue<qint32>(m_episodeCount);
|
result["SeriesCount"] = Jellyfin::Support::toJsonValue<qint32>(m_seriesCount);
|
||||||
result["ArtistCount"] = Jellyfin::Support::toJsonValue<qint32>(m_artistCount);
|
result["EpisodeCount"] = Jellyfin::Support::toJsonValue<qint32>(m_episodeCount);
|
||||||
result["ProgramCount"] = Jellyfin::Support::toJsonValue<qint32>(m_programCount);
|
result["ArtistCount"] = Jellyfin::Support::toJsonValue<qint32>(m_artistCount);
|
||||||
result["TrailerCount"] = Jellyfin::Support::toJsonValue<qint32>(m_trailerCount);
|
result["ProgramCount"] = Jellyfin::Support::toJsonValue<qint32>(m_programCount);
|
||||||
result["SongCount"] = Jellyfin::Support::toJsonValue<qint32>(m_songCount);
|
result["TrailerCount"] = Jellyfin::Support::toJsonValue<qint32>(m_trailerCount);
|
||||||
result["AlbumCount"] = Jellyfin::Support::toJsonValue<qint32>(m_albumCount);
|
result["SongCount"] = Jellyfin::Support::toJsonValue<qint32>(m_songCount);
|
||||||
result["MusicVideoCount"] = Jellyfin::Support::toJsonValue<qint32>(m_musicVideoCount);
|
result["AlbumCount"] = Jellyfin::Support::toJsonValue<qint32>(m_albumCount);
|
||||||
result["BoxSetCount"] = Jellyfin::Support::toJsonValue<qint32>(m_boxSetCount);
|
result["MusicVideoCount"] = Jellyfin::Support::toJsonValue<qint32>(m_musicVideoCount);
|
||||||
result["BookCount"] = Jellyfin::Support::toJsonValue<qint32>(m_bookCount);
|
result["BoxSetCount"] = Jellyfin::Support::toJsonValue<qint32>(m_boxSetCount);
|
||||||
result["ItemCount"] = Jellyfin::Support::toJsonValue<qint32>(m_itemCount);
|
result["BookCount"] = Jellyfin::Support::toJsonValue<qint32>(m_bookCount);
|
||||||
|
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,32 +129,76 @@ 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["EnableRealtimeMonitor"] = Jellyfin::Support::toJsonValue<bool>(m_enableRealtimeMonitor);
|
result["EnablePhotos"] = Jellyfin::Support::toJsonValue<bool>(m_enablePhotos);
|
||||||
result["EnableChapterImageExtraction"] = Jellyfin::Support::toJsonValue<bool>(m_enableChapterImageExtraction);
|
result["EnableRealtimeMonitor"] = Jellyfin::Support::toJsonValue<bool>(m_enableRealtimeMonitor);
|
||||||
result["ExtractChapterImagesDuringLibraryScan"] = Jellyfin::Support::toJsonValue<bool>(m_extractChapterImagesDuringLibraryScan);
|
result["EnableChapterImageExtraction"] = Jellyfin::Support::toJsonValue<bool>(m_enableChapterImageExtraction);
|
||||||
result["PathInfos"] = Jellyfin::Support::toJsonValue<QList<MediaPathInfo>>(m_pathInfos);
|
result["ExtractChapterImagesDuringLibraryScan"] = Jellyfin::Support::toJsonValue<bool>(m_extractChapterImagesDuringLibraryScan);
|
||||||
result["SaveLocalMetadata"] = Jellyfin::Support::toJsonValue<bool>(m_saveLocalMetadata);
|
|
||||||
result["EnableInternetProviders"] = Jellyfin::Support::toJsonValue<bool>(m_enableInternetProviders);
|
if (!(m_pathInfos.size() == 0)) {
|
||||||
result["EnableAutomaticSeriesGrouping"] = Jellyfin::Support::toJsonValue<bool>(m_enableAutomaticSeriesGrouping);
|
result["PathInfos"] = Jellyfin::Support::toJsonValue<QList<MediaPathInfo>>(m_pathInfos);
|
||||||
result["EnableEmbeddedTitles"] = Jellyfin::Support::toJsonValue<bool>(m_enableEmbeddedTitles);
|
}
|
||||||
result["EnableEmbeddedEpisodeInfos"] = Jellyfin::Support::toJsonValue<bool>(m_enableEmbeddedEpisodeInfos);
|
|
||||||
result["AutomaticRefreshIntervalDays"] = Jellyfin::Support::toJsonValue<qint32>(m_automaticRefreshIntervalDays);
|
result["SaveLocalMetadata"] = Jellyfin::Support::toJsonValue<bool>(m_saveLocalMetadata);
|
||||||
result["PreferredMetadataLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_preferredMetadataLanguage);
|
result["EnableInternetProviders"] = Jellyfin::Support::toJsonValue<bool>(m_enableInternetProviders);
|
||||||
result["MetadataCountryCode"] = Jellyfin::Support::toJsonValue<QString>(m_metadataCountryCode);
|
result["EnableAutomaticSeriesGrouping"] = Jellyfin::Support::toJsonValue<bool>(m_enableAutomaticSeriesGrouping);
|
||||||
result["SeasonZeroDisplayName"] = Jellyfin::Support::toJsonValue<QString>(m_seasonZeroDisplayName);
|
result["EnableEmbeddedTitles"] = Jellyfin::Support::toJsonValue<bool>(m_enableEmbeddedTitles);
|
||||||
result["MetadataSavers"] = Jellyfin::Support::toJsonValue<QStringList>(m_metadataSavers);
|
result["EnableEmbeddedEpisodeInfos"] = Jellyfin::Support::toJsonValue<bool>(m_enableEmbeddedEpisodeInfos);
|
||||||
result["DisabledLocalMetadataReaders"] = Jellyfin::Support::toJsonValue<QStringList>(m_disabledLocalMetadataReaders);
|
result["AutomaticRefreshIntervalDays"] = Jellyfin::Support::toJsonValue<qint32>(m_automaticRefreshIntervalDays);
|
||||||
result["LocalMetadataReaderOrder"] = Jellyfin::Support::toJsonValue<QStringList>(m_localMetadataReaderOrder);
|
|
||||||
result["DisabledSubtitleFetchers"] = Jellyfin::Support::toJsonValue<QStringList>(m_disabledSubtitleFetchers);
|
if (!(m_preferredMetadataLanguage.isNull())) {
|
||||||
result["SubtitleFetcherOrder"] = Jellyfin::Support::toJsonValue<QStringList>(m_subtitleFetcherOrder);
|
result["PreferredMetadataLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_preferredMetadataLanguage);
|
||||||
result["SkipSubtitlesIfEmbeddedSubtitlesPresent"] = Jellyfin::Support::toJsonValue<bool>(m_skipSubtitlesIfEmbeddedSubtitlesPresent);
|
}
|
||||||
result["SkipSubtitlesIfAudioTrackMatches"] = Jellyfin::Support::toJsonValue<bool>(m_skipSubtitlesIfAudioTrackMatches);
|
|
||||||
result["SubtitleDownloadLanguages"] = Jellyfin::Support::toJsonValue<QStringList>(m_subtitleDownloadLanguages);
|
|
||||||
result["RequirePerfectSubtitleMatch"] = Jellyfin::Support::toJsonValue<bool>(m_requirePerfectSubtitleMatch);
|
if (!(m_metadataCountryCode.isNull())) {
|
||||||
result["SaveSubtitlesWithMedia"] = Jellyfin::Support::toJsonValue<bool>(m_saveSubtitlesWithMedia);
|
result["MetadataCountryCode"] = Jellyfin::Support::toJsonValue<QString>(m_metadataCountryCode);
|
||||||
result["TypeOptions"] = Jellyfin::Support::toJsonValue<QList<TypeOptions>>(m_typeOptions);
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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["SkipSubtitlesIfAudioTrackMatches"] = Jellyfin::Support::toJsonValue<bool>(m_skipSubtitlesIfAudioTrackMatches);
|
||||||
|
|
||||||
|
if (!(m_subtitleDownloadLanguages.size() == 0)) {
|
||||||
|
result["SubtitleDownloadLanguages"] = Jellyfin::Support::toJsonValue<QStringList>(m_subtitleDownloadLanguages);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["RequirePerfectSubtitleMatch"] = Jellyfin::Support::toJsonValue<bool>(m_requirePerfectSubtitleMatch);
|
||||||
|
result["SaveSubtitlesWithMedia"] = Jellyfin::Support::toJsonValue<bool>(m_saveSubtitlesWithMedia);
|
||||||
|
|
||||||
|
if (!(m_typeOptions.size() == 0)) {
|
||||||
|
result["TypeOptions"] = Jellyfin::Support::toJsonValue<QList<TypeOptions>>(m_typeOptions);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,11 +66,27 @@ 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,12 +69,32 @@ 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);
|
if (!(m_foldersAddedTo.size() == 0)) {
|
||||||
result["ItemsRemoved"] = Jellyfin::Support::toJsonValue<QStringList>(m_itemsRemoved);
|
result["FoldersAddedTo"] = Jellyfin::Support::toJsonValue<QStringList>(m_foldersAddedTo);
|
||||||
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_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,25 +108,93 @@ 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);
|
||||||
result["EnableAllTuners"] = Jellyfin::Support::toJsonValue<bool>(m_enableAllTuners);
|
}
|
||||||
result["NewsCategories"] = Jellyfin::Support::toJsonValue<QStringList>(m_newsCategories);
|
|
||||||
result["SportsCategories"] = Jellyfin::Support::toJsonValue<QStringList>(m_sportsCategories);
|
|
||||||
result["KidsCategories"] = Jellyfin::Support::toJsonValue<QStringList>(m_kidsCategories);
|
if (!(m_username.isNull())) {
|
||||||
result["MovieCategories"] = Jellyfin::Support::toJsonValue<QStringList>(m_movieCategories);
|
result["Username"] = Jellyfin::Support::toJsonValue<QString>(m_username);
|
||||||
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);
|
|
||||||
result["UserAgent"] = Jellyfin::Support::toJsonValue<QString>(m_userAgent);
|
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);
|
||||||
|
|
||||||
|
if (!(m_newsCategories.size() == 0)) {
|
||||||
|
result["NewsCategories"] = Jellyfin::Support::toJsonValue<QStringList>(m_newsCategories);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_sportsCategories.size() == 0)) {
|
||||||
|
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,10 +63,18 @@ 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);
|
|
||||||
result["IsEnabled"] = Jellyfin::Support::toJsonValue<bool>(m_isEnabled);
|
|
||||||
result["EnabledUsers"] = Jellyfin::Support::toJsonValue<QStringList>(m_enabledUsers);
|
if (!(m_services.size() == 0)) {
|
||||||
|
result["Services"] = Jellyfin::Support::toJsonValue<QList<LiveTvServiceInfo>>(m_services);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["IsEnabled"] = Jellyfin::Support::toJsonValue<bool>(m_isEnabled);
|
||||||
|
|
||||||
|
if (!(m_enabledUsers.size() == 0)) {
|
||||||
|
result["EnabledUsers"] = Jellyfin::Support::toJsonValue<QStringList>(m_enabledUsers);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,15 +78,35 @@ 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);
|
|
||||||
result["Status"] = Jellyfin::Support::toJsonValue<LiveTvServiceStatus>(m_status);
|
if (!(m_name.isNull())) {
|
||||||
result["StatusMessage"] = Jellyfin::Support::toJsonValue<QString>(m_statusMessage);
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
result["Version"] = Jellyfin::Support::toJsonValue<QString>(m_version);
|
}
|
||||||
result["HasUpdateAvailable"] = Jellyfin::Support::toJsonValue<bool>(m_hasUpdateAvailable);
|
|
||||||
result["IsVisible"] = Jellyfin::Support::toJsonValue<bool>(m_isVisible);
|
|
||||||
result["Tuners"] = Jellyfin::Support::toJsonValue<QStringList>(m_tuners);
|
if (!(m_homePageUrl.isNull())) {
|
||||||
|
result["HomePageUrl"] = Jellyfin::Support::toJsonValue<QString>(m_homePageUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["Status"] = Jellyfin::Support::toJsonValue<LiveTvServiceStatus>(m_status);
|
||||||
|
|
||||||
|
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["IsVisible"] = Jellyfin::Support::toJsonValue<bool>(m_isVisible);
|
||||||
|
|
||||||
|
if (!(m_tuners.size() == 0)) {
|
||||||
|
result["Tuners"] = Jellyfin::Support::toJsonValue<QStringList>(m_tuners);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,9 +60,17 @@ 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,11 +66,15 @@ 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["DateModified"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateModified);
|
result["DateCreated"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateCreated);
|
||||||
result["Size"] = Jellyfin::Support::toJsonValue<qint64>(m_size);
|
result["DateModified"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateModified);
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
result["Size"] = Jellyfin::Support::toJsonValue<qint64>(m_size);
|
||||||
|
|
||||||
|
if (!(m_name.isNull())) {
|
||||||
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -75,14 +75,38 @@ 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["Index"] = Jellyfin::Support::toJsonValue<qint32>(m_index);
|
result["Codec"] = Jellyfin::Support::toJsonValue<QString>(m_codec);
|
||||||
result["FileName"] = Jellyfin::Support::toJsonValue<QString>(m_fileName);
|
}
|
||||||
result["MimeType"] = Jellyfin::Support::toJsonValue<QString>(m_mimeType);
|
|
||||||
result["DeliveryUrl"] = Jellyfin::Support::toJsonValue<QString>(m_deliveryUrl);
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
if (!(m_fileName.isNull())) {
|
||||||
|
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,9 +60,17 @@ 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["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
result["PathInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<MediaPathInfo>>(m_pathInfo);
|
|
||||||
|
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,9 +60,17 @@ 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,49 +180,137 @@ 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["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
result["Protocol"] = Jellyfin::Support::toJsonValue<MediaProtocol>(m_protocol);
|
||||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
|
||||||
result["EncoderPath"] = Jellyfin::Support::toJsonValue<QString>(m_encoderPath);
|
if (!(m_jellyfinId.isNull())) {
|
||||||
result["EncoderProtocol"] = Jellyfin::Support::toJsonValue<MediaProtocol>(m_encoderProtocol);
|
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||||
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);
|
|
||||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
if (!(m_path.isNull())) {
|
||||||
result["IsRemote"] = Jellyfin::Support::toJsonValue<bool>(m_isRemote);
|
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||||
result["ETag"] = Jellyfin::Support::toJsonValue<QString>(m_eTag);
|
}
|
||||||
result["RunTimeTicks"] = Jellyfin::Support::toJsonValue<std::optional<qint64>>(m_runTimeTicks);
|
|
||||||
result["ReadAtNativeFramerate"] = Jellyfin::Support::toJsonValue<bool>(m_readAtNativeFramerate);
|
|
||||||
result["IgnoreDts"] = Jellyfin::Support::toJsonValue<bool>(m_ignoreDts);
|
if (!(m_encoderPath.isNull())) {
|
||||||
result["IgnoreIndex"] = Jellyfin::Support::toJsonValue<bool>(m_ignoreIndex);
|
result["EncoderPath"] = Jellyfin::Support::toJsonValue<QString>(m_encoderPath);
|
||||||
result["GenPtsInput"] = Jellyfin::Support::toJsonValue<bool>(m_genPtsInput);
|
}
|
||||||
result["SupportsTranscoding"] = Jellyfin::Support::toJsonValue<bool>(m_supportsTranscoding);
|
|
||||||
result["SupportsDirectStream"] = Jellyfin::Support::toJsonValue<bool>(m_supportsDirectStream);
|
result["EncoderProtocol"] = Jellyfin::Support::toJsonValue<MediaProtocol>(m_encoderProtocol);
|
||||||
result["SupportsDirectPlay"] = Jellyfin::Support::toJsonValue<bool>(m_supportsDirectPlay);
|
result["Type"] = Jellyfin::Support::toJsonValue<MediaSourceType>(m_type);
|
||||||
result["IsInfiniteStream"] = Jellyfin::Support::toJsonValue<bool>(m_isInfiniteStream);
|
|
||||||
result["RequiresOpening"] = Jellyfin::Support::toJsonValue<bool>(m_requiresOpening);
|
if (!(m_container.isNull())) {
|
||||||
result["OpenToken"] = Jellyfin::Support::toJsonValue<QString>(m_openToken);
|
result["Container"] = Jellyfin::Support::toJsonValue<QString>(m_container);
|
||||||
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);
|
|
||||||
result["RequiresLooping"] = Jellyfin::Support::toJsonValue<bool>(m_requiresLooping);
|
if (!(!m_size.has_value())) {
|
||||||
result["SupportsProbing"] = Jellyfin::Support::toJsonValue<bool>(m_supportsProbing);
|
result["Size"] = Jellyfin::Support::toJsonValue<std::optional<qint64>>(m_size);
|
||||||
result["VideoType"] = Jellyfin::Support::toJsonValue<VideoType>(m_videoType);
|
}
|
||||||
result["IsoType"] = Jellyfin::Support::toJsonValue<IsoType>(m_isoType);
|
|
||||||
result["Video3DFormat"] = Jellyfin::Support::toJsonValue<Video3DFormat>(m_video3DFormat);
|
|
||||||
result["MediaStreams"] = Jellyfin::Support::toJsonValue<QList<MediaStream>>(m_mediaStreams);
|
if (!(m_name.isNull())) {
|
||||||
result["MediaAttachments"] = Jellyfin::Support::toJsonValue<QList<MediaAttachment>>(m_mediaAttachments);
|
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||||
result["Formats"] = Jellyfin::Support::toJsonValue<QStringList>(m_formats);
|
}
|
||||||
result["Bitrate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_bitrate);
|
|
||||||
result["Timestamp"] = Jellyfin::Support::toJsonValue<TransportStreamTimestamp>(m_timestamp);
|
result["IsRemote"] = Jellyfin::Support::toJsonValue<bool>(m_isRemote);
|
||||||
result["RequiredHttpHeaders"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_requiredHttpHeaders);
|
|
||||||
result["TranscodingUrl"] = Jellyfin::Support::toJsonValue<QString>(m_transcodingUrl);
|
if (!(m_eTag.isNull())) {
|
||||||
result["TranscodingSubProtocol"] = Jellyfin::Support::toJsonValue<QString>(m_transcodingSubProtocol);
|
result["ETag"] = Jellyfin::Support::toJsonValue<QString>(m_eTag);
|
||||||
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_runTimeTicks.has_value())) {
|
||||||
|
result["RunTimeTicks"] = Jellyfin::Support::toJsonValue<std::optional<qint64>>(m_runTimeTicks);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["ReadAtNativeFramerate"] = Jellyfin::Support::toJsonValue<bool>(m_readAtNativeFramerate);
|
||||||
|
result["IgnoreDts"] = Jellyfin::Support::toJsonValue<bool>(m_ignoreDts);
|
||||||
|
result["IgnoreIndex"] = Jellyfin::Support::toJsonValue<bool>(m_ignoreIndex);
|
||||||
|
result["GenPtsInput"] = Jellyfin::Support::toJsonValue<bool>(m_genPtsInput);
|
||||||
|
result["SupportsTranscoding"] = Jellyfin::Support::toJsonValue<bool>(m_supportsTranscoding);
|
||||||
|
result["SupportsDirectStream"] = Jellyfin::Support::toJsonValue<bool>(m_supportsDirectStream);
|
||||||
|
result["SupportsDirectPlay"] = Jellyfin::Support::toJsonValue<bool>(m_supportsDirectPlay);
|
||||||
|
result["IsInfiniteStream"] = Jellyfin::Support::toJsonValue<bool>(m_isInfiniteStream);
|
||||||
|
result["RequiresOpening"] = Jellyfin::Support::toJsonValue<bool>(m_requiresOpening);
|
||||||
|
|
||||||
|
if (!(m_openToken.isNull())) {
|
||||||
|
result["OpenToken"] = Jellyfin::Support::toJsonValue<QString>(m_openToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["RequiresClosing"] = Jellyfin::Support::toJsonValue<bool>(m_requiresClosing);
|
||||||
|
|
||||||
|
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["SupportsProbing"] = Jellyfin::Support::toJsonValue<bool>(m_supportsProbing);
|
||||||
|
result["VideoType"] = Jellyfin::Support::toJsonValue<VideoType>(m_videoType);
|
||||||
|
result["IsoType"] = Jellyfin::Support::toJsonValue<IsoType>(m_isoType);
|
||||||
|
result["Video3DFormat"] = Jellyfin::Support::toJsonValue<Video3DFormat>(m_video3DFormat);
|
||||||
|
|
||||||
|
if (!(m_mediaStreams.size() == 0)) {
|
||||||
|
result["MediaStreams"] = Jellyfin::Support::toJsonValue<QList<MediaStream>>(m_mediaStreams);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
if (!(m_requiredHttpHeaders.isEmpty())) {
|
||||||
|
result["RequiredHttpHeaders"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_requiredHttpHeaders);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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,54 +195,206 @@ 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);
|
|
||||||
result["IsInterlaced"] = Jellyfin::Support::toJsonValue<bool>(m_isInterlaced);
|
if (!(m_colorRange.isNull())) {
|
||||||
result["IsAVC"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isAVC);
|
result["ColorRange"] = Jellyfin::Support::toJsonValue<QString>(m_colorRange);
|
||||||
result["ChannelLayout"] = Jellyfin::Support::toJsonValue<QString>(m_channelLayout);
|
}
|
||||||
result["BitRate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_bitRate);
|
|
||||||
result["BitDepth"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_bitDepth);
|
|
||||||
result["RefFrames"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_refFrames);
|
if (!(m_colorSpace.isNull())) {
|
||||||
result["PacketLength"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_packetLength);
|
result["ColorSpace"] = Jellyfin::Support::toJsonValue<QString>(m_colorSpace);
|
||||||
result["Channels"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_channels);
|
}
|
||||||
result["SampleRate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_sampleRate);
|
|
||||||
result["IsDefault"] = Jellyfin::Support::toJsonValue<bool>(m_isDefault);
|
|
||||||
result["IsForced"] = Jellyfin::Support::toJsonValue<bool>(m_isForced);
|
if (!(m_colorTransfer.isNull())) {
|
||||||
result["Height"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_height);
|
result["ColorTransfer"] = Jellyfin::Support::toJsonValue<QString>(m_colorTransfer);
|
||||||
result["Width"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_width);
|
}
|
||||||
result["AverageFrameRate"] = Jellyfin::Support::toJsonValue<std::optional<float>>(m_averageFrameRate);
|
|
||||||
result["RealFrameRate"] = Jellyfin::Support::toJsonValue<std::optional<float>>(m_realFrameRate);
|
|
||||||
result["Profile"] = Jellyfin::Support::toJsonValue<QString>(m_profile);
|
if (!(m_colorPrimaries.isNull())) {
|
||||||
result["Type"] = Jellyfin::Support::toJsonValue<MediaStreamType>(m_type);
|
result["ColorPrimaries"] = Jellyfin::Support::toJsonValue<QString>(m_colorPrimaries);
|
||||||
result["AspectRatio"] = Jellyfin::Support::toJsonValue<QString>(m_aspectRatio);
|
}
|
||||||
result["Index"] = Jellyfin::Support::toJsonValue<qint32>(m_index);
|
|
||||||
result["Score"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_score);
|
|
||||||
result["IsExternal"] = Jellyfin::Support::toJsonValue<bool>(m_isExternal);
|
if (!(m_comment.isNull())) {
|
||||||
result["DeliveryMethod"] = Jellyfin::Support::toJsonValue<SubtitleDeliveryMethod>(m_deliveryMethod);
|
result["Comment"] = Jellyfin::Support::toJsonValue<QString>(m_comment);
|
||||||
result["DeliveryUrl"] = Jellyfin::Support::toJsonValue<QString>(m_deliveryUrl);
|
}
|
||||||
result["IsExternalUrl"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isExternalUrl);
|
|
||||||
result["IsTextSubtitleStream"] = Jellyfin::Support::toJsonValue<bool>(m_isTextSubtitleStream);
|
|
||||||
result["SupportsExternalStream"] = Jellyfin::Support::toJsonValue<bool>(m_supportsExternalStream);
|
if (!(m_timeBase.isNull())) {
|
||||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
result["TimeBase"] = Jellyfin::Support::toJsonValue<QString>(m_timeBase);
|
||||||
result["PixelFormat"] = Jellyfin::Support::toJsonValue<QString>(m_pixelFormat);
|
}
|
||||||
result["Level"] = Jellyfin::Support::toJsonValue<std::optional<double>>(m_level);
|
|
||||||
result["IsAnamorphic"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isAnamorphic);
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
if (!(!m_isAVC.has_value())) {
|
||||||
|
result["IsAVC"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isAVC);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!(m_channelLayout.isNull())) {
|
||||||
|
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["IsForced"] = Jellyfin::Support::toJsonValue<bool>(m_isForced);
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
if (!(m_aspectRatio.isNull())) {
|
||||||
|
result["AspectRatio"] = Jellyfin::Support::toJsonValue<QString>(m_aspectRatio);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["Index"] = Jellyfin::Support::toJsonValue<qint32>(m_index);
|
||||||
|
|
||||||
|
if (!(!m_score.has_value())) {
|
||||||
|
result["Score"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_score);
|
||||||
|
}
|
||||||
|
|
||||||
|
result["IsExternal"] = Jellyfin::Support::toJsonValue<bool>(m_isExternal);
|
||||||
|
result["DeliveryMethod"] = Jellyfin::Support::toJsonValue<SubtitleDeliveryMethod>(m_deliveryMethod);
|
||||||
|
|
||||||
|
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["SupportsExternalStream"] = Jellyfin::Support::toJsonValue<bool>(m_supportsExternalStream);
|
||||||
|
|
||||||
|
if (!(m_path.isNull())) {
|
||||||
|
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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,9 +60,17 @@ 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,9 +60,17 @@ 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,13 +72,37 @@ 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,14 +75,42 @@ 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["NewIndex"] = Jellyfin::Support::toJsonValue<qint32>(m_newIndex);
|
result["PlaylistItemId"] = Jellyfin::Support::toJsonValue<QString>(m_playlistItemId);
|
||||||
|
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);
|
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);
|
||||||
result["IsAutomated"] = Jellyfin::Support::toJsonValue<bool>(m_isAutomated);
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
result["SearchInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<MovieInfo>>(m_searchInfo);
|
||||||
result["SearchProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_searchProviderName);
|
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
||||||
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,18 +87,58 @@ 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);
|
||||||
result["IsAutomated"] = Jellyfin::Support::toJsonValue<bool>(m_isAutomated);
|
}
|
||||||
result["Artists"] = Jellyfin::Support::toJsonValue<QStringList>(m_artists);
|
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
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["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
result["SearchInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<MusicVideoInfo>>(m_searchInfo);
|
||||||
result["SearchProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_searchProviderName);
|
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
||||||
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,9 +60,17 @@ 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,9 +60,17 @@ 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