mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-23 06:00:47 +02:00
Rename "limit" to "insertAtOnce" in InsertMediaAttachments.
This commit is contained in:
parent
c2d8f210b1
commit
ad2101ce52
|
@ -6218,13 +6218,13 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
|
||||||
private void InsertMediaAttachments(byte[] idBlob, List<MediaAttachment> attachments, IDatabaseConnection db)
|
private void InsertMediaAttachments(byte[] idBlob, List<MediaAttachment> attachments, IDatabaseConnection db)
|
||||||
{
|
{
|
||||||
var startIndex = 0;
|
var startIndex = 0;
|
||||||
var limit = 10;
|
var insertAtOnce = 10;
|
||||||
|
|
||||||
while (startIndex < attachments.Count)
|
while (startIndex < attachments.Count)
|
||||||
{
|
{
|
||||||
var insertText = new StringBuilder(string.Format("insert into mediaattachments ({0}) values ", string.Join(",", _mediaAttachmentSaveColumns)));
|
var insertText = new StringBuilder(string.Format("insert into mediaattachments ({0}) values ", string.Join(",", _mediaAttachmentSaveColumns)));
|
||||||
|
|
||||||
var endIndex = Math.Min(attachments.Count, startIndex + limit);
|
var endIndex = Math.Min(attachments.Count, startIndex + insertAtOnce);
|
||||||
|
|
||||||
for (var i = startIndex; i < endIndex; i++)
|
for (var i = startIndex; i < endIndex; i++)
|
||||||
{
|
{
|
||||||
|
@ -6266,7 +6266,7 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
|
||||||
statement.Reset();
|
statement.Reset();
|
||||||
statement.MoveNext();
|
statement.MoveNext();
|
||||||
}
|
}
|
||||||
startIndex += limit;
|
startIndex += insertAtOnce;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue