Mercurial > minori
comparison include/core/torrent.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 | ab191e28e69d |
children | 4d461ef7d424 |
comparison
equal
deleted
inserted
replaced
117:2c1b6782e1d0 | 118:39521c47c7a3 |
---|---|
2 #define __core__torrent_h | 2 #define __core__torrent_h |
3 | 3 |
4 #include <string> | 4 #include <string> |
5 #include <QDateTime> | 5 #include <QDateTime> |
6 | 6 |
7 /* this will be moved into its own namespace if | 7 /* this is really just a fancy struct... |
8 | |
9 this will be moved into its own namespace if | |
8 it's deemed necessary */ | 10 it's deemed necessary */ |
9 class Torrent { | 11 class Torrent { |
10 public: | 12 public: |
11 std::string GetTitle() const { return _title; }; | 13 std::string GetTitle() const { return _title; }; |
14 std::string GetCategory() const { return _category; }; | |
12 std::string GetEpisode() const { return _episode; }; | 15 std::string GetEpisode() const { return _episode; }; |
13 std::string GetGroup() const { return _group; }; | 16 std::string GetGroup() const { return _group; }; |
14 size_t GetSize() const { return _size; }; | 17 size_t GetSize() const { return _size; }; |
15 std::string GetResolution() const { return _resolution; }; | 18 std::string GetResolution() const { return _resolution; }; |
16 int GetSeeders() const { return _seeders; }; | 19 int GetSeeders() const { return _seeders; }; |
21 std::string GetLink() const { return _link; }; | 24 std::string GetLink() const { return _link; }; |
22 std::string GetGuid() const { return _guid; }; | 25 std::string GetGuid() const { return _guid; }; |
23 QDateTime GetDate() const { return _date; }; | 26 QDateTime GetDate() const { return _date; }; |
24 | 27 |
25 void SetTitle(const std::string& title) { _title = title; }; | 28 void SetTitle(const std::string& title) { _title = title; }; |
29 void SetCategory(const std::string& category) { _category = category; }; | |
26 void SetEpisode(const std::string& episode) { _episode = episode; }; | 30 void SetEpisode(const std::string& episode) { _episode = episode; }; |
27 void SetGroup(const std::string& group) { _group = group; }; | 31 void SetGroup(const std::string& group) { _group = group; }; |
28 void SetSize(const size_t size) { _size = size; }; | 32 void SetSize(const size_t size) { _size = size; }; |
29 void SetResolution(const std::string& resolution) { _resolution = resolution; }; | 33 void SetResolution(const std::string& resolution) { _resolution = resolution; }; |
30 void SetSeeders(const int seeders) { _seeders = seeders; }; | 34 void SetSeeders(const int seeders) { _seeders = seeders; }; |
36 void SetGuid(const std::string& guid) { _guid = guid; }; | 40 void SetGuid(const std::string& guid) { _guid = guid; }; |
37 void SetDate(const QDateTime& date) { _date = date; }; | 41 void SetDate(const QDateTime& date) { _date = date; }; |
38 | 42 |
39 private: | 43 private: |
40 std::string _title; | 44 std::string _title; |
45 std::string _category; | |
41 std::string _episode; | 46 std::string _episode; |
42 std::string _group; | 47 std::string _group; |
43 size_t _size = 0; | 48 size_t _size = 0; |
44 std::string _resolution; /* technically should be an int, | 49 std::string _resolution; /* technically should be an int, |
45 but std::string is more useful */ | 50 but std::string is more useful */ |