comparison include/core/session.h @ 118:39521c47c7a3

*: another huge megacommit, SORRY The torrents page works a lot better now Added the edit option to the anime list right click menu Vectorized currently playing files Available player and extensions are now loaded at runtime from files in (dotpath)/players.json and (dotpath)/extensions.json These paths are not permanent and will likely be moved to (dotpath)/recognition ... ... ...
author Paper <mrpapersonic@gmail.com>
date Tue, 07 Nov 2023 23:40:54 -0500
parents 2004b41d4a59
children 6fdf0632c003
comparison
equal deleted inserted replaced
117:2c1b6782e1d0 118:39521c47c7a3
1 #ifndef __core__session_h 1 #ifndef __core__session_h
2 #define __core__session_h 2 #define __core__session_h
3 3
4 #include "core/config.h" 4 #include "core/config.h"
5 #include "track/types.h"
5 #include "gui/locale.h" 6 #include "gui/locale.h"
6 #include <QElapsedTimer> 7 #include <QElapsedTimer>
7 8
8 struct Session { 9 struct Session {
9 public: 10 public:
10 Config config;
11 Session() { timer.start(); } 11 Session() { timer.start(); }
12 /* we literally *cannot* be lying to the user by doing this */ 12 /* we literally *cannot* be lying to the user by doing this */
13 void IncrementRequests() { requests++; }; 13 void IncrementRequests() { requests++; };
14 int GetRequests() { return requests; }; 14 int GetRequests() { return requests; };
15 int uptime() { return timer.elapsed(); } 15 int uptime() { return timer.elapsed(); }
16 16
17 Config config;
18
19 struct {
20 std::vector<Track::Types::MediaPlayer> players;
21 std::vector<Track::Types::MediaExtension> extensions;
22 } recognition;
23
17 private: 24 private:
18 int requests = 0; 25 uint32_t requests = 0;
19 QElapsedTimer timer; 26 QElapsedTimer timer;
20 }; 27 };
21 28
22 extern Session session; 29 extern Session session;
23 30