comparison 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
comparison
equal deleted inserted replaced
257:699a20c57dc8 258:862d0d8619f6
1 #ifndef __core__torrent_h 1 #ifndef __core__torrent_h
2 #define __core__torrent_h 2 #define __core__torrent_h
3 3
4 #include <QDateTime>
4 #include <string> 5 #include <string>
5 #include <QDateTime>
6 6
7 /* this is really just a fancy struct... 7 /* this is really just a fancy struct...
8 * 8 *
9 * this will be moved into its own namespace if 9 * this will be moved into its own namespace if
10 * it's deemed necessary 10 * it's deemed necessary
11 */ 11 */
12 class Torrent { 12 class Torrent {
13 public: 13 public:
14 std::string GetTitle() const { return _title; }; 14 std::string GetTitle() const { return _title; };
15 std::string GetCategory() const { return _category; }; 15 std::string GetCategory() const { return _category; };
16 std::string GetEpisode() const { return _episode; }; 16 std::string GetEpisode() const { return _episode; };
17 std::string GetGroup() const { return _group; }; 17 std::string GetGroup() const { return _group; };
18 size_t GetSize() const { return _size; }; 18 size_t GetSize() const { return _size; };
19 std::string GetResolution() const { return _resolution; }; 19 std::string GetResolution() const { return _resolution; };
20 int GetSeeders() const { return _seeders; }; 20 int GetSeeders() const { return _seeders; };
21 int GetLeechers() const { return _leechers; }; 21 int GetLeechers() const { return _leechers; };
22 int GetDownloads() const { return _downloads; }; 22 int GetDownloads() const { return _downloads; };
23 std::string GetDescription() const { return _description; }; 23 std::string GetDescription() const { return _description; };
24 std::string GetFilename() const { return _filename; }; 24 std::string GetFilename() const { return _filename; };
25 std::string GetLink() const { return _link; }; 25 std::string GetLink() const { return _link; };
26 std::string GetGuid() const { return _guid; }; 26 std::string GetGuid() const { return _guid; };
27 QDateTime GetDate() const { return _date; }; 27 QDateTime GetDate() const { return _date; };
28 28
29 void SetTitle(const std::string& title) { _title = title; }; 29 void SetTitle(const std::string& title) { _title = title; };
30 void SetCategory(const std::string& category) { _category = category; }; 30 void SetCategory(const std::string& category) { _category = category; };
31 void SetEpisode(const std::string& episode) { _episode = episode; }; 31 void SetEpisode(const std::string& episode) { _episode = episode; };
32 void SetGroup(const std::string& group) { _group = group; }; 32 void SetGroup(const std::string& group) { _group = group; };
33 void SetSize(const size_t size) { _size = size; }; 33 void SetSize(const size_t size) { _size = size; };
34 void SetResolution(const std::string& resolution) { _resolution = resolution; }; 34 void SetResolution(const std::string& resolution) { _resolution = resolution; };
35 void SetSeeders(const int seeders) { _seeders = seeders; }; 35 void SetSeeders(const int seeders) { _seeders = seeders; };
36 void SetLeechers(const int leechers) { _leechers = leechers; }; 36 void SetLeechers(const int leechers) { _leechers = leechers; };
37 void SetDownloads(const int downloads) { _downloads = downloads; }; 37 void SetDownloads(const int downloads) { _downloads = downloads; };
38 void SetDescription(const std::string& description) { _description = description; }; 38 void SetDescription(const std::string& description) { _description = description; };
39 void SetFilename(const std::string& filename) { _filename = filename; }; 39 void SetFilename(const std::string& filename) { _filename = filename; };
40 void SetLink(const std::string& link) { _link = link; }; 40 void SetLink(const std::string& link) { _link = link; };
41 void SetGuid(const std::string& guid) { _guid = guid; }; 41 void SetGuid(const std::string& guid) { _guid = guid; };
42 void SetDate(const QDateTime& date) { _date = date; }; 42 void SetDate(const QDateTime& date) { _date = date; };
43 43
44 private: 44 private:
45 std::string _title; 45 std::string _title;
46 std::string _category; 46 std::string _category;
47 std::string _episode; 47 std::string _episode;
48 std::string _group; 48 std::string _group;
49 size_t _size = 0; 49 size_t _size = 0;
50 std::string _resolution; /* technically should be an int, 50 std::string _resolution; /* technically should be an int,
51 but std::string is more useful */ 51 but std::string is more useful */
52 int _seeders = 0; 52 int _seeders = 0;
53 int _leechers = 0; 53 int _leechers = 0;
54 int _downloads = 0; 54 int _downloads = 0;
55 std::string _description; 55 std::string _description;
56 std::string _filename; 56 std::string _filename;
57 std::string _link; 57 std::string _link;
58 std::string _guid; 58 std::string _guid;
59 QDateTime _date; 59 QDateTime _date;
60 }; 60 };
61 61
62 #endif // __core__torrent_h 62 #endif // __core__torrent_h