Skip to content

Commit

Permalink
Can specify Maximum concurrent Google Drive downloads.
Browse files Browse the repository at this point in the history
  • Loading branch information
moisespr123 committed May 17, 2019
1 parent 30db4fb commit c315d08
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
3 changes: 3 additions & 0 deletions opus_gui/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
<setting name="EncFfmpeg2" serializeAs="String">
<value>False</value>
</setting>
<setting name="MaxDriveDownloads" serializeAs="String">
<value>4</value>
</setting>
</opus_gui.My.MySettings>
</userSettings>
<runtime>
Expand Down
2 changes: 1 addition & 1 deletion opus_gui/Form1.vb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
Dim i As Integer = Counter
download_tasks.Add(Function() Download_Files(GDriveItemsToProcess(i), GDriveItemIDs(i)))
Next
Parallel.Invoke(New ParallelOptions With {.MaxDegreeOfParallelism = 4}, download_tasks.ToArray())
Parallel.Invoke(New ParallelOptions With {.MaxDegreeOfParallelism = My.Settings.MaxDriveDownloads}, download_tasks.ToArray())
End If
Dim tasks = New List(Of Action)
If enableMultithreading.Checked Then
Expand Down
12 changes: 12 additions & 0 deletions opus_gui/My Project/Settings.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions opus_gui/My Project/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@
<Setting Name="EncFfmpeg2" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="MaxDriveDownloads" Type="System.Int32" Scope="User">
<Value Profile="(Default)">4</Value>
</Setting>
</Settings>
</SettingsFile>

0 comments on commit c315d08

Please sign in to comment.