Mercurial > minori
annotate include/core/torrent.h @ 258:862d0d8619f6
*: HUUUGE changes
animia has been renamed to animone, so instead of thinking of a
health condition, you think of a beautiful flower :)
I've also edited some of the code for animone, but I have no idea
if it even works or not because I don't have a mac or windows
machine lying around. whoops!
... anyway, all of the changes divergent from Anisthesia are now
licensed under BSD. it's possible that I could even rewrite most
of the code to where I don't even have to keep the MIT license,
but that's thinking too far into the future
I've been slacking off on implementing the anime seasons page,
mostly out of laziness. I think I'd have to create another db file
specifically for the seasons
anyway, this code is being pushed *primarily* because the hard drive
it's on is failing! yay :)
| author | Paper <paper@paper.us.eu.org> |
|---|---|
| date | Mon, 01 Apr 2024 02:43:44 -0400 |
| parents | 4d461ef7d424 |
| children | 3ec7804abf17 |
| rev | line source |
|---|---|
| 114 | 1 #ifndef __core__torrent_h |
| 2 #define __core__torrent_h | |
| 3 | |
| 258 | 4 #include <QDateTime> |
| 114 | 5 #include <string> |
| 6 | |
|
118
39521c47c7a3
*: another huge megacommit, SORRY
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
7 /* this is really just a fancy struct... |
|
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
118
diff
changeset
|
8 * |
|
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
118
diff
changeset
|
9 * this will be moved into its own namespace if |
|
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
118
diff
changeset
|
10 * it's deemed necessary |
| 258 | 11 */ |
| 114 | 12 class Torrent { |
| 258 | 13 public: |
| 14 std::string GetTitle() const { return _title; }; | |
| 15 std::string GetCategory() const { return _category; }; | |
| 16 std::string GetEpisode() const { return _episode; }; | |
| 17 std::string GetGroup() const { return _group; }; | |
| 18 size_t GetSize() const { return _size; }; | |
| 19 std::string GetResolution() const { return _resolution; }; | |
| 20 int GetSeeders() const { return _seeders; }; | |
| 21 int GetLeechers() const { return _leechers; }; | |
| 22 int GetDownloads() const { return _downloads; }; | |
| 23 std::string GetDescription() const { return _description; }; | |
| 24 std::string GetFilename() const { return _filename; }; | |
| 25 std::string GetLink() const { return _link; }; | |
| 26 std::string GetGuid() const { return _guid; }; | |
| 27 QDateTime GetDate() const { return _date; }; | |
| 114 | 28 |
| 258 | 29 void SetTitle(const std::string& title) { _title = title; }; |
| 30 void SetCategory(const std::string& category) { _category = category; }; | |
| 31 void SetEpisode(const std::string& episode) { _episode = episode; }; | |
| 32 void SetGroup(const std::string& group) { _group = group; }; | |
| 33 void SetSize(const size_t size) { _size = size; }; | |
| 34 void SetResolution(const std::string& resolution) { _resolution = resolution; }; | |
| 35 void SetSeeders(const int seeders) { _seeders = seeders; }; | |
| 36 void SetLeechers(const int leechers) { _leechers = leechers; }; | |
| 37 void SetDownloads(const int downloads) { _downloads = downloads; }; | |
| 38 void SetDescription(const std::string& description) { _description = description; }; | |
| 39 void SetFilename(const std::string& filename) { _filename = filename; }; | |
| 40 void SetLink(const std::string& link) { _link = link; }; | |
| 41 void SetGuid(const std::string& guid) { _guid = guid; }; | |
| 42 void SetDate(const QDateTime& date) { _date = date; }; | |
| 114 | 43 |
| 258 | 44 private: |
| 45 std::string _title; | |
| 46 std::string _category; | |
| 47 std::string _episode; | |
| 48 std::string _group; | |
| 49 size_t _size = 0; | |
| 50 std::string _resolution; /* technically should be an int, | |
| 51 but std::string is more useful */ | |
| 52 int _seeders = 0; | |
| 53 int _leechers = 0; | |
| 54 int _downloads = 0; | |
| 55 std::string _description; | |
| 56 std::string _filename; | |
| 57 std::string _link; | |
| 58 std::string _guid; | |
| 59 QDateTime _date; | |
| 114 | 60 }; |
| 61 | |
| 62 #endif // __core__torrent_h |
