1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2025-09-04 01:42:44 +00:00

WIP: Add playlists/queues and add support for Sailfish back

This commit is contained in:
Chris Josten 2021-07-31 15:06:17 +02:00
parent fbc154fb56
commit 86672be051
89 changed files with 1637 additions and 849 deletions

View file

@ -108,8 +108,7 @@ signals:
*/
void itemsLoaded();
void reloadWanted();
protected slots:
public slots:
virtual void futureReady() = 0;
protected:
@ -243,6 +242,18 @@ bool setRequestStartIndex(P &parameters, int startIndex) {
return false;
}
#ifndef JELLYFIN_APIMODEL_CPP
extern template bool setRequestStartIndex(Loader::GetUserViewsParams &params, int startIndex);
extern template void setRequestLimit(Loader::GetUserViewsParams &params, int limit);
extern template QList<DTO::BaseItemDto> extractRecords(const DTO::BaseItemDtoQueryResult &result);
extern template int extractTotalRecordCount(const DTO::BaseItemDtoQueryResult &result);
extern template QList<DTO::BaseItemDto> extractRecords(const QList<DTO::BaseItemDto> &result);
extern template int extractTotalRecordCount(const QList<DTO::BaseItemDto> &result);
extern template void setRequestLimit(Loader::GetLatestMediaParams &params, int limit);
extern template bool setRequestStartIndex(Loader::GetLatestMediaParams &params, int offset);
#endif
/**
* Template for implementing a loader for the given type, response and parameters using Jellyfin::Support:Loaders.
*
@ -301,7 +312,7 @@ protected:
return;
}
result = optResult.value();
} catch (Support::LoadException e) {
} catch (Support::LoadException &e) {
qWarning() << "Exception while loading: " << e.what();
this->setStatus(ViewModel::ModelStatus::Error);
return;
@ -430,11 +441,11 @@ public:
}
// QList-like API
const T& at(int index) { return m_array.at(index); }
const T& at(int index) const { return m_array.at(index); }
/**
* @return the amount of objects in this model.
*/
int size() {
int size() const {
return m_array.size();
}