aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md5
-rw-r--r--include/QuickMedia.hpp2
-rw-r--r--src/QuickMedia.cpp6
-rw-r--r--src/VideoPlayer.cpp4
4 files changed, 7 insertions, 10 deletions
diff --git a/README.md b/README.md
index 2849bd5..e08b0a6 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,7 @@
# QuickMedia
Native clients of websites with fast access to what you want to see
# Dependencies
-See project.conf \[dependencies]. youtube-dl also needs to be installed to play videos from youtube. \ No newline at end of file
+See project.conf \[dependencies]. youtube-dl also needs to be installed to play videos from youtube.
+# TODO
+Fix x11 freeze that sometimes happens when playing video.
+If a search returns no results, then "No results found for ..." should be shown and navigation should go back to searching with suggestions. \ No newline at end of file
diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp
index 291afff..d5839c7 100644
--- a/include/QuickMedia.hpp
+++ b/include/QuickMedia.hpp
@@ -3,7 +3,6 @@
#include "SearchBar.hpp"
#include "Page.hpp"
#include <vector>
-#include <stack>
#include <memory>
#include <SFML/Graphics/Font.hpp>
#include <SFML/Graphics/RenderWindow.hpp>
@@ -31,6 +30,5 @@ namespace QuickMedia {
std::unique_ptr<SearchBar> search_bar;
Page current_page;
std::string video_url;
- std::stack<Page> page_view_stack;
};
} \ No newline at end of file
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index c0ae44f..70f520a 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -184,7 +184,6 @@ namespace QuickMedia {
//current_plugin = new Manganelo();
current_plugin = new Youtube();
search_bar = std::make_unique<SearchBar>(font);
- page_view_stack.push(current_page);
}
Program::~Program() {
@@ -244,10 +243,8 @@ namespace QuickMedia {
};
search_bar->onTextSubmitCallback = [this](const std::string &text) {
- if(search_selected_suggestion(body, current_plugin) == SearchResult::OK) {
+ if(search_selected_suggestion(body, current_plugin) == SearchResult::OK)
current_page = Page::SEARCH_RESULT;
- page_view_stack.push(current_page);
- }
};
sf::Vector2f body_pos;
@@ -317,7 +314,6 @@ namespace QuickMedia {
return;
video_url = selected_item->url;
current_page = Page::VIDEO_CONTENT;
- page_view_stack.push(current_page);
};
sf::Vector2f body_pos;
diff --git a/src/VideoPlayer.cpp b/src/VideoPlayer.cpp
index 210a2ca..e3dab43 100644
--- a/src/VideoPlayer.cpp
+++ b/src/VideoPlayer.cpp
@@ -33,8 +33,8 @@ namespace QuickMedia {
if(!mpv)
throw VideoInitializationException("Failed to create mpv handle");
- mpv_set_option_string(mpv, "input-default-bindings", "yes");
- mpv_set_option_string(mpv, "input-vo-keyboard", "yes");
+ //mpv_set_option_string(mpv, "input-default-bindings", "yes");
+ //mpv_set_option_string(mpv, "input-vo-keyboard", "yes");
mpv_set_option_string(mpv, "cache-secs", "120");
mpv_set_option_string(mpv, "demuxer-max-bytes", "20M");
mpv_set_option_string(mpv, "demuxer-max-back-bytes", "10M");