MCPcopy Create free account
hub / github.com/ErrorFlynn/ytdlp-interface / queue_save

Method queue_save

ytdlp-interface/queue.cpp:1041–1065  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1039
1040
1041bool GUI::queue_save()
1042{
1043 static std::mutex mtx;
1044 std::lock_guard<std::mutex> lock {mtx};
1045 if(fn_write_conf && lbq.item_count())
1046 {
1047 conf.unfinished_queue_items.clear();
1048 for(size_t cat {0}; cat < lbq.size_categ(); cat++)
1049 {
1050 auto icat {lbq.at(cat)};
1051 if(icat.size())
1052 {
1053 auto &qitems {conf.unfinished_queue_items.emplace_back(icat.text(), std::vector<std::string>{}).second};
1054 for(auto item : icat)
1055 {
1056 auto text {item.text(3)};
1057 if(text != "done" && (text != "error" || text == "error" && conf.cb_save_errors))
1058 qitems.push_back(nana::to_utf8(item.value<lbqval_t>().url));
1059 }
1060 }
1061 }
1062 return fn_write_conf();
1063 }
1064 return true;
1065}
1066
1067
1068void GUI::queue_save_data(size_t max_qitems_to_process)

Callers

nothing calls this directly

Calls 5

item_countMethod · 0.80
atMethod · 0.80
textMethod · 0.80
clearMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected