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 0000000..1b62646 Binary files /dev/null and b/SCrawler/Content/Pictures/TagPic_24.png differ diff --git a/SCrawler/Download/Automation/AutoDownloader.vb b/SCrawler/Download/Automation/AutoDownloader.vb index c6b85e4..70c1367 100644 --- a/SCrawler/Download/Automation/AutoDownloader.vb +++ b/SCrawler/Download/Automation/AutoDownloader.vb @@ -471,18 +471,25 @@ Namespace DownloadObjects Dim DownloadedUsersCount% = 0 Dim simple As Boolean = ShowSimpleNotification And ShowNotifications Dim notify As Action = Sub() - With Downloader.Downloaded - If ShowNotifications And .Count > 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