This commit is contained in:
parent
163777d69a
commit
259e15defc
|
@ -234,7 +234,6 @@ void Config::parse()
|
||||||
static_cast<uint32_t>(_json[profile]["interval"].asUInt64());
|
static_cast<uint32_t>(_json[profile]["interval"].asUInt64());
|
||||||
}
|
}
|
||||||
profiledata.keep_looking = _json[profile]["keep_looking"].asBool();
|
profiledata.keep_looking = _json[profile]["keep_looking"].asBool();
|
||||||
profiledata.last_guid = _json[profile]["last_guid"].asString();
|
|
||||||
if (!_json[profile]["max_size"].isNull())
|
if (!_json[profile]["max_size"].isNull())
|
||||||
{
|
{
|
||||||
profiledata.max_size = _json[profile]["max_size"].asUInt64();
|
profiledata.max_size = _json[profile]["max_size"].asUInt64();
|
||||||
|
@ -256,7 +255,6 @@ void Config::write()
|
||||||
_json[profile]["instance"] = profiledata.instance;
|
_json[profile]["instance"] = profiledata.instance;
|
||||||
_json[profile]["interval"] = profiledata.interval;
|
_json[profile]["interval"] = profiledata.interval;
|
||||||
_json[profile]["keep_looking"] = profiledata.keep_looking;
|
_json[profile]["keep_looking"] = profiledata.keep_looking;
|
||||||
_json[profile]["last_guid"] = profiledata.last_guid;
|
|
||||||
_json[profile]["max_size"]
|
_json[profile]["max_size"]
|
||||||
= static_cast<Json::Value::UInt64>(profiledata.max_size);
|
= static_cast<Json::Value::UInt64>(profiledata.max_size);
|
||||||
_json[profile]["skip"] = stringlist_to_jsonarray(profiledata.skip);
|
_json[profile]["skip"] = stringlist_to_jsonarray(profiledata.skip);
|
||||||
|
|
|
@ -48,7 +48,6 @@ struct ProfileData
|
||||||
string instance;
|
string instance;
|
||||||
bool keep_looking{false};
|
bool keep_looking{false};
|
||||||
uint32_t interval{30};
|
uint32_t interval{30};
|
||||||
string last_guid;
|
|
||||||
size_t max_size{500};
|
size_t max_size{500};
|
||||||
list<string> skip;
|
list<string> skip;
|
||||||
bool titles_as_cw{false};
|
bool titles_as_cw{false};
|
||||||
|
|
|
@ -109,7 +109,6 @@ int main(int argc, char *argv[])
|
||||||
for (const auto &item : doc.new_items)
|
for (const auto &item : doc.new_items)
|
||||||
{
|
{
|
||||||
masto.post_item(item);
|
masto.post_item(item);
|
||||||
cfg.profiledata.last_guid = item.guid;
|
|
||||||
if (item != *doc.new_items.rbegin())
|
if (item != *doc.new_items.rbegin())
|
||||||
{ // Don't sleep if this is the last item.
|
{ // Don't sleep if this is the last item.
|
||||||
sleep_for(seconds(cfg.profiledata.interval));
|
sleep_for(seconds(cfg.profiledata.interval));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user