Skip to content

Commit

Permalink
boxart: save database regularly when scraping
Browse files Browse the repository at this point in the history
Issue #1117
  • Loading branch information
flyinghead committed Jan 17, 2024
1 parent 9e37d1e commit a620a43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions core/rend/boxart/boxart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,13 @@ void Boxart::fetchBoxart()
}
}
}
saveDatabase(true);
});
}

void Boxart::saveDatabase()
void Boxart::saveDatabase(bool internal)
{
if (fetching.valid())
if (!internal && fetching.valid())
fetching.get();
if (!databaseDirty)
return;
Expand Down
2 changes: 1 addition & 1 deletion core/rend/boxart/boxart.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Boxart
{
public:
GameBoxart getBoxart(const GameMedia& media);
void saveDatabase();
void saveDatabase(bool internal = false);

private:
void loadDatabase();
Expand Down

0 comments on commit a620a43

Please sign in to comment.