Fixed missing external cover import
This commit is contained in:
@@ -41,7 +41,7 @@ namespace lms::scanner
|
|||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
constexpr std::size_t readBatchSize{ 100 };
|
constexpr std::size_t readBatchSize{ 100 };
|
||||||
constexpr std::size_t writeBatchSize{ 10 };
|
constexpr std::size_t writeBatchSize{ 20 };
|
||||||
|
|
||||||
struct ArtistImageAssociation
|
struct ArtistImageAssociation
|
||||||
{
|
{
|
||||||
@@ -170,15 +170,15 @@ namespace lms::scanner
|
|||||||
|
|
||||||
void updateArtistImages(db::Session& session, ArtistImageAssociationContainer& imageAssociations)
|
void updateArtistImages(db::Session& session, ArtistImageAssociationContainer& imageAssociations)
|
||||||
{
|
{
|
||||||
if (imageAssociations.empty())
|
while (!imageAssociations.empty())
|
||||||
return;
|
|
||||||
|
|
||||||
auto transaction{ session.createWriteTransaction() };
|
|
||||||
|
|
||||||
for (std::size_t i{}; !imageAssociations.empty() && i < writeBatchSize; ++i)
|
|
||||||
{
|
{
|
||||||
updateArtistImage(session, imageAssociations.front());
|
auto transaction{ session.createWriteTransaction() };
|
||||||
imageAssociations.pop_front();
|
|
||||||
|
for (std::size_t i{}; !imageAssociations.empty() && i < writeBatchSize; ++i)
|
||||||
|
{
|
||||||
|
updateArtistImage(session, imageAssociations.front());
|
||||||
|
imageAssociations.pop_front();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ namespace lms::scanner
|
|||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
constexpr std::size_t readBatchSize{ 100 };
|
constexpr std::size_t readBatchSize{ 100 };
|
||||||
constexpr std::size_t writeBatchSize{ 10 };
|
constexpr std::size_t writeBatchSize{ 20 };
|
||||||
|
|
||||||
struct ReleaseImageAssociation
|
struct ReleaseImageAssociation
|
||||||
{
|
{
|
||||||
@@ -166,15 +166,15 @@ namespace lms::scanner
|
|||||||
|
|
||||||
void updateReleaseImages(db::Session& session, ReleaseImageAssociationContainer& imageAssociations)
|
void updateReleaseImages(db::Session& session, ReleaseImageAssociationContainer& imageAssociations)
|
||||||
{
|
{
|
||||||
if (imageAssociations.empty())
|
while (!imageAssociations.empty())
|
||||||
return;
|
|
||||||
|
|
||||||
auto transaction{ session.createWriteTransaction() };
|
|
||||||
|
|
||||||
for (std::size_t i{}; !imageAssociations.empty() && i < writeBatchSize; ++i)
|
|
||||||
{
|
{
|
||||||
updateReleaseImage(session, imageAssociations.front());
|
auto transaction{ session.createWriteTransaction() };
|
||||||
imageAssociations.pop_front();
|
|
||||||
|
for (std::size_t i{}; !imageAssociations.empty() && i < writeBatchSize; ++i)
|
||||||
|
{
|
||||||
|
updateReleaseImage(session, imageAssociations.front());
|
||||||
|
imageAssociations.pop_front();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user