From b9a5d95635a2f0094cd919f0b11f37336012dc24 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 14 Nov 2020 06:15:06 +0100 Subject: Resume video when navigating back from related/channel videos --- src/plugins/Matrix.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index a48bcdd..4b78978 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -1015,6 +1015,7 @@ namespace QuickMedia { //if(next_batch.empty()) // clear_sync_cache_for_new_sync(); + additional_messages_queue.pop_wait(); parse_sync_response(json_root, true); }); @@ -1055,8 +1056,10 @@ namespace QuickMedia { } } - if(next_batch.empty()) + if(next_batch.empty()) { + additional_messages_queue.push(true); clear_sync_cache_for_new_sync(); + } result = parse_sync_response(json_root, false); if(result != PluginResult::OK) { @@ -1137,7 +1140,9 @@ namespace QuickMedia { if(sync_additional_messages_thread.joinable()) { program_kill_in_thread(sync_additional_messages_thread.get_id()); + additional_messages_queue.close(); sync_additional_messages_thread.join(); + additional_messages_queue.restart(); } if(notification_thread.joinable()) { -- cgit v1.2.3