Skip to content

Commit 70e73c7

Browse files
committed
1.0.0.3
Fix typo in properties, re-enabling the "Download all" button after changing the mode, removed unused elements
1 parent 4acef31 commit 70e73c7

File tree

8 files changed

+26
-27
lines changed

8 files changed

+26
-27
lines changed

Changelog.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 1.0.0.3
2+
3+
- Fixed
4+
- Custom "Download videos" option is not saved
5+
- The "Download all" button is not activated after changing modes
6+
17
# 1.0.0.2
28

39
- Added

SCrawler/API/Base/Structures.vb

-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
''' <summary>Post ID</summary>
5050
Friend ID As String
5151
Friend [Date] As Date?
52-
Friend Title As String
5352
#Region "Channel compatible fields"
5453
Friend UserID As String
5554
Friend CachedFile As SFile

SCrawler/API/Base/UserDataBase.vb

+1-1
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ BlockNullPicture:
436436
SeparateVideoFolder = AConvert(Of Boolean)(x.Value(Name_SeparateVideoFolder), Nothing)
437437
ReadyForDownload = x.Value(Name_ReadyForDownload).FromXML(Of Boolean)(True)
438438
DownloadImages = x.Value(Name_DownloadImages).FromXML(Of Boolean)(True)
439-
DownloadedVideos = x.Value(Name_DownloadVideos).FromXML(Of Boolean)(True)
439+
DownloadVideos = x.Value(Name_DownloadVideos).FromXML(Of Boolean)(True)
440440
_CountVideo = x.Value(Name_VideoCount).FromXML(Of Integer)(0)
441441
_CountPictures = x.Value(Name_PicturesCount).FromXML(Of Integer)(0)
442442
LastUpdated = AConvert(Of Date)(x.Value(Name_LastUpdated), ADateTime.Formats.BaseDateTime, Nothing)

SCrawler/API/Reddit/UserData.vb

+9-13
Original file line numberDiff line numberDiff line change
@@ -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

SCrawler/API/Twitter/UserData.vb

+6-8
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Namespace API.Twitter
4747
Dim URL$ = String.Empty
4848
Try
4949
Dim PostID$ = String.Empty
50-
Dim PostDate$, PostTitle$
50+
Dim PostDate$
5151
Dim m As EContainer, nn As EContainer, s As EContainer
5252
Dim NewPostDetected As Boolean = False
5353
Dim ExistsDetected As Boolean = False
@@ -83,18 +83,17 @@ Namespace API.Twitter
8383
ExistsDetected = True
8484
Continue For
8585
End If
86-
PostTitle = nn.Value("full_text")
8786

8887
If Not ParseUserMediaOnly OrElse (Not nn.Contains("retweeted_status") OrElse
8988
(Not ID.IsEmptyString AndAlso UID(nn("retweeted_status")) = ID)) Then
90-
If Not CheckVideoNode(nn, PostID, PostDate, PostTitle) Then
89+
If Not CheckVideoNode(nn, PostID, PostDate) Then
9190
s = nn.ItemF({"extended_entities", "media"})
9291
If s Is Nothing OrElse s.Count = 0 Then s = nn.ItemF({"retweeted_status", "extended_entities", "media"})
9392
If Not s Is Nothing AndAlso s.Count > 0 Then
9493
For Each m In s
9594
If m.Count > 0 AndAlso m.Contains("media_url") Then
9695
_TempMediaList.ListAddValue(MediaFromData(m("media_url").Value,
97-
PostID, PostDate, GetPictureOption(m), PostTitle), LNC)
96+
PostID, PostDate, GetPictureOption(m)), LNC)
9897
End If
9998
Next
10099
End If
@@ -159,10 +158,10 @@ Namespace API.Twitter
159158
End Function
160159
#End Region
161160
#Region "Video options"
162-
Private Function CheckVideoNode(ByVal w As EContainer, ByVal PostID As String, ByVal PostDate As String, ByVal Title As String) As Boolean
161+
Private Function CheckVideoNode(ByVal w As EContainer, ByVal PostID As String, ByVal PostDate As String) As Boolean
163162
Try
164163
Dim URL$ = GetVideoNodeURL(w)
165-
If Not URL.IsEmptyString Then _TempMediaList.ListAddValue(MediaFromData(URL, PostID, PostDate,, Title), LNC) : Return True
164+
If Not URL.IsEmptyString Then _TempMediaList.ListAddValue(MediaFromData(URL, PostID, PostDate), LNC) : Return True
166165
Return False
167166
Catch ex As Exception
168167
LogError(ex, "[CheckVideoNode]")
@@ -194,15 +193,14 @@ Namespace API.Twitter
194193
End Sub
195194
#End Region
196195
Private Shared Function MediaFromData(ByVal _URL As String, ByVal PostID As String, ByVal PostDate As String,
197-
Optional ByVal _PictureOption As String = "", Optional ByVal Title As String = Nothing) As UserMedia
196+
Optional ByVal _PictureOption As String = "") As UserMedia
198197
_URL = LinkFormatterSecure(RegexReplace(_URL.Replace("\", String.Empty), LinkPattern))
199198
Dim m As New UserMedia(_URL) With {.PictureOption = _PictureOption, .Post = New UserPost With {.ID = PostID}}
200199
If Not m.URL.IsEmptyString Then m.File = CStr(RegexReplace(m.URL, FilesPattern))
201200
If Not m.PictureOption.IsEmptyString And Not m.File.IsEmptyString And Not m.URL.IsEmptyString Then
202201
m.URL_BASE = $"{m.URL.Replace($".{m.File.Extension}", String.Empty)}?format={m.File.Extension}&name={m.PictureOption}"
203202
End If
204203
If Not PostDate.IsEmptyString Then m.Post.Date = AConvert(Of Date)(PostDate, Declarations.DateProvider, Nothing) Else m.Post.Date = Nothing
205-
If Not Title.IsEmptyString Then m.Post.Title = Title
206204
Return m
207205
End Function
208206
#End Region

SCrawler/Editors/UserCreatorForm.vb

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Namespace Editors
106106
CH_PARSE_USER_MEDIA.Checked = .ParseUserMediaOnly
107107
CH_READY_FOR_DOWN.Checked = .ReadyForDownload
108108
CH_DOWN_IMAGES.Checked = .DownloadImages
109-
CH_DOWN_VIDEOS.Checked = .DownloadedVideos
109+
CH_DOWN_VIDEOS.Checked = .DownloadVideos
110110
TXT_DESCR.Text = .Description
111111
UserLabels.ListAddList(.Labels)
112112
If UserLabels.ListExists Then TXT_LABELS.Text = UserLabels.ListToString

SCrawler/MainFrame.vb

+1-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ CloseResume:
405405
End If
406406
End If
407407
Settings.ShowingMode.Value = m
408-
If Not m = ShowingModes.All Then BTT_DOWN_ALL.Enabled = False
408+
BTT_DOWN_ALL.Enabled = m = ShowingModes.All
409409
End Sub
410410
Private Sub BTT_SELECT_LABELS_Click(sender As Object, e As EventArgs) Handles BTT_SELECT_LABELS.Click
411411
OpenLabelsForm()

SCrawler/My Project/AssemblyInfo.vb

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
3232
' by using the '*' as shown below:
3333
' <Assembly: AssemblyVersion("1.0.*")>
3434

35-
<Assembly: AssemblyVersion("1.0.0.2")>
36-
<Assembly: AssemblyFileVersion("1.0.0.2")>
35+
<Assembly: AssemblyVersion("1.0.0.3")>
36+
<Assembly: AssemblyFileVersion("1.0.0.3")>
3737
<Assembly: NeutralResourcesLanguage("en")>

0 commit comments

Comments
 (0)