mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-03-15 02:12:40 +00:00
838 lines
27 KiB
C++
838 lines
27 KiB
C++
/*
|
|
* 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;
|
|
|
|
DeleteItemsLoader::DeleteItemsLoader(ApiClient *apiClient)
|
|
: Jellyfin::Support::HttpLoader<void, DeleteItemsParams>(apiClient) {}
|
|
|
|
QString DeleteItemsLoader::path(const DeleteItemsParams ¶ms) const {
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
return QStringLiteral("/Items");
|
|
}
|
|
|
|
QUrlQuery DeleteItemsLoader::query(const DeleteItemsParams ¶ms) const {
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
QUrlQuery result;
|
|
|
|
// Optional parameters
|
|
if (!params.idsNull()) {
|
|
result.addQueryItem("ids", Support::toString<QStringList>(params.ids()));
|
|
}
|
|
|
|
return result;
|
|
}
|
|
|
|
QByteArray DeleteItemsLoader::body(const DeleteItemsParams ¶ms) const {
|
|
return QByteArray();
|
|
}
|
|
|
|
QNetworkAccessManager::Operation DeleteItemsLoader::operation() const {
|
|
// HTTP method Delete
|
|
return QNetworkAccessManager::DeleteOperation;
|
|
|
|
}
|
|
|
|
DeleteItemLoader::DeleteItemLoader(ApiClient *apiClient)
|
|
: Jellyfin::Support::HttpLoader<void, DeleteItemParams>(apiClient) {}
|
|
|
|
QString DeleteItemLoader::path(const DeleteItemParams ¶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()) ;
|
|
}
|
|
|
|
QUrlQuery DeleteItemLoader::query(const DeleteItemParams ¶ms) const {
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
QUrlQuery result;
|
|
|
|
// Optional parameters
|
|
|
|
return result;
|
|
}
|
|
|
|
QByteArray DeleteItemLoader::body(const DeleteItemParams ¶ms) const {
|
|
return QByteArray();
|
|
}
|
|
|
|
QNetworkAccessManager::Operation DeleteItemLoader::operation() const {
|
|
// HTTP method Delete
|
|
return QNetworkAccessManager::DeleteOperation;
|
|
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
QByteArray GetSimilarAlbumsLoader::body(const GetSimilarAlbumsParams ¶ms) const {
|
|
return QByteArray();
|
|
}
|
|
|
|
QNetworkAccessManager::Operation GetSimilarAlbumsLoader::operation() const {
|
|
// HTTP method Get
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
QByteArray GetSimilarArtistsLoader::body(const GetSimilarArtistsParams ¶ms) const {
|
|
return QByteArray();
|
|
}
|
|
|
|
QNetworkAccessManager::Operation GetSimilarArtistsLoader::operation() const {
|
|
// HTTP method Get
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
QByteArray GetAncestorsLoader::body(const GetAncestorsParams ¶ms) const {
|
|
return QByteArray();
|
|
}
|
|
|
|
QNetworkAccessManager::Operation GetAncestorsLoader::operation() const {
|
|
// HTTP method Get
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
QByteArray GetCriticReviewsLoader::body(const GetCriticReviewsParams ¶ms) const {
|
|
return QByteArray();
|
|
}
|
|
|
|
QNetworkAccessManager::Operation GetCriticReviewsLoader::operation() const {
|
|
// HTTP method Get
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
QByteArray GetSimilarItemsLoader::body(const GetSimilarItemsParams ¶ms) const {
|
|
return QByteArray();
|
|
}
|
|
|
|
QNetworkAccessManager::Operation GetSimilarItemsLoader::operation() const {
|
|
// HTTP method Get
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
QByteArray GetThemeMediaLoader::body(const GetThemeMediaParams ¶ms) const {
|
|
return QByteArray();
|
|
}
|
|
|
|
QNetworkAccessManager::Operation GetThemeMediaLoader::operation() const {
|
|
// HTTP method Get
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
QByteArray GetThemeSongsLoader::body(const GetThemeSongsParams ¶ms) const {
|
|
return QByteArray();
|
|
}
|
|
|
|
QNetworkAccessManager::Operation GetThemeSongsLoader::operation() const {
|
|
// HTTP method Get
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
QByteArray GetThemeVideosLoader::body(const GetThemeVideosParams ¶ms) const {
|
|
return QByteArray();
|
|
}
|
|
|
|
QNetworkAccessManager::Operation GetThemeVideosLoader::operation() const {
|
|
// HTTP method Get
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
QByteArray GetItemCountsLoader::body(const GetItemCountsParams ¶ms) const {
|
|
return QByteArray();
|
|
}
|
|
|
|
QNetworkAccessManager::Operation GetItemCountsLoader::operation() const {
|
|
// HTTP method Get
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
QByteArray GetLibraryOptionsInfoLoader::body(const GetLibraryOptionsInfoParams ¶ms) const {
|
|
return QByteArray();
|
|
}
|
|
|
|
QNetworkAccessManager::Operation GetLibraryOptionsInfoLoader::operation() const {
|
|
// HTTP method Get
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
}
|
|
|
|
PostUpdatedMediaLoader::PostUpdatedMediaLoader(ApiClient *apiClient)
|
|
: Jellyfin::Support::HttpLoader<void, PostUpdatedMediaParams>(apiClient) {}
|
|
|
|
QString PostUpdatedMediaLoader::path(const PostUpdatedMediaParams ¶ms) const {
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
return QStringLiteral("/Library/Media/Updated");
|
|
}
|
|
|
|
QUrlQuery PostUpdatedMediaLoader::query(const PostUpdatedMediaParams ¶ms) const {
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
QUrlQuery result;
|
|
|
|
// Optional parameters
|
|
|
|
return result;
|
|
}
|
|
|
|
QByteArray PostUpdatedMediaLoader::body(const PostUpdatedMediaParams ¶ms) const {
|
|
return Support::toString<QList<MediaUpdateInfoDto>>(params.body()).toUtf8();
|
|
}
|
|
|
|
QNetworkAccessManager::Operation PostUpdatedMediaLoader::operation() const {
|
|
// HTTP method Post
|
|
return QNetworkAccessManager::PostOperation;
|
|
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
QByteArray GetMediaFoldersLoader::body(const GetMediaFoldersParams ¶ms) const {
|
|
return QByteArray();
|
|
}
|
|
|
|
QNetworkAccessManager::Operation GetMediaFoldersLoader::operation() const {
|
|
// HTTP method Get
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
}
|
|
|
|
PostAddedMoviesLoader::PostAddedMoviesLoader(ApiClient *apiClient)
|
|
: Jellyfin::Support::HttpLoader<void, PostAddedMoviesParams>(apiClient) {}
|
|
|
|
QString PostAddedMoviesLoader::path(const PostAddedMoviesParams ¶ms) const {
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
return QStringLiteral("/Library/Movies/Added");
|
|
}
|
|
|
|
QUrlQuery PostAddedMoviesLoader::query(const PostAddedMoviesParams ¶ms) const {
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
QUrlQuery result;
|
|
|
|
// Optional parameters
|
|
if (!params.tmdbIdNull()) {
|
|
result.addQueryItem("tmdbId", Support::toString<QString>(params.tmdbId()));
|
|
}
|
|
if (!params.imdbIdNull()) {
|
|
result.addQueryItem("imdbId", Support::toString<QString>(params.imdbId()));
|
|
}
|
|
|
|
return result;
|
|
}
|
|
|
|
QByteArray PostAddedMoviesLoader::body(const PostAddedMoviesParams ¶ms) const {
|
|
return QByteArray();
|
|
}
|
|
|
|
QNetworkAccessManager::Operation PostAddedMoviesLoader::operation() const {
|
|
// HTTP method Post
|
|
return QNetworkAccessManager::PostOperation;
|
|
|
|
}
|
|
|
|
PostUpdatedMoviesLoader::PostUpdatedMoviesLoader(ApiClient *apiClient)
|
|
: Jellyfin::Support::HttpLoader<void, PostUpdatedMoviesParams>(apiClient) {}
|
|
|
|
QString PostUpdatedMoviesLoader::path(const PostUpdatedMoviesParams ¶ms) const {
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
return QStringLiteral("/Library/Movies/Updated");
|
|
}
|
|
|
|
QUrlQuery PostUpdatedMoviesLoader::query(const PostUpdatedMoviesParams ¶ms) const {
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
QUrlQuery result;
|
|
|
|
// Optional parameters
|
|
if (!params.tmdbIdNull()) {
|
|
result.addQueryItem("tmdbId", Support::toString<QString>(params.tmdbId()));
|
|
}
|
|
if (!params.imdbIdNull()) {
|
|
result.addQueryItem("imdbId", Support::toString<QString>(params.imdbId()));
|
|
}
|
|
|
|
return result;
|
|
}
|
|
|
|
QByteArray PostUpdatedMoviesLoader::body(const PostUpdatedMoviesParams ¶ms) const {
|
|
return QByteArray();
|
|
}
|
|
|
|
QNetworkAccessManager::Operation PostUpdatedMoviesLoader::operation() const {
|
|
// HTTP method Post
|
|
return QNetworkAccessManager::PostOperation;
|
|
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
QByteArray GetPhysicalPathsLoader::body(const GetPhysicalPathsParams ¶ms) const {
|
|
return QByteArray();
|
|
}
|
|
|
|
QNetworkAccessManager::Operation GetPhysicalPathsLoader::operation() const {
|
|
// HTTP method Get
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
}
|
|
|
|
RefreshLibraryLoader::RefreshLibraryLoader(ApiClient *apiClient)
|
|
: Jellyfin::Support::HttpLoader<void, RefreshLibraryParams>(apiClient) {}
|
|
|
|
QString RefreshLibraryLoader::path(const RefreshLibraryParams ¶ms) const {
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
return QStringLiteral("/Library/Refresh");
|
|
}
|
|
|
|
QUrlQuery RefreshLibraryLoader::query(const RefreshLibraryParams ¶ms) const {
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
QUrlQuery result;
|
|
|
|
// Optional parameters
|
|
|
|
return result;
|
|
}
|
|
|
|
QByteArray RefreshLibraryLoader::body(const RefreshLibraryParams ¶ms) const {
|
|
return QByteArray();
|
|
}
|
|
|
|
QNetworkAccessManager::Operation RefreshLibraryLoader::operation() const {
|
|
// HTTP method Get
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
}
|
|
|
|
PostAddedSeriesLoader::PostAddedSeriesLoader(ApiClient *apiClient)
|
|
: Jellyfin::Support::HttpLoader<void, PostAddedSeriesParams>(apiClient) {}
|
|
|
|
QString PostAddedSeriesLoader::path(const PostAddedSeriesParams ¶ms) const {
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
return QStringLiteral("/Library/Series/Added");
|
|
}
|
|
|
|
QUrlQuery PostAddedSeriesLoader::query(const PostAddedSeriesParams ¶ms) const {
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
QUrlQuery result;
|
|
|
|
// Optional parameters
|
|
if (!params.tvdbIdNull()) {
|
|
result.addQueryItem("tvdbId", Support::toString<QString>(params.tvdbId()));
|
|
}
|
|
|
|
return result;
|
|
}
|
|
|
|
QByteArray PostAddedSeriesLoader::body(const PostAddedSeriesParams ¶ms) const {
|
|
return QByteArray();
|
|
}
|
|
|
|
QNetworkAccessManager::Operation PostAddedSeriesLoader::operation() const {
|
|
// HTTP method Post
|
|
return QNetworkAccessManager::PostOperation;
|
|
|
|
}
|
|
|
|
PostUpdatedSeriesLoader::PostUpdatedSeriesLoader(ApiClient *apiClient)
|
|
: Jellyfin::Support::HttpLoader<void, PostUpdatedSeriesParams>(apiClient) {}
|
|
|
|
QString PostUpdatedSeriesLoader::path(const PostUpdatedSeriesParams ¶ms) const {
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
return QStringLiteral("/Library/Series/Updated");
|
|
}
|
|
|
|
QUrlQuery PostUpdatedSeriesLoader::query(const PostUpdatedSeriesParams ¶ms) const {
|
|
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
|
|
|
QUrlQuery result;
|
|
|
|
// Optional parameters
|
|
if (!params.tvdbIdNull()) {
|
|
result.addQueryItem("tvdbId", Support::toString<QString>(params.tvdbId()));
|
|
}
|
|
|
|
return result;
|
|
}
|
|
|
|
QByteArray PostUpdatedSeriesLoader::body(const PostUpdatedSeriesParams ¶ms) const {
|
|
return QByteArray();
|
|
}
|
|
|
|
QNetworkAccessManager::Operation PostUpdatedSeriesLoader::operation() const {
|
|
// HTTP method Post
|
|
return QNetworkAccessManager::PostOperation;
|
|
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
QByteArray GetSimilarMoviesLoader::body(const GetSimilarMoviesParams ¶ms) const {
|
|
return QByteArray();
|
|
}
|
|
|
|
QNetworkAccessManager::Operation GetSimilarMoviesLoader::operation() const {
|
|
// HTTP method Get
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
QByteArray GetSimilarShowsLoader::body(const GetSimilarShowsParams ¶ms) const {
|
|
return QByteArray();
|
|
}
|
|
|
|
QNetworkAccessManager::Operation GetSimilarShowsLoader::operation() const {
|
|
// HTTP method Get
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
QByteArray GetSimilarTrailersLoader::body(const GetSimilarTrailersParams ¶ms) const {
|
|
return QByteArray();
|
|
}
|
|
|
|
QNetworkAccessManager::Operation GetSimilarTrailersLoader::operation() const {
|
|
// HTTP method Get
|
|
return QNetworkAccessManager::GetOperation;
|
|
|
|
}
|
|
|
|
|
|
} // NS HTTP
|
|
} // NS Loader
|
|
} // NS Jellyfin
|