From f0686bbc8e64abf281f5d6d083a4cb31962b9840 Mon Sep 17 00:00:00 2001 From: Andy <88590076+AAndyProgram@users.noreply.github.com> Date: Sat, 24 Dec 2022 15:18:04 +0300 Subject: [PATCH] Fixes Fixed typo Added label icon to context menu Fixed PornHub bug Added 'Object' to IUserMedia --- .../Objects/PluginUserMedia.vb | 2 ++ SCrawler/API/Base/Structures.vb | 11 ++++++- SCrawler/API/PornHub/UserData.vb | 4 +-- SCrawler/Content/Pictures/TagPic_24.png | Bin 0 -> 3168 bytes .../Download/Automation/AutoDownloader.vb | 31 +++++++++++------- SCrawler/MainFrame.Designer.vb | 1 + SCrawler/MainFrame.vb | 4 +-- SCrawler/My Project/Resources.Designer.vb | 10 ++++++ SCrawler/My Project/Resources.resx | 3 ++ SCrawler/SCrawler.vbproj | 1 + SCrawler/UserFinder.vb | 4 +-- 11 files changed, 52 insertions(+), 19 deletions(-) create mode 100644 SCrawler/Content/Pictures/TagPic_24.png diff --git a/SCrawler.PluginProvider/Objects/PluginUserMedia.vb b/SCrawler.PluginProvider/Objects/PluginUserMedia.vb index d5693e0..a5d59c8 100644 --- a/SCrawler.PluginProvider/Objects/PluginUserMedia.vb +++ b/SCrawler.PluginProvider/Objects/PluginUserMedia.vb @@ -34,6 +34,7 @@ Namespace Plugin Public Property PostDate As Date? Implements IUserMedia.PostDate Public Property SpecialFolder As String Implements IUserMedia.SpecialFolder Public Property Attempts As Integer Implements IUserMedia.Attempts + Public Property [Object] As Object Implements IUserMedia.Object End Structure Public Interface IUserMedia Property ContentType As Integer @@ -46,5 +47,6 @@ Namespace Plugin Property PostDate As Date? Property SpecialFolder As String Property Attempts As Integer + Property [Object] As Object End Interface End Namespace \ No newline at end of file diff --git a/SCrawler/API/Base/Structures.vb b/SCrawler/API/Base/Structures.vb index ba3b061..06206af 100644 --- a/SCrawler/API/Base/Structures.vb +++ b/SCrawler/API/Base/Structures.vb @@ -131,6 +131,14 @@ Namespace API.Base Me.Attempts = Attempts End Set End Property + Private Property IUserMedia_Object As Object Implements IUserMedia.Object + Get + Return Me.Object + End Get + Set(ByVal Obj As Object) + Me.Object = Obj + End Set + End Property #End Region Friend Sub New(ByVal URL As String) Me.URL = URL @@ -142,7 +150,7 @@ Namespace API.Base Me.New(URL) Me.Type = Type End Sub - Friend Sub New(ByVal m As Plugin.IUserMedia) + Friend Sub New(ByVal m As IUserMedia) [Type] = m.ContentType URL = m.URL URL_BASE = m.URL_BASE @@ -152,6 +160,7 @@ Namespace API.Base State = m.DownloadState SpecialFolder = m.SpecialFolder Attempts = m.Attempts + Me.Object = m.Object End Sub Friend Sub New(ByVal e As EContainer, ByVal UserInstance As IUserData) Type = e.Attribute(Name_MediaType).Value.FromXML(Of Integer)(CInt(Types.Undefined)) diff --git a/SCrawler/API/PornHub/UserData.vb b/SCrawler/API/PornHub/UserData.vb index 993fbdb..5c272eb 100644 --- a/SCrawler/API/PornHub/UserData.vb +++ b/SCrawler/API/PornHub/UserData.vb @@ -346,12 +346,12 @@ Namespace API.PornHub If PhotoPageModel = PhotoPageModels.Undefined Then If DownloadUserPhotos_ModelHub(Token) Then PhotoPageModel = PhotoPageModels.ModelHubPage ThrowAny(Token) - If PhotoPageModel = PhotoPageModels.Undefined AndAlso DownloadPhotoOnlyFromModelHub AndAlso + If PhotoPageModel = PhotoPageModels.Undefined AndAlso Not DownloadPhotoOnlyFromModelHub AndAlso DownloadUserPhotos_PornHub(Token) Then PhotoPageModel = PhotoPageModels.PornHubPage Else Select Case PhotoPageModel Case PhotoPageModels.ModelHubPage : DownloadUserPhotos_ModelHub(Token) - Case PhotoPageModels.PornHubPage : If DownloadPhotoOnlyFromModelHub Then DownloadUserPhotos_PornHub(Token) + Case PhotoPageModels.PornHubPage : If Not DownloadPhotoOnlyFromModelHub Then DownloadUserPhotos_PornHub(Token) End Select End If ElseIf Not DownloadPhotoOnlyFromModelHub Then diff --git a/SCrawler/Content/Pictures/TagPic_24.png b/SCrawler/Content/Pictures/TagPic_24.png new file mode 100644 index 0000000000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~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0004tNklX?s=d4c~27&)Y2@dvDFFw0YPJ> z0RKT~kyLKG*vCR(A_x%xfS5r<5K?%4iFpGXD?uYzM9N|-7@FDKJC@f(O0qds5s{k* zaeI7HoWoQBtL*WtX9Uf5tKmDpeEfbr=U-0@3j~v+edy_IudYPtR01xi1JSq+m(u}e z#>8MpUU{Kh0%idboA+Sde>l`+wS}1!lu{s-gUV(RjqBJyI)Qg?2CXgjk_wm=#)tdN z37V|7u%3wdR+r~@3%<3D9dS7wMsfgU735R}1$rXpFHT;t+lMD~ceFuR%JzU+VQiqc zbe+wn$nEiUxjjA!NABc3^JyUU{wc}yhrH?Eh$k}=PiExe`u@ihX_da~{^^A&0B2R~ z*3#8!z}Oq@H}{}_dZ7V80|2@@4Nx_ktkn-ro#5{id<_76zDWSV4ZN-Z0000 0 Then .ForEach(Sub(ByVal u As IUserData) - If Keys.Contains(u.Key) Then - If simple Then - DownloadedUsersCount += 1 - Else - ShowNotification(u) - End If - Keys.Remove(u.Key) - End If - End Sub) - End With + Try + With Downloader.Downloaded + If ShowNotifications And .Count > 0 Then + For indx% = 0 To .Count - 1 + With .Item(indx) + If Keys.Contains(.Key) Then + If simple Then + DownloadedUsersCount += 1 + Else + ShowNotification(.Self) + End If + Keys.Remove(.Key) + End If + End With + Next + End If + End With + Catch n_ex As Exception + End Try End Sub Select Case Mode Case Modes.All diff --git a/SCrawler/MainFrame.Designer.vb b/SCrawler/MainFrame.Designer.vb index 9d6991b..dcf6424 100644 --- a/SCrawler/MainFrame.Designer.vb +++ b/SCrawler/MainFrame.Designer.vb @@ -754,6 +754,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form ' 'BTT_CONTEXT_GROUPS ' + Me.BTT_CONTEXT_GROUPS.Image = Global.SCrawler.My.Resources.Resources.TagPic_24 Me.BTT_CONTEXT_GROUPS.Name = "BTT_CONTEXT_GROUPS" Me.BTT_CONTEXT_GROUPS.Size = New System.Drawing.Size(221, 22) Me.BTT_CONTEXT_GROUPS.Text = "Change labels" diff --git a/SCrawler/MainFrame.vb b/SCrawler/MainFrame.vb index aaf2206..d08404b 100644 --- a/SCrawler/MainFrame.vb +++ b/SCrawler/MainFrame.vb @@ -1452,8 +1452,8 @@ ResumeDownloadingOperation: m.Text = "No one user deleted!" m.Style = MsgBoxStyle.Critical Else - m.Text = $"The following users were deleted:{vbNewLine}{removedUsers.ListToStringE(vbNewLine, userProvider)}{vbNewLine.StringDup(2)}" - m.Text &= $"The following users were NOT deleted:{vbNewLine}{leftUsers.ListToStringE(vbNewLine, userProvider)}" + m.Text = $"The following users were deleted:{vbNewLine}{removedUsers.ListToString(vbNewLine)}{vbNewLine.StringDup(2)}" + m.Text &= $"The following users were NOT deleted:{vbNewLine}{leftUsers.ListToString(vbNewLine)}" m.Style = MsgBoxStyle.Exclamation End If If b Then Settings.UpdateBlackList() diff --git a/SCrawler/My Project/Resources.Designer.vb b/SCrawler/My Project/Resources.Designer.vb index 424a8b3..0953ba6 100644 --- a/SCrawler/My Project/Resources.Designer.vb +++ b/SCrawler/My Project/Resources.Designer.vb @@ -370,6 +370,16 @@ Namespace My.Resources End Get End Property + ''' + ''' Looks up a localized resource of type System.Drawing.Bitmap. + ''' + Friend ReadOnly Property TagPic_24() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("TagPic_24", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + ''' ''' Looks up a localized resource of type System.Drawing.Icon similar to (Icon). ''' diff --git a/SCrawler/My Project/Resources.resx b/SCrawler/My Project/Resources.resx index 6583640..6e7f93e 100644 --- a/SCrawler/My Project/Resources.resx +++ b/SCrawler/My Project/Resources.resx @@ -214,4 +214,7 @@ ..\Content\Icons\TagIcon_32.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Content\Pictures\TagPic_24.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/SCrawler/SCrawler.vbproj b/SCrawler/SCrawler.vbproj index 3080712..27637a6 100644 --- a/SCrawler/SCrawler.vbproj +++ b/SCrawler/SCrawler.vbproj @@ -584,6 +584,7 @@ + PreserveNewest diff --git a/SCrawler/UserFinder.vb b/SCrawler/UserFinder.vb index 77be89d..ffaf3cf 100644 --- a/SCrawler/UserFinder.vb +++ b/SCrawler/UserFinder.vb @@ -158,7 +158,7 @@ Friend Class UserFinder : Implements IDisposable Const MsgTitle$ = "Import users" Const DesignNode$ = "ImportUserSelector" Try - Dim uStr As Func(Of UserInfo, String) = Function(u) $"{IIf(u.CollectionName.IsEmptyString, String.Empty, $"[{u.CollectionName}]: ")} {u.Site} - {u.Name}" + Dim uStr As Func(Of UserInfo, String) = Function(u) $"{IIf(u.CollectionName.IsEmptyString, String.Empty, $"[{u.CollectionName}]: ")}{u.Site} - {u.Name}" Dim uc As Comparison(Of UserInfo) = Function(ByVal x As UserInfo, ByVal y As UserInfo) As Integer If Not x.CollectionName.IsEmptyString And Not y.CollectionName.IsEmptyString Then Return x.CollectionName.CompareTo(y.CollectionName) @@ -296,7 +296,7 @@ Friend Class UserFinder : Implements IDisposable AddHandler f.AddClick, __add If f.ShowDialog() = DialogResult.OK Then l.Clear() - l.AddRange(f.DataResult) + l.ListAddList(f.DataResult, LAP.NotContainsOnly) Return l End If End Using