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:
parent
fbc154fb56
commit
86672be051
89 changed files with 1637 additions and 849 deletions
|
@ -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 ¶meters, int startIndex) {
|
|||
return false;
|
||||
}
|
||||
|
||||
#ifndef JELLYFIN_APIMODEL_CPP
|
||||
extern template bool setRequestStartIndex(Loader::GetUserViewsParams ¶ms, int startIndex);
|
||||
extern template void setRequestLimit(Loader::GetUserViewsParams ¶ms, 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 ¶ms, int limit);
|
||||
extern template bool setRequestStartIndex(Loader::GetLatestMediaParams ¶ms, 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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue