diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-01-23 18:33:28 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-01-23 18:33:28 +0100 |
commit | 8a05b8cdd48acca84fc52981d8cb989c849ea3cc (patch) | |
tree | 74f12222c6c063954d768bbe0437fa8dca85fddb /plugins/youtube | |
parent | 4ac963533bd7e538febf001cc158fcbd46f0267a (diff) |
Youtube: show timestamps for video comments with timestamp at end of line, remove unused signature code for now
Diffstat (limited to 'plugins/youtube')
-rw-r--r-- | plugins/youtube/Signature.hpp | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/plugins/youtube/Signature.hpp b/plugins/youtube/Signature.hpp deleted file mode 100644 index 265bbce..0000000 --- a/plugins/youtube/Signature.hpp +++ /dev/null @@ -1,47 +0,0 @@ -#pragma once - -#ifdef YOUTUBE_SIGNATURE_DECRYPTOR -#include "../../include/AsyncTask.hpp" -#include <string> -#include <vector> -#include <map> -#include <time.h> - -namespace QuickMedia { - // Thread safe - class YoutubeSignatureDecryptor { - public: - static YoutubeSignatureDecryptor& get_instance(); - bool decrypt(const std::string &s, const std::string &sp, std::string &sig_key, std::string &sig_value); - private: - YoutubeSignatureDecryptor(); - YoutubeSignatureDecryptor(const YoutubeSignatureDecryptor&) = delete; - YoutubeSignatureDecryptor& operator=(const YoutubeSignatureDecryptor&) = delete; - - struct DecryptFuncCall { - std::string func_name; - long arg; - }; - - enum class DecryptFunction { - REVERSE, - SPLICE, - SWAP - }; - - bool js_code_to_operations(const std::string &function_body_str, const std::string &var_body_str, std::vector<DecryptFuncCall> &new_func_calls, std::map<std::string, DecryptFunction> &new_func_decls); - int update_decrypt_function(); - private: - // TODO: Remove this task and instead add the network download task to a queue and add a poll function to check if it has finished downloading - // or if it needs to be updated. - AsyncTask<void> poll_task; - std::string decryption_function; - time_t decrypt_function_last_updated = 0; - bool running = false; - bool up_to_date = false; - - std::vector<DecryptFuncCall> func_calls; - std::map<std::string, DecryptFunction> func_decls; - }; -} -#endif
\ No newline at end of file |