mirror of
https://github.com/AAndyProgram/SCrawler.git
synced 2026-03-14 15:52:18 +00:00
2023.6.9.0
YT.MediaItem: fixed opening paths to downloaded playlists and channels API.InternalSettingsForm: add members distinct API.Mastodon: create personal EditorExchangeOptions class with some Twitter members disabled API.Twitter: add 'DownloadModels'; update algo Make progress more informative
This commit is contained in:
13
Changelog.md
13
Changelog.md
@@ -1,12 +1,21 @@
|
|||||||
|
# 2023.6.9.0
|
||||||
|
|
||||||
|
*2023-06-09*
|
||||||
|
|
||||||
|
- Fixed
|
||||||
|
- YouTube: opening paths to downloaded playlists and channels
|
||||||
|
- Twitter: make the algorithm faster
|
||||||
|
- Make progress more informative
|
||||||
|
|
||||||
# 2023.6.8.0
|
# 2023.6.8.0
|
||||||
|
|
||||||
*2023-06-08*
|
*2023-06-08*
|
||||||
|
|
||||||
- Added
|
- Added
|
||||||
- YouTube: append artist name to music playlist output path
|
- YouTube: append artist name to music playlist output path
|
||||||
- YouTube: save thumbnail path for playlist and channel
|
- YouTube: save thumbnail path for playlist and channel
|
||||||
- Fixed
|
- Fixed
|
||||||
- YouTube: opening paths to downloaded playlists and channels
|
- YouTube: opening paths to downloaded playlists and channels
|
||||||
- Twitter: profile not fully downloaded
|
- Twitter: profile not fully downloaded
|
||||||
- Corrected form size for small monitors (Issue #136)
|
- Corrected form size for small monitors (Issue #136)
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 9.9 KiB |
@@ -380,7 +380,7 @@ Namespace DownloadObjects.STDownloader
|
|||||||
m.Show()
|
m.Show()
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If MyContainer.File.Exists(SFO.Path, False) Then MyContainer.File.Open(SFO.Path,, EDP.ShowMainMsg) Else m.Show()
|
If MyContainer.File.Exists(SFO.Path, False) Then GlobalOpenPath(MyContainer.File, EDP.ShowMainMsg) Else m.Show()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
OnDoubleClick(e)
|
OnDoubleClick(e)
|
||||||
|
|||||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2023.6.8.0")>
|
<Assembly: AssemblyVersion("2023.6.9.0")>
|
||||||
<Assembly: AssemblyFileVersion("2023.6.8.0")>
|
<Assembly: AssemblyFileVersion("2023.6.9.0")>
|
||||||
<Assembly: NeutralResourcesLanguage("en")>
|
<Assembly: NeutralResourcesLanguage("en")>
|
||||||
|
|||||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2023.6.8.0")>
|
<Assembly: AssemblyVersion("2023.6.9.0")>
|
||||||
<Assembly: AssemblyFileVersion("2023.6.8.0")>
|
<Assembly: AssemblyFileVersion("2023.6.9.0")>
|
||||||
<Assembly: NeutralResourcesLanguage("en")>
|
<Assembly: NeutralResourcesLanguage("en")>
|
||||||
|
|||||||
@@ -154,7 +154,8 @@ Namespace API.Base
|
|||||||
Dim tmpObj As Object
|
Dim tmpObj As Object
|
||||||
|
|
||||||
members = GetObjectMembers(MyObject, Function(m) (m.MemberType = MemberTypes.Field Or m.MemberType = MemberTypes.Property) AndAlso
|
members = GetObjectMembers(MyObject, Function(m) (m.MemberType = MemberTypes.Field Or m.MemberType = MemberTypes.Property) AndAlso
|
||||||
Not m.GetCustomAttribute(Of PSettingAttribute) Is Nothing)
|
Not m.GetCustomAttribute(Of PSettingAttribute) Is Nothing,, True,
|
||||||
|
New FComparer(Of MemberInfo)(Function(mm1, mm2) mm1.Name = mm2.Name))
|
||||||
providersMembersSettings = GetObjectMembers(MySettingsInstance, providersPredicate)
|
providersMembersSettings = GetObjectMembers(MySettingsInstance, providersPredicate)
|
||||||
providersMembersObj = GetObjectMembers(MyObject, providersPredicate)
|
providersMembersObj = GetObjectMembers(MyObject, providersPredicate)
|
||||||
|
|
||||||
|
|||||||
22
SCrawler/API/Mastodon/EditorExchangeOptions.vb
Normal file
22
SCrawler/API/Mastodon/EditorExchangeOptions.vb
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
' 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
|
||||||
|
' (at your option) any later version.
|
||||||
|
'
|
||||||
|
' This program is distributed in the hope that it will be useful,
|
||||||
|
' but WITHOUT ANY WARRANTY
|
||||||
|
Imports SCrawler.Plugin.Attributes
|
||||||
|
Namespace API.Mastodon
|
||||||
|
Friend Class EditorExchangeOptions : Inherits Twitter.EditorExchangeOptions
|
||||||
|
<PSetting(Address:=SettingAddress.None)> Friend Overrides Property DownloadModelMedia As Boolean
|
||||||
|
<PSetting(Address:=SettingAddress.None)> Friend Overrides Property DownloadModelProfile As Boolean
|
||||||
|
<PSetting(Address:=SettingAddress.None)> Friend Overrides Property DownloadModelSearch As Boolean
|
||||||
|
Friend Sub New(ByVal s As SiteSettings)
|
||||||
|
MyBase.New(s)
|
||||||
|
End Sub
|
||||||
|
Friend Sub New(ByVal u As UserData)
|
||||||
|
MyBase.New(u)
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
@@ -139,9 +139,9 @@ Namespace API.Mastodon
|
|||||||
#End Region
|
#End Region
|
||||||
#Region "UserOptions"
|
#Region "UserOptions"
|
||||||
Friend Overrides Sub UserOptions(ByRef Options As Object, ByVal OpenForm As Boolean)
|
Friend Overrides Sub UserOptions(ByRef Options As Object, ByVal OpenForm As Boolean)
|
||||||
If Options Is Nothing OrElse (Not TypeOf Options Is Twitter.EditorExchangeOptions OrElse
|
If Options Is Nothing OrElse (Not TypeOf Options Is EditorExchangeOptions OrElse
|
||||||
Not DirectCast(Options, Twitter.EditorExchangeOptions).SiteKey = MastodonSiteKey) Then _
|
Not DirectCast(Options, EditorExchangeOptions).SiteKey = MastodonSiteKey) Then _
|
||||||
Options = New Twitter.EditorExchangeOptions(Me) With {.SiteKey = MastodonSiteKey}
|
Options = New EditorExchangeOptions(Me) With {.SiteKey = MastodonSiteKey}
|
||||||
If OpenForm Then
|
If OpenForm Then
|
||||||
Using f As New InternalSettingsForm(Options, Me, False) : f.ShowDialog() : End Using
|
Using f As New InternalSettingsForm(Options, Me, False) : f.ShowDialog() : End Using
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
' This program is distributed in the hope that it will be useful,
|
' This program is distributed in the hope that it will be useful,
|
||||||
' but WITHOUT ANY WARRANTY
|
' but WITHOUT ANY WARRANTY
|
||||||
Imports SCrawler.Plugin.Attributes
|
Imports SCrawler.Plugin.Attributes
|
||||||
|
Imports DModels = SCrawler.API.Twitter.UserData.DownloadModels
|
||||||
Namespace API.Twitter
|
Namespace API.Twitter
|
||||||
Friend Class EditorExchangeOptions
|
Friend Class EditorExchangeOptions
|
||||||
Private Const DefaultOffset As Integer = 100
|
Private Const DefaultOffset As Integer = 100
|
||||||
@@ -23,6 +24,18 @@ Namespace API.Twitter
|
|||||||
ToolTip:="Existing files will be checked for duplicates and duplicates removed." & vbCr &
|
ToolTip:="Existing files will be checked for duplicates and duplicates removed." & vbCr &
|
||||||
"Works only on the first activation 'Use MD5 comparison'.", LeftOffset:=DefaultOffset)>
|
"Works only on the first activation 'Use MD5 comparison'.", LeftOffset:=DefaultOffset)>
|
||||||
Friend Property RemoveExistingDuplicates As Boolean = False
|
Friend Property RemoveExistingDuplicates As Boolean = False
|
||||||
|
<PSetting(Address:=SettingAddress.User,
|
||||||
|
Caption:="Download model 'Media'",
|
||||||
|
ToolTip:="Download the data using the 'https://twitter.com/UserName/media' command.", LeftOffset:=DefaultOffset)>
|
||||||
|
Friend Overridable Property DownloadModelMedia As Boolean = False
|
||||||
|
<PSetting(Address:=SettingAddress.User,
|
||||||
|
Caption:="Download model 'Profile'",
|
||||||
|
ToolTip:="Download the data using the 'https://twitter.com/UserName' command.", LeftOffset:=DefaultOffset)>
|
||||||
|
Friend Overridable Property DownloadModelProfile As Boolean = False
|
||||||
|
<PSetting(Address:=SettingAddress.User,
|
||||||
|
Caption:="Download model 'Search'",
|
||||||
|
ToolTip:="Download the data using the 'https://twitter.com/search?q=from:UserName+include:nativeretweets' command.", LeftOffset:=DefaultOffset)>
|
||||||
|
Friend Overridable Property DownloadModelSearch As Boolean = False
|
||||||
Private ReadOnly Property MySettings As Object
|
Private ReadOnly Property MySettings As Object
|
||||||
Friend Sub New(ByVal s As SiteSettings)
|
Friend Sub New(ByVal s As SiteSettings)
|
||||||
GifsDownload = s.GifsDownload.Value
|
GifsDownload = s.GifsDownload.Value
|
||||||
@@ -44,6 +57,14 @@ Namespace API.Twitter
|
|||||||
GifsPrefix = u.GifsPrefix
|
GifsPrefix = u.GifsPrefix
|
||||||
UseMD5Comparison = u.UseMD5Comparison
|
UseMD5Comparison = u.UseMD5Comparison
|
||||||
RemoveExistingDuplicates = u.RemoveExistingDuplicates
|
RemoveExistingDuplicates = u.RemoveExistingDuplicates
|
||||||
|
If Not TypeOf u Is Mastodon.UserData Then
|
||||||
|
Dim dm As DModels() = EnumExtract(Of DModels)(u.DownloadModel)
|
||||||
|
If dm.ListExists Then
|
||||||
|
DownloadModelMedia = dm.Contains(DModels.Media)
|
||||||
|
DownloadModelProfile = dm.Contains(DModels.Profile)
|
||||||
|
DownloadModelSearch = dm.Contains(DModels.Search)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
MySettings = u.HOST.Source
|
MySettings = u.HOST.Source
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -18,11 +18,21 @@ Imports UTypes = SCrawler.API.Base.UserMedia.Types
|
|||||||
Namespace API.Twitter
|
Namespace API.Twitter
|
||||||
Friend Class UserData : Inherits UserDataBase
|
Friend Class UserData : Inherits UserDataBase
|
||||||
#Region "XML names"
|
#Region "XML names"
|
||||||
|
Private Const Name_FirstDownloadComplete As String = "FirstDownloadComplete"
|
||||||
|
Private Const Name_DownloadModel As String = "DownloadModel"
|
||||||
Private Const Name_GifsDownload As String = "GifsDownload"
|
Private Const Name_GifsDownload As String = "GifsDownload"
|
||||||
Private Const Name_GifsSpecialFolder As String = "GifsSpecialFolder"
|
Private Const Name_GifsSpecialFolder As String = "GifsSpecialFolder"
|
||||||
Private Const Name_GifsPrefix As String = "GifsPrefix"
|
Private Const Name_GifsPrefix As String = "GifsPrefix"
|
||||||
#End Region
|
#End Region
|
||||||
#Region "Declarations"
|
#Region "Declarations"
|
||||||
|
Friend Enum DownloadModels As Integer
|
||||||
|
Undefined = 0
|
||||||
|
Media = 1
|
||||||
|
Profile = 2
|
||||||
|
Search = 5
|
||||||
|
End Enum
|
||||||
|
Private FirstDownloadComplete As Boolean = False
|
||||||
|
Friend Property DownloadModel As DownloadModels = DownloadModels.Undefined
|
||||||
Friend Property GifsDownload As Boolean = True
|
Friend Property GifsDownload As Boolean = True
|
||||||
Friend Property GifsSpecialFolder As String = String.Empty
|
Friend Property GifsSpecialFolder As String = String.Empty
|
||||||
Friend Property GifsPrefix As String = String.Empty
|
Friend Property GifsPrefix As String = String.Empty
|
||||||
@@ -53,6 +63,10 @@ Namespace API.Twitter
|
|||||||
GifsPrefix = .GifsPrefix
|
GifsPrefix = .GifsPrefix
|
||||||
UseMD5Comparison = .UseMD5Comparison
|
UseMD5Comparison = .UseMD5Comparison
|
||||||
RemoveExistingDuplicates = .RemoveExistingDuplicates
|
RemoveExistingDuplicates = .RemoveExistingDuplicates
|
||||||
|
DownloadModel = DownloadModels.Undefined
|
||||||
|
If .DownloadModelMedia Then DownloadModel += DownloadModels.Media
|
||||||
|
If .DownloadModelProfile Then DownloadModel += DownloadModels.Profile
|
||||||
|
If .DownloadModelSearch Then DownloadModel += DownloadModels.Search
|
||||||
End With
|
End With
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -62,25 +76,48 @@ Namespace API.Twitter
|
|||||||
_DataNames = New List(Of String)
|
_DataNames = New List(Of String)
|
||||||
End Sub
|
End Sub
|
||||||
Protected Overrides Sub LoadUserInformation_OptionalFields(ByRef Container As XmlFile, ByVal Loading As Boolean)
|
Protected Overrides Sub LoadUserInformation_OptionalFields(ByRef Container As XmlFile, ByVal Loading As Boolean)
|
||||||
If Loading Then
|
With Container
|
||||||
GifsDownload = Container.Value(Name_GifsDownload).FromXML(Of Boolean)(True)
|
If Loading Then
|
||||||
GifsSpecialFolder = Container.Value(Name_GifsSpecialFolder)
|
If .Contains(Name_FirstDownloadComplete) Then
|
||||||
If Not Container.Contains(Name_GifsPrefix) Then
|
FirstDownloadComplete = .Value(Name_FirstDownloadComplete).FromXML(Of Boolean)(False)
|
||||||
GifsPrefix = "GIF_"
|
DownloadModel = .Value(Name_DownloadModel).FromXML(Of Integer)(DownloadModels.Undefined)
|
||||||
|
Else
|
||||||
|
FirstDownloadComplete = DownloadedVideos(True) + DownloadedPictures(True) > 0
|
||||||
|
If .Contains(Name_DownloadModel) Then
|
||||||
|
DownloadModel = .Value(Name_DownloadModel).FromXML(Of Integer)(DownloadModels.Undefined)
|
||||||
|
Else
|
||||||
|
If FirstDownloadComplete Then
|
||||||
|
If ParseUserMediaOnly Then
|
||||||
|
DownloadModel = DownloadModels.Media
|
||||||
|
Else
|
||||||
|
DownloadModel = DownloadModels.Media + DownloadModels.Profile + DownloadModels.Search
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
DownloadModel = DownloadModels.Undefined
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
GifsDownload = .Value(Name_GifsDownload).FromXML(Of Boolean)(True)
|
||||||
|
GifsSpecialFolder = .Value(Name_GifsSpecialFolder)
|
||||||
|
If Not .Contains(Name_GifsPrefix) Then
|
||||||
|
GifsPrefix = "GIF_"
|
||||||
|
Else
|
||||||
|
GifsPrefix = .Value(Name_GifsPrefix)
|
||||||
|
End If
|
||||||
|
UseMD5Comparison = .Value(Name_UseMD5Comparison).FromXML(Of Boolean)(False)
|
||||||
|
RemoveExistingDuplicates = .Value(Name_RemoveExistingDuplicates).FromXML(Of Boolean)(False)
|
||||||
|
StartMD5Checked = .Value(Name_StartMD5Checked).FromXML(Of Boolean)(False)
|
||||||
Else
|
Else
|
||||||
GifsPrefix = Container.Value(Name_GifsPrefix)
|
.Add(Name_FirstDownloadComplete, FirstDownloadComplete.BoolToInteger)
|
||||||
|
.Add(Name_DownloadModel, CInt(DownloadModel))
|
||||||
|
.Add(Name_GifsDownload, GifsDownload.BoolToInteger)
|
||||||
|
.Add(Name_GifsSpecialFolder, GifsSpecialFolder)
|
||||||
|
.Add(Name_GifsPrefix, GifsPrefix)
|
||||||
|
.Add(Name_UseMD5Comparison, UseMD5Comparison.BoolToInteger)
|
||||||
|
.Add(Name_RemoveExistingDuplicates, RemoveExistingDuplicates.BoolToInteger)
|
||||||
|
.Add(Name_StartMD5Checked, StartMD5Checked.BoolToInteger)
|
||||||
End If
|
End If
|
||||||
UseMD5Comparison = Container.Value(Name_UseMD5Comparison).FromXML(Of Boolean)(False)
|
End With
|
||||||
RemoveExistingDuplicates = Container.Value(Name_RemoveExistingDuplicates).FromXML(Of Boolean)(False)
|
|
||||||
StartMD5Checked = Container.Value(Name_StartMD5Checked).FromXML(Of Boolean)(False)
|
|
||||||
Else
|
|
||||||
Container.Add(Name_GifsDownload, GifsDownload.BoolToInteger)
|
|
||||||
Container.Add(Name_GifsSpecialFolder, GifsSpecialFolder)
|
|
||||||
Container.Add(Name_GifsPrefix, GifsPrefix)
|
|
||||||
Container.Add(Name_UseMD5Comparison, UseMD5Comparison.BoolToInteger)
|
|
||||||
Container.Add(Name_RemoveExistingDuplicates, RemoveExistingDuplicates.BoolToInteger)
|
|
||||||
Container.Add(Name_StartMD5Checked, StartMD5Checked.BoolToInteger)
|
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
#Region "Download functions"
|
#Region "Download functions"
|
||||||
@@ -262,7 +299,20 @@ Namespace API.Twitter
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
dirs.Clear()
|
||||||
End If
|
End If
|
||||||
|
ThrowAny(Token)
|
||||||
|
If Not FirstDownloadComplete Then
|
||||||
|
_ForceSaveUserInfo = True
|
||||||
|
If DownloadModel = DownloadModels.Undefined Then
|
||||||
|
If ParseUserMediaOnly Then
|
||||||
|
DownloadModel = DownloadModels.Media
|
||||||
|
Else
|
||||||
|
DownloadModel = DownloadModels.Media + DownloadModels.Profile + DownloadModels.Search
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
FirstDownloadComplete = True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ProcessException(ex, Token, $"data downloading error [{URL}]")
|
ProcessException(ex, Token, $"data downloading error [{URL}]")
|
||||||
Finally
|
Finally
|
||||||
@@ -459,7 +509,8 @@ Namespace API.Twitter
|
|||||||
Private Function GetTimelineFromGalleryDL(ByVal Cache As CacheKeeper, ByVal Token As CancellationToken) As List(Of SFile)
|
Private Function GetTimelineFromGalleryDL(ByVal Cache As CacheKeeper, ByVal Token As CancellationToken) As List(Of SFile)
|
||||||
Dim command$ = String.Empty
|
Dim command$ = String.Empty
|
||||||
Try
|
Try
|
||||||
Dim conf As SFile = $"{Cache.NewPath.PathWithSeparator}TwitterGdlConfig.conf"
|
Dim confCache As CacheKeeper = Cache.NewInstance(Of BatchFileExchanger)
|
||||||
|
Dim conf As SFile = $"{confCache.RootDirectory.PathWithSeparator}TwitterGdlConfig.conf"
|
||||||
Dim confText$ = "{""extractor"":{""cookies"": """ & MySettings.CookiesNetscapeFile.ToString.Replace("\", "/") &
|
Dim confText$ = "{""extractor"":{""cookies"": """ & MySettings.CookiesNetscapeFile.ToString.Replace("\", "/") &
|
||||||
""",""cookies-update"": false,""twitter"":{""cards"": false,""conversations"": true,""pinned"": false,""quoted"": false,""replies"": true,""retweets"": true,""strategy"": null,""text-tweets"": false,""twitpic"": false,""unique"": true,""users"": ""timeline"",""videos"": true}}}"
|
""",""cookies-update"": false,""twitter"":{""cards"": false,""conversations"": true,""pinned"": false,""quoted"": false,""replies"": true,""retweets"": true,""strategy"": null,""text-tweets"": false,""twitpic"": false,""unique"": true,""users"": ""timeline"",""videos"": true}}}"
|
||||||
If conf.Exists(SFO.Path, True, EDP.ThrowException) Then TextSaver.SaveTextToFile(confText, conf)
|
If conf.Exists(SFO.Path, True, EDP.ThrowException) Then TextSaver.SaveTextToFile(confText, conf)
|
||||||
@@ -468,8 +519,19 @@ Namespace API.Twitter
|
|||||||
Dim outList As New List(Of SFile)
|
Dim outList As New List(Of SFile)
|
||||||
Dim rootDir As CacheKeeper = Cache.NewInstance
|
Dim rootDir As CacheKeeper = Cache.NewInstance
|
||||||
Dim dir As SFile
|
Dim dir As SFile
|
||||||
|
Dim dm As List(Of DownloadModels) = EnumExtract(Of DownloadModels)(DownloadModel).ListIfNothing
|
||||||
|
Dim process As Boolean
|
||||||
|
Dim bProcess As Boolean = DownloadModel = DownloadModels.Undefined Or Not FirstDownloadComplete
|
||||||
|
|
||||||
Using tgdl As New TwitterGDL(Nothing, Token) With {.TempPostsList = _TempPostsList, .AutoClear = True, .AutoReset = True}
|
Using tgdl As New TwitterGDL(Nothing, Token) With {
|
||||||
|
.TempPostsList = _TempPostsList,
|
||||||
|
.AutoClear = True,
|
||||||
|
.AutoReset = True,
|
||||||
|
.CommandPermanent = $"chcp {BatchExecutor.UnicodeEncoding}",
|
||||||
|
.FileExchanger = confCache
|
||||||
|
}
|
||||||
|
tgdl.FileExchanger.DeleteCacheOnDispose = False
|
||||||
|
tgdl.FileExchanger.DeleteRootOnDispose = False
|
||||||
For i As Byte = 0 To 2
|
For i As Byte = 0 To 2
|
||||||
dir = rootDir.NewPath
|
dir = rootDir.NewPath
|
||||||
dir.Exists(SFO.Path, True, EDP.ThrowException)
|
dir.Exists(SFO.Path, True, EDP.ThrowException)
|
||||||
@@ -478,20 +540,25 @@ Namespace API.Twitter
|
|||||||
command = $"""{Settings.GalleryDLFile}"" --verbose --no-download --no-skip --config ""{conf}"" --write-pages "
|
command = $"""{Settings.GalleryDLFile}"" --verbose --no-download --no-skip --config ""{conf}"" --write-pages "
|
||||||
command &= GdlGetIdFilterString()
|
command &= GdlGetIdFilterString()
|
||||||
Select Case i
|
Select Case i
|
||||||
Case 0 : command &= $"https://twitter.com/{Name}/media"
|
Case 0 : command &= $"https://twitter.com/{Name}/media" : process = bProcess Or dm.Contains(DownloadModels.Media)
|
||||||
Case 1 : command &= $"https://twitter.com/{Name}"
|
Case 1 : command &= $"https://twitter.com/{Name}" : process = bProcess Or dm.Contains(DownloadModels.Profile)
|
||||||
Case 2 : command &= $"https://twitter.com/search?q=from:{Name}+include:nativeretweets"
|
Case 2 : command &= $"https://twitter.com/search?q=from:{Name}+include:nativeretweets" : process = bProcess Or dm.Contains(DownloadModels.Search)
|
||||||
|
Case Else : process = False
|
||||||
End Select
|
End Select
|
||||||
'#If DEBUG Then
|
'#If DEBUG Then
|
||||||
'Debug.WriteLine(command)
|
'Debug.WriteLine(command)
|
||||||
'#End If
|
'#End If
|
||||||
tgdl.Execute(command)
|
ThrowAny(Token)
|
||||||
|
If process Then tgdl.Execute(command)
|
||||||
|
ThrowAny(Token)
|
||||||
Next
|
Next
|
||||||
End Using
|
End Using
|
||||||
|
dm.Clear()
|
||||||
|
|
||||||
Return outList
|
Return outList
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Return ErrorsDescriber.Execute(EDP.SendToLog, ex, $"{ToStringForLog()}: GetTimelineFromGalleryDL({command})")
|
ProcessException(ex, Token, $"{ToStringForLog()}: GetTimelineFromGalleryDL({command})")
|
||||||
|
Return Nothing
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
Private Function GdlGetIdFilterString() As String
|
Private Function GdlGetIdFilterString() As String
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ Namespace DownloadObjects
|
|||||||
Private WithEvents BTT_STOP As Button
|
Private WithEvents BTT_STOP As Button
|
||||||
Private WithEvents BTT_OPEN As Button
|
Private WithEvents BTT_OPEN As Button
|
||||||
Private ReadOnly PR_MAIN As ProgressBar
|
Private ReadOnly PR_MAIN As ProgressBar
|
||||||
|
Private ReadOnly PR_PRE As ProgressBar
|
||||||
Private ReadOnly LBL_INFO As Label
|
Private ReadOnly LBL_INFO As Label
|
||||||
Private ReadOnly Icon As PictureBox
|
Private ReadOnly Icon As PictureBox
|
||||||
#End Region
|
#End Region
|
||||||
@@ -39,6 +40,7 @@ Namespace DownloadObjects
|
|||||||
TP_MAIN.ColumnCount = 1
|
TP_MAIN.ColumnCount = 1
|
||||||
TP_CONTROLS = New TableLayoutPanel With {.Margin = New Padding(0), .Dock = DockStyle.Fill}
|
TP_CONTROLS = New TableLayoutPanel With {.Margin = New Padding(0), .Dock = DockStyle.Fill}
|
||||||
PR_MAIN = New ProgressBar With {.Dock = DockStyle.Fill}
|
PR_MAIN = New ProgressBar With {.Dock = DockStyle.Fill}
|
||||||
|
PR_PRE = New ProgressBar With {.Dock = DockStyle.Fill}
|
||||||
LBL_INFO = New Label With {.Text = String.Empty, .Dock = DockStyle.Fill}
|
LBL_INFO = New Label With {.Text = String.Empty, .Dock = DockStyle.Fill}
|
||||||
Icon = New PictureBox With {
|
Icon = New PictureBox With {
|
||||||
.SizeMode = PictureBoxSizeMode.Zoom,
|
.SizeMode = PictureBoxSizeMode.Zoom,
|
||||||
@@ -66,7 +68,8 @@ Namespace DownloadObjects
|
|||||||
With TP_CONTROLS
|
With TP_CONTROLS
|
||||||
.ColumnStyles.Add(New ColumnStyle(SizeType.Absolute, 30))
|
.ColumnStyles.Add(New ColumnStyle(SizeType.Absolute, 30))
|
||||||
.ColumnStyles.Add(New ColumnStyle(SizeType.Absolute, 30))
|
.ColumnStyles.Add(New ColumnStyle(SizeType.Absolute, 30))
|
||||||
.ColumnStyles.Add(New ColumnStyle(SizeType.Absolute, 150))
|
.ColumnStyles.Add(New ColumnStyle(SizeType.Absolute, 75))
|
||||||
|
.ColumnStyles.Add(New ColumnStyle(SizeType.Absolute, 75)) '150
|
||||||
.ColumnStyles.Add(New ColumnStyle(SizeType.Percent, 100))
|
.ColumnStyles.Add(New ColumnStyle(SizeType.Percent, 100))
|
||||||
.ColumnCount = .ColumnStyles.Count
|
.ColumnCount = .ColumnStyles.Count
|
||||||
.RowStyles.Add(New RowStyle(SizeType.Percent, 100))
|
.RowStyles.Add(New RowStyle(SizeType.Percent, 100))
|
||||||
@@ -74,8 +77,9 @@ Namespace DownloadObjects
|
|||||||
With .Controls
|
With .Controls
|
||||||
If Not img Is Nothing Then .Add(Icon, 0, 0)
|
If Not img Is Nothing Then .Add(Icon, 0, 0)
|
||||||
.Add(BTT_STOP, 1, 0)
|
.Add(BTT_STOP, 1, 0)
|
||||||
.Add(PR_MAIN, 2, 0)
|
.Add(PR_PRE, 2, 0)
|
||||||
.Add(LBL_INFO, 3, 0)
|
.Add(PR_MAIN, 3, 0)
|
||||||
|
.Add(LBL_INFO, 4, 0)
|
||||||
End With
|
End With
|
||||||
End With
|
End With
|
||||||
TP_MAIN.Controls.Add(TP_CONTROLS, 0, 0)
|
TP_MAIN.Controls.Add(TP_CONTROLS, 0, 0)
|
||||||
@@ -90,7 +94,8 @@ Namespace DownloadObjects
|
|||||||
.Add(New ColumnStyle(SizeType.Absolute, 30))
|
.Add(New ColumnStyle(SizeType.Absolute, 30))
|
||||||
.Add(New ColumnStyle(SizeType.Absolute, 30))
|
.Add(New ColumnStyle(SizeType.Absolute, 30))
|
||||||
.Add(New ColumnStyle(SizeType.Absolute, 30))
|
.Add(New ColumnStyle(SizeType.Absolute, 30))
|
||||||
.Add(New ColumnStyle(SizeType.Percent, 100))
|
.Add(New ColumnStyle(SizeType.Percent, 50))
|
||||||
|
.Add(New ColumnStyle(SizeType.Percent, 50)) '100
|
||||||
End With
|
End With
|
||||||
.ColumnCount = .ColumnStyles.Count
|
.ColumnCount = .ColumnStyles.Count
|
||||||
.RowStyles.Add(New RowStyle(SizeType.Percent, 50))
|
.RowStyles.Add(New RowStyle(SizeType.Percent, 50))
|
||||||
@@ -100,7 +105,8 @@ Namespace DownloadObjects
|
|||||||
.Add(BTT_START, 1, 0)
|
.Add(BTT_START, 1, 0)
|
||||||
.Add(BTT_STOP, 2, 0)
|
.Add(BTT_STOP, 2, 0)
|
||||||
.Add(BTT_OPEN, 3, 0)
|
.Add(BTT_OPEN, 3, 0)
|
||||||
.Add(PR_MAIN, 4, 0)
|
.Add(PR_PRE, 4, 0)
|
||||||
|
.Add(PR_MAIN, 5, 0)
|
||||||
End With
|
End With
|
||||||
End With
|
End With
|
||||||
With TP_MAIN
|
With TP_MAIN
|
||||||
@@ -115,7 +121,7 @@ Namespace DownloadObjects
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
With Job
|
With Job
|
||||||
.Progress = New MyProgressExt(PR_MAIN, LBL_INFO) With {.ResetProgressOnMaximumChanges = False}
|
.Progress = New MyProgressExt(PR_MAIN, PR_PRE, LBL_INFO) With {.ResetProgressOnMaximumChanges = False}
|
||||||
With DirectCast(.Progress, MyProgressExt)
|
With DirectCast(.Progress, MyProgressExt)
|
||||||
AddHandler .ProgressChanged, AddressOf JobProgress_ProgressChanged
|
AddHandler .ProgressChanged, AddressOf JobProgress_ProgressChanged
|
||||||
AddHandler .MaximumChanged, AddressOf JobProgress_MaximumChanged
|
AddHandler .MaximumChanged, AddressOf JobProgress_MaximumChanged
|
||||||
@@ -197,7 +203,7 @@ Namespace DownloadObjects
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub JobProgress_Progress0Changed(ByVal Sender As Object, ByVal e As ProgressEventArgs)
|
Private Sub JobProgress_Progress0Changed(ByVal Sender As Object, ByVal e As ProgressEventArgs)
|
||||||
If Not Job.Type = Download.SavedPosts Then
|
If Not Job.Type = Download.SavedPosts Then
|
||||||
MainProgress.Value0 = DirectCast(Sender, MyProgressExt).Value0
|
MainProgress.Value0 = DirectCast(Job.Progress, MyProgressExt).Value0
|
||||||
MainProgress.Perform0(0)
|
MainProgress.Perform0(0)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
26
SCrawler/MainFrame.Designer.vb
generated
26
SCrawler/MainFrame.Designer.vb
generated
@@ -92,6 +92,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
|||||||
Me.BTT_DONATE = New System.Windows.Forms.ToolStripButton()
|
Me.BTT_DONATE = New System.Windows.Forms.ToolStripButton()
|
||||||
Me.Toolbar_BOTTOM = New System.Windows.Forms.StatusStrip()
|
Me.Toolbar_BOTTOM = New System.Windows.Forms.StatusStrip()
|
||||||
Me.BTT_PR_INFO = New System.Windows.Forms.ToolStripStatusLabel()
|
Me.BTT_PR_INFO = New System.Windows.Forms.ToolStripStatusLabel()
|
||||||
|
Me.PR_PRE = New System.Windows.Forms.ToolStripProgressBar()
|
||||||
Me.PR_MAIN = New System.Windows.Forms.ToolStripProgressBar()
|
Me.PR_MAIN = New System.Windows.Forms.ToolStripProgressBar()
|
||||||
Me.LBL_JOBS_COUNT = New System.Windows.Forms.ToolStripStatusLabel()
|
Me.LBL_JOBS_COUNT = New System.Windows.Forms.ToolStripStatusLabel()
|
||||||
Me.LBL_STATUS = New System.Windows.Forms.ToolStripStatusLabel()
|
Me.LBL_STATUS = New System.Windows.Forms.ToolStripStatusLabel()
|
||||||
@@ -122,10 +123,10 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
|||||||
Me.BTT_TRAY_SILENT_MODE = New System.Windows.Forms.ToolStripMenuItem()
|
Me.BTT_TRAY_SILENT_MODE = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.BTT_TRAY_FEED_SHOW = New System.Windows.Forms.ToolStripMenuItem()
|
Me.BTT_TRAY_FEED_SHOW = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.BTT_TRAY_CHANNELS = New System.Windows.Forms.ToolStripMenuItem()
|
Me.BTT_TRAY_CHANNELS = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
|
Me.BTT_TRAY_DOWNLOADER = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.BTT_TRAY_SHOW_HIDE = New System.Windows.Forms.ToolStripMenuItem()
|
Me.BTT_TRAY_SHOW_HIDE = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.BTT_TRAY_CLOSE = New System.Windows.Forms.ToolStripMenuItem()
|
Me.BTT_TRAY_CLOSE = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.BTT_TRAY_CLOSE_NO_SCRIPT = New System.Windows.Forms.ToolStripMenuItem()
|
Me.BTT_TRAY_CLOSE_NO_SCRIPT = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.BTT_TRAY_DOWNLOADER = New System.Windows.Forms.ToolStripMenuItem()
|
|
||||||
SEP_1 = New System.Windows.Forms.ToolStripSeparator()
|
SEP_1 = New System.Windows.Forms.ToolStripSeparator()
|
||||||
SEP_2 = New System.Windows.Forms.ToolStripSeparator()
|
SEP_2 = New System.Windows.Forms.ToolStripSeparator()
|
||||||
CONTEXT_SEP_1 = New System.Windows.Forms.ToolStripSeparator()
|
CONTEXT_SEP_1 = New System.Windows.Forms.ToolStripSeparator()
|
||||||
@@ -633,7 +634,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
|||||||
'
|
'
|
||||||
'Toolbar_BOTTOM
|
'Toolbar_BOTTOM
|
||||||
'
|
'
|
||||||
Me.Toolbar_BOTTOM.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BTT_PR_INFO, Me.PR_MAIN, Me.LBL_JOBS_COUNT, Me.LBL_STATUS})
|
Me.Toolbar_BOTTOM.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BTT_PR_INFO, Me.PR_PRE, Me.PR_MAIN, Me.LBL_JOBS_COUNT, Me.LBL_STATUS})
|
||||||
Me.Toolbar_BOTTOM.Location = New System.Drawing.Point(0, 439)
|
Me.Toolbar_BOTTOM.Location = New System.Drawing.Point(0, 439)
|
||||||
Me.Toolbar_BOTTOM.Name = "Toolbar_BOTTOM"
|
Me.Toolbar_BOTTOM.Name = "Toolbar_BOTTOM"
|
||||||
Me.Toolbar_BOTTOM.Size = New System.Drawing.Size(934, 22)
|
Me.Toolbar_BOTTOM.Size = New System.Drawing.Size(934, 22)
|
||||||
@@ -647,6 +648,12 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
|||||||
Me.BTT_PR_INFO.Padding = New System.Windows.Forms.Padding(0, 0, 3, 0)
|
Me.BTT_PR_INFO.Padding = New System.Windows.Forms.Padding(0, 0, 3, 0)
|
||||||
Me.BTT_PR_INFO.Size = New System.Drawing.Size(19, 17)
|
Me.BTT_PR_INFO.Size = New System.Drawing.Size(19, 17)
|
||||||
'
|
'
|
||||||
|
'PR_PRE
|
||||||
|
'
|
||||||
|
Me.PR_PRE.Name = "PR_PRE"
|
||||||
|
Me.PR_PRE.Size = New System.Drawing.Size(100, 16)
|
||||||
|
Me.PR_PRE.Visible = False
|
||||||
|
'
|
||||||
'PR_MAIN
|
'PR_MAIN
|
||||||
'
|
'
|
||||||
Me.PR_MAIN.Name = "PR_MAIN"
|
Me.PR_MAIN.Name = "PR_MAIN"
|
||||||
@@ -865,6 +872,13 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
|||||||
Me.BTT_TRAY_CHANNELS.Size = New System.Drawing.Size(170, 22)
|
Me.BTT_TRAY_CHANNELS.Size = New System.Drawing.Size(170, 22)
|
||||||
Me.BTT_TRAY_CHANNELS.Text = "Channels"
|
Me.BTT_TRAY_CHANNELS.Text = "Channels"
|
||||||
'
|
'
|
||||||
|
'BTT_TRAY_DOWNLOADER
|
||||||
|
'
|
||||||
|
Me.BTT_TRAY_DOWNLOADER.Image = Global.SCrawler.My.Resources.Resources.ArrowDownPic_Blue_24
|
||||||
|
Me.BTT_TRAY_DOWNLOADER.Name = "BTT_TRAY_DOWNLOADER"
|
||||||
|
Me.BTT_TRAY_DOWNLOADER.Size = New System.Drawing.Size(170, 22)
|
||||||
|
Me.BTT_TRAY_DOWNLOADER.Text = "Downloader"
|
||||||
|
'
|
||||||
'BTT_TRAY_SHOW_HIDE
|
'BTT_TRAY_SHOW_HIDE
|
||||||
'
|
'
|
||||||
Me.BTT_TRAY_SHOW_HIDE.Image = Global.SCrawler.My.Resources.Resources.ApplicationPic_16
|
Me.BTT_TRAY_SHOW_HIDE.Image = Global.SCrawler.My.Resources.Resources.ApplicationPic_16
|
||||||
@@ -893,13 +907,6 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
|||||||
Me.BTT_TRAY_CLOSE_NO_SCRIPT.ToolTipText = "Close the program without executing the script"
|
Me.BTT_TRAY_CLOSE_NO_SCRIPT.ToolTipText = "Close the program without executing the script"
|
||||||
Me.BTT_TRAY_CLOSE_NO_SCRIPT.Visible = False
|
Me.BTT_TRAY_CLOSE_NO_SCRIPT.Visible = False
|
||||||
'
|
'
|
||||||
'BTT_TRAY_DOWNLOADER
|
|
||||||
'
|
|
||||||
Me.BTT_TRAY_DOWNLOADER.Image = Global.SCrawler.My.Resources.Resources.ArrowDownPic_Blue_24
|
|
||||||
Me.BTT_TRAY_DOWNLOADER.Name = "BTT_TRAY_DOWNLOADER"
|
|
||||||
Me.BTT_TRAY_DOWNLOADER.Size = New System.Drawing.Size(170, 22)
|
|
||||||
Me.BTT_TRAY_DOWNLOADER.Text = "Downloader"
|
|
||||||
'
|
|
||||||
'MainFrame
|
'MainFrame
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
@@ -1005,4 +1012,5 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
|||||||
Friend WithEvents MENU_DOWN_ALL As ToolStripDropDownButton
|
Friend WithEvents MENU_DOWN_ALL As ToolStripDropDownButton
|
||||||
Private WithEvents BTT_TRAY_CHANNELS As ToolStripMenuItem
|
Private WithEvents BTT_TRAY_CHANNELS As ToolStripMenuItem
|
||||||
Private WithEvents BTT_TRAY_DOWNLOADER As ToolStripMenuItem
|
Private WithEvents BTT_TRAY_DOWNLOADER As ToolStripMenuItem
|
||||||
|
Private WithEvents PR_PRE As ToolStripProgressBar
|
||||||
End Class
|
End Class
|
||||||
@@ -58,7 +58,7 @@ Public Class MainFrame
|
|||||||
YouTube.MyCache = Settings.Cache
|
YouTube.MyCache = Settings.Cache
|
||||||
YouTube.MyYouTubeSettings = New YouTube.YTSettings_Internal
|
YouTube.MyYouTubeSettings = New YouTube.YTSettings_Internal
|
||||||
UpdateYouTubeSettings()
|
UpdateYouTubeSettings()
|
||||||
MainProgress = New MyProgressExt(Toolbar_BOTTOM, PR_MAIN, LBL_STATUS, "Downloading profiles' data") With {
|
MainProgress = New MyProgressExt(Toolbar_BOTTOM, PR_MAIN, PR_PRE, LBL_STATUS, "Downloading profiles' data") With {
|
||||||
.ResetProgressOnMaximumChanges = False, .Visible = False}
|
.ResetProgressOnMaximumChanges = False, .Visible = False}
|
||||||
Downloader = New TDownloader
|
Downloader = New TDownloader
|
||||||
InfoForm = New DownloadedInfoForm
|
InfoForm = New DownloadedInfoForm
|
||||||
|
|||||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2023.6.8.0")>
|
<Assembly: AssemblyVersion("2023.6.9.0")>
|
||||||
<Assembly: AssemblyFileVersion("2023.6.8.0")>
|
<Assembly: AssemblyFileVersion("2023.6.9.0")>
|
||||||
<Assembly: NeutralResourcesLanguage("en")>
|
<Assembly: NeutralResourcesLanguage("en")>
|
||||||
|
|||||||
@@ -114,62 +114,71 @@ Friend Class MyProgressExt : Inherits MyProgress
|
|||||||
End If
|
End If
|
||||||
End RaiseEvent
|
End RaiseEvent
|
||||||
End Event
|
End Event
|
||||||
|
Private WithEvents PR_PRE As MyProgress
|
||||||
|
Private Sub PR_PRE_ProgressChanged(ByVal Sender As Object, ByVal e As ProgressEventArgs) Handles PR_PRE.ProgressChanged
|
||||||
|
RaiseEvent Progress0Changed(Sender, e)
|
||||||
|
End Sub
|
||||||
|
Private Sub PR_PRE_MaximumChanged(ByVal Sender As Object, ByVal e As ProgressEventArgs) Handles PR_PRE.MaximumChanged
|
||||||
|
RaiseEvent Maximum0Changed(Sender, e)
|
||||||
|
End Sub
|
||||||
Friend Sub New()
|
Friend Sub New()
|
||||||
_Progress0ChangedEventHandlers = New List(Of EventHandler(Of ProgressEventArgs))
|
_Progress0ChangedEventHandlers = New List(Of EventHandler(Of ProgressEventArgs))
|
||||||
_Maximum0ChangedEventHandlers = New List(Of EventHandler(Of ProgressEventArgs))
|
_Maximum0ChangedEventHandlers = New List(Of EventHandler(Of ProgressEventArgs))
|
||||||
End Sub
|
End Sub
|
||||||
Friend Sub New(ByRef StatusStrip As StatusStrip, ByRef ProgressBar As ToolStripProgressBar, ByRef Label As ToolStripStatusLabel,
|
Friend Sub New(ByRef StatusStrip As StatusStrip, ByRef ProgressBar As ToolStripProgressBar, ByRef ProgressBarPre As ToolStripProgressBar, ByRef Label As ToolStripStatusLabel,
|
||||||
Optional ByVal Information As String = Nothing)
|
Optional ByVal Information As String = Nothing)
|
||||||
MyBase.New(StatusStrip, ProgressBar, Label, Information)
|
MyBase.New(StatusStrip, ProgressBar, Label, Information)
|
||||||
|
PR_PRE = New MyProgress(StatusStrip, ProgressBarPre, Nothing) With {.PerformMod = 10, .ResetProgressOnMaximumChanges = False}
|
||||||
_Progress0ChangedEventHandlers = New List(Of EventHandler(Of ProgressEventArgs))
|
_Progress0ChangedEventHandlers = New List(Of EventHandler(Of ProgressEventArgs))
|
||||||
_Maximum0ChangedEventHandlers = New List(Of EventHandler(Of ProgressEventArgs))
|
_Maximum0ChangedEventHandlers = New List(Of EventHandler(Of ProgressEventArgs))
|
||||||
End Sub
|
End Sub
|
||||||
Friend Sub New(ByRef ProgressBar As ProgressBar, ByRef Label As Label, Optional ByVal Information As String = Nothing)
|
Friend Sub New(ByRef ProgressBar As ProgressBar, ByRef ProgressBarPre As ProgressBar, ByRef Label As Label, Optional ByVal Information As String = Nothing)
|
||||||
MyBase.New(ProgressBar, Label, Information)
|
MyBase.New(ProgressBar, Label, Information)
|
||||||
|
PR_PRE = New MyProgress(ProgressBarPre, Nothing) With {.PerformMod = 10, .ResetProgressOnMaximumChanges = False}
|
||||||
_Progress0ChangedEventHandlers = New List(Of EventHandler(Of ProgressEventArgs))
|
_Progress0ChangedEventHandlers = New List(Of EventHandler(Of ProgressEventArgs))
|
||||||
_Maximum0ChangedEventHandlers = New List(Of EventHandler(Of ProgressEventArgs))
|
_Maximum0ChangedEventHandlers = New List(Of EventHandler(Of ProgressEventArgs))
|
||||||
End Sub
|
End Sub
|
||||||
Private _Maximum0 As Double = 0
|
|
||||||
Friend Property Maximum0 As Double
|
Friend Property Maximum0 As Double
|
||||||
Get
|
Get
|
||||||
Return _Maximum0
|
Return PR_PRE.Maximum
|
||||||
End Get
|
End Get
|
||||||
Set(ByVal v As Double)
|
Set(ByVal v As Double)
|
||||||
Dim b As Boolean = Not _Maximum0 = v
|
PR_PRE.Maximum = v
|
||||||
_Maximum0 = v
|
End Set
|
||||||
If ResetProgressOnMaximumChanges Then Value0 = 0
|
End Property
|
||||||
If b Then RaiseEvent Maximum0Changed(Me, Nothing)
|
Friend Property Value0 As Double
|
||||||
|
Get
|
||||||
|
Return PR_PRE.Value
|
||||||
|
End Get
|
||||||
|
Set(ByVal v As Double)
|
||||||
|
PR_PRE.Value = v
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Friend Property Value0 As Double = 0
|
|
||||||
Friend Sub Perform0(Optional ByVal Value As Double = 1)
|
Friend Sub Perform0(Optional ByVal Value As Double = 1)
|
||||||
Value0 += Value
|
PR_PRE.Perform(Value)
|
||||||
If Perform(0, 10, False, False) Then RaiseEvent Progress0Changed(Me, Nothing)
|
|
||||||
End Sub
|
End Sub
|
||||||
Public Overloads Overrides Sub Perform(Optional ByVal Value As Double = 1)
|
|
||||||
If Perform(Value, PerformMod, True, True) Then OnProgressChanged()
|
|
||||||
End Sub
|
|
||||||
Public Overloads Function Perform(ByVal Value As Double, ByVal pm As Integer, ByVal SetText As Boolean, ByVal InvokeProgressChangeHandler As Boolean) As Boolean
|
|
||||||
Me.Value += Value
|
|
||||||
If Me.Value < 0 Then Me.Value = 0
|
|
||||||
Dim v# = Me.Value + Value0
|
|
||||||
Dim m# = Maximum + Maximum0
|
|
||||||
If pm = 0 OrElse (v Mod pm) = 0 OrElse v = m Then PerformImpl(GetPercentage(v, m), SetText, InvokeProgressChangeHandler) : Return True
|
|
||||||
Return False
|
|
||||||
End Function
|
|
||||||
Public Overrides Sub Done()
|
Public Overrides Sub Done()
|
||||||
Value0 = Maximum0
|
PR_PRE.Done()
|
||||||
MyBase.Done()
|
MyBase.Done()
|
||||||
End Sub
|
End Sub
|
||||||
Public Overrides Sub Reset()
|
Public Overrides Sub Reset()
|
||||||
MyBase.Reset()
|
MyBase.Reset()
|
||||||
Value0 = 0
|
PR_PRE.Done()
|
||||||
Maximum0 = 0
|
|
||||||
End Sub
|
End Sub
|
||||||
|
Public Overrides Property Visible(Optional ByVal ProgressBar As Boolean = True, Optional ByVal Label As Boolean = True) As Boolean
|
||||||
|
Get
|
||||||
|
Return MyBase.Visible(ProgressBar, Label)
|
||||||
|
End Get
|
||||||
|
Set(ByVal _Visible As Boolean)
|
||||||
|
MyBase.Visible(ProgressBar, Label) = _Visible
|
||||||
|
PR_PRE.Visible(ProgressBar, Label) = _Visible
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||||
If Not disposedValue And disposing Then
|
If Not disposedValue And disposing Then
|
||||||
_Progress0ChangedEventHandlers.Clear()
|
_Progress0ChangedEventHandlers.Clear()
|
||||||
_Maximum0ChangedEventHandlers.Clear()
|
_Maximum0ChangedEventHandlers.Clear()
|
||||||
|
PR_PRE.Dispose()
|
||||||
End If
|
End If
|
||||||
MyBase.Dispose(disposing)
|
MyBase.Dispose(disposing)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
' but WITHOUT ANY WARRANTY
|
' but WITHOUT ANY WARRANTY
|
||||||
Imports System.Runtime.CompilerServices
|
Imports System.Runtime.CompilerServices
|
||||||
Namespace Plugin.Attributes
|
Namespace Plugin.Attributes
|
||||||
Public Enum SettingAddress : Both : Settings : User : End Enum
|
Public Enum SettingAddress : Both : Settings : User : None : End Enum
|
||||||
Public Class PSettingAttribute : Inherits Attribute
|
Public Class PSettingAttribute : Inherits Attribute
|
||||||
Public Number As Integer = 0
|
Public Number As Integer = 0
|
||||||
Friend ReadOnly Name As String
|
Friend ReadOnly Name As String
|
||||||
|
|||||||
@@ -178,6 +178,7 @@
|
|||||||
<Compile Include="API\LPSG\UserData.vb" />
|
<Compile Include="API\LPSG\UserData.vb" />
|
||||||
<Compile Include="API\Mastodon\Credentials.vb" />
|
<Compile Include="API\Mastodon\Credentials.vb" />
|
||||||
<Compile Include="API\Mastodon\Declarations.vb" />
|
<Compile Include="API\Mastodon\Declarations.vb" />
|
||||||
|
<Compile Include="API\Mastodon\EditorExchangeOptions.vb" />
|
||||||
<Compile Include="API\Mastodon\MastodonDomains.vb" />
|
<Compile Include="API\Mastodon\MastodonDomains.vb" />
|
||||||
<Compile Include="API\Mastodon\SettingsForm.Designer.vb">
|
<Compile Include="API\Mastodon\SettingsForm.Designer.vb">
|
||||||
<DependentUpon>SettingsForm.vb</DependentUpon>
|
<DependentUpon>SettingsForm.vb</DependentUpon>
|
||||||
|
|||||||
Reference in New Issue
Block a user