// SPDX-License-Identifier: MIT #include "application.h" #define _X_OPEN_SOURCE #include "tui.h" #include "yt.h" #include "db.h" #include "subprocess.h" #include #include #include #include #include #include #include #include #include #include #include #include std::string user_home; std::vector userFlags; std::vector channels; std::unordered_map> videos; size_t selected_channel; size_t current_video_count = 0; size_t selected_video = 0; size_t videos_per_page = 0; size_t current_page_count = 0; size_t title_offset = 0; bool any_title_in_next_half = false; bool clear_channels_on_change = false; static application_host *host = nullptr; static termpaint_attr* get_attr(const AttributeSetType type, const bool highlight=false) { return highlight ? attributes[type].highlight : attributes[type].normal; } void draw_channel_list(const std::vector