aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO1
-rw-r--r--src/QuickMedia.cpp17
2 files changed, 12 insertions, 6 deletions
diff --git a/TODO b/TODO
index 076900a..3527720 100644
--- a/TODO
+++ b/TODO
@@ -12,7 +12,6 @@ Add support for special formatting for posts by admins on imageboards.
For image boards, track (You)'s and show notification when somebody replies to your post.
Go to next chapter when reaching the end of the chapter in image endless mode.
Some text is not visible on 4chan, such as code blocks.
-Show indication when search is in progress (or when something is loading). Some sites such as youtube and mangadex are slow at searching.
Add login page for mangadex instead of having to manually add remember_me token to config file.
Allow deleting watch history with delete key (and show confirmation).
Add navigation to nyaa.si submitter torrents.
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 33ebb06..054b3ed 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -1640,10 +1640,10 @@ namespace QuickMedia {
sf::RectangleShape rect;
rect.setFillColor(sf::Color::Red);
- // Clear screen before playing video, to show a black screen instead of being frozen
- // at the previous UI for a moment
- window.clear();
- window.display();
+
+ sf::Sprite load_sprite(loading_icon);
+ sf::Vector2u loading_icon_size = loading_icon.getSize();
+ load_sprite.setOrigin(loading_icon_size.x * 0.5f, loading_icon_size.y * 0.5f);
XEvent xev;
bool cursor_visible = true;
@@ -1782,7 +1782,14 @@ namespace QuickMedia {
break;
}
- // TODO: Show loading video animation. load_video needs to be made asynchronous first
+ if(!video_loaded) {
+ window.clear(back_color);
+ load_sprite.setPosition(window_size.x * 0.5f - loading_icon_size.x * 0.5f, window_size.y * 0.5f - loading_icon_size.y * 0.5f);
+ load_sprite.setRotation(-time_watched_timer.getElapsedTime().asSeconds() * 400.0);
+ window.draw(load_sprite);
+ window.display();
+ continue;
+ }
/* Only save recommendations for the video if we have been watching it for 15 seconds */
if(is_youtube && video_loaded && !added_recommendations && time_watched_timer.getElapsedTime().asSeconds() >= 15) {