#include <sys/time.h>
#include <time.h>
#include <memory>
#include <configcontainer.h>
private:
void mkdir_p(const char * file);
download * dl;
std::ofstream *f;
std::shared_ptr<std::ofstream> f;
timeval tv1;
timeval tv2;
size_t bytecount;
if (it->status() == DL_QUEUED) {
std::thread t {poddlthread(&(*it), cfg)};
--dl2start;
t.detach();
}
if (idx != -1) {
if (ctrl->downloads()[idx].status() != DL_DOWNLOADING) {
std::thread t {poddlthread(&ctrl->downloads()[idx], ctrl->get_cfgcont())};
poddlthread::~poddlthread() {
delete f;
void poddlthread::operator()() {