2021-09-01 12:50:02 +00:00
|
|
|
/*
|
|
|
|
* Sailfin: a Jellyfin client written using Qt
|
|
|
|
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
/*
|
|
|
|
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
|
|
|
* OVERWRITTEN AT SOME POINT!
|
|
|
|
*
|
|
|
|
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
|
|
|
* core/openapigenerator.d.
|
|
|
|
*
|
|
|
|
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
|
|
|
* file with a newer file if needed instead of manually updating the files.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <JellyfinQt/loader/http/library.h>
|
|
|
|
|
|
|
|
namespace Jellyfin {
|
|
|
|
namespace Loader {
|
|
|
|
namespace HTTP {
|
|
|
|
|
|
|
|
using namespace Jellyfin::DTO;
|
|
|
|
|
|
|
|
GetSimilarAlbumsLoader::GetSimilarAlbumsLoader(ApiClient *apiClient)
|
|
|
|
: Jellyfin::Support::HttpLoader<BaseItemDtoQueryResult, GetSimilarAlbumsParams>(apiClient) {}
|
|
|
|
|
|
|
|
QString GetSimilarAlbumsLoader::path(const GetSimilarAlbumsParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
return QStringLiteral("/Albums/") + Support::toString< QString>(params.itemId()) + QStringLiteral("/Similar");
|
|
|
|
}
|
|
|
|
|
|
|
|
QUrlQuery GetSimilarAlbumsLoader::query(const GetSimilarAlbumsParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
QUrlQuery result;
|
|
|
|
|
|
|
|
// Optional parameters
|
|
|
|
if (!params.excludeArtistIdsNull()) {
|
|
|
|
result.addQueryItem("excludeArtistIds", Support::toString<QStringList>(params.excludeArtistIds()));
|
|
|
|
}
|
|
|
|
if (!params.userIdNull()) {
|
|
|
|
result.addQueryItem("userId", Support::toString<QString>(params.userId()));
|
|
|
|
}
|
|
|
|
if (!params.limitNull()) {
|
|
|
|
result.addQueryItem("limit", Support::toString<std::optional<qint32>>(params.limit()));
|
|
|
|
}
|
|
|
|
if (!params.fieldsNull()) {
|
|
|
|
result.addQueryItem("fields", Support::toString<QList<ItemFields>>(params.fields()));
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2021-09-03 01:47:25 +00:00
|
|
|
QByteArray GetSimilarAlbumsLoader::body(const GetSimilarAlbumsParams ¶ms) const {
|
|
|
|
return QByteArray();
|
|
|
|
}
|
|
|
|
|
|
|
|
QNetworkAccessManager::Operation GetSimilarAlbumsLoader::operation() const {
|
|
|
|
// HTTP method Get
|
|
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-09-01 12:50:02 +00:00
|
|
|
GetSimilarArtistsLoader::GetSimilarArtistsLoader(ApiClient *apiClient)
|
|
|
|
: Jellyfin::Support::HttpLoader<BaseItemDtoQueryResult, GetSimilarArtistsParams>(apiClient) {}
|
|
|
|
|
|
|
|
QString GetSimilarArtistsLoader::path(const GetSimilarArtistsParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
return QStringLiteral("/Artists/") + Support::toString< QString>(params.itemId()) + QStringLiteral("/Similar");
|
|
|
|
}
|
|
|
|
|
|
|
|
QUrlQuery GetSimilarArtistsLoader::query(const GetSimilarArtistsParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
QUrlQuery result;
|
|
|
|
|
|
|
|
// Optional parameters
|
|
|
|
if (!params.excludeArtistIdsNull()) {
|
|
|
|
result.addQueryItem("excludeArtistIds", Support::toString<QStringList>(params.excludeArtistIds()));
|
|
|
|
}
|
|
|
|
if (!params.userIdNull()) {
|
|
|
|
result.addQueryItem("userId", Support::toString<QString>(params.userId()));
|
|
|
|
}
|
|
|
|
if (!params.limitNull()) {
|
|
|
|
result.addQueryItem("limit", Support::toString<std::optional<qint32>>(params.limit()));
|
|
|
|
}
|
|
|
|
if (!params.fieldsNull()) {
|
|
|
|
result.addQueryItem("fields", Support::toString<QList<ItemFields>>(params.fields()));
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2021-09-03 01:47:25 +00:00
|
|
|
QByteArray GetSimilarArtistsLoader::body(const GetSimilarArtistsParams ¶ms) const {
|
|
|
|
return QByteArray();
|
|
|
|
}
|
|
|
|
|
|
|
|
QNetworkAccessManager::Operation GetSimilarArtistsLoader::operation() const {
|
|
|
|
// HTTP method Get
|
|
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-09-01 12:50:02 +00:00
|
|
|
GetAncestorsLoader::GetAncestorsLoader(ApiClient *apiClient)
|
|
|
|
: Jellyfin::Support::HttpLoader<QList<BaseItemDto>, GetAncestorsParams>(apiClient) {}
|
|
|
|
|
|
|
|
QString GetAncestorsLoader::path(const GetAncestorsParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
return QStringLiteral("/Items/") + Support::toString< QString>(params.itemId()) + QStringLiteral("/Ancestors");
|
|
|
|
}
|
|
|
|
|
|
|
|
QUrlQuery GetAncestorsLoader::query(const GetAncestorsParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
QUrlQuery result;
|
|
|
|
|
|
|
|
// Optional parameters
|
|
|
|
if (!params.userIdNull()) {
|
|
|
|
result.addQueryItem("userId", Support::toString<QString>(params.userId()));
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2021-09-03 01:47:25 +00:00
|
|
|
QByteArray GetAncestorsLoader::body(const GetAncestorsParams ¶ms) const {
|
|
|
|
return QByteArray();
|
|
|
|
}
|
|
|
|
|
|
|
|
QNetworkAccessManager::Operation GetAncestorsLoader::operation() const {
|
|
|
|
// HTTP method Get
|
|
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-09-01 12:50:02 +00:00
|
|
|
GetCriticReviewsLoader::GetCriticReviewsLoader(ApiClient *apiClient)
|
|
|
|
: Jellyfin::Support::HttpLoader<BaseItemDtoQueryResult, GetCriticReviewsParams>(apiClient) {}
|
|
|
|
|
|
|
|
QString GetCriticReviewsLoader::path(const GetCriticReviewsParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
return QStringLiteral("/Items/") + Support::toString< QString>(params.itemId()) + QStringLiteral("/CriticReviews");
|
|
|
|
}
|
|
|
|
|
|
|
|
QUrlQuery GetCriticReviewsLoader::query(const GetCriticReviewsParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
QUrlQuery result;
|
|
|
|
|
|
|
|
// Optional parameters
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2021-09-03 01:47:25 +00:00
|
|
|
QByteArray GetCriticReviewsLoader::body(const GetCriticReviewsParams ¶ms) const {
|
|
|
|
return QByteArray();
|
|
|
|
}
|
|
|
|
|
|
|
|
QNetworkAccessManager::Operation GetCriticReviewsLoader::operation() const {
|
|
|
|
// HTTP method Get
|
|
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-09-01 12:50:02 +00:00
|
|
|
GetSimilarItemsLoader::GetSimilarItemsLoader(ApiClient *apiClient)
|
|
|
|
: Jellyfin::Support::HttpLoader<BaseItemDtoQueryResult, GetSimilarItemsParams>(apiClient) {}
|
|
|
|
|
|
|
|
QString GetSimilarItemsLoader::path(const GetSimilarItemsParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
return QStringLiteral("/Items/") + Support::toString< QString>(params.itemId()) + QStringLiteral("/Similar");
|
|
|
|
}
|
|
|
|
|
|
|
|
QUrlQuery GetSimilarItemsLoader::query(const GetSimilarItemsParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
QUrlQuery result;
|
|
|
|
|
|
|
|
// Optional parameters
|
|
|
|
if (!params.excludeArtistIdsNull()) {
|
|
|
|
result.addQueryItem("excludeArtistIds", Support::toString<QStringList>(params.excludeArtistIds()));
|
|
|
|
}
|
|
|
|
if (!params.userIdNull()) {
|
|
|
|
result.addQueryItem("userId", Support::toString<QString>(params.userId()));
|
|
|
|
}
|
|
|
|
if (!params.limitNull()) {
|
|
|
|
result.addQueryItem("limit", Support::toString<std::optional<qint32>>(params.limit()));
|
|
|
|
}
|
|
|
|
if (!params.fieldsNull()) {
|
|
|
|
result.addQueryItem("fields", Support::toString<QList<ItemFields>>(params.fields()));
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2021-09-03 01:47:25 +00:00
|
|
|
QByteArray GetSimilarItemsLoader::body(const GetSimilarItemsParams ¶ms) const {
|
|
|
|
return QByteArray();
|
|
|
|
}
|
|
|
|
|
|
|
|
QNetworkAccessManager::Operation GetSimilarItemsLoader::operation() const {
|
|
|
|
// HTTP method Get
|
|
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-09-01 12:50:02 +00:00
|
|
|
GetThemeMediaLoader::GetThemeMediaLoader(ApiClient *apiClient)
|
|
|
|
: Jellyfin::Support::HttpLoader<AllThemeMediaResult, GetThemeMediaParams>(apiClient) {}
|
|
|
|
|
|
|
|
QString GetThemeMediaLoader::path(const GetThemeMediaParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
return QStringLiteral("/Items/") + Support::toString< QString>(params.itemId()) + QStringLiteral("/ThemeMedia");
|
|
|
|
}
|
|
|
|
|
|
|
|
QUrlQuery GetThemeMediaLoader::query(const GetThemeMediaParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
QUrlQuery result;
|
|
|
|
|
|
|
|
// Optional parameters
|
|
|
|
if (!params.userIdNull()) {
|
|
|
|
result.addQueryItem("userId", Support::toString<QString>(params.userId()));
|
|
|
|
}
|
|
|
|
if (!params.inheritFromParentNull()) {
|
|
|
|
result.addQueryItem("inheritFromParent", Support::toString<std::optional<bool>>(params.inheritFromParent()));
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2021-09-03 01:47:25 +00:00
|
|
|
QByteArray GetThemeMediaLoader::body(const GetThemeMediaParams ¶ms) const {
|
|
|
|
return QByteArray();
|
|
|
|
}
|
|
|
|
|
|
|
|
QNetworkAccessManager::Operation GetThemeMediaLoader::operation() const {
|
|
|
|
// HTTP method Get
|
|
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-09-01 12:50:02 +00:00
|
|
|
GetThemeSongsLoader::GetThemeSongsLoader(ApiClient *apiClient)
|
|
|
|
: Jellyfin::Support::HttpLoader<ThemeMediaResult, GetThemeSongsParams>(apiClient) {}
|
|
|
|
|
|
|
|
QString GetThemeSongsLoader::path(const GetThemeSongsParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
return QStringLiteral("/Items/") + Support::toString< QString>(params.itemId()) + QStringLiteral("/ThemeSongs");
|
|
|
|
}
|
|
|
|
|
|
|
|
QUrlQuery GetThemeSongsLoader::query(const GetThemeSongsParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
QUrlQuery result;
|
|
|
|
|
|
|
|
// Optional parameters
|
|
|
|
if (!params.userIdNull()) {
|
|
|
|
result.addQueryItem("userId", Support::toString<QString>(params.userId()));
|
|
|
|
}
|
|
|
|
if (!params.inheritFromParentNull()) {
|
|
|
|
result.addQueryItem("inheritFromParent", Support::toString<std::optional<bool>>(params.inheritFromParent()));
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2021-09-03 01:47:25 +00:00
|
|
|
QByteArray GetThemeSongsLoader::body(const GetThemeSongsParams ¶ms) const {
|
|
|
|
return QByteArray();
|
|
|
|
}
|
|
|
|
|
|
|
|
QNetworkAccessManager::Operation GetThemeSongsLoader::operation() const {
|
|
|
|
// HTTP method Get
|
|
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-09-01 12:50:02 +00:00
|
|
|
GetThemeVideosLoader::GetThemeVideosLoader(ApiClient *apiClient)
|
|
|
|
: Jellyfin::Support::HttpLoader<ThemeMediaResult, GetThemeVideosParams>(apiClient) {}
|
|
|
|
|
|
|
|
QString GetThemeVideosLoader::path(const GetThemeVideosParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
return QStringLiteral("/Items/") + Support::toString< QString>(params.itemId()) + QStringLiteral("/ThemeVideos");
|
|
|
|
}
|
|
|
|
|
|
|
|
QUrlQuery GetThemeVideosLoader::query(const GetThemeVideosParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
QUrlQuery result;
|
|
|
|
|
|
|
|
// Optional parameters
|
|
|
|
if (!params.userIdNull()) {
|
|
|
|
result.addQueryItem("userId", Support::toString<QString>(params.userId()));
|
|
|
|
}
|
|
|
|
if (!params.inheritFromParentNull()) {
|
|
|
|
result.addQueryItem("inheritFromParent", Support::toString<std::optional<bool>>(params.inheritFromParent()));
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2021-09-03 01:47:25 +00:00
|
|
|
QByteArray GetThemeVideosLoader::body(const GetThemeVideosParams ¶ms) const {
|
|
|
|
return QByteArray();
|
|
|
|
}
|
|
|
|
|
|
|
|
QNetworkAccessManager::Operation GetThemeVideosLoader::operation() const {
|
|
|
|
// HTTP method Get
|
|
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-09-01 12:50:02 +00:00
|
|
|
GetItemCountsLoader::GetItemCountsLoader(ApiClient *apiClient)
|
|
|
|
: Jellyfin::Support::HttpLoader<ItemCounts, GetItemCountsParams>(apiClient) {}
|
|
|
|
|
|
|
|
QString GetItemCountsLoader::path(const GetItemCountsParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
return QStringLiteral("/Items/Counts");
|
|
|
|
}
|
|
|
|
|
|
|
|
QUrlQuery GetItemCountsLoader::query(const GetItemCountsParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
QUrlQuery result;
|
|
|
|
|
|
|
|
// Optional parameters
|
|
|
|
if (!params.userIdNull()) {
|
|
|
|
result.addQueryItem("userId", Support::toString<QString>(params.userId()));
|
|
|
|
}
|
|
|
|
if (!params.isFavoriteNull()) {
|
|
|
|
result.addQueryItem("isFavorite", Support::toString<std::optional<bool>>(params.isFavorite()));
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2021-09-03 01:47:25 +00:00
|
|
|
QByteArray GetItemCountsLoader::body(const GetItemCountsParams ¶ms) const {
|
|
|
|
return QByteArray();
|
|
|
|
}
|
|
|
|
|
|
|
|
QNetworkAccessManager::Operation GetItemCountsLoader::operation() const {
|
|
|
|
// HTTP method Get
|
|
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-09-01 12:50:02 +00:00
|
|
|
GetLibraryOptionsInfoLoader::GetLibraryOptionsInfoLoader(ApiClient *apiClient)
|
|
|
|
: Jellyfin::Support::HttpLoader<LibraryOptionsResultDto, GetLibraryOptionsInfoParams>(apiClient) {}
|
|
|
|
|
|
|
|
QString GetLibraryOptionsInfoLoader::path(const GetLibraryOptionsInfoParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
return QStringLiteral("/Libraries/AvailableOptions");
|
|
|
|
}
|
|
|
|
|
|
|
|
QUrlQuery GetLibraryOptionsInfoLoader::query(const GetLibraryOptionsInfoParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
QUrlQuery result;
|
|
|
|
|
|
|
|
// Optional parameters
|
|
|
|
if (!params.libraryContentTypeNull()) {
|
|
|
|
result.addQueryItem("libraryContentType", Support::toString<QString>(params.libraryContentType()));
|
|
|
|
}
|
|
|
|
if (!params.isNewLibraryNull()) {
|
|
|
|
result.addQueryItem("isNewLibrary", Support::toString<std::optional<bool>>(params.isNewLibrary()));
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2021-09-03 01:47:25 +00:00
|
|
|
QByteArray GetLibraryOptionsInfoLoader::body(const GetLibraryOptionsInfoParams ¶ms) const {
|
|
|
|
return QByteArray();
|
|
|
|
}
|
|
|
|
|
|
|
|
QNetworkAccessManager::Operation GetLibraryOptionsInfoLoader::operation() const {
|
|
|
|
// HTTP method Get
|
|
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-09-01 12:50:02 +00:00
|
|
|
GetMediaFoldersLoader::GetMediaFoldersLoader(ApiClient *apiClient)
|
|
|
|
: Jellyfin::Support::HttpLoader<BaseItemDtoQueryResult, GetMediaFoldersParams>(apiClient) {}
|
|
|
|
|
|
|
|
QString GetMediaFoldersLoader::path(const GetMediaFoldersParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
return QStringLiteral("/Library/MediaFolders");
|
|
|
|
}
|
|
|
|
|
|
|
|
QUrlQuery GetMediaFoldersLoader::query(const GetMediaFoldersParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
QUrlQuery result;
|
|
|
|
|
|
|
|
// Optional parameters
|
|
|
|
if (!params.isHiddenNull()) {
|
|
|
|
result.addQueryItem("isHidden", Support::toString<std::optional<bool>>(params.isHidden()));
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2021-09-03 01:47:25 +00:00
|
|
|
QByteArray GetMediaFoldersLoader::body(const GetMediaFoldersParams ¶ms) const {
|
|
|
|
return QByteArray();
|
|
|
|
}
|
|
|
|
|
|
|
|
QNetworkAccessManager::Operation GetMediaFoldersLoader::operation() const {
|
|
|
|
// HTTP method Get
|
|
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-09-01 12:50:02 +00:00
|
|
|
GetPhysicalPathsLoader::GetPhysicalPathsLoader(ApiClient *apiClient)
|
|
|
|
: Jellyfin::Support::HttpLoader<QStringList, GetPhysicalPathsParams>(apiClient) {}
|
|
|
|
|
|
|
|
QString GetPhysicalPathsLoader::path(const GetPhysicalPathsParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
return QStringLiteral("/Library/PhysicalPaths");
|
|
|
|
}
|
|
|
|
|
|
|
|
QUrlQuery GetPhysicalPathsLoader::query(const GetPhysicalPathsParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
QUrlQuery result;
|
|
|
|
|
|
|
|
// Optional parameters
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2021-09-03 01:47:25 +00:00
|
|
|
QByteArray GetPhysicalPathsLoader::body(const GetPhysicalPathsParams ¶ms) const {
|
|
|
|
return QByteArray();
|
|
|
|
}
|
|
|
|
|
|
|
|
QNetworkAccessManager::Operation GetPhysicalPathsLoader::operation() const {
|
|
|
|
// HTTP method Get
|
|
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-09-01 12:50:02 +00:00
|
|
|
GetSimilarMoviesLoader::GetSimilarMoviesLoader(ApiClient *apiClient)
|
|
|
|
: Jellyfin::Support::HttpLoader<BaseItemDtoQueryResult, GetSimilarMoviesParams>(apiClient) {}
|
|
|
|
|
|
|
|
QString GetSimilarMoviesLoader::path(const GetSimilarMoviesParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
return QStringLiteral("/Movies/") + Support::toString< QString>(params.itemId()) + QStringLiteral("/Similar");
|
|
|
|
}
|
|
|
|
|
|
|
|
QUrlQuery GetSimilarMoviesLoader::query(const GetSimilarMoviesParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
QUrlQuery result;
|
|
|
|
|
|
|
|
// Optional parameters
|
|
|
|
if (!params.excludeArtistIdsNull()) {
|
|
|
|
result.addQueryItem("excludeArtistIds", Support::toString<QStringList>(params.excludeArtistIds()));
|
|
|
|
}
|
|
|
|
if (!params.userIdNull()) {
|
|
|
|
result.addQueryItem("userId", Support::toString<QString>(params.userId()));
|
|
|
|
}
|
|
|
|
if (!params.limitNull()) {
|
|
|
|
result.addQueryItem("limit", Support::toString<std::optional<qint32>>(params.limit()));
|
|
|
|
}
|
|
|
|
if (!params.fieldsNull()) {
|
|
|
|
result.addQueryItem("fields", Support::toString<QList<ItemFields>>(params.fields()));
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2021-09-03 01:47:25 +00:00
|
|
|
QByteArray GetSimilarMoviesLoader::body(const GetSimilarMoviesParams ¶ms) const {
|
|
|
|
return QByteArray();
|
|
|
|
}
|
|
|
|
|
|
|
|
QNetworkAccessManager::Operation GetSimilarMoviesLoader::operation() const {
|
|
|
|
// HTTP method Get
|
|
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-09-01 12:50:02 +00:00
|
|
|
GetSimilarShowsLoader::GetSimilarShowsLoader(ApiClient *apiClient)
|
|
|
|
: Jellyfin::Support::HttpLoader<BaseItemDtoQueryResult, GetSimilarShowsParams>(apiClient) {}
|
|
|
|
|
|
|
|
QString GetSimilarShowsLoader::path(const GetSimilarShowsParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
return QStringLiteral("/Shows/") + Support::toString< QString>(params.itemId()) + QStringLiteral("/Similar");
|
|
|
|
}
|
|
|
|
|
|
|
|
QUrlQuery GetSimilarShowsLoader::query(const GetSimilarShowsParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
QUrlQuery result;
|
|
|
|
|
|
|
|
// Optional parameters
|
|
|
|
if (!params.excludeArtistIdsNull()) {
|
|
|
|
result.addQueryItem("excludeArtistIds", Support::toString<QStringList>(params.excludeArtistIds()));
|
|
|
|
}
|
|
|
|
if (!params.userIdNull()) {
|
|
|
|
result.addQueryItem("userId", Support::toString<QString>(params.userId()));
|
|
|
|
}
|
|
|
|
if (!params.limitNull()) {
|
|
|
|
result.addQueryItem("limit", Support::toString<std::optional<qint32>>(params.limit()));
|
|
|
|
}
|
|
|
|
if (!params.fieldsNull()) {
|
|
|
|
result.addQueryItem("fields", Support::toString<QList<ItemFields>>(params.fields()));
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2021-09-03 01:47:25 +00:00
|
|
|
QByteArray GetSimilarShowsLoader::body(const GetSimilarShowsParams ¶ms) const {
|
|
|
|
return QByteArray();
|
|
|
|
}
|
|
|
|
|
|
|
|
QNetworkAccessManager::Operation GetSimilarShowsLoader::operation() const {
|
|
|
|
// HTTP method Get
|
|
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-09-01 12:50:02 +00:00
|
|
|
GetSimilarTrailersLoader::GetSimilarTrailersLoader(ApiClient *apiClient)
|
|
|
|
: Jellyfin::Support::HttpLoader<BaseItemDtoQueryResult, GetSimilarTrailersParams>(apiClient) {}
|
|
|
|
|
|
|
|
QString GetSimilarTrailersLoader::path(const GetSimilarTrailersParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
return QStringLiteral("/Trailers/") + Support::toString< QString>(params.itemId()) + QStringLiteral("/Similar");
|
|
|
|
}
|
|
|
|
|
|
|
|
QUrlQuery GetSimilarTrailersLoader::query(const GetSimilarTrailersParams ¶ms) const {
|
|
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
|
|
|
|
QUrlQuery result;
|
|
|
|
|
|
|
|
// Optional parameters
|
|
|
|
if (!params.excludeArtistIdsNull()) {
|
|
|
|
result.addQueryItem("excludeArtistIds", Support::toString<QStringList>(params.excludeArtistIds()));
|
|
|
|
}
|
|
|
|
if (!params.userIdNull()) {
|
|
|
|
result.addQueryItem("userId", Support::toString<QString>(params.userId()));
|
|
|
|
}
|
|
|
|
if (!params.limitNull()) {
|
|
|
|
result.addQueryItem("limit", Support::toString<std::optional<qint32>>(params.limit()));
|
|
|
|
}
|
|
|
|
if (!params.fieldsNull()) {
|
|
|
|
result.addQueryItem("fields", Support::toString<QList<ItemFields>>(params.fields()));
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2021-09-03 01:47:25 +00:00
|
|
|
QByteArray GetSimilarTrailersLoader::body(const GetSimilarTrailersParams ¶ms) const {
|
|
|
|
return QByteArray();
|
|
|
|
}
|
|
|
|
|
|
|
|
QNetworkAccessManager::Operation GetSimilarTrailersLoader::operation() const {
|
|
|
|
// HTTP method Get
|
|
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-09-01 12:50:02 +00:00
|
|
|
|
|
|
|
} // NS HTTP
|
|
|
|
} // NS Loader
|
|
|
|
} // NS Jellyfin
|