aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/DownloadUtils.cpp7
-rw-r--r--src/QuickMedia.cpp6
2 files changed, 7 insertions, 6 deletions
diff --git a/src/DownloadUtils.cpp b/src/DownloadUtils.cpp
index 53f8bb0..bb60ad6 100644
--- a/src/DownloadUtils.cpp
+++ b/src/DownloadUtils.cpp
@@ -142,9 +142,10 @@ namespace QuickMedia {
}
bool download_async_gui(const std::string &url, bool use_youtube_dl, bool no_video) {
- char quickmedia_path[PATH_MAX];
- if(readlink("/proc/self/exe", quickmedia_path, sizeof(quickmedia_path)) == -1)
- return false;
+ // TODO: Figure out why /proc/self/exe doesn't work when installed to /usr/bin/quickmedia
+ char quickmedia_path[PATH_MAX] = "/usr/bin/quickmedia";
+ //if(readlink("/proc/self/exe", quickmedia_path, sizeof(quickmedia_path)) == -1)
+ // return false;
std::vector<const char*> args = { quickmedia_path, "download", "-u", url.c_str() };
if(use_youtube_dl)
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index f4ee68f..d4e9bac 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -6071,9 +6071,9 @@ namespace QuickMedia {
loading_bar_background.get_position() + sf::Vector2f(0.0f, loading_bar_height + spacing_y));
}
- const float progress_diff = std::abs(progress - ui_progress);
- const float progress_move = frame_timer.getElapsedTime().asSeconds() * 500.0f * progress_diff;
- if(progress_diff < progress_move) {
+ const float progress_diff = progress - ui_progress;
+ const float progress_move = frame_timer.getElapsedTime().asSeconds() * 500.0f * std::abs(progress_diff);
+ if(std::abs(progress_diff) < progress_move) {
ui_progress = progress;
} else {
if(progress_diff > 0.0f)