aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO3
-rw-r--r--src/DownloadUtils.cpp7
-rw-r--r--src/QuickMedia.cpp6
3 files changed, 9 insertions, 7 deletions
diff --git a/TODO b/TODO
index 90369ec..5bf0c1f 100644
--- a/TODO
+++ b/TODO
@@ -129,4 +129,5 @@ Add client side 4chan max comment chars limit.
Use a directory icon and a file icon for non-media files in the file manager.
Dynamically fetch 4chan api key, if it ever changes in the future. Same for youtube.
Set curl download limits everywhere (when saving to file, downloading to json, etc...).
-In the downloader if we already have the url in thumbnail/video cache, then copy it to the destination instead of redownloading it. This would also fix downloading images when viewing a manga page. \ No newline at end of file
+In the downloader if we already have the url in thumbnail/video cache, then copy it to the destination instead of redownloading it. This would also fix downloading images when viewing a manga page.
+Improve file saving ui. We want it to display the remote name of the file so we dont have to manually type it. \ No newline at end of file
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)