aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/QuickMedia.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 433cc77..4de923d 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -3321,12 +3321,12 @@ namespace QuickMedia {
if(update_duration) {
update_duration = false;
- successfully_fetched_video_duration = true;
+ successfully_fetched_video_duration = false;
double file_duration = 0.0;
video_player->get_duration_in_file(&file_duration);
video_info.duration = std::max(video_info.duration, file_duration);
- if(video_info.duration > 0.001)//
- successfully_fetched_video_duration = true;//
+ if(video_info.duration > 0.001)
+ successfully_fetched_video_duration = true;
}
};
@@ -3346,8 +3346,11 @@ namespace QuickMedia {
if(update_time_pos) {
update_time_pos = false;
- if(video_player->get_time_in_file(&video_time_pos) == VideoPlayer::Error::OK)
+ if(video_player->get_time_in_file(&video_time_pos) == VideoPlayer::Error::OK) {
successfully_fetched_time_pos = true;
+ if(successfully_fetched_video_duration)
+ video_page->set_watch_progress(video_time_pos, video_info.duration);
+ }
}
update_video_duration_handler();