aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-09-15 18:52:40 +0200
committerdec05eba <dec05eba@protonmail.com>2021-09-15 18:52:40 +0200
commitd7f736bde209e9a77844060cfd9b27122f7ca53f (patch)
tree4242aa8db6828b3740b7499dbdfb8d959281bb61 /src
parentadcbb9e464bb9033e406008ea9cd209486a292aa (diff)
Reset timestamp when going to next youtube video, copy download url on ctrl-c for youtube
Diffstat (limited to 'src')
-rw-r--r--src/QuickMedia.cpp2
-rw-r--r--src/plugins/Matrix.cpp4
-rw-r--r--src/plugins/Youtube.cpp1
3 files changed, 4 insertions, 3 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 38ff610..1095aaa 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -2995,7 +2995,7 @@ namespace QuickMedia {
sf::Clock cursor_hide_timer;
auto save_video_url_to_clipboard = [this, video_page]() {
- std::string url = video_page->get_url();
+ std::string url = video_page->get_download_url(get_largest_monitor_height(disp));
if(video_url_supports_timestamp(url)) {
double time_in_file = 0.0;
if(video_player && (video_player->get_time_in_file(&time_in_file) != VideoPlayer::Error::OK))
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp
index 13fd230..c9d57d4 100644
--- a/src/plugins/Matrix.cpp
+++ b/src/plugins/Matrix.cpp
@@ -3815,8 +3815,8 @@ namespace QuickMedia {
Path matrix_sync_data_path = get_cache_dir().join("matrix").join("sync_data.json");
remove(matrix_sync_data_path.data.c_str());
- Path filter_cache_path = get_storage_dir().join("matrix").join("filter");
- remove(filter_cache_path.data.c_str());
+ //Path filter_cache_path = get_storage_dir().join("matrix").join("filter");
+ //remove(filter_cache_path.data.c_str());
for_files_in_dir(get_cache_dir().join("matrix").join("events"), [](const Path &filepath) {
remove(filepath.data.c_str());
return true;
diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp
index 0316c6f..993b197 100644
--- a/src/plugins/Youtube.cpp
+++ b/src/plugins/Youtube.cpp
@@ -2040,6 +2040,7 @@ namespace QuickMedia {
}
void YoutubeVideoPage::set_url(std::string new_url) {
+ timestamp.clear();
new_url = invidious_url_to_youtube_url(new_url);
youtube_url_remove_timestamp(new_url, timestamp);
VideoPage::set_url(std::move(new_url));