@@ -132,7 +132,8 @@ Namespace DownloadObjects.STDownloader
132132# End Region
133133# Region "Controls"
134134 Protected Sub ControlCreateAndAdd( ByVal Container As IYouTubeMediaContainer, Optional ByVal DisableDownload As Boolean = False ,
135- Optional ByVal PerformClick As Boolean = True , Optional ByVal IsLoading As Boolean = False )
135+ Optional ByVal PerformClick As Boolean = True , Optional ByVal IsLoading As Boolean = False ,
136+ Optional ByVal UseCookies As Boolean = False )
136137 ControlInvokeFast(TP_CONTROLS, Sub ()
137138 With TP_CONTROLS
138139 .SuspendLayout()
@@ -142,7 +143,7 @@ Namespace DownloadObjects.STDownloader
142143 .RowStyles.Insert( 0 , New RowStyle(SizeType.Absolute, 60 ))
143144 .RowCount = .RowStyles.Count
144145 OffsetControls( 0 , True )
145- Dim cnt As New MediaItem(Container) With {.Dock = DockStyle.Fill, .Margin = New Padding( 0 )}
146+ Dim cnt As New MediaItem(Container) With {.Dock = DockStyle.Fill, .Margin = New Padding( 0 ), .UseCookies = UseCookies }
146147 AddHandler cnt.FileDownloaded, AddressOf MediaControl_FileDownloaded
147148 AddHandler cnt.Removal, AddressOf MediaControl_Removal
148149 AddHandler cnt.DownloadAgain, AddressOf MediaControl_DownloadAgain
@@ -333,19 +334,19 @@ Namespace DownloadObjects.STDownloader
333334 If Not c Is Nothing Then
334335 Dim f As Form
335336 Select Case c.ObjectType
336- Case YouTubeMediaType.Single : f = New VideoOptionsForm(c)
337+ Case YouTubeMediaType.Single : f = New VideoOptionsForm(c) With {.UseCookies = useCookies}
337338 Case YouTubeMediaType.Channel, YouTubeMediaType.PlayList
338339 If c.IsMusic Then
339340 f = New MusicPlaylistsForm(c)
340341 Else
341- f = New VideoOptionsForm(c)
342+ f = New VideoOptionsForm(c) With {.UseCookies = useCookies}
342343 End If
343344 Case Else : c.Dispose() : Throw New ArgumentException( $"Object type {c.ObjectType} not implemented" , "IYouTubeMediaContainer.ObjectType" )
344345 End Select
345346 If Not f Is Nothing Then
346347 If TypeOf f Is IDesignXMLContainer Then DirectCast (f, IDesignXMLContainer).DesignXML = DesignXML
347348 f.ShowDialog()
348- If f.DialogResult = DialogResult.OK AndAlso ValidateContainerURL(c) Then ControlCreateAndAdd(c, disableDown)
349+ If f.DialogResult = DialogResult.OK AndAlso ValidateContainerURL(c) Then ControlCreateAndAdd(c, disableDown,,, useCookies )
349350 f.Dispose()
350351 End If
351352 End If
0 commit comments