From c571e5fec41ad2f369199258727b3e9fffb9532d Mon Sep 17 00:00:00 2001 From: trilader Date: Thu, 26 Nov 2020 13:27:11 +0100 Subject: [PATCH] Add virtual channel for all unwatched videos --- main.cpp | 105 ++++++++++++++++++++++++++++++++++++------------------- yt.cpp | 45 +++++++++++++++++++----- yt.h | 18 ++++++---- 3 files changed, 118 insertions(+), 50 deletions(-) diff --git a/main.cpp b/main.cpp index 7a27099..b1b6a29 100644 --- a/main.cpp +++ b/main.cpp @@ -22,13 +22,14 @@ static std::string user_home; std::vector channels; std::unordered_map> videos; -std::optional selected_channel; +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 termpaint_attr* get_attr(const AttributeSetType type, const bool highlight=false) { @@ -58,7 +59,7 @@ void draw_channel_list(const std::vector