aboutsummaryrefslogtreecommitdiff
path: root/src/QuickMedia.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/QuickMedia.cpp')
-rw-r--r--src/QuickMedia.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 956ab32..cae1234 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -378,7 +378,6 @@ namespace QuickMedia {
exit(1);
}
// TODO: Make asynchronous
- // TODO: Make this also work for mangadex. Would require storing both id and name of the manga
for_files_in_dir_sort_last_modified(content_storage_dir, [&history_body, this](const std::filesystem::path &filepath) {
Path fullpath(filepath.c_str());
Json::Value body;
@@ -396,6 +395,10 @@ namespace QuickMedia {
body_item->url = "https://manganelo.com/manga/" + base64_decode(filename.string());
else if(current_plugin->name == "mangadex")
body_item->url = "https://mangadex.org/title/" + base64_decode(filename.string());
+ else if(current_plugin->name == "mangatown")
+ body_item->url = "https://mangatown.com/manga/" + base64_decode(filename.string());
+ else
+ fprintf(stderr, "Error: Not implemented: filename to manga chapter list\n");
history_body.items.push_back(std::move(body_item));
}
return true;
@@ -423,7 +426,7 @@ namespace QuickMedia {
search_bar->onTextSubmitCallback = [this, &tabs, &selected_tab, &typing](const std::string &text) -> bool {
if(current_plugin->name != "dmenu") {
- if(typing || text.empty())
+ if(typing || tabs[selected_tab].body->no_items_visible())
return false;
}