mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2024-11-22 01:05:17 +00:00
Make model code compileable
This disables some application level logic, but I'm going to rewrite that using Lager anyway.
This commit is contained in:
parent
0358418926
commit
b9b08ab384
|
@ -25,3 +25,6 @@ if(PLATFORM_SAILFISHOS)
|
|||
elseif(PLATFORM_QTQUICK)
|
||||
add_subdirectory(qtquick)
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||
|
|
|
@ -1,11 +1,47 @@
|
|||
project(jellyfin-qt VERSION 0.1.0)
|
||||
find_package(Qt5 5.6 COMPONENTS Multimedia Network Qml WebSockets REQUIRED)
|
||||
include(GNUInstallDirs)
|
||||
include(FetchContent)
|
||||
|
||||
find_package(Boost REQUIRED)
|
||||
find_package(Immer)
|
||||
if(NOT Immer_FOUND)
|
||||
message(STATUS "Using Immer from FetchContent")
|
||||
set(immer_BUILD_TESTS OFF)
|
||||
set(immer_BUILD_EXAMPLES OFF)
|
||||
set(immer_BUILD_DOCS OFF)
|
||||
set(immer_BUILD_EXTRAS OFF)
|
||||
FetchContent_Declare(immer GIT_REPOSITORY https://github.com/arximboldi/immer GIT_TAG
|
||||
800ddb04e528a3e83e69e8021d7e872e7c34cbcd)
|
||||
FetchContent_MakeAvailable(immer)
|
||||
endif()
|
||||
|
||||
find_package(Lager)
|
||||
if(NOT Lager_FOUND)
|
||||
message(STATUS "Using lager from FetchContent")
|
||||
set(lager_BUILD_TESTS OFF)
|
||||
set(lager_BUILD_EXAMPLES OFF)
|
||||
set(lager_BUILD_DOCS OFF)
|
||||
set(lager_EMBED_RESOURCES_PATH OFF)
|
||||
FetchContent_Declare(lager GIT_REPOSITORY https://github.com/arximboldi/lager GIT_TAG
|
||||
71eca6b0ebbccf3e0e54324b6967f047e49ba92d)
|
||||
FetchContent_MakeAvailable(lager)
|
||||
endif()
|
||||
|
||||
find_package(cereal)
|
||||
if(NOT cereal_FOUND)
|
||||
set(JUST_INSTALL_CEREAL ON)
|
||||
FetchContent_Declare(cereal GIT_REPOSITORY https://github.com/USCiLab/cereal GIT_TAG v1.3.0)
|
||||
FetchContent_MakeAvailable(cereal)
|
||||
endif()
|
||||
|
||||
|
||||
include(GeneratedSources.cmake)
|
||||
|
||||
set(jellyfin-qt_SOURCES
|
||||
# src/DTO/dto.cpp
|
||||
src/model/item.cpp
|
||||
src/support/jsonconv.cpp
|
||||
src/support/loader.cpp
|
||||
src/apiclient.cpp
|
||||
src/apimodel.cpp
|
||||
|
@ -22,6 +58,8 @@ list(APPEND jellyfin-qt_SOURCES ${openapi_SOURCES})
|
|||
|
||||
set(jellyfin-qt_HEADERS
|
||||
# include/JellyfinQt/DTO/dto.h
|
||||
include/JellyfinQt/model/item.h
|
||||
include/JellyfinQt/support/jsonconv.h
|
||||
include/JellyfinQt/support/loader.h
|
||||
include/JellyfinQt/apiclient.h
|
||||
include/JellyfinQt/apimodel.h
|
||||
|
|
|
@ -15,27 +15,3 @@ private:
|
|||
};
|
||||
|
||||
typedef {{className}}Class::Value {{className}};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using {{className}} = Jellyfin::DTO::{{className}};
|
||||
using {{className}}Class = Jellyfin::DTO::{{className}}Class;
|
||||
|
||||
template <>
|
||||
|
||||
{{className}} fromJsonValue<{{className}}>(const QJsonValue &source) {
|
||||
if (!source.isString()) return {{className}}Class::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
|
||||
{{#each values as |value|}}
|
||||
if (str == QStringLiteral("{{value}}")) {
|
||||
return {{className}}Class::{{value}};
|
||||
}
|
||||
|
||||
{{/each}}
|
||||
|
||||
return {{className}}Class::EnumNotSet;
|
||||
}
|
||||
|
|
25
core/codegen/enum_implementation.hbs
Normal file
25
core/codegen/enum_implementation.hbs
Normal file
|
@ -0,0 +1,25 @@
|
|||
{{className}}Class::{{className}}Class() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using {{className}} = Jellyfin::DTO::{{className}};
|
||||
|
||||
template <>
|
||||
|
||||
{{className}} fromJsonValue<{{className}}>(const QJsonValue &source) {
|
||||
if (!source.isString()) return {{className}}::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
|
||||
{{#each values as |value|}}
|
||||
if (str == QStringLiteral("{{value}}")) {
|
||||
return {{className}}::{{value}};
|
||||
}
|
||||
|
||||
{{/each}}
|
||||
|
||||
return {{className}}::EnumNotSet;
|
||||
}
|
|
@ -50,16 +50,3 @@ protected:
|
|||
|
||||
{{/each}}
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using {{className}} = Jellyfin::DTO::{{className}};
|
||||
|
||||
template <>
|
||||
|
||||
{{className}} fromJsonValue<{{className}}>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return {{className}}::fromJson(source.toObject());
|
||||
}
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
{{className}}::{{className}}(QObject *parent) {}
|
||||
{{className}}::{{className}}() {}
|
||||
|
||||
|
||||
{{className}} {{className}}::fromJson(QJsonObject source) {
|
||||
|
||||
{{className}} instance;
|
||||
instance->setFromJson(source, false);
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
@ -11,7 +12,7 @@
|
|||
void {{className}}::setFromJson(QJsonObject source) {
|
||||
|
||||
{{#each properties as |property|}}
|
||||
{{property.memberName}} = fromJsonValue<{{property.typeNameWithQualifiers}}>(source["{{property.originalName}}"]);
|
||||
{{property.memberName}} = {{supportNamespace}}::fromJsonValue<{{property.typeNameWithQualifiers}}>(source["{{property.originalName}}"]);
|
||||
|
||||
{{/each}}
|
||||
|
||||
|
@ -21,7 +22,7 @@ QJsonObject {{className}}::toJson() {
|
|||
QJsonObject result;
|
||||
|
||||
{{#each properties as |property|}}
|
||||
result["{{property.originalName}}"] = toJsonValue<{{property.typeNameWithQualifiers}}>({{property.memberName}});
|
||||
result["{{property.originalName}}"] = {{supportNamespace}}::toJsonValue<{{property.typeNameWithQualifiers}}>({{property.memberName}});
|
||||
|
||||
{{/each}}
|
||||
|
||||
|
@ -46,3 +47,16 @@ void {{className}}::setNull() {
|
|||
{{property.nullableSetter}};
|
||||
}
|
||||
{{/each}}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using {{className}} = Jellyfin::DTO::{{className}};
|
||||
|
||||
template <>
|
||||
|
||||
{{className}} fromJsonValue<{{className}}>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return {{className}}::fromJson(source.toObject());
|
||||
}
|
||||
|
|
|
@ -95,18 +95,6 @@ protected:
|
|||
double m_endHour;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using AccessSchedule = Jellyfin::DTO::AccessSchedule;
|
||||
|
||||
template <>
|
||||
AccessSchedule fromJsonValue<AccessSchedule>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return AccessSchedule::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -142,18 +142,6 @@ protected:
|
|||
LogLevel m_severity;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ActivityLogEntry = Jellyfin::DTO::ActivityLogEntry;
|
||||
|
||||
template <>
|
||||
ActivityLogEntry fromJsonValue<ActivityLogEntry>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ActivityLogEntry::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -83,18 +83,6 @@ protected:
|
|||
qint32 m_startIndex;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ActivityLogEntryQueryResult = Jellyfin::DTO::ActivityLogEntryQueryResult;
|
||||
|
||||
template <>
|
||||
ActivityLogEntryQueryResult fromJsonValue<ActivityLogEntryQueryResult>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ActivityLogEntryQueryResult::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -59,18 +59,6 @@ protected:
|
|||
QSharedPointer<LibraryOptions> m_libraryOptions = nullptr;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using AddVirtualFolderDto = Jellyfin::DTO::AddVirtualFolderDto;
|
||||
|
||||
template <>
|
||||
AddVirtualFolderDto fromJsonValue<AddVirtualFolderDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return AddVirtualFolderDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -155,18 +155,6 @@ protected:
|
|||
QList<QSharedPointer<SongInfo>> m_songInfos;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using AlbumInfo = Jellyfin::DTO::AlbumInfo;
|
||||
|
||||
template <>
|
||||
AlbumInfo fromJsonValue<AlbumInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return AlbumInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -84,18 +84,6 @@ protected:
|
|||
bool m_includeDisabledProviders;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using AlbumInfoRemoteSearchQuery = Jellyfin::DTO::AlbumInfoRemoteSearchQuery;
|
||||
|
||||
template <>
|
||||
AlbumInfoRemoteSearchQuery fromJsonValue<AlbumInfoRemoteSearchQuery>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return AlbumInfoRemoteSearchQuery::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -69,18 +69,6 @@ protected:
|
|||
QSharedPointer<ThemeMediaResult> m_soundtrackSongsResult = nullptr;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using AllThemeMediaResult = Jellyfin::DTO::AllThemeMediaResult;
|
||||
|
||||
template <>
|
||||
AllThemeMediaResult fromJsonValue<AllThemeMediaResult>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return AllThemeMediaResult::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -57,37 +57,6 @@ private:
|
|||
|
||||
typedef ArchitectureClass::Value Architecture;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using Architecture = Jellyfin::DTO::Architecture;
|
||||
using ArchitectureClass = Jellyfin::DTO::ArchitectureClass;
|
||||
|
||||
template <>
|
||||
Architecture fromJsonValue<Architecture>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ArchitectureClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("X86")) {
|
||||
return ArchitectureClass::X86;
|
||||
}
|
||||
if (str == QStringLiteral("X64")) {
|
||||
return ArchitectureClass::X64;
|
||||
}
|
||||
if (str == QStringLiteral("Arm")) {
|
||||
return ArchitectureClass::Arm;
|
||||
}
|
||||
if (str == QStringLiteral("Arm64")) {
|
||||
return ArchitectureClass::Arm64;
|
||||
}
|
||||
if (str == QStringLiteral("Wasm")) {
|
||||
return ArchitectureClass::Wasm;
|
||||
}
|
||||
|
||||
return ArchitectureClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -137,18 +137,6 @@ protected:
|
|||
QList<QSharedPointer<SongInfo>> m_songInfos;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ArtistInfo = Jellyfin::DTO::ArtistInfo;
|
||||
|
||||
template <>
|
||||
ArtistInfo fromJsonValue<ArtistInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ArtistInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -84,18 +84,6 @@ protected:
|
|||
bool m_includeDisabledProviders;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ArtistInfoRemoteSearchQuery = Jellyfin::DTO::ArtistInfoRemoteSearchQuery;
|
||||
|
||||
template <>
|
||||
ArtistInfoRemoteSearchQuery fromJsonValue<ArtistInfoRemoteSearchQuery>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ArtistInfoRemoteSearchQuery::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -80,18 +80,6 @@ protected:
|
|||
QString m_password;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using AuthenticateUserByName = Jellyfin::DTO::AuthenticateUserByName;
|
||||
|
||||
template <>
|
||||
AuthenticateUserByName fromJsonValue<AuthenticateUserByName>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return AuthenticateUserByName::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -155,18 +155,6 @@ protected:
|
|||
QString m_userName;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using AuthenticationInfo = Jellyfin::DTO::AuthenticationInfo;
|
||||
|
||||
template <>
|
||||
AuthenticationInfo fromJsonValue<AuthenticationInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return AuthenticationInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -83,18 +83,6 @@ protected:
|
|||
qint32 m_startIndex;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using AuthenticationInfoQueryResult = Jellyfin::DTO::AuthenticationInfoQueryResult;
|
||||
|
||||
template <>
|
||||
AuthenticationInfoQueryResult fromJsonValue<AuthenticationInfoQueryResult>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return AuthenticationInfoQueryResult::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -76,18 +76,6 @@ protected:
|
|||
QString m_serverId;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using AuthenticationResult = Jellyfin::DTO::AuthenticationResult;
|
||||
|
||||
template <>
|
||||
AuthenticationResult fromJsonValue<AuthenticationResult>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return AuthenticationResult::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -118,18 +118,6 @@ protected:
|
|||
bool m_supportsExternalTransfer;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using BaseItem = Jellyfin::DTO::BaseItem;
|
||||
|
||||
template <>
|
||||
BaseItem fromJsonValue<BaseItem>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return BaseItem::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -1261,18 +1261,6 @@ protected:
|
|||
QSharedPointer<BaseItemDto> m_currentProgram = nullptr;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using BaseItemDto = Jellyfin::DTO::BaseItemDto;
|
||||
|
||||
template <>
|
||||
BaseItemDto fromJsonValue<BaseItemDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return BaseItemDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -83,18 +83,6 @@ protected:
|
|||
qint32 m_startIndex;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using BaseItemDtoQueryResult = Jellyfin::DTO::BaseItemDtoQueryResult;
|
||||
|
||||
template <>
|
||||
BaseItemDtoQueryResult fromJsonValue<BaseItemDtoQueryResult>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return BaseItemDtoQueryResult::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -107,18 +107,6 @@ protected:
|
|||
QJsonObject m_imageBlurHashes;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using BaseItemPerson = Jellyfin::DTO::BaseItemPerson;
|
||||
|
||||
template <>
|
||||
BaseItemPerson fromJsonValue<BaseItemPerson>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return BaseItemPerson::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -133,18 +133,6 @@ protected:
|
|||
QString m_seriesName;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using BookInfo = Jellyfin::DTO::BookInfo;
|
||||
|
||||
template <>
|
||||
BookInfo fromJsonValue<BookInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return BookInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -84,18 +84,6 @@ protected:
|
|||
bool m_includeDisabledProviders;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using BookInfoRemoteSearchQuery = Jellyfin::DTO::BookInfoRemoteSearchQuery;
|
||||
|
||||
template <>
|
||||
BookInfoRemoteSearchQuery fromJsonValue<BookInfoRemoteSearchQuery>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return BookInfoRemoteSearchQuery::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -128,18 +128,6 @@ protected:
|
|||
bool m_isAutomated;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using BoxSetInfo = Jellyfin::DTO::BoxSetInfo;
|
||||
|
||||
template <>
|
||||
BoxSetInfo fromJsonValue<BoxSetInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return BoxSetInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -84,18 +84,6 @@ protected:
|
|||
bool m_includeDisabledProviders;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using BoxSetInfoRemoteSearchQuery = Jellyfin::DTO::BoxSetInfoRemoteSearchQuery;
|
||||
|
||||
template <>
|
||||
BoxSetInfoRemoteSearchQuery fromJsonValue<BoxSetInfoRemoteSearchQuery>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return BoxSetInfoRemoteSearchQuery::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -71,18 +71,6 @@ protected:
|
|||
QString m_customCss;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using BrandingOptions = Jellyfin::DTO::BrandingOptions;
|
||||
|
||||
template <>
|
||||
BrandingOptions fromJsonValue<BrandingOptions>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return BrandingOptions::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -90,18 +90,6 @@ protected:
|
|||
QUuid m_playlistItemId;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using BufferRequestDto = Jellyfin::DTO::BufferRequestDto;
|
||||
|
||||
template <>
|
||||
BufferRequestDto fromJsonValue<BufferRequestDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return BufferRequestDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -166,18 +166,6 @@ protected:
|
|||
bool m_supportsContentDownloading;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ChannelFeatures = Jellyfin::DTO::ChannelFeatures;
|
||||
|
||||
template <>
|
||||
ChannelFeatures fromJsonValue<ChannelFeatures>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ChannelFeatures::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -59,43 +59,6 @@ private:
|
|||
|
||||
typedef ChannelItemSortFieldClass::Value ChannelItemSortField;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ChannelItemSortField = Jellyfin::DTO::ChannelItemSortField;
|
||||
using ChannelItemSortFieldClass = Jellyfin::DTO::ChannelItemSortFieldClass;
|
||||
|
||||
template <>
|
||||
ChannelItemSortField fromJsonValue<ChannelItemSortField>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ChannelItemSortFieldClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Name")) {
|
||||
return ChannelItemSortFieldClass::Name;
|
||||
}
|
||||
if (str == QStringLiteral("CommunityRating")) {
|
||||
return ChannelItemSortFieldClass::CommunityRating;
|
||||
}
|
||||
if (str == QStringLiteral("PremiereDate")) {
|
||||
return ChannelItemSortFieldClass::PremiereDate;
|
||||
}
|
||||
if (str == QStringLiteral("DateCreated")) {
|
||||
return ChannelItemSortFieldClass::DateCreated;
|
||||
}
|
||||
if (str == QStringLiteral("Runtime")) {
|
||||
return ChannelItemSortFieldClass::Runtime;
|
||||
}
|
||||
if (str == QStringLiteral("PlayCount")) {
|
||||
return ChannelItemSortFieldClass::PlayCount;
|
||||
}
|
||||
if (str == QStringLiteral("CommunityPlayCount")) {
|
||||
return ChannelItemSortFieldClass::CommunityPlayCount;
|
||||
}
|
||||
|
||||
return ChannelItemSortFieldClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -95,18 +95,6 @@ protected:
|
|||
QString m_providerName;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ChannelMappingOptionsDto = Jellyfin::DTO::ChannelMappingOptionsDto;
|
||||
|
||||
template <>
|
||||
ChannelMappingOptionsDto fromJsonValue<ChannelMappingOptionsDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ChannelMappingOptionsDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -60,46 +60,6 @@ private:
|
|||
|
||||
typedef ChannelMediaContentTypeClass::Value ChannelMediaContentType;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ChannelMediaContentType = Jellyfin::DTO::ChannelMediaContentType;
|
||||
using ChannelMediaContentTypeClass = Jellyfin::DTO::ChannelMediaContentTypeClass;
|
||||
|
||||
template <>
|
||||
ChannelMediaContentType fromJsonValue<ChannelMediaContentType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ChannelMediaContentTypeClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Clip")) {
|
||||
return ChannelMediaContentTypeClass::Clip;
|
||||
}
|
||||
if (str == QStringLiteral("Podcast")) {
|
||||
return ChannelMediaContentTypeClass::Podcast;
|
||||
}
|
||||
if (str == QStringLiteral("Trailer")) {
|
||||
return ChannelMediaContentTypeClass::Trailer;
|
||||
}
|
||||
if (str == QStringLiteral("Movie")) {
|
||||
return ChannelMediaContentTypeClass::Movie;
|
||||
}
|
||||
if (str == QStringLiteral("Episode")) {
|
||||
return ChannelMediaContentTypeClass::Episode;
|
||||
}
|
||||
if (str == QStringLiteral("Song")) {
|
||||
return ChannelMediaContentTypeClass::Song;
|
||||
}
|
||||
if (str == QStringLiteral("MovieExtra")) {
|
||||
return ChannelMediaContentTypeClass::MovieExtra;
|
||||
}
|
||||
if (str == QStringLiteral("TvExtra")) {
|
||||
return ChannelMediaContentTypeClass::TvExtra;
|
||||
}
|
||||
|
||||
return ChannelMediaContentTypeClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -55,31 +55,6 @@ private:
|
|||
|
||||
typedef ChannelMediaTypeClass::Value ChannelMediaType;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ChannelMediaType = Jellyfin::DTO::ChannelMediaType;
|
||||
using ChannelMediaTypeClass = Jellyfin::DTO::ChannelMediaTypeClass;
|
||||
|
||||
template <>
|
||||
ChannelMediaType fromJsonValue<ChannelMediaType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ChannelMediaTypeClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Audio")) {
|
||||
return ChannelMediaTypeClass::Audio;
|
||||
}
|
||||
if (str == QStringLiteral("Video")) {
|
||||
return ChannelMediaTypeClass::Video;
|
||||
}
|
||||
if (str == QStringLiteral("Photo")) {
|
||||
return ChannelMediaTypeClass::Photo;
|
||||
}
|
||||
|
||||
return ChannelMediaTypeClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -54,28 +54,6 @@ private:
|
|||
|
||||
typedef ChannelTypeClass::Value ChannelType;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ChannelType = Jellyfin::DTO::ChannelType;
|
||||
using ChannelTypeClass = Jellyfin::DTO::ChannelTypeClass;
|
||||
|
||||
template <>
|
||||
ChannelType fromJsonValue<ChannelType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ChannelTypeClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("TV")) {
|
||||
return ChannelTypeClass::TV;
|
||||
}
|
||||
if (str == QStringLiteral("Radio")) {
|
||||
return ChannelTypeClass::Radio;
|
||||
}
|
||||
|
||||
return ChannelTypeClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -91,18 +91,6 @@ protected:
|
|||
QString m_imageTag;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ChapterInfo = Jellyfin::DTO::ChapterInfo;
|
||||
|
||||
template <>
|
||||
ChapterInfo fromJsonValue<ChapterInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ChapterInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -108,18 +108,6 @@ protected:
|
|||
QString m_iconUrl;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ClientCapabilities = Jellyfin::DTO::ClientCapabilities;
|
||||
|
||||
template <>
|
||||
ClientCapabilities fromJsonValue<ClientCapabilities>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ClientCapabilities::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -144,18 +144,6 @@ protected:
|
|||
QString m_iconUrl;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ClientCapabilitiesDto = Jellyfin::DTO::ClientCapabilitiesDto;
|
||||
|
||||
template <>
|
||||
ClientCapabilitiesDto fromJsonValue<ClientCapabilitiesDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ClientCapabilitiesDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -83,18 +83,6 @@ protected:
|
|||
QString m_container;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using CodecProfile = Jellyfin::DTO::CodecProfile;
|
||||
|
||||
template <>
|
||||
CodecProfile fromJsonValue<CodecProfile>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return CodecProfile::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -55,31 +55,6 @@ private:
|
|||
|
||||
typedef CodecTypeClass::Value CodecType;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using CodecType = Jellyfin::DTO::CodecType;
|
||||
using CodecTypeClass = Jellyfin::DTO::CodecTypeClass;
|
||||
|
||||
template <>
|
||||
CodecType fromJsonValue<CodecType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return CodecTypeClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Video")) {
|
||||
return CodecTypeClass::Video;
|
||||
}
|
||||
if (str == QStringLiteral("VideoAudio")) {
|
||||
return CodecTypeClass::VideoAudio;
|
||||
}
|
||||
if (str == QStringLiteral("Audio")) {
|
||||
return CodecTypeClass::Audio;
|
||||
}
|
||||
|
||||
return CodecTypeClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -58,18 +58,6 @@ protected:
|
|||
QUuid m_jellyfinId;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using CollectionCreationResult = Jellyfin::DTO::CollectionCreationResult;
|
||||
|
||||
template <>
|
||||
CollectionCreationResult fromJsonValue<CollectionCreationResult>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return CollectionCreationResult::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -114,18 +114,6 @@ protected:
|
|||
QUuid m_pluginId;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ConfigurationPageInfo = Jellyfin::DTO::ConfigurationPageInfo;
|
||||
|
||||
template <>
|
||||
ConfigurationPageInfo fromJsonValue<ConfigurationPageInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ConfigurationPageInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -54,28 +54,6 @@ private:
|
|||
|
||||
typedef ConfigurationPageTypeClass::Value ConfigurationPageType;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ConfigurationPageType = Jellyfin::DTO::ConfigurationPageType;
|
||||
using ConfigurationPageTypeClass = Jellyfin::DTO::ConfigurationPageTypeClass;
|
||||
|
||||
template <>
|
||||
ConfigurationPageType fromJsonValue<ConfigurationPageType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ConfigurationPageTypeClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("PluginConfiguration")) {
|
||||
return ConfigurationPageTypeClass::PluginConfiguration;
|
||||
}
|
||||
if (str == QStringLiteral("None")) {
|
||||
return ConfigurationPageTypeClass::None;
|
||||
}
|
||||
|
||||
return ConfigurationPageTypeClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -73,18 +73,6 @@ protected:
|
|||
QString m_container;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ContainerProfile = Jellyfin::DTO::ContainerProfile;
|
||||
|
||||
template <>
|
||||
ContainerProfile fromJsonValue<ContainerProfile>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ContainerProfile::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -68,18 +68,6 @@ protected:
|
|||
bool m_isSuccessful;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ControlResponse = Jellyfin::DTO::ControlResponse;
|
||||
|
||||
template <>
|
||||
ControlResponse fromJsonValue<ControlResponse>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ControlResponse::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -89,18 +89,6 @@ protected:
|
|||
QString m_threeLetterISORegionName;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using CountryInfo = Jellyfin::DTO::CountryInfo;
|
||||
|
||||
template <>
|
||||
CountryInfo fromJsonValue<CountryInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return CountryInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -92,18 +92,6 @@ protected:
|
|||
QString m_mediaType;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using CreatePlaylistDto = Jellyfin::DTO::CreatePlaylistDto;
|
||||
|
||||
template <>
|
||||
CreatePlaylistDto fromJsonValue<CreatePlaylistDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return CreatePlaylistDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -71,18 +71,6 @@ protected:
|
|||
QString m_password;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using CreateUserByName = Jellyfin::DTO::CreateUserByName;
|
||||
|
||||
template <>
|
||||
CreateUserByName fromJsonValue<CreateUserByName>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return CreateUserByName::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -96,18 +96,6 @@ protected:
|
|||
QStringList m_threeLetterISOLanguageNames;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using CultureDto = Jellyfin::DTO::CultureDto;
|
||||
|
||||
template <>
|
||||
CultureDto fromJsonValue<CultureDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return CultureDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -59,43 +59,6 @@ private:
|
|||
|
||||
typedef DayOfWeekClass::Value DayOfWeek;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DayOfWeek = Jellyfin::DTO::DayOfWeek;
|
||||
using DayOfWeekClass = Jellyfin::DTO::DayOfWeekClass;
|
||||
|
||||
template <>
|
||||
DayOfWeek fromJsonValue<DayOfWeek>(const QJsonValue &source) {
|
||||
if (!source.isString()) return DayOfWeekClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Sunday")) {
|
||||
return DayOfWeekClass::Sunday;
|
||||
}
|
||||
if (str == QStringLiteral("Monday")) {
|
||||
return DayOfWeekClass::Monday;
|
||||
}
|
||||
if (str == QStringLiteral("Tuesday")) {
|
||||
return DayOfWeekClass::Tuesday;
|
||||
}
|
||||
if (str == QStringLiteral("Wednesday")) {
|
||||
return DayOfWeekClass::Wednesday;
|
||||
}
|
||||
if (str == QStringLiteral("Thursday")) {
|
||||
return DayOfWeekClass::Thursday;
|
||||
}
|
||||
if (str == QStringLiteral("Friday")) {
|
||||
return DayOfWeekClass::Friday;
|
||||
}
|
||||
if (str == QStringLiteral("Saturday")) {
|
||||
return DayOfWeekClass::Saturday;
|
||||
}
|
||||
|
||||
return DayOfWeekClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -55,31 +55,6 @@ private:
|
|||
|
||||
typedef DayPatternClass::Value DayPattern;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DayPattern = Jellyfin::DTO::DayPattern;
|
||||
using DayPatternClass = Jellyfin::DTO::DayPatternClass;
|
||||
|
||||
template <>
|
||||
DayPattern fromJsonValue<DayPattern>(const QJsonValue &source) {
|
||||
if (!source.isString()) return DayPatternClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Daily")) {
|
||||
return DayPatternClass::Daily;
|
||||
}
|
||||
if (str == QStringLiteral("Weekdays")) {
|
||||
return DayPatternClass::Weekdays;
|
||||
}
|
||||
if (str == QStringLiteral("Weekends")) {
|
||||
return DayPatternClass::Weekends;
|
||||
}
|
||||
|
||||
return DayPatternClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -62,18 +62,6 @@ protected:
|
|||
QString m_path;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DefaultDirectoryBrowserInfoDto = Jellyfin::DTO::DefaultDirectoryBrowserInfoDto;
|
||||
|
||||
template <>
|
||||
DefaultDirectoryBrowserInfoDto fromJsonValue<DefaultDirectoryBrowserInfoDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return DefaultDirectoryBrowserInfoDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -138,18 +138,6 @@ protected:
|
|||
QList<QSharedPointer<HttpHeaderInfo>> m_headers;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DeviceIdentification = Jellyfin::DTO::DeviceIdentification;
|
||||
|
||||
template <>
|
||||
DeviceIdentification fromJsonValue<DeviceIdentification>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return DeviceIdentification::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -126,18 +126,6 @@ protected:
|
|||
QString m_iconUrl;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DeviceInfo = Jellyfin::DTO::DeviceInfo;
|
||||
|
||||
template <>
|
||||
DeviceInfo fromJsonValue<DeviceInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return DeviceInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -83,18 +83,6 @@ protected:
|
|||
qint32 m_startIndex;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DeviceInfoQueryResult = Jellyfin::DTO::DeviceInfoQueryResult;
|
||||
|
||||
template <>
|
||||
DeviceInfoQueryResult fromJsonValue<DeviceInfoQueryResult>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return DeviceInfoQueryResult::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -58,18 +58,6 @@ protected:
|
|||
QString m_customName;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DeviceOptions = Jellyfin::DTO::DeviceOptions;
|
||||
|
||||
template <>
|
||||
DeviceOptions fromJsonValue<DeviceOptions>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return DeviceOptions::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -411,18 +411,6 @@ protected:
|
|||
QList<QSharedPointer<SubtitleProfile>> m_subtitleProfiles;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DeviceProfile = Jellyfin::DTO::DeviceProfile;
|
||||
|
||||
template <>
|
||||
DeviceProfile fromJsonValue<DeviceProfile>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return DeviceProfile::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -77,18 +77,6 @@ protected:
|
|||
DeviceProfileType m_type;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DeviceProfileInfo = Jellyfin::DTO::DeviceProfileInfo;
|
||||
|
||||
template <>
|
||||
DeviceProfileInfo fromJsonValue<DeviceProfileInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return DeviceProfileInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -54,28 +54,6 @@ private:
|
|||
|
||||
typedef DeviceProfileTypeClass::Value DeviceProfileType;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DeviceProfileType = Jellyfin::DTO::DeviceProfileType;
|
||||
using DeviceProfileTypeClass = Jellyfin::DTO::DeviceProfileTypeClass;
|
||||
|
||||
template <>
|
||||
DeviceProfileType fromJsonValue<DeviceProfileType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return DeviceProfileTypeClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("System")) {
|
||||
return DeviceProfileTypeClass::System;
|
||||
}
|
||||
if (str == QStringLiteral("User")) {
|
||||
return DeviceProfileTypeClass::User;
|
||||
}
|
||||
|
||||
return DeviceProfileTypeClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -74,18 +74,6 @@ protected:
|
|||
DlnaProfileType m_type;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DirectPlayProfile = Jellyfin::DTO::DirectPlayProfile;
|
||||
|
||||
template <>
|
||||
DirectPlayProfile fromJsonValue<DirectPlayProfile>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return DirectPlayProfile::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -173,18 +173,6 @@ protected:
|
|||
QString m_client;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DisplayPreferencesDto = Jellyfin::DTO::DisplayPreferencesDto;
|
||||
|
||||
template <>
|
||||
DisplayPreferencesDto fromJsonValue<DisplayPreferencesDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return DisplayPreferencesDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -55,31 +55,6 @@ private:
|
|||
|
||||
typedef DlnaProfileTypeClass::Value DlnaProfileType;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DlnaProfileType = Jellyfin::DTO::DlnaProfileType;
|
||||
using DlnaProfileTypeClass = Jellyfin::DTO::DlnaProfileTypeClass;
|
||||
|
||||
template <>
|
||||
DlnaProfileType fromJsonValue<DlnaProfileType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return DlnaProfileTypeClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Audio")) {
|
||||
return DlnaProfileTypeClass::Audio;
|
||||
}
|
||||
if (str == QStringLiteral("Video")) {
|
||||
return DlnaProfileTypeClass::Video;
|
||||
}
|
||||
if (str == QStringLiteral("Photo")) {
|
||||
return DlnaProfileTypeClass::Photo;
|
||||
}
|
||||
|
||||
return DlnaProfileTypeClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -62,52 +62,6 @@ private:
|
|||
|
||||
typedef DynamicDayOfWeekClass::Value DynamicDayOfWeek;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DynamicDayOfWeek = Jellyfin::DTO::DynamicDayOfWeek;
|
||||
using DynamicDayOfWeekClass = Jellyfin::DTO::DynamicDayOfWeekClass;
|
||||
|
||||
template <>
|
||||
DynamicDayOfWeek fromJsonValue<DynamicDayOfWeek>(const QJsonValue &source) {
|
||||
if (!source.isString()) return DynamicDayOfWeekClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Sunday")) {
|
||||
return DynamicDayOfWeekClass::Sunday;
|
||||
}
|
||||
if (str == QStringLiteral("Monday")) {
|
||||
return DynamicDayOfWeekClass::Monday;
|
||||
}
|
||||
if (str == QStringLiteral("Tuesday")) {
|
||||
return DynamicDayOfWeekClass::Tuesday;
|
||||
}
|
||||
if (str == QStringLiteral("Wednesday")) {
|
||||
return DynamicDayOfWeekClass::Wednesday;
|
||||
}
|
||||
if (str == QStringLiteral("Thursday")) {
|
||||
return DynamicDayOfWeekClass::Thursday;
|
||||
}
|
||||
if (str == QStringLiteral("Friday")) {
|
||||
return DynamicDayOfWeekClass::Friday;
|
||||
}
|
||||
if (str == QStringLiteral("Saturday")) {
|
||||
return DynamicDayOfWeekClass::Saturday;
|
||||
}
|
||||
if (str == QStringLiteral("Everyday")) {
|
||||
return DynamicDayOfWeekClass::Everyday;
|
||||
}
|
||||
if (str == QStringLiteral("Weekday")) {
|
||||
return DynamicDayOfWeekClass::Weekday;
|
||||
}
|
||||
if (str == QStringLiteral("Weekend")) {
|
||||
return DynamicDayOfWeekClass::Weekend;
|
||||
}
|
||||
|
||||
return DynamicDayOfWeekClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -54,28 +54,6 @@ private:
|
|||
|
||||
typedef EncodingContextClass::Value EncodingContext;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using EncodingContext = Jellyfin::DTO::EncodingContext;
|
||||
using EncodingContextClass = Jellyfin::DTO::EncodingContextClass;
|
||||
|
||||
template <>
|
||||
EncodingContext fromJsonValue<EncodingContext>(const QJsonValue &source) {
|
||||
if (!source.isString()) return EncodingContextClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Streaming")) {
|
||||
return EncodingContextClass::Streaming;
|
||||
}
|
||||
if (str == QStringLiteral("Static")) {
|
||||
return EncodingContextClass::Static;
|
||||
}
|
||||
|
||||
return EncodingContextClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -62,18 +62,6 @@ protected:
|
|||
bool m_isInNetwork;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using EndPointInfo = Jellyfin::DTO::EndPointInfo;
|
||||
|
||||
template <>
|
||||
EndPointInfo fromJsonValue<EndPointInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return EndPointInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -86,18 +86,6 @@ protected:
|
|||
QString m_urlFormatString;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ExternalIdInfo = Jellyfin::DTO::ExternalIdInfo;
|
||||
|
||||
template <>
|
||||
ExternalIdInfo fromJsonValue<ExternalIdInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ExternalIdInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -64,58 +64,6 @@ private:
|
|||
|
||||
typedef ExternalIdMediaTypeClass::Value ExternalIdMediaType;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ExternalIdMediaType = Jellyfin::DTO::ExternalIdMediaType;
|
||||
using ExternalIdMediaTypeClass = Jellyfin::DTO::ExternalIdMediaTypeClass;
|
||||
|
||||
template <>
|
||||
ExternalIdMediaType fromJsonValue<ExternalIdMediaType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ExternalIdMediaTypeClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Album")) {
|
||||
return ExternalIdMediaTypeClass::Album;
|
||||
}
|
||||
if (str == QStringLiteral("AlbumArtist")) {
|
||||
return ExternalIdMediaTypeClass::AlbumArtist;
|
||||
}
|
||||
if (str == QStringLiteral("Artist")) {
|
||||
return ExternalIdMediaTypeClass::Artist;
|
||||
}
|
||||
if (str == QStringLiteral("BoxSet")) {
|
||||
return ExternalIdMediaTypeClass::BoxSet;
|
||||
}
|
||||
if (str == QStringLiteral("Episode")) {
|
||||
return ExternalIdMediaTypeClass::Episode;
|
||||
}
|
||||
if (str == QStringLiteral("Movie")) {
|
||||
return ExternalIdMediaTypeClass::Movie;
|
||||
}
|
||||
if (str == QStringLiteral("OtherArtist")) {
|
||||
return ExternalIdMediaTypeClass::OtherArtist;
|
||||
}
|
||||
if (str == QStringLiteral("Person")) {
|
||||
return ExternalIdMediaTypeClass::Person;
|
||||
}
|
||||
if (str == QStringLiteral("ReleaseGroup")) {
|
||||
return ExternalIdMediaTypeClass::ReleaseGroup;
|
||||
}
|
||||
if (str == QStringLiteral("Season")) {
|
||||
return ExternalIdMediaTypeClass::Season;
|
||||
}
|
||||
if (str == QStringLiteral("Series")) {
|
||||
return ExternalIdMediaTypeClass::Series;
|
||||
}
|
||||
if (str == QStringLiteral("Track")) {
|
||||
return ExternalIdMediaTypeClass::Track;
|
||||
}
|
||||
|
||||
return ExternalIdMediaTypeClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -71,18 +71,6 @@ protected:
|
|||
QString m_url;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ExternalUrl = Jellyfin::DTO::ExternalUrl;
|
||||
|
||||
template <>
|
||||
ExternalUrl fromJsonValue<ExternalUrl>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ExternalUrl::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -56,34 +56,6 @@ private:
|
|||
|
||||
typedef FFmpegLocationClass::Value FFmpegLocation;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using FFmpegLocation = Jellyfin::DTO::FFmpegLocation;
|
||||
using FFmpegLocationClass = Jellyfin::DTO::FFmpegLocationClass;
|
||||
|
||||
template <>
|
||||
FFmpegLocation fromJsonValue<FFmpegLocation>(const QJsonValue &source) {
|
||||
if (!source.isString()) return FFmpegLocationClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("NotFound")) {
|
||||
return FFmpegLocationClass::NotFound;
|
||||
}
|
||||
if (str == QStringLiteral("SetByArgument")) {
|
||||
return FFmpegLocationClass::SetByArgument;
|
||||
}
|
||||
if (str == QStringLiteral("Custom")) {
|
||||
return FFmpegLocationClass::Custom;
|
||||
}
|
||||
if (str == QStringLiteral("System")) {
|
||||
return FFmpegLocationClass::System;
|
||||
}
|
||||
|
||||
return FFmpegLocationClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -77,18 +77,6 @@ protected:
|
|||
FileSystemEntryType m_type;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using FileSystemEntryInfo = Jellyfin::DTO::FileSystemEntryInfo;
|
||||
|
||||
template <>
|
||||
FileSystemEntryInfo fromJsonValue<FileSystemEntryInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return FileSystemEntryInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -56,34 +56,6 @@ private:
|
|||
|
||||
typedef FileSystemEntryTypeClass::Value FileSystemEntryType;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using FileSystemEntryType = Jellyfin::DTO::FileSystemEntryType;
|
||||
using FileSystemEntryTypeClass = Jellyfin::DTO::FileSystemEntryTypeClass;
|
||||
|
||||
template <>
|
||||
FileSystemEntryType fromJsonValue<FileSystemEntryType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return FileSystemEntryTypeClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("File")) {
|
||||
return FileSystemEntryTypeClass::File;
|
||||
}
|
||||
if (str == QStringLiteral("Directory")) {
|
||||
return FileSystemEntryTypeClass::Directory;
|
||||
}
|
||||
if (str == QStringLiteral("NetworkComputer")) {
|
||||
return FileSystemEntryTypeClass::NetworkComputer;
|
||||
}
|
||||
if (str == QStringLiteral("NetworkShare")) {
|
||||
return FileSystemEntryTypeClass::NetworkShare;
|
||||
}
|
||||
|
||||
return FileSystemEntryTypeClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -90,18 +90,6 @@ protected:
|
|||
QDateTime m_dateModified;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using FontFile = Jellyfin::DTO::FontFile;
|
||||
|
||||
template <>
|
||||
FontFile fromJsonValue<FontFile>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return FontFile::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -55,31 +55,6 @@ private:
|
|||
|
||||
typedef ForgotPasswordActionClass::Value ForgotPasswordAction;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ForgotPasswordAction = Jellyfin::DTO::ForgotPasswordAction;
|
||||
using ForgotPasswordActionClass = Jellyfin::DTO::ForgotPasswordActionClass;
|
||||
|
||||
template <>
|
||||
ForgotPasswordAction fromJsonValue<ForgotPasswordAction>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ForgotPasswordActionClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("ContactAdmin")) {
|
||||
return ForgotPasswordActionClass::ContactAdmin;
|
||||
}
|
||||
if (str == QStringLiteral("PinCode")) {
|
||||
return ForgotPasswordActionClass::PinCode;
|
||||
}
|
||||
if (str == QStringLiteral("InNetworkRequired")) {
|
||||
return ForgotPasswordActionClass::InNetworkRequired;
|
||||
}
|
||||
|
||||
return ForgotPasswordActionClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -62,18 +62,6 @@ protected:
|
|||
QString m_enteredUsername;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ForgotPasswordDto = Jellyfin::DTO::ForgotPasswordDto;
|
||||
|
||||
template <>
|
||||
ForgotPasswordDto fromJsonValue<ForgotPasswordDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ForgotPasswordDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -78,18 +78,6 @@ protected:
|
|||
QDateTime m_pinExpirationDate;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ForgotPasswordResult = Jellyfin::DTO::ForgotPasswordResult;
|
||||
|
||||
template <>
|
||||
ForgotPasswordResult fromJsonValue<ForgotPasswordResult>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ForgotPasswordResult::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -69,18 +69,6 @@ protected:
|
|||
QJsonObject m_arguments;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using GeneralCommand = Jellyfin::DTO::GeneralCommand;
|
||||
|
||||
template <>
|
||||
GeneralCommand fromJsonValue<GeneralCommand>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return GeneralCommand::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -93,145 +93,6 @@ private:
|
|||
|
||||
typedef GeneralCommandTypeClass::Value GeneralCommandType;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using GeneralCommandType = Jellyfin::DTO::GeneralCommandType;
|
||||
using GeneralCommandTypeClass = Jellyfin::DTO::GeneralCommandTypeClass;
|
||||
|
||||
template <>
|
||||
GeneralCommandType fromJsonValue<GeneralCommandType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return GeneralCommandTypeClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("MoveUp")) {
|
||||
return GeneralCommandTypeClass::MoveUp;
|
||||
}
|
||||
if (str == QStringLiteral("MoveDown")) {
|
||||
return GeneralCommandTypeClass::MoveDown;
|
||||
}
|
||||
if (str == QStringLiteral("MoveLeft")) {
|
||||
return GeneralCommandTypeClass::MoveLeft;
|
||||
}
|
||||
if (str == QStringLiteral("MoveRight")) {
|
||||
return GeneralCommandTypeClass::MoveRight;
|
||||
}
|
||||
if (str == QStringLiteral("PageUp")) {
|
||||
return GeneralCommandTypeClass::PageUp;
|
||||
}
|
||||
if (str == QStringLiteral("PageDown")) {
|
||||
return GeneralCommandTypeClass::PageDown;
|
||||
}
|
||||
if (str == QStringLiteral("PreviousLetter")) {
|
||||
return GeneralCommandTypeClass::PreviousLetter;
|
||||
}
|
||||
if (str == QStringLiteral("NextLetter")) {
|
||||
return GeneralCommandTypeClass::NextLetter;
|
||||
}
|
||||
if (str == QStringLiteral("ToggleOsd")) {
|
||||
return GeneralCommandTypeClass::ToggleOsd;
|
||||
}
|
||||
if (str == QStringLiteral("ToggleContextMenu")) {
|
||||
return GeneralCommandTypeClass::ToggleContextMenu;
|
||||
}
|
||||
if (str == QStringLiteral("Select")) {
|
||||
return GeneralCommandTypeClass::Select;
|
||||
}
|
||||
if (str == QStringLiteral("Back")) {
|
||||
return GeneralCommandTypeClass::Back;
|
||||
}
|
||||
if (str == QStringLiteral("TakeScreenshot")) {
|
||||
return GeneralCommandTypeClass::TakeScreenshot;
|
||||
}
|
||||
if (str == QStringLiteral("SendKey")) {
|
||||
return GeneralCommandTypeClass::SendKey;
|
||||
}
|
||||
if (str == QStringLiteral("SendString")) {
|
||||
return GeneralCommandTypeClass::SendString;
|
||||
}
|
||||
if (str == QStringLiteral("GoHome")) {
|
||||
return GeneralCommandTypeClass::GoHome;
|
||||
}
|
||||
if (str == QStringLiteral("GoToSettings")) {
|
||||
return GeneralCommandTypeClass::GoToSettings;
|
||||
}
|
||||
if (str == QStringLiteral("VolumeUp")) {
|
||||
return GeneralCommandTypeClass::VolumeUp;
|
||||
}
|
||||
if (str == QStringLiteral("VolumeDown")) {
|
||||
return GeneralCommandTypeClass::VolumeDown;
|
||||
}
|
||||
if (str == QStringLiteral("Mute")) {
|
||||
return GeneralCommandTypeClass::Mute;
|
||||
}
|
||||
if (str == QStringLiteral("Unmute")) {
|
||||
return GeneralCommandTypeClass::Unmute;
|
||||
}
|
||||
if (str == QStringLiteral("ToggleMute")) {
|
||||
return GeneralCommandTypeClass::ToggleMute;
|
||||
}
|
||||
if (str == QStringLiteral("SetVolume")) {
|
||||
return GeneralCommandTypeClass::SetVolume;
|
||||
}
|
||||
if (str == QStringLiteral("SetAudioStreamIndex")) {
|
||||
return GeneralCommandTypeClass::SetAudioStreamIndex;
|
||||
}
|
||||
if (str == QStringLiteral("SetSubtitleStreamIndex")) {
|
||||
return GeneralCommandTypeClass::SetSubtitleStreamIndex;
|
||||
}
|
||||
if (str == QStringLiteral("ToggleFullscreen")) {
|
||||
return GeneralCommandTypeClass::ToggleFullscreen;
|
||||
}
|
||||
if (str == QStringLiteral("DisplayContent")) {
|
||||
return GeneralCommandTypeClass::DisplayContent;
|
||||
}
|
||||
if (str == QStringLiteral("GoToSearch")) {
|
||||
return GeneralCommandTypeClass::GoToSearch;
|
||||
}
|
||||
if (str == QStringLiteral("DisplayMessage")) {
|
||||
return GeneralCommandTypeClass::DisplayMessage;
|
||||
}
|
||||
if (str == QStringLiteral("SetRepeatMode")) {
|
||||
return GeneralCommandTypeClass::SetRepeatMode;
|
||||
}
|
||||
if (str == QStringLiteral("ChannelUp")) {
|
||||
return GeneralCommandTypeClass::ChannelUp;
|
||||
}
|
||||
if (str == QStringLiteral("ChannelDown")) {
|
||||
return GeneralCommandTypeClass::ChannelDown;
|
||||
}
|
||||
if (str == QStringLiteral("Guide")) {
|
||||
return GeneralCommandTypeClass::Guide;
|
||||
}
|
||||
if (str == QStringLiteral("ToggleStats")) {
|
||||
return GeneralCommandTypeClass::ToggleStats;
|
||||
}
|
||||
if (str == QStringLiteral("PlayMediaSource")) {
|
||||
return GeneralCommandTypeClass::PlayMediaSource;
|
||||
}
|
||||
if (str == QStringLiteral("PlayTrailers")) {
|
||||
return GeneralCommandTypeClass::PlayTrailers;
|
||||
}
|
||||
if (str == QStringLiteral("SetShuffleQueue")) {
|
||||
return GeneralCommandTypeClass::SetShuffleQueue;
|
||||
}
|
||||
if (str == QStringLiteral("PlayState")) {
|
||||
return GeneralCommandTypeClass::PlayState;
|
||||
}
|
||||
if (str == QStringLiteral("PlayNext")) {
|
||||
return GeneralCommandTypeClass::PlayNext;
|
||||
}
|
||||
if (str == QStringLiteral("ToggleOsdMenu")) {
|
||||
return GeneralCommandTypeClass::ToggleOsdMenu;
|
||||
}
|
||||
if (str == QStringLiteral("Play")) {
|
||||
return GeneralCommandTypeClass::Play;
|
||||
}
|
||||
|
||||
return GeneralCommandTypeClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -344,18 +344,6 @@ protected:
|
|||
QList<ItemFields> m_fields;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using GetProgramsDto = Jellyfin::DTO::GetProgramsDto;
|
||||
|
||||
template <>
|
||||
GetProgramsDto fromJsonValue<GetProgramsDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return GetProgramsDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -99,18 +99,6 @@ protected:
|
|||
QDateTime m_lastUpdatedAt;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using GroupInfoDto = Jellyfin::DTO::GroupInfoDto;
|
||||
|
||||
template <>
|
||||
GroupInfoDto fromJsonValue<GroupInfoDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return GroupInfoDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -54,28 +54,6 @@ private:
|
|||
|
||||
typedef GroupQueueModeClass::Value GroupQueueMode;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using GroupQueueMode = Jellyfin::DTO::GroupQueueMode;
|
||||
using GroupQueueModeClass = Jellyfin::DTO::GroupQueueModeClass;
|
||||
|
||||
template <>
|
||||
GroupQueueMode fromJsonValue<GroupQueueMode>(const QJsonValue &source) {
|
||||
if (!source.isString()) return GroupQueueModeClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Queue")) {
|
||||
return GroupQueueModeClass::Queue;
|
||||
}
|
||||
if (str == QStringLiteral("QueueNext")) {
|
||||
return GroupQueueModeClass::QueueNext;
|
||||
}
|
||||
|
||||
return GroupQueueModeClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -55,31 +55,6 @@ private:
|
|||
|
||||
typedef GroupRepeatModeClass::Value GroupRepeatMode;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using GroupRepeatMode = Jellyfin::DTO::GroupRepeatMode;
|
||||
using GroupRepeatModeClass = Jellyfin::DTO::GroupRepeatModeClass;
|
||||
|
||||
template <>
|
||||
GroupRepeatMode fromJsonValue<GroupRepeatMode>(const QJsonValue &source) {
|
||||
if (!source.isString()) return GroupRepeatModeClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("RepeatOne")) {
|
||||
return GroupRepeatModeClass::RepeatOne;
|
||||
}
|
||||
if (str == QStringLiteral("RepeatAll")) {
|
||||
return GroupRepeatModeClass::RepeatAll;
|
||||
}
|
||||
if (str == QStringLiteral("RepeatNone")) {
|
||||
return GroupRepeatModeClass::RepeatNone;
|
||||
}
|
||||
|
||||
return GroupRepeatModeClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -54,28 +54,6 @@ private:
|
|||
|
||||
typedef GroupShuffleModeClass::Value GroupShuffleMode;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using GroupShuffleMode = Jellyfin::DTO::GroupShuffleMode;
|
||||
using GroupShuffleModeClass = Jellyfin::DTO::GroupShuffleModeClass;
|
||||
|
||||
template <>
|
||||
GroupShuffleMode fromJsonValue<GroupShuffleMode>(const QJsonValue &source) {
|
||||
if (!source.isString()) return GroupShuffleModeClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Sorted")) {
|
||||
return GroupShuffleModeClass::Sorted;
|
||||
}
|
||||
if (str == QStringLiteral("Shuffle")) {
|
||||
return GroupShuffleModeClass::Shuffle;
|
||||
}
|
||||
|
||||
return GroupShuffleModeClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -56,34 +56,6 @@ private:
|
|||
|
||||
typedef GroupStateTypeClass::Value GroupStateType;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using GroupStateType = Jellyfin::DTO::GroupStateType;
|
||||
using GroupStateTypeClass = Jellyfin::DTO::GroupStateTypeClass;
|
||||
|
||||
template <>
|
||||
GroupStateType fromJsonValue<GroupStateType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return GroupStateTypeClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Idle")) {
|
||||
return GroupStateTypeClass::Idle;
|
||||
}
|
||||
if (str == QStringLiteral("Waiting")) {
|
||||
return GroupStateTypeClass::Waiting;
|
||||
}
|
||||
if (str == QStringLiteral("Paused")) {
|
||||
return GroupStateTypeClass::Paused;
|
||||
}
|
||||
if (str == QStringLiteral("Playing")) {
|
||||
return GroupStateTypeClass::Playing;
|
||||
}
|
||||
|
||||
return GroupStateTypeClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -63,55 +63,6 @@ private:
|
|||
|
||||
typedef GroupUpdateTypeClass::Value GroupUpdateType;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using GroupUpdateType = Jellyfin::DTO::GroupUpdateType;
|
||||
using GroupUpdateTypeClass = Jellyfin::DTO::GroupUpdateTypeClass;
|
||||
|
||||
template <>
|
||||
GroupUpdateType fromJsonValue<GroupUpdateType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return GroupUpdateTypeClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("UserJoined")) {
|
||||
return GroupUpdateTypeClass::UserJoined;
|
||||
}
|
||||
if (str == QStringLiteral("UserLeft")) {
|
||||
return GroupUpdateTypeClass::UserLeft;
|
||||
}
|
||||
if (str == QStringLiteral("GroupJoined")) {
|
||||
return GroupUpdateTypeClass::GroupJoined;
|
||||
}
|
||||
if (str == QStringLiteral("GroupLeft")) {
|
||||
return GroupUpdateTypeClass::GroupLeft;
|
||||
}
|
||||
if (str == QStringLiteral("StateUpdate")) {
|
||||
return GroupUpdateTypeClass::StateUpdate;
|
||||
}
|
||||
if (str == QStringLiteral("PlayQueue")) {
|
||||
return GroupUpdateTypeClass::PlayQueue;
|
||||
}
|
||||
if (str == QStringLiteral("NotInGroup")) {
|
||||
return GroupUpdateTypeClass::NotInGroup;
|
||||
}
|
||||
if (str == QStringLiteral("GroupDoesNotExist")) {
|
||||
return GroupUpdateTypeClass::GroupDoesNotExist;
|
||||
}
|
||||
if (str == QStringLiteral("CreateGroupDenied")) {
|
||||
return GroupUpdateTypeClass::CreateGroupDenied;
|
||||
}
|
||||
if (str == QStringLiteral("JoinGroupDenied")) {
|
||||
return GroupUpdateTypeClass::JoinGroupDenied;
|
||||
}
|
||||
if (str == QStringLiteral("LibraryAccessDenied")) {
|
||||
return GroupUpdateTypeClass::LibraryAccessDenied;
|
||||
}
|
||||
|
||||
return GroupUpdateTypeClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -71,18 +71,6 @@ protected:
|
|||
QDateTime m_endDate;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using GuideInfo = Jellyfin::DTO::GuideInfo;
|
||||
|
||||
template <>
|
||||
GuideInfo fromJsonValue<GuideInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return GuideInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -55,31 +55,6 @@ private:
|
|||
|
||||
typedef HeaderMatchTypeClass::Value HeaderMatchType;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using HeaderMatchType = Jellyfin::DTO::HeaderMatchType;
|
||||
using HeaderMatchTypeClass = Jellyfin::DTO::HeaderMatchTypeClass;
|
||||
|
||||
template <>
|
||||
HeaderMatchType fromJsonValue<HeaderMatchType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return HeaderMatchTypeClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Equals")) {
|
||||
return HeaderMatchTypeClass::Equals;
|
||||
}
|
||||
if (str == QStringLiteral("Regex")) {
|
||||
return HeaderMatchTypeClass::Regex;
|
||||
}
|
||||
if (str == QStringLiteral("Substring")) {
|
||||
return HeaderMatchTypeClass::Substring;
|
||||
}
|
||||
|
||||
return HeaderMatchTypeClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -69,18 +69,6 @@ protected:
|
|||
HeaderMatchType m_match;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using HttpHeaderInfo = Jellyfin::DTO::HttpHeaderInfo;
|
||||
|
||||
template <>
|
||||
HttpHeaderInfo fromJsonValue<HttpHeaderInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return HttpHeaderInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -61,18 +61,6 @@ protected:
|
|||
bool m_ignoreWait;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using IgnoreWaitRequestDto = Jellyfin::DTO::IgnoreWaitRequestDto;
|
||||
|
||||
template <>
|
||||
IgnoreWaitRequestDto fromJsonValue<IgnoreWaitRequestDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return IgnoreWaitRequestDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -98,18 +98,6 @@ protected:
|
|||
QString m_format;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ImageByNameInfo = Jellyfin::DTO::ImageByNameInfo;
|
||||
|
||||
template <>
|
||||
ImageByNameInfo fromJsonValue<ImageByNameInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ImageByNameInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -57,37 +57,6 @@ private:
|
|||
|
||||
typedef ImageFormatClass::Value ImageFormat;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ImageFormat = Jellyfin::DTO::ImageFormat;
|
||||
using ImageFormatClass = Jellyfin::DTO::ImageFormatClass;
|
||||
|
||||
template <>
|
||||
ImageFormat fromJsonValue<ImageFormat>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ImageFormatClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Bmp")) {
|
||||
return ImageFormatClass::Bmp;
|
||||
}
|
||||
if (str == QStringLiteral("Gif")) {
|
||||
return ImageFormatClass::Gif;
|
||||
}
|
||||
if (str == QStringLiteral("Jpg")) {
|
||||
return ImageFormatClass::Jpg;
|
||||
}
|
||||
if (str == QStringLiteral("Png")) {
|
||||
return ImageFormatClass::Png;
|
||||
}
|
||||
if (str == QStringLiteral("Webp")) {
|
||||
return ImageFormatClass::Webp;
|
||||
}
|
||||
|
||||
return ImageFormatClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -122,18 +122,6 @@ protected:
|
|||
qint64 m_size;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ImageInfo = Jellyfin::DTO::ImageInfo;
|
||||
|
||||
template <>
|
||||
ImageInfo fromJsonValue<ImageInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ImageInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -76,18 +76,6 @@ protected:
|
|||
qint32 m_minWidth;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ImageOption = Jellyfin::DTO::ImageOption;
|
||||
|
||||
template <>
|
||||
ImageOption fromJsonValue<ImageOption>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ImageOption::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -60,46 +60,6 @@ private:
|
|||
|
||||
typedef ImageOrientationClass::Value ImageOrientation;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ImageOrientation = Jellyfin::DTO::ImageOrientation;
|
||||
using ImageOrientationClass = Jellyfin::DTO::ImageOrientationClass;
|
||||
|
||||
template <>
|
||||
ImageOrientation fromJsonValue<ImageOrientation>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ImageOrientationClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("TopLeft")) {
|
||||
return ImageOrientationClass::TopLeft;
|
||||
}
|
||||
if (str == QStringLiteral("TopRight")) {
|
||||
return ImageOrientationClass::TopRight;
|
||||
}
|
||||
if (str == QStringLiteral("BottomRight")) {
|
||||
return ImageOrientationClass::BottomRight;
|
||||
}
|
||||
if (str == QStringLiteral("BottomLeft")) {
|
||||
return ImageOrientationClass::BottomLeft;
|
||||
}
|
||||
if (str == QStringLiteral("LeftTop")) {
|
||||
return ImageOrientationClass::LeftTop;
|
||||
}
|
||||
if (str == QStringLiteral("RightTop")) {
|
||||
return ImageOrientationClass::RightTop;
|
||||
}
|
||||
if (str == QStringLiteral("RightBottom")) {
|
||||
return ImageOrientationClass::RightBottom;
|
||||
}
|
||||
if (str == QStringLiteral("LeftBottom")) {
|
||||
return ImageOrientationClass::LeftBottom;
|
||||
}
|
||||
|
||||
return ImageOrientationClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -74,18 +74,6 @@ protected:
|
|||
QList<ImageType> m_supportedImages;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ImageProviderInfo = Jellyfin::DTO::ImageProviderInfo;
|
||||
|
||||
template <>
|
||||
ImageProviderInfo fromJsonValue<ImageProviderInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ImageProviderInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -54,28 +54,6 @@ private:
|
|||
|
||||
typedef ImageSavingConventionClass::Value ImageSavingConvention;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ImageSavingConvention = Jellyfin::DTO::ImageSavingConvention;
|
||||
using ImageSavingConventionClass = Jellyfin::DTO::ImageSavingConventionClass;
|
||||
|
||||
template <>
|
||||
ImageSavingConvention fromJsonValue<ImageSavingConvention>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ImageSavingConventionClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Legacy")) {
|
||||
return ImageSavingConventionClass::Legacy;
|
||||
}
|
||||
if (str == QStringLiteral("Compatible")) {
|
||||
return ImageSavingConventionClass::Compatible;
|
||||
}
|
||||
|
||||
return ImageSavingConventionClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -65,61 +65,6 @@ private:
|
|||
|
||||
typedef ImageTypeClass::Value ImageType;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ImageType = Jellyfin::DTO::ImageType;
|
||||
using ImageTypeClass = Jellyfin::DTO::ImageTypeClass;
|
||||
|
||||
template <>
|
||||
ImageType fromJsonValue<ImageType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ImageTypeClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Primary")) {
|
||||
return ImageTypeClass::Primary;
|
||||
}
|
||||
if (str == QStringLiteral("Art")) {
|
||||
return ImageTypeClass::Art;
|
||||
}
|
||||
if (str == QStringLiteral("Backdrop")) {
|
||||
return ImageTypeClass::Backdrop;
|
||||
}
|
||||
if (str == QStringLiteral("Banner")) {
|
||||
return ImageTypeClass::Banner;
|
||||
}
|
||||
if (str == QStringLiteral("Logo")) {
|
||||
return ImageTypeClass::Logo;
|
||||
}
|
||||
if (str == QStringLiteral("Thumb")) {
|
||||
return ImageTypeClass::Thumb;
|
||||
}
|
||||
if (str == QStringLiteral("Disc")) {
|
||||
return ImageTypeClass::Disc;
|
||||
}
|
||||
if (str == QStringLiteral("Box")) {
|
||||
return ImageTypeClass::Box;
|
||||
}
|
||||
if (str == QStringLiteral("Screenshot")) {
|
||||
return ImageTypeClass::Screenshot;
|
||||
}
|
||||
if (str == QStringLiteral("Menu")) {
|
||||
return ImageTypeClass::Menu;
|
||||
}
|
||||
if (str == QStringLiteral("Chapter")) {
|
||||
return ImageTypeClass::Chapter;
|
||||
}
|
||||
if (str == QStringLiteral("BoxRear")) {
|
||||
return ImageTypeClass::BoxRear;
|
||||
}
|
||||
if (str == QStringLiteral("Profile")) {
|
||||
return ImageTypeClass::Profile;
|
||||
}
|
||||
|
||||
return ImageTypeClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -106,18 +106,6 @@ protected:
|
|||
QString m_checksum;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using InstallationInfo = Jellyfin::DTO::InstallationInfo;
|
||||
|
||||
template <>
|
||||
InstallationInfo fromJsonValue<InstallationInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return InstallationInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -115,18 +115,6 @@ protected:
|
|||
QString m_dataFolderPath;
|
||||
};
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using IPlugin = Jellyfin::DTO::IPlugin;
|
||||
|
||||
template <>
|
||||
IPlugin fromJsonValue<IPlugin>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return IPlugin::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
|
@ -54,28 +54,6 @@ private:
|
|||
|
||||
typedef IsoTypeClass::Value IsoType;
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using IsoType = Jellyfin::DTO::IsoType;
|
||||
using IsoTypeClass = Jellyfin::DTO::IsoTypeClass;
|
||||
|
||||
template <>
|
||||
IsoType fromJsonValue<IsoType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return IsoTypeClass::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Dvd")) {
|
||||
return IsoTypeClass::Dvd;
|
||||
}
|
||||
if (str == QStringLiteral("BluRay")) {
|
||||
return IsoTypeClass::BluRay;
|
||||
}
|
||||
|
||||
return IsoTypeClass::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue