@@ -92,7 +92,7 @@ Namespace API.Reddit
9292 Dim URL$ = String .Empty
9393 Try
9494 Dim PostID$ = String .Empty
95- Dim PostDate$, PostTitle$
95+ Dim PostDate$
9696 Dim n As EContainer, nn As EContainer, s As EContainer
9797 Dim NewPostDetected As Boolean = False
9898 Dim ExistsDetected As Boolean = False
@@ -124,30 +124,29 @@ Namespace API.Reddit
124124 ExistsDetected = True
125125 Continue For
126126 End If
127- PostTitle = nn.Value( "title" )
128127
129128 If CheckNode(nn) Then
130129 _ItemsBefore = _TempMediaList.Count
131130 added = True
132131 s = nn.ItemF({ "source" , "url" })
133132 If s.XmlIfNothingValue( "/" ).Contains( "redgifs.com" ) Then
134- _TempMediaList.ListAddValue(MediaFromData(UTypes.VideoPre, s.Value, PostID, PostDate,, IsChannel, PostTitle ), LNC)
133+ _TempMediaList.ListAddValue(MediaFromData(UTypes.VideoPre, s.Value, PostID, PostDate,, IsChannel), LNC)
135134 Else
136135 s = nn.ItemF({ "media" }).XmlIfNothing
137136 __ItemType = s( "type" ).XmlIfNothingValue
138137 Select Case __ItemType
139- Case "gallery" : If Not DownloadGallery(s, PostID, PostDate,,, PostTitle ) Then added = False
138+ Case "gallery" : If Not DownloadGallery(s, PostID, PostDate) Then added = False
140139 Case "image" , "gifvideo"
141140 If s.Contains( "content" ) Then
142141 _TempMediaList.ListAddValue(MediaFromData(UPicType(__ItemType), s.Value( "content" ),
143- PostID, PostDate,, IsChannel, PostTitle ), LNC)
142+ PostID, PostDate,, IsChannel), LNC)
144143 Else
145144 added = False
146145 End If
147146 Case "video"
148147 If Settings.UseM3U8 AndAlso s( "hlsUrl" ).XmlIfNothingValue( "/" ).ToLower.Contains( "m3u8" ) Then
149148 _TempMediaList.ListAddValue(MediaFromData(UTypes.m3u8, s.Value( "hlsUrl" ),
150- PostID, PostDate,, IsChannel, PostTitle ), LNC)
149+ PostID, PostDate,, IsChannel), LNC)
151150 Else
152151 added = False
153152 End If
@@ -167,7 +166,7 @@ Namespace API.Reddit
167166 End Select
168167 End With
169168 If Not tmpType = UTypes.Undefined Then
170- _TempMediaList.ListAddValue(MediaFromData(tmpType, s.Value, PostID, PostDate,, IsChannel, PostTitle ), LNC)
169+ _TempMediaList.ListAddValue(MediaFromData(tmpType, s.Value, PostID, PostDate,, IsChannel), LNC)
171170 End If
172171 End If
173172 End If
@@ -270,8 +269,7 @@ Namespace API.Reddit
270269# End Region
271270# Region "Download Base Functions"
272271 Private Function DownloadGallery( ByVal w As EContainer, ByVal PostID As String , ByVal PostDate As String ,
273- Optional ByVal _UserID As String = Nothing , Optional ByVal FirstOnly As Boolean = False ,
274- Optional ByVal Title As String = Nothing ) As Boolean
272+ Optional ByVal _UserID As String = Nothing , Optional ByVal FirstOnly As Boolean = False ) As Boolean
275273 Try
276274 Dim added As Boolean = False
277275 Dim cn$ = IIf(IsChannel, "media_metadata" , "mediaMetadata" )
@@ -280,7 +278,7 @@ Namespace API.Reddit
280278 For Each n As EContainer In w(cn)
281279 t = n.ItemF({ "s" , "u" })
282280 If Not t Is Nothing AndAlso Not t.Value.IsEmptyString Then
283- _TempMediaList.ListAddValue(MediaFromData(UTypes.Picture, t.Value, PostID, PostDate, _UserID, IsChannel, Title ), LNC)
281+ _TempMediaList.ListAddValue(MediaFromData(UTypes.Picture, t.Value, PostID, PostDate, _UserID, IsChannel), LNC)
284282 added = True
285283 If FirstOnly Then Exit For
286284 End If
@@ -340,15 +338,13 @@ Namespace API.Reddit
340338# End Region
341339# Region "Structure creator"
342340 Protected Shared Function MediaFromData( ByVal t As UTypes, ByVal _URL As String , ByVal PostID As String , ByVal PostDate As String ,
343- Optional ByVal _UserID As String = "" , Optional ByVal IsChannel As Boolean = False ,
344- Optional ByVal Title As String = Nothing ) As UserMedia
341+ Optional ByVal _UserID As String = "" , Optional ByVal IsChannel As Boolean = False ) As UserMedia
345342 If _URL.IsEmptyString And t = UTypes.Picture Then Return Nothing
346343 _URL = LinkFormatterSecure(RegexReplace(_URL.Replace( "\" , String .Empty), LinkPattern))
347344 Dim m As New UserMedia(_URL, t) With {.Post = New UserPost With {.ID = PostID, .UserID = _UserID}}
348345 If t = UTypes.Picture Or t = UTypes.GIF Then m.File = UrlToFile(m.URL) Else m.File = Nothing
349346 If m.URL.Contains( "preview" ) Then m.URL = $"https://i.redd.it/{m.File.File}"
350347 If Not PostDate.IsEmptyString Then m.Post.Date = AConvert( Of Date )(PostDate, If (IsChannel, DateProviderChannel, DateProvider), Nothing ) Else m.Post.Date = Nothing
351- If Not Title.IsEmptyString Then m.Post.Title = Title
352348 Return m
353349 End Function
354350 Private Function TryFile( ByVal URL As String ) As Boolean
0 commit comments