RichPresence: Use class for activity
This commit is contained in:
@@ -49,7 +49,6 @@ RichPresence::RichPresence(const SharedPtr<Player> player,
|
|||||||
: QObject(parent),
|
: QObject(parent),
|
||||||
player_(player),
|
player_(player),
|
||||||
playlist_manager_(playlist_manager),
|
playlist_manager_(playlist_manager),
|
||||||
activity_({ {}, {}, {}, 0, 0, 0 }),
|
|
||||||
send_presence_timestamp_(0),
|
send_presence_timestamp_(0),
|
||||||
enabled_(false) {
|
enabled_(false) {
|
||||||
|
|
||||||
|
|||||||
@@ -58,14 +58,17 @@ class RichPresence : public QObject {
|
|||||||
const SharedPtr<Player> player_;
|
const SharedPtr<Player> player_;
|
||||||
const SharedPtr<PlaylistManager> playlist_manager_;
|
const SharedPtr<PlaylistManager> playlist_manager_;
|
||||||
|
|
||||||
struct {
|
class Activity {
|
||||||
|
public:
|
||||||
|
explicit Activity() : start_timestamp(0), length_secs(0), seek_secs(0) {}
|
||||||
QString title;
|
QString title;
|
||||||
QString artist;
|
QString artist;
|
||||||
QString album;
|
QString album;
|
||||||
qint64 start_timestamp;
|
qint64 start_timestamp;
|
||||||
qint64 length_secs;
|
qint64 length_secs;
|
||||||
qint64 seek_secs;
|
qint64 seek_secs;
|
||||||
} activity_;
|
};
|
||||||
|
Activity activity_;
|
||||||
qint64 send_presence_timestamp_;
|
qint64 send_presence_timestamp_;
|
||||||
bool enabled_;
|
bool enabled_;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user