mirror of
https://github.com/AAndyProgram/SCrawler.git
synced 2026-03-15 00:02:17 +00:00
2022.10.18.0
Moved UserMedia xml initialization to the structure itself Added download with feed skip Added silent mode (temporary disabling notifications) Added additional Instagram protection Excluding users whose profiles do not exist from downloading with groups and AutoDownloader Feed: delete file bugs; reorder data after file deletion; video playback bugs SiteSettingsForm: enable 'OK' button when editing cookies Fixed collection users ban Settings: disabling ffmpeg missing notification; advanced notification management Added 'ToolStripKeyMenuItem' control Plugins: deprecated XVIDEOS and LPSG plugin libraries; moved them to SCrawler. Updated license PluginProvider: added 'BeginEdit' and 'EndEdit' function to ISiteSettings; changed GetSpecialData (ISiteSettings) return type to IEnumerable PluginsEnvironment: removed 'IsMyClass' attribute MainFrame: grouped all download buttons into one menu; reorganized code; removed 'F2' hotkey AutoDownloader: added advanced pause options; added buttons to tray icon and AutoDownloader form MissingPosts: finished; activated functions that were disabled; added download functions to UserData classes UserDataBase: ability to use responser; ability to download m3u8; extended 'DownloadingException' with optional argument 'EObj'; user index in collection (button tag) changed to user instance; extended information with user labels; updated 'ProcessException' function Replaced download buttons with 'KeyClick' control Replaced FDatePickerForm with my library's form Collections: Deleting multiple collections - disabled confirmation; ban each user in collection
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
' Copyright (C) 2022 Andy
|
||||
' Copyright (C) 2023 Andy https://github.com/AAndyProgram
|
||||
' This program is free software: you can redistribute it and/or modify
|
||||
' it under the terms of the GNU General Public License as published by
|
||||
' the Free Software Foundation, either version 3 of the License, or
|
||||
@@ -6,21 +6,26 @@
|
||||
'
|
||||
' This program is distributed in the hope that it will be useful,
|
||||
' but WITHOUT ANY WARRANTY
|
||||
Imports PersonalUtilities.Functions.XML
|
||||
Imports PersonalUtilities.Functions.XML.Base
|
||||
Imports SCrawler.API
|
||||
Imports SCrawler.API.Base
|
||||
Imports PersonalUtilities.Functions.XML
|
||||
Imports PersonalUtilities.Functions.XML.Base
|
||||
Namespace DownloadObjects.Groups
|
||||
Friend Class DownloadGroup : Inherits GroupParameters : Implements IIndexable, IEContainerProvider
|
||||
#Region "Events"
|
||||
Friend Delegate Sub GroupEventHandler(ByVal Sender As DownloadGroup)
|
||||
Friend Event Deleted As GroupEventHandler
|
||||
Friend Event Updated As GroupEventHandler
|
||||
#End Region
|
||||
#Region "Declarations"
|
||||
#Region "Controls"
|
||||
Private WithEvents BTT_EDIT As ToolStripMenuItem
|
||||
Private WithEvents BTT_DELETE As ToolStripMenuItem
|
||||
Private WithEvents BTT_DOWNLOAD As ToolStripMenuItem
|
||||
Private WithEvents BTT_DOWNLOAD_FULL As ToolStripMenuItem
|
||||
Private ReadOnly SEP_1 As ToolStripSeparator
|
||||
Private WithEvents BTT_MENU As ToolStripMenuItem
|
||||
#End Region
|
||||
Friend Property NameBefore As String = String.Empty
|
||||
Private _Key As String = String.Empty
|
||||
Friend ReadOnly Property Key As String
|
||||
@@ -40,14 +45,20 @@ Namespace DownloadObjects.Groups
|
||||
If b Then RaiseEvent Updated(Me)
|
||||
End Set
|
||||
End Property
|
||||
Private Function SetIndex(ByVal Obj As Object, ByVal _Index As Integer) As Object Implements IIndexable.SetIndex
|
||||
DirectCast(Obj, DownloadGroup).Index = _Index
|
||||
Return Obj
|
||||
End Function
|
||||
#End Region
|
||||
#Region "Initializers"
|
||||
Friend Sub New()
|
||||
BTT_MENU = New ToolStripMenuItem With {
|
||||
.ToolTipText = "Download users of this group",
|
||||
.AutoToolTip = True,
|
||||
.Image = My.Resources.GroupBy_284.ToBitmap
|
||||
.Image = My.Resources.GroupByIcon_16.ToBitmap
|
||||
}
|
||||
BTT_DELETE = New ToolStripMenuItem With {
|
||||
.Image = PersonalUtilities.My.Resources.DeletePic_02_Red_24,
|
||||
.Image = PersonalUtilities.My.Resources.DeletePic_Red_24,
|
||||
.BackColor = MyColor.DeleteBack,
|
||||
.ForeColor = MyColor.DeleteFore,
|
||||
.Text = "Delete",
|
||||
@@ -55,7 +66,7 @@ Namespace DownloadObjects.Groups
|
||||
.AutoToolTip = False
|
||||
}
|
||||
BTT_EDIT = New ToolStripMenuItem With {
|
||||
.Image = PersonalUtilities.My.Resources.PencilPic_01_48,
|
||||
.Image = PersonalUtilities.My.Resources.PencilPic_16,
|
||||
.BackColor = MyColor.EditBack,
|
||||
.ForeColor = MyColor.EditFore,
|
||||
.Text = "Edit",
|
||||
@@ -64,13 +75,13 @@ Namespace DownloadObjects.Groups
|
||||
}
|
||||
SEP_1 = New ToolStripSeparator
|
||||
BTT_DOWNLOAD = New ToolStripMenuItem With {
|
||||
.Image = My.Resources.StartPic_01_Green_16,
|
||||
.Image = My.Resources.StartPic_Green_16,
|
||||
.Text = "Download",
|
||||
.ToolTipText = "Download users of this group (respect the 'Ready for download' parameter)",
|
||||
.AutoToolTip = True
|
||||
}
|
||||
BTT_DOWNLOAD_FULL = New ToolStripMenuItem With {
|
||||
.Image = My.Resources.StartPic_01_Green_16,
|
||||
.Image = My.Resources.StartPic_Green_16,
|
||||
.Text = "Download FULL",
|
||||
.ToolTipText = "Download users of this group (ignore the 'Ready for download' parameter)",
|
||||
.AutoToolTip = True
|
||||
@@ -86,9 +97,13 @@ Namespace DownloadObjects.Groups
|
||||
ReadyForDownloadIgnore = e.Attribute(Name_ReadyForDownloadIgnore).Value.FromXML(Of Boolean)(False)
|
||||
If Not e.Value.IsEmptyString Then Labels.ListAddList(e.Value.Split("|"), LAP.NotContainsOnly)
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "ToString"
|
||||
Public Overrides Function ToString() As String
|
||||
Return $"{IIf(Index.ValueBetween(0, 8), $"#{Index + 1}: ", String.Empty)}{Name}"
|
||||
End Function
|
||||
#End Region
|
||||
#Region "GetControl"
|
||||
Private _ControlSent As Boolean = False
|
||||
Friend Function GetControl() As ToolStripMenuItem
|
||||
If Not _ControlSent Then
|
||||
@@ -98,10 +113,7 @@ Namespace DownloadObjects.Groups
|
||||
End If
|
||||
Return BTT_MENU
|
||||
End Function
|
||||
Private Function SetIndex(ByVal Obj As Object, ByVal _Index As Integer) As Object Implements IIndexable.SetIndex
|
||||
DirectCast(Obj, DownloadGroup).Index = _Index
|
||||
Return Obj
|
||||
End Function
|
||||
#End Region
|
||||
#Region "Buttons"
|
||||
Private Sub BTT_MENU_Click(sender As Object, e As EventArgs) Handles BTT_MENU.Click
|
||||
DownloadUsers(True)
|
||||
@@ -124,6 +136,8 @@ Namespace DownloadObjects.Groups
|
||||
Private Sub BTT_DOWNLOAD_FULL_Click(sender As Object, e As EventArgs) Handles BTT_DOWNLOAD_FULL.Click
|
||||
DownloadUsers(False)
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Get users"
|
||||
Friend Overloads Function GetUsers() As IEnumerable(Of IUserData)
|
||||
Return GetUsers(Me, True)
|
||||
End Function
|
||||
@@ -134,7 +148,7 @@ Namespace DownloadObjects.Groups
|
||||
Dim CheckParams As Predicate(Of IUserData) = Function(user) _
|
||||
(.Temporary = CheckState.Indeterminate Or user.Temporary = CBool(.Temporary)) And
|
||||
(.Favorite = CheckState.Indeterminate Or (user.Favorite = CBool(.Favorite))) And
|
||||
(Not UseReadyOption Or .ReadyForDownloadIgnore Or user.ReadyForDownload = .ReadyForDownload)
|
||||
(Not UseReadyOption Or .ReadyForDownloadIgnore Or user.ReadyForDownload = .ReadyForDownload) And user.Exists
|
||||
Dim f As Func(Of IUserData, IEnumerable(Of IUserData)) = Function(ByVal user As IUserData) As IEnumerable(Of IUserData)
|
||||
If user.IsCollection Then
|
||||
With DirectCast(user, UserDataBind)
|
||||
@@ -156,12 +170,14 @@ Namespace DownloadObjects.Groups
|
||||
Return ErrorsDescriber.Execute(EDP.SendInLog, ex, "[DownloadGroup.GetUsers]")
|
||||
End Try
|
||||
End Function
|
||||
#End Region
|
||||
#Region "Download users"
|
||||
Friend Sub DownloadUsers(ByVal UseReadyOption As Boolean)
|
||||
Try
|
||||
If Settings.Users.Count > 0 Then
|
||||
Dim u As IEnumerable(Of IUserData) = GetUsers(Me, UseReadyOption)
|
||||
If u.ListExists Then
|
||||
Downloader.AddRange(u)
|
||||
Downloader.AddRange(u, True)
|
||||
Else
|
||||
MsgBoxE({$"No users found for group [{Name}].", "No users found"}, vbExclamation)
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user