feat: photo queue manager with cycling modes and favorites weighting
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
32
src/photo_queue.h
Normal file
32
src/photo_queue.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <vector>
|
||||
#include "settings.h"
|
||||
|
||||
class ImmichClient;
|
||||
|
||||
class PhotoQueue {
|
||||
public:
|
||||
void begin(ImmichClient& client, SettingsManager& settings);
|
||||
bool sync();
|
||||
String next();
|
||||
String random();
|
||||
String current();
|
||||
size_t size();
|
||||
bool needsResync();
|
||||
String findPortraitPair(size_t startIndex);
|
||||
|
||||
private:
|
||||
ImmichClient* _client = nullptr;
|
||||
SettingsManager* _settings = nullptr;
|
||||
|
||||
std::vector<String> _queue;
|
||||
size_t _cursor = 0;
|
||||
unsigned long _lastSyncTime = 0;
|
||||
|
||||
void shuffle();
|
||||
void sortChronological(bool reverse);
|
||||
void applyFavoritesWeighting();
|
||||
std::vector<String> getSelectedAlbumIds();
|
||||
};
|
||||
Reference in New Issue
Block a user