aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/QuickMedia.cpp6
-rw-r--r--src/SearchBar.cpp2
-rw-r--r--src/VideoPlayer.cpp4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 041e3a6..3b379c1 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -465,7 +465,7 @@ namespace QuickMedia {
bool end_of_file = false;
if(strcmp(event_name, "pause") == 0) {
double time_remaining = 0.0;
- if(video_player->get_time_remaining(&time_remaining) == VideoPlayer::Error::OK && time_remaining < 0.1)
+ if(video_player->get_time_remaining(&time_remaining) == VideoPlayer::Error::OK && time_remaining <= 1.0)
end_of_file = true;
} else if(strcmp(event_name, "playback-restart") == 0) {
video_player->set_paused(false);
@@ -682,9 +682,9 @@ namespace QuickMedia {
BodyItem *selected_item = body->get_selected();
if(selected_item) {
if(track_media(TrackMediaType::HTML, content_title, selected_item->title, content_url) == 0) {
- show_notification("Media tracker", "You are now tracking " + selected_item->title);
+ show_notification("Media tracker", "You are now tracking \"" + content_title + "\" after \"" + selected_item->title + "\"");
} else {
- show_notification("Media tracker", "Failed to track media. Url: " + selected_item->url + ", title: " + selected_item->title, Urgency::CRITICAL);
+ show_notification("Media tracker", "Failed to track media \"" + content_title + "\", chapter: \"" + selected_item->title + "\"", Urgency::CRITICAL);
}
}
}
diff --git a/src/SearchBar.cpp b/src/SearchBar.cpp
index e792480..179f1d9 100644
--- a/src/SearchBar.cpp
+++ b/src/SearchBar.cpp
@@ -127,6 +127,6 @@ namespace QuickMedia {
}
float SearchBar::getBottom() const {
- return background.getPosition().y + background.getSize().y;
+ return shade.getSize().y + background_shadow.getSize().y;
}
} \ No newline at end of file
diff --git a/src/VideoPlayer.cpp b/src/VideoPlayer.cpp
index 16a53e0..2336367 100644
--- a/src/VideoPlayer.cpp
+++ b/src/VideoPlayer.cpp
@@ -139,7 +139,7 @@ namespace QuickMedia {
if(connect(ipc_socket, (struct sockaddr*)&ipc_addr, sizeof(ipc_addr)) == -1) {
++connect_tries;
if(connect_tries == MAX_RETRIES_CONNECT) {
- fprintf(stderr, "Failed to connect to mpv ipc after %d seconds, last error: %s\n", RETRY_TIME_MS * MAX_RETRIES_CONNECT, strerror(errno));
+ fprintf(stderr, "Failed to connect to mpv ipc after %d seconds, last error: %s\n", (RETRY_TIME_MS * MAX_RETRIES_CONNECT)/1000, strerror(errno));
return Error::FAIL_TO_CONNECT_TIMEOUT;
}
} else {
@@ -154,7 +154,7 @@ namespace QuickMedia {
if(num_children == 0) {
++find_window_tries;
if(find_window_tries == MAX_RETRIES_FIND_WINDOW) {
- fprintf(stderr, "Failed to find mpv window after %d seconds\n", RETRY_TIME_MS * MAX_RETRIES_FIND_WINDOW);
+ fprintf(stderr, "Failed to find mpv window after %d seconds\n", (RETRY_TIME_MS * MAX_RETRIES_FIND_WINDOW)/1000);
return Error::FAIL_TO_FIND_WINDOW_TIMEOUT;
}
} else if(num_children == 1) {