Mercurial > minori
comparison src/services/services.cc @ 250:c130f47f6f48
*: many many changes
e.g. the search page is actually implemented now!
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Sun, 04 Feb 2024 21:17:17 -0500 |
parents | 80f49f623d30 |
children | 657fda1b9cac |
comparison
equal
deleted
inserted
replaced
249:6b2441c776dd | 250:c130f47f6f48 |
---|---|
1 #include "services/services.h" | 1 #include "services/services.h" |
2 #include "core/session.h" | 2 #include "core/session.h" |
3 #include "gui/dialog/settings.h" | 3 #include "gui/dialog/settings.h" |
4 #include "services/anilist.h" | 4 #include "services/anilist.h" |
5 #include <QMessageBox> | |
6 | 5 |
7 namespace Services { | 6 namespace Services { |
8 | 7 |
9 void Synchronize() { | 8 void Synchronize() { |
10 switch (session.config.service) { | 9 switch (session.config.service) { |
11 case Anime::Services::ANILIST: AniList::GetAnimeList(); break; | 10 case Anime::Services::ANILIST: AniList::GetAnimeList(); break; |
12 default: break; | 11 default: break; |
12 } | |
13 } | |
14 | |
15 std::vector<int> Search(const std::string& search) { | |
16 switch (session.config.service) { | |
17 case Anime::Services::ANILIST: return AniList::Search(search); | |
18 default: return {}; | |
13 } | 19 } |
14 } | 20 } |
15 | 21 |
16 void UpdateAnimeEntry(int id) { | 22 void UpdateAnimeEntry(int id) { |
17 switch (session.config.service) { | 23 switch (session.config.service) { |