Compare commits

...

2 Commits

Author SHA1 Message Date
Andy
a540aded68 2023.11.24.0
Scheduler: handle scheduler change error (collection was modified)
SchedulerEditorForm: add scheduler name to form title
DownloadProgress: fix disposing error when some objects are already null
API.Reddit: add special notification for error 429
API.Twitter: handle JSON deserialization error
Porn sites: fix incorrect parsing of search queries
YouTube: path not set when adding array to download
2023-11-24 04:54:04 +03:00
Andy
0ec617c1dc 2023.11.21.0
YouTube
Add absolute paths support
PlaylistArrayForm: fix RTB issue
Single media: the file name is not changed manually

SCrawler
Automation: add manual tasks
DownloaderUrlsArrForm: fix RTB issue
SiteSettingsBase: add use of Netscape cookies if enabled for a class; disable saving Netscape cookies on init
Add feeds update when users' location and/or basic info changes
API.TikTok: add ID, username and friendly name extraction from data; update request URL; update 'GetUserUrl' function; add new option 'Use video date as file date'
API.YouTube: set 'UseNetscapeCookies'
2023-11-21 09:25:22 +03:00
44 changed files with 516 additions and 248 deletions

View File

@@ -1,3 +1,27 @@
# 2023.11.24.0
*2023-11-24*
For those of you who use TikTok, I recommend updating [TikTok plugin](https://github.com/bashonly/yt-dlp-TTUser) to the latest version using [these instructions](https://github.com/AAndyProgram/SCrawler/wiki/Settings#how-to-install-yt-dlp-ttuser-plugin).
- Added
- Automation: manual task option
- Scheduler: add scheduler name to form title
- Feeds: update when users' location and/or basic information changes
- Reddit: special notification for error 429
- TikTok: ID, username and friendly name extraction from data
- TikTok: new option `Use video date as file date`
- YouTube: absolute path for a single playlist
- Updated
- yt-dlp up to version 2023.11.16
- Fixed
- Scheduler: scheduler change error
- Twitter: JSON deserialization error
- xHamster, XVideos, PornHub, ThisVid: incorrect parsing of search queries
- YouTube: the file name is not changed manually
- YouTube: path not set when adding array to download
- Minor bugs
# 2023.11.17.0 # 2023.11.17.0
*2023-11-17* *2023-11-17*

View File

@@ -1,3 +1,3 @@
[*.vb] [*.vb]
# Modifier preferences # Modifier preferences
file_header_template = Copyright (C) 2023 Andy https://github.com/AAndyProgram\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see <https://www.gnu.org/licenses/> file_header_template = Copyright (C) Andy https://github.com/AAndyProgram\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see <https://www.gnu.org/licenses/>

View File

@@ -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.11.17.0")> <Assembly: AssemblyVersion("2023.11.24.0")>
<Assembly: AssemblyFileVersion("2023.11.17.0")> <Assembly: AssemblyFileVersion("2023.11.24.0")>
<Assembly: NeutralResourcesLanguage("en")> <Assembly: NeutralResourcesLanguage("en")>

View File

@@ -1,3 +1,3 @@
[*.vb] [*.vb]
# Modifier preferences # Modifier preferences
file_header_template = Copyright (C) 2023 Andy https://github.com/AAndyProgram\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see <https://www.gnu.org/licenses/> file_header_template = Copyright (C) Andy https://github.com/AAndyProgram\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see <https://www.gnu.org/licenses/>

View File

@@ -427,10 +427,14 @@ Namespace API.YouTube.Controls
Me.TXT_OUTPUT_PATH.Buttons.Add(ActionButton8) Me.TXT_OUTPUT_PATH.Buttons.Add(ActionButton8)
Me.TXT_OUTPUT_PATH.Buttons.Add(ActionButton9) Me.TXT_OUTPUT_PATH.Buttons.Add(ActionButton9)
Me.TXT_OUTPUT_PATH.Buttons.Add(ActionButton10) Me.TXT_OUTPUT_PATH.Buttons.Add(ActionButton10)
Me.TXT_OUTPUT_PATH.CaptionMode = PersonalUtilities.Forms.Controls.Base.ICaptionControl.Modes.Label Me.TXT_OUTPUT_PATH.CaptionMode = PersonalUtilities.Forms.Controls.Base.ICaptionControl.Modes.CheckBox
Me.TXT_OUTPUT_PATH.CaptionText = "Output path" Me.TXT_OUTPUT_PATH.CaptionText = "Output path"
Me.TXT_OUTPUT_PATH.CaptionToolTipEnabled = True
Me.TXT_OUTPUT_PATH.CaptionToolTipText = "If this checkbox is selected, this path is absolute and artist folder will not be" &
" created in it"
Me.TXT_OUTPUT_PATH.CaptionVisible = True Me.TXT_OUTPUT_PATH.CaptionVisible = True
Me.TXT_OUTPUT_PATH.CaptionWidth = 112.0R Me.TXT_OUTPUT_PATH.CaptionWidth = 112.0R
Me.TXT_OUTPUT_PATH.ChangeControlsEnableOnCheckedChange = False
ListColumn1.Name = "COL_NAME" ListColumn1.Name = "COL_NAME"
ListColumn1.Text = "Name" ListColumn1.Text = "Name"
ListColumn1.Width = -1 ListColumn1.Width = -1

View File

@@ -80,6 +80,14 @@ Namespace API.YouTube.Controls
End If End If
LIST_PLAYLISTS.SelectedIndex = 0 LIST_PLAYLISTS.SelectedIndex = 0
If .ObjectType = Base.YouTubeMediaType.Channel Then
With TXT_OUTPUT_PATH
.CaptionMode = ICaptionControl.Modes.Label
.CaptionToolTipText = String.Empty
.CaptionToolTipEnabled = False
End With
End If
TXT_OUTPUT_PATH.Text = MyYouTubeSettings.OutputPath.Value TXT_OUTPUT_PATH.Text = MyYouTubeSettings.OutputPath.Value
If Not .UserTitle.IsEmptyString Then If Not .UserTitle.IsEmptyString Then
@@ -266,6 +274,7 @@ Namespace API.YouTube.Controls
If Not TXT_SUBS.Checked Then .PostProcessing_OutputSubtitlesFormats.Clear() If Not TXT_SUBS.Checked Then .PostProcessing_OutputSubtitlesFormats.Clear()
.OutputAudioCodec = CMB_FORMATS.Text .OutputAudioCodec = CMB_FORMATS.Text
If Not TXT_FORMATS_ADDIT.Checked Then .PostProcessing_OutputAudioFormats.Clear() If Not TXT_FORMATS_ADDIT.Checked Then .PostProcessing_OutputAudioFormats.Clear()
.AbsolutePath = TXT_OUTPUT_PATH.Checked
.File = TXT_OUTPUT_PATH.Text.CSFileP .File = TXT_OUTPUT_PATH.Text.CSFileP
If MyYouTubeSettings.OutputPathAutoChange Then MyYouTubeSettings.OutputPath.Value = .File If MyYouTubeSettings.OutputPathAutoChange Then MyYouTubeSettings.OutputPath.Value = .File
If MyDownloaderSettings.OutputPathAutoAddPaths Then MyYouTubeSettings.DownloadLocations.Add(.File, False) If MyDownloaderSettings.OutputPathAutoAddPaths Then MyYouTubeSettings.DownloadLocations.Add(.File, False)

View File

@@ -26,7 +26,7 @@ Namespace API.YouTube.Controls
Dim TP_MAIN As System.Windows.Forms.TableLayoutPanel Dim TP_MAIN As System.Windows.Forms.TableLayoutPanel
Dim FRM_PLS As System.Windows.Forms.GroupBox Dim FRM_PLS As System.Windows.Forms.GroupBox
Me.CH_PLS_ONE = New System.Windows.Forms.CheckBox() Me.CH_PLS_ONE = New System.Windows.Forms.CheckBox()
Me.TXT_URLS = New System.Windows.Forms.RichTextBox() Me.TXT_URLS = New System.Windows.Forms.TextBox()
CONTAINER_MAIN = New System.Windows.Forms.ToolStripContainer() CONTAINER_MAIN = New System.Windows.Forms.ToolStripContainer()
TP_MAIN = New System.Windows.Forms.TableLayoutPanel() TP_MAIN = New System.Windows.Forms.TableLayoutPanel()
FRM_PLS = New System.Windows.Forms.GroupBox() FRM_PLS = New System.Windows.Forms.GroupBox()
@@ -94,13 +94,14 @@ Namespace API.YouTube.Controls
' '
'TXT_URLS 'TXT_URLS
' '
Me.TXT_URLS.DetectUrls = False Me.TXT_URLS.AcceptsReturn = True
Me.TXT_URLS.Dock = System.Windows.Forms.DockStyle.Fill Me.TXT_URLS.Dock = System.Windows.Forms.DockStyle.Fill
Me.TXT_URLS.Location = New System.Drawing.Point(3, 16) Me.TXT_URLS.Location = New System.Drawing.Point(3, 16)
Me.TXT_URLS.MaxLength = 2147483647
Me.TXT_URLS.Multiline = True
Me.TXT_URLS.Name = "TXT_URLS" Me.TXT_URLS.Name = "TXT_URLS"
Me.TXT_URLS.Size = New System.Drawing.Size(372, 261) Me.TXT_URLS.Size = New System.Drawing.Size(372, 261)
Me.TXT_URLS.TabIndex = 0 Me.TXT_URLS.TabIndex = 0
Me.TXT_URLS.Text = ""
' '
'PlaylistArrayForm 'PlaylistArrayForm
' '
@@ -119,10 +120,11 @@ Namespace API.YouTube.Controls
TP_MAIN.ResumeLayout(False) TP_MAIN.ResumeLayout(False)
TP_MAIN.PerformLayout() TP_MAIN.PerformLayout()
FRM_PLS.ResumeLayout(False) FRM_PLS.ResumeLayout(False)
FRM_PLS.PerformLayout()
Me.ResumeLayout(False) Me.ResumeLayout(False)
End Sub End Sub
Private WithEvents CH_PLS_ONE As CheckBox Private WithEvents CH_PLS_ONE As CheckBox
Private WithEvents TXT_URLS As RichTextBox Private WithEvents TXT_URLS As TextBox
End Class End Class
End Namespace End Namespace

View File

@@ -275,6 +275,7 @@ Namespace API.YouTube.Controls
ActionButton1.Name = "ArrowDown" ActionButton1.Name = "ArrowDown"
ActionButton1.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.ArrowDown ActionButton1.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.ArrowDown
Me.TXT_FILE.Buttons.Add(ActionButton1) Me.TXT_FILE.Buttons.Add(ActionButton1)
Me.TXT_FILE.ChangeControlsEnableOnCheckedChange = False
ListColumn1.Name = "COL_NAME" ListColumn1.Name = "COL_NAME"
ListColumn1.Text = "Name" ListColumn1.Text = "Name"
ListColumn1.Width = -1 ListColumn1.Width = -1

View File

@@ -76,6 +76,12 @@ Namespace API.YouTube.Controls
If Not def.ValueBetween(-1, 10000) Then def = 1080 If Not def.ValueBetween(-1, 10000) Then def = 1080
End If End If
NUM_RES.Value = def NUM_RES.Value = def
With TXT_FILE
.CaptionMode = ICaptionControl.Modes.CheckBox
.CaptionWidth = 18
.CaptionToolTipText = "If this checkbox is selected, this path is absolute and artist folder will not be created in it"
.CaptionToolTipEnabled = True
End With
Else Else
TP_OPTIONS.Controls.Remove(NUM_RES) TP_OPTIONS.Controls.Remove(NUM_RES)
TP_OPTIONS.ColumnStyles(3).Width = 0 TP_OPTIONS.ColumnStyles(3).Width = 0
@@ -297,8 +303,8 @@ Namespace API.YouTube.Controls
.SelectedVideoIndex = -1 .SelectedVideoIndex = -1
.SelectedAudioIndex = cntIndex .SelectedAudioIndex = cntIndex
End If End If
.File = f
.FileSetManually = True .FileSetManually = True
.File = f
.UpdateInfoFields() .UpdateInfoFields()
'#If DEBUG Then '#If DEBUG Then
'Debug.WriteLine(.Command(False)) 'Debug.WriteLine(.Command(False))
@@ -309,6 +315,7 @@ Namespace API.YouTube.Controls
Else Else
.SetMaxResolution(NUM_RES.Value) .SetMaxResolution(NUM_RES.Value)
End If End If
.AbsolutePath = TXT_FILE.Checked
.File = f .File = f
End If End If
End With End With

View File

@@ -278,6 +278,17 @@ Namespace DownloadObjects.STDownloader
.IsMusic = containers.Any(Function(cc) cc.IsMusic) .IsMusic = containers.Any(Function(cc) cc.IsMusic)
} }
c.Elements.AddRange(containers) c.Elements.AddRange(containers)
Dim path$ = c.Elements(0).File.PathWithSeparator
For Each list As List(Of String) In {
c.Elements.Select(Function(cc) cc.UserTitle).ListWithRemove(Function(cc) cc.IsEmptyString).ListIfNothing,
c.Elements.Select(Function(cc) cc.PlaylistTitle).ListWithRemove(Function(cc) cc.IsEmptyString).ListIfNothing
}
If list.Count > 0 AndAlso
(list.Count = 1 OrElse
ListAddList(Nothing, list, LAP.NotContainsOnly, EDP.ReturnValue).ListIfNothing.Count = 1) Then _
path &= $"{list(0)}\"
Next
c.File = path
End If End If
End If End If
End With End With
@@ -450,12 +461,16 @@ Namespace DownloadObjects.STDownloader
UpdateLogButton() UpdateLogButton()
End Sub End Sub
Protected Sub AddToDownload(ByRef Item As MediaItem, ByVal RunThread As Boolean) Protected Sub AddToDownload(ByRef Item As MediaItem, ByVal RunThread As Boolean)
Try
Dim hc% = Item.MyContainer.GetHashCode Dim hc% = Item.MyContainer.GetHashCode
If MyJob.Count = 0 OrElse Not MyJob.Items.Exists(Function(i) i.MyContainer.GetHashCode = hc) Then If MyJob.Count = 0 OrElse Not MyJob.Items.Exists(Function(i) i.MyContainer.GetHashCode = hc) Then
MyJob.Add(Item) MyJob.Add(Item)
Item.AddToQueue() Item.AddToQueue()
If RunThread Then StartDownloading() If RunThread Then StartDownloading()
End If End If
Catch ex As Exception
ErrorsDescriber.Execute(EDP.SendToLog, ex, "[VideoListForm.AddToDownload]")
End Try
End Sub End Sub
Private Sub StartDownloading() Private Sub StartDownloading()
If Not MyJob.Working And MyJob.Count > 0 Then If Not MyJob.Working And MyJob.Count > 0 Then

View File

@@ -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.11.17.0")> <Assembly: AssemblyVersion("2023.11.24.0")>
<Assembly: AssemblyFileVersion("2023.11.17.0")> <Assembly: AssemblyFileVersion("2023.11.24.0")>
<Assembly: NeutralResourcesLanguage("en")> <Assembly: NeutralResourcesLanguage("en")>

View File

@@ -543,6 +543,16 @@ Namespace API.YouTube.Objects
Return _FileIsPlaylistObject Return _FileIsPlaylistObject
End Get End Get
End Property End Property
Private _AbsolutePath As Boolean = False
Public Property AbsolutePath As Boolean
Get
Return _AbsolutePath
End Get
Set(ByVal ap As Boolean)
_AbsolutePath = ap
If Elements.Count > 0 Then Elements.ForEach(Sub(e As YouTubeMediaContainerBase) e.AbsolutePath = ap)
End Set
End Property
Public Overridable Property File As SFile Implements IYouTubeMediaContainer.File Public Overridable Property File As SFile Implements IYouTubeMediaContainer.File
Get Get
Return _File Return _File
@@ -550,11 +560,16 @@ Namespace API.YouTube.Objects
Set(ByVal f As SFile) Set(ByVal f As SFile)
Select Case ObjectType Select Case ObjectType
Case YouTubeMediaType.Channel : _File = f.Path Case YouTubeMediaType.Channel : _File = f.Path
Case YouTubeMediaType.PlayList : _File.Path = $"{f.PathWithSeparator}{GetPlayListTitle()}" Case YouTubeMediaType.PlayList
If AbsolutePath Then
_File.Path = f.Path
Else
_File.Path = $"{f.PathWithSeparator}{GetPlayListTitle()}"
End If
Case YouTubeMediaType.Single Case YouTubeMediaType.Single
If PlaylistCount > 0 And Not FileIgnorePlaylist Then If PlaylistCount > 0 And Not FileIgnorePlaylist Then
_File.Path = f.Path _File.Path = f.Path
Dim pls$ = GetPlayListTitle() Dim pls$ = If(AbsolutePath, String.Empty, GetPlayListTitle())
If Not _File.Path.Contains(pls) Then _File.Path = $"{_File.PathWithSeparator(Not pls.IsEmptyString)}{pls}" If Not _File.Path.Contains(pls) Then _File.Path = $"{_File.PathWithSeparator(Not pls.IsEmptyString)}{pls}"
ElseIf Not f.Name.IsEmptyString Then ElseIf Not f.Name.IsEmptyString Then
_File = f _File = f

View File

@@ -1,3 +1,3 @@
[*.vb] [*.vb]
# Modifier preferences # Modifier preferences
file_header_template = Copyright (C) 2023 Andy https://github.com/AAndyProgram\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see <https://www.gnu.org/licenses/> file_header_template = Copyright (C) Andy https://github.com/AAndyProgram\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see <https://www.gnu.org/licenses/>

View File

@@ -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.11.17.0")> <Assembly: AssemblyVersion("2023.11.24.0")>
<Assembly: AssemblyFileVersion("2023.11.17.0")> <Assembly: AssemblyFileVersion("2023.11.24.0")>
<Assembly: NeutralResourcesLanguage("en")> <Assembly: NeutralResourcesLanguage("en")>

View File

@@ -123,4 +123,4 @@ insert_final_newline=false
[*.vb] [*.vb]
# Modifier preferences # Modifier preferences
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion
file_header_template = Copyright (C) 2023 Andy https://github.com/AAndyProgram\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see <https://www.gnu.org/licenses/> file_header_template = Copyright (C) Andy https://github.com/AAndyProgram\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see <https://www.gnu.org/licenses/>

View File

@@ -10,6 +10,7 @@ Imports System.Reflection
Imports SCrawler.Plugin Imports SCrawler.Plugin
Imports SCrawler.Plugin.Attributes Imports SCrawler.Plugin.Attributes
Imports PersonalUtilities.Tools Imports PersonalUtilities.Tools
Imports PersonalUtilities.Tools.Web.Cookies
Imports PersonalUtilities.Tools.Web.Clients Imports PersonalUtilities.Tools.Web.Clients
Imports PersonalUtilities.Functions.RegularExpressions Imports PersonalUtilities.Functions.RegularExpressions
Imports Download = SCrawler.Plugin.ISiteSettings.Download Imports Download = SCrawler.Plugin.ISiteSettings.Download
@@ -73,7 +74,7 @@ Namespace API.Base
Responser.Cookies.ChangedAllowInternalDrop = Not _UseNetscapeCookies Responser.Cookies.ChangedAllowInternalDrop = Not _UseNetscapeCookies
Responser.Cookies.Changed = False Responser.Cookies.Changed = False
End If End If
If b And _UseNetscapeCookies Then Update_SaveCookiesNetscape() If b AndAlso _UseNetscapeCookies AndAlso Not CookiesNetscapeFile.Exists Then Update_SaveCookiesNetscape()
End Set End Set
End Property End Property
Private Property IResponserContainer_Responser As Responser Implements IResponserContainer.Responser Private Property IResponserContainer_Responser As Responser Implements IResponserContainer.Responser
@@ -140,6 +141,12 @@ Namespace API.Base
Protected _SiteEditorFormOpened As Boolean = False Protected _SiteEditorFormOpened As Boolean = False
Friend Overridable Sub BeginEdit() Implements ISiteSettings.BeginEdit Friend Overridable Sub BeginEdit() Implements ISiteSettings.BeginEdit
_SiteEditorFormOpened = True _SiteEditorFormOpened = True
If UseNetscapeCookies And CookiesNetscapeFile.Exists Then
With Responser.Cookies
.Clear()
.AddRange(CookieKeeper.ParseNetscapeText(CookiesNetscapeFile.GetText, EDP.SendToLog + EDP.ReturnValue),, EDP.None)
End With
End If
End Sub End Sub
Friend Overridable Sub EndEdit() Implements ISiteSettings.EndEdit Friend Overridable Sub EndEdit() Implements ISiteSettings.EndEdit
If _SiteEditorFormOpened Then DomainsReset() If _SiteEditorFormOpened Then DomainsReset()

View File

@@ -1729,8 +1729,6 @@ BlockNullPicture:
DownloadContentDefault_PostProcessing(v, f, Token) DownloadContentDefault_PostProcessing(v, f, Token)
dCount += 1 dCount += 1
Catch woex As OperationCanceledException When Token.IsCancellationRequested Catch woex As OperationCanceledException When Token.IsCancellationRequested
'TODELETE: UserDataBase.DownloadContentDefault: remove file when 'OperationCanceledException'
'If f.Exists Then f.Delete(,, EDP.SendToLog)
__deleteFile.Invoke(f, v.URL_BASE) __deleteFile.Invoke(f, v.URL_BASE)
v.State = UStates.Missing v.State = UStates.Missing
v.Attempts += 1 v.Attempts += 1
@@ -1942,6 +1940,7 @@ BlockNullPicture:
Try Try
Dim f As SFile Dim f As SFile
Dim v As Boolean = IsVirtual Dim v As Boolean = IsVirtual
Settings.Feeds.Load()
If IncludedInCollection And __CollectionName.IsEmptyString And __SpecialCollectionPath.IsEmptyString Then If IncludedInCollection And __CollectionName.IsEmptyString And __SpecialCollectionPath.IsEmptyString Then
Settings.Users.Add(Me) Settings.Users.Add(Me)
@@ -1984,6 +1983,7 @@ BlockNullPicture:
Settings.UsersList.Remove(UserBefore) Settings.UsersList.Remove(UserBefore)
Settings.UpdateUsersList(User) Settings.UpdateUsersList(User)
Settings.Feeds.UpdateUsers(UserBefore, User)
UpdateUserInformation() UpdateUserInformation()
Return True Return True
Catch ex As Exception Catch ex As Exception
@@ -2037,6 +2037,7 @@ BlockNullPicture:
End If End If
If Not ScriptData.IsEmptyString AndAlso ScriptData.Contains(UserBefore.File.PathNoSeparator) Then _ If Not ScriptData.IsEmptyString AndAlso ScriptData.Contains(UserBefore.File.PathNoSeparator) Then _
ScriptData = ScriptData.Replace(UserBefore.File.PathNoSeparator, MyFile.PathNoSeparator) ScriptData = ScriptData.Replace(UserBefore.File.PathNoSeparator, MyFile.PathNoSeparator)
Settings.Feeds.UpdateUsers(UserBefore, User)
UpdateUserInformation() UpdateUserInformation()
End If End If
Catch ioex As InvalidOperationException When ioex.HelpLink = 1 Catch ioex As InvalidOperationException When ioex.HelpLink = 1

View File

@@ -126,70 +126,6 @@ Namespace API.JustForFans
$"API.JustForFans.M3U8.GetFiles({IIf(IsAudio, "audio", "video")}):{vbCr}URL: {URL}{vbCr}File: {File}") $"API.JustForFans.M3U8.GetFiles({IIf(IsAudio, "audio", "video")}):{vbCr}URL: {URL}{vbCr}File: {File}")
End Try End Try
End Sub End Sub
'TODELETE: JFF.M3U8.GetFiles_OLD 20231008
'Private Sub GetFiles_OLD(ByVal URL As String, ByRef File As SFile, ByVal IsAudio As Boolean)
' Try
' Dim r$ = Responser.GetResponse(URL)
' If Not r.IsEmptyString Then
' Dim data As List(Of RegexMatchStruct) = RegexFields(Of RegexMatchStruct)(r, {REGEX_PLS_FILES}, {1, 2}, EDP.ReturnValue)
' If data.ListExists Then
' Dim appender$ = URL.Replace(URL.Split("/").LastOrDefault, String.Empty)
' With (From d As RegexMatchStruct In data
' Where Not d.Arr(0).IfNullOrEmpty(d.Arr(1)).IsEmptyString
' Select M3U8Base.CreateUrl(appender, d.Arr(0).IfNullOrEmpty(d.Arr(1)).Trim)).ToList
' If .ListExists Then
' File = $"{Cache.RootDirectory.PathWithSeparator}{IIf(IsAudio, "AUDIO.aac", "VIDEO.mp4")}"
' Dim tmpCache As CacheKeeper = Cache.NewInstance
' Dim tmpFile As SFile = .Item(0)
' If tmpFile.Extension.IsEmptyString Then tmpFile.Extension = "ts"
' tmpFile.Path = tmpCache.RootDirectory.Path
' tmpFile.Separator = "\"
' Dim cFile As SFile = tmpFile
' cFile.Name = "all"
' tmpCache.Validate()
' Using bat As New TextSaver
' Using b As New BatchExecutor(True) With {.Encoding = Settings.CMDEncoding}
' AddHandler b.OutputDataReceived, AddressOf Batch_OutputDataReceived
' bat.AppendLine($"chcp {BatchExecutor.UnicodeEncoding}")
' bat.AppendLine(BatchExecutor.GetDirectoryCommand(tmpCache))
' ProgressChangeMax(.Count * 2 + 1)
' Using w As New WebClient
' For i = 0 To .Count - 1
' tmpFile.Name = $"ConPart_{i}"
' Thrower.ThrowAny()
' 'Responser.DownloadFile(.Item(i), tmpFile)
' w.DownloadFile(.Item(i), tmpFile)
' ProgressPerform()
' tmpCache.AddFile(tmpFile, True)
' bat.AppendLine($"type {tmpFile.File} >> {cFile.File}")
' Next
' End Using
' bat.AppendLine($"""{Settings.FfmpegFile}"" -i {cFile.File} -c copy ""{File}""")
' Dim batFile As SFile = bat.SaveAs($"{tmpCache.RootDirectory.PathWithSeparator}command.bat")
' b.Execute($"""{batFile}""")
' If Not File.Exists Then File = Nothing
' End Using
' End Using
' End If
' End With
' End If
' End If
' Catch oex As OperationCanceledException
' Throw oex
' Catch dex As ObjectDisposedException
' Throw dex
' Catch ex As Exception
' ErrorsDescriber.Execute(EDP.SendToLog + EDP.ThrowException, ex,
' $"API.JustForFans.M3U8.GetFiles({IIf(IsAudio, "audio", "video")}):{vbCr}URL: {URL}{vbCr}File: {File}")
' End Try
'End Sub
Private Async Sub Batch_OutputDataReceived(ByVal Sender As Object, ByVal e As DataReceivedEventArgs) Private Async Sub Batch_OutputDataReceived(ByVal Sender As Object, ByVal e As DataReceivedEventArgs)
Await Task.Run(Sub() If Not e.Data.IsEmptyString AndAlso e.Data.Contains("] Opening") Then ProgressPerform()) Await Task.Run(Sub() If Not e.Data.IsEmptyString AndAlso e.Data.Contains("] Opening") Then ProgressPerform())
End Sub End Sub

View File

@@ -168,8 +168,6 @@ Namespace API.JustForFans
#Region "Initializer" #Region "Initializer"
Friend Sub New() Friend Sub New()
UseInternalM3U8Function = True UseInternalM3U8Function = True
'TODELETE: UseResponserClient 20231008
'UseResponserClient = True
End Sub End Sub
#End Region #End Region
#Region "Download functions" #Region "Download functions"

View File

@@ -423,30 +423,28 @@ Namespace API.PornHub
newLastPageIDs.Add(uv.ID) newLastPageIDs.Add(uv.ID)
If Not _TempPostsList.Contains(uv.ID) Then If Not _TempPostsList.Contains(uv.ID) Then
_TempPostsList.Add(uv.ID) _TempPostsList.Add(uv.ID)
newPostsFound = True
Return False Return False
ElseIf SessionPosts.Count > 0 AndAlso SessionPosts.Contains(uv.id) Then ElseIf SessionPosts.Count > 0 AndAlso SessionPosts.Contains(uv.id) Then
prevPostsFound = True prevPostsFound = True
If pageRepeatSet Then pageRepeatSet = False : _PageVideosRepeat -= 1
Return True Return True
Else Else
'TODELETE: PornHub old validating
'If Not SessionPosts.Contains(uv.ID) Then nonLastPageDetected = True
If Not pageRepeatSet And Not newPostsFound Then pageRepeatSet = True : _PageVideosRepeat += 1 If Not pageRepeatSet And Not newPostsFound Then pageRepeatSet = True : _PageVideosRepeat += 1
'Debug.WriteLine($"[REMOVED]: {uv.Title}") 'Debug.WriteLine($"[REMOVED]: {uv.Title}")
Return True Return True
End If End If
End Function) End Function)
'Debug.WriteLineIf(l.Count > 0, l.Select(Function(ll) ll.Title).ListToString(vbNewLine)) 'Debug.WriteLineIf(l.Count > 0, l.Select(Function(ll) ll.Title).ListToString(vbNewLine))
If prevPostsFound And Not pageRepeatSet And Not newPostsFound Then pageRepeatSet = True : _PageVideosRepeat += 1
If prevPostsFound And newPostsFound And pageRepeatSet Then _PageVideosRepeat -= 1
If l.Count > 0 Then _TempMediaList.ListAddList(l.Select(Function(uv) uv.ToUserMedia(specFolder))) If l.Count > 0 Then _TempMediaList.ListAddList(l.Select(Function(uv) uv.ToUserMedia(specFolder)))
SessionPosts.ListAddList(newLastPageIDs, LNC) SessionPosts.ListAddList(newLastPageIDs, LNC)
newLastPageIDs.Clear() newLastPageIDs.Clear()
'TODELETE: PornHub old validating
'If l.Count > 0 AndAlso (l.Count = lBefore Or Not nonLastPageDetected) AndAlso
' Not (limit > 0 And _TempMediaList.Count >= limit) Then tryNextPage = True
If limit > 0 And _TempMediaList.Count >= limit Then Exit Sub If limit > 0 And _TempMediaList.Count >= limit Then Exit Sub
If (Not IsUser And prevPostsFound And Not newPostsFound And Page < 1000) Or If _PageVideosRepeat < 2 And
(Not cBefore = _TempMediaList.Count And (IsUser Or Page < 1000)) Then tryNextPage = True ((Not IsUser And prevPostsFound And Not newPostsFound And Page < 1000) Or
(Not cBefore = _TempMediaList.Count And (IsUser Or Page < 1000))) Then tryNextPage = True
l.Clear() l.Clear()
End If End If

View File

@@ -50,6 +50,12 @@ Namespace API.Reddit
Friend ReadOnly Property UseCookiesForTimelines As PropertyValue Friend ReadOnly Property UseCookiesForTimelines As PropertyValue
<PropertyOption(ControlText:=DeclaredNames.SavedPostsUserNameCaption, ControlToolTip:=DeclaredNames.SavedPostsUserNameToolTip, IsAuth:=True), PXML, PClonable(Clone:=False)> <PropertyOption(ControlText:=DeclaredNames.SavedPostsUserNameCaption, ControlToolTip:=DeclaredNames.SavedPostsUserNameToolTip, IsAuth:=True), PXML, PClonable(Clone:=False)>
Friend ReadOnly Property SavedPostsUserName As PropertyValue Friend ReadOnly Property SavedPostsUserName As PropertyValue
Friend ReadOnly Property CredentialsExists As Boolean
Get
Return {AuthUserName.Value, AuthPassword.Value, ApiClientID.Value, ApiClientSecret.Value}.All(Function(v$) Not v.IsEmptyString)
End Get
End Property
#End Region #End Region
#Region "Other" #Region "Other"
<PropertyOption(ControlText:="Use M3U8", ControlToolTip:="Use M3U8 or mp4 for Reddit videos", IsAuth:=False), PXML, PClonable> <PropertyOption(ControlText:="Use M3U8", ControlToolTip:="Use M3U8 or mp4 for Reddit videos", IsAuth:=False), PXML, PClonable>
@@ -238,8 +244,7 @@ Namespace API.Reddit
Return False Return False
End Function End Function
Private Function UpdateTokenIfRequired() As Boolean Private Function UpdateTokenIfRequired() As Boolean
If (CBool(UseTokenForTimelines.Value) Or CBool(UseTokenForSavedPosts.Value)) AndAlso If (CBool(UseTokenForTimelines.Value) Or CBool(UseTokenForSavedPosts.Value)) AndAlso CredentialsExists Then
{AuthUserName.Value, AuthPassword.Value, ApiClientID.Value, ApiClientSecret.Value}.All(Function(v$) Not v.IsEmptyString) Then
If CDate(BearerTokenDateUpdate.Value).AddMinutes(TokenUpdateInterval.Value) <= Now Then Return UpdateToken() If CDate(BearerTokenDateUpdate.Value).AddMinutes(TokenUpdateInterval.Value) <= Now Then Return UpdateToken()
End If End If
Return True Return True

View File

@@ -1037,22 +1037,29 @@ Namespace API.Reddit
Protected Overrides Function DownloadingException(ByVal ex As Exception, ByVal Message As String, Optional ByVal FromPE As Boolean = False, Protected Overrides Function DownloadingException(ByVal ex As Exception, ByVal Message As String, Optional ByVal FromPE As Boolean = False,
Optional ByVal EObj As Object = Nothing) As Integer Optional ByVal EObj As Object = Nothing) As Integer
With Responser With Responser
If .StatusCode = HttpStatusCode.NotFound Then If .StatusCode = HttpStatusCode.NotFound Then '404
UserExists = False UserExists = False
ElseIf .StatusCode = HttpStatusCode.Forbidden Then ElseIf .StatusCode = HttpStatusCode.Forbidden Then '403
UserSuspended = True UserSuspended = True
ElseIf .StatusCode = HttpStatusCode.BadGateway Or .StatusCode = HttpStatusCode.ServiceUnavailable Then ElseIf .StatusCode = HttpStatusCode.BadGateway Or .StatusCode = HttpStatusCode.ServiceUnavailable Then '502, 503
MyMainLOG = $"[{CInt(Responser.StatusCode)}] Reddit is currently unavailable ({ToString()})" MyMainLOG = $"{ToStringForLog()}: [{CInt(Responser.StatusCode)}] Reddit is currently unavailable"
Throw New Plugin.ExitException With {.Silent = True} Throw New Plugin.ExitException With {.Silent = True}
ElseIf .StatusCode = HttpStatusCode.GatewayTimeout Then ElseIf .StatusCode = HttpStatusCode.GatewayTimeout Then '504
Return 1 Return 1
ElseIf .StatusCode = HttpStatusCode.Unauthorized Then ElseIf .StatusCode = HttpStatusCode.Unauthorized Then '401
MyMainLOG = $"[{CInt(Responser.StatusCode)}] Reddit credentials expired ({ToString()})" MyMainLOG = $"{ToStringForLog()}: [{CInt(Responser.StatusCode)}] Reddit credentials expired"
MySiteSettings.SessionInterrupted = True MySiteSettings.SessionInterrupted = True
Throw New Plugin.ExitException With {.Silent = True} Throw New Plugin.ExitException With {.Silent = True}
ElseIf .StatusCode = HttpStatusCode.InternalServerError Then ElseIf .StatusCode = HttpStatusCode.InternalServerError Then '500
If Not IsNothing(EObj) AndAlso IsNumeric(EObj) AndAlso CInt(EObj) = HttpStatusCode.InternalServerError Then Return 1 If Not IsNothing(EObj) AndAlso IsNumeric(EObj) AndAlso CInt(EObj) = HttpStatusCode.InternalServerError Then Return 1
Return HttpStatusCode.InternalServerError Return HttpStatusCode.InternalServerError
ElseIf .StatusCode = 429 AndAlso
((Not IsSavedPosts And CBool(MySiteSettings.UseTokenForTimelines.Value)) Or (IsSavedPosts And MySiteSettings.UseTokenForSavedPosts.Value)) AndAlso
Not MySiteSettings.CredentialsExists Then '429
MyMainLOG = $"{ToStringForLog()}: [{CInt(Responser.StatusCode)}] You should use OAuth authorization or disable " &
IIf(IsSavedPosts, "token usage for downloading saved posts", "the use of token and cookies for downloading timelines")
MySiteSettings.SessionInterrupted = True
Throw New Plugin.ExitException With {.Silent = True}
Else Else
If Not FromPE Then LogError(ex, Message) : HasError = True If Not FromPE Then LogError(ex, Message) : HasError = True
Return 0 Return 0

View File

@@ -304,14 +304,12 @@ Namespace API.ThisVid
_TempMediaList.Add(New UserMedia(u) With {.Type = UserMedia.Types.VideoPre, .SpecialFolder = __SpecialFolder}) _TempMediaList.Add(New UserMedia(u) With {.Type = UserMedia.Types.VideoPre, .SpecialFolder = __SpecialFolder})
AddedCount += 1 AddedCount += 1
newPostsFound = True newPostsFound = True
If pageRepeatSet Then pageRepeatSet = False : _PageVideosRepeat -= 1
If limit > 0 And AddedCount >= limit Then Exit Sub If limit > 0 And AddedCount >= limit Then Exit Sub
ElseIf SessionPosts.Count > 0 AndAlso SessionPosts.Contains(u) Then ElseIf SessionPosts.Count > 0 AndAlso SessionPosts.Contains(u) Then
prevPostsFound = True prevPostsFound = True
If pageRepeatSet Then pageRepeatSet = False : _PageVideosRepeat -= 1
Continue For Continue For
Else Else
If _PageVideosRepeat > 2 Then If _PageVideosRepeat >= 2 Then
Exit Sub Exit Sub
ElseIf Not pageRepeatSet And Not newPostsFound Then ElseIf Not pageRepeatSet And Not newPostsFound Then
pageRepeatSet = True pageRepeatSet = True
@@ -320,12 +318,15 @@ Namespace API.ThisVid
End If End If
End If End If
Next Next
If prevPostsFound And Not pageRepeatSet And Not newPostsFound Then pageRepeatSet = True : _PageVideosRepeat += 1
If prevPostsFound And newPostsFound And pageRepeatSet Then _PageVideosRepeat -= 1
SessionPosts.ListAddList(l, LNC) SessionPosts.ListAddList(l, LNC)
l.Clear() l.Clear()
End If End If
End If End If
If (Not IsUser And prevPostsFound And Not newPostsFound And Page < 1000) Or If _PageVideosRepeat < 2 And
(Not cBefore = _TempMediaList.Count And (IsUser Or Page < 1000)) Then DownloadData(Page + 1, Model, Token) ((Not IsUser And prevPostsFound And Not newPostsFound And Page < 1000) Or
(Not cBefore = _TempMediaList.Count And (IsUser Or Page < 1000))) Then DownloadData(Page + 1, Model, Token)
Catch aex As ArgumentNullException When aex.HelpLink = 1 Catch aex As ArgumentNullException When aex.HelpLink = 1
Catch ex As Exception Catch ex As Exception
ProcessException(ex, Token, $"videos downloading error [{URL}]") ProcessException(ex, Token, $"videos downloading error [{URL}]")

View File

@@ -14,20 +14,24 @@ Namespace API.TikTok
<Manifest("AndyProgram_TikTok"), SpecialForm(False), SeparatedTasks(1)> <Manifest("AndyProgram_TikTok"), SpecialForm(False), SeparatedTasks(1)>
Friend Class SiteSettings : Inherits SiteSettingsBase Friend Class SiteSettings : Inherits SiteSettingsBase
<PropertyOption(ControlText:="Remove tags from title"), PXML, PClonable> <PropertyOption(ControlText:="Remove tags from title"), PXML, PClonable>
Friend Property RemoveTagsFromTitle As PropertyValue Friend ReadOnly Property RemoveTagsFromTitle As PropertyValue
<PropertyOption(ControlText:="Use native title", ControlToolTip:="Use a user-created video title for the filename instead of the video ID."), PXML, PClonable> <PropertyOption(ControlText:="Use native title", ControlToolTip:="Use a user-created video title for the filename instead of the video ID."), PXML, PClonable>
Friend Property TitleUseNative As PropertyValue Friend ReadOnly Property TitleUseNative As PropertyValue
<PropertyOption(ControlText:="Use native title in standalone downloader", <PropertyOption(ControlText:="Use native title in standalone downloader",
ControlToolTip:="Use a user-created video title for the filename instead of the video ID."), PXML, PClonable> ControlToolTip:="Use a user-created video title for the filename instead of the video ID."), PXML, PClonable>
Friend Property TitleUseNativeSTD As PropertyValue Friend ReadOnly Property TitleUseNativeSTD As PropertyValue
<PropertyOption(ControlText:="Add video ID to video title"), PXML, PClonable> <PropertyOption(ControlText:="Add video ID to video title"), PXML, PClonable>
Friend Property TitleAddVideoID As PropertyValue Friend ReadOnly Property TitleAddVideoID As PropertyValue
<PropertyOption(ControlText:="Use video date as file date",
ControlToolTip:="Set the file date to the date the video was added (website) (if available)."), PXML, PClonable>
Friend ReadOnly Property UseParsedVideoDate As PropertyValue
Friend Sub New(ByVal AccName As String, ByVal Temp As Boolean) Friend Sub New(ByVal AccName As String, ByVal Temp As Boolean)
MyBase.New("TikTok", "www.tiktok.com", AccName, Temp, My.Resources.SiteResources.TikTokIcon_32, My.Resources.SiteResources.TikTokPic_192) MyBase.New("TikTok", "www.tiktok.com", AccName, Temp, My.Resources.SiteResources.TikTokIcon_32, My.Resources.SiteResources.TikTokPic_192)
RemoveTagsFromTitle = New PropertyValue(False) RemoveTagsFromTitle = New PropertyValue(False)
TitleUseNative = New PropertyValue(True) TitleUseNative = New PropertyValue(True)
TitleUseNativeSTD = New PropertyValue(False) TitleUseNativeSTD = New PropertyValue(False)
TitleAddVideoID = New PropertyValue(True) TitleAddVideoID = New PropertyValue(True)
UseParsedVideoDate = New PropertyValue(True)
UseNetscapeCookies = True UseNetscapeCookies = True
UrlPatternUser = "https://www.tiktok.com/@{0}/" UrlPatternUser = "https://www.tiktok.com/@{0}/"
UserRegex = RParams.DMS("[htps:/]{7,8}.*?tiktok.com/@([^/]+)", 1) UserRegex = RParams.DMS("[htps:/]{7,8}.*?tiktok.com/@([^/]+)", 1)
@@ -45,5 +49,8 @@ Namespace API.TikTok
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
End Sub End Sub
Friend Overrides Function GetUserUrl(ByVal User As IPluginContentProvider) As String
Return String.Format(UrlPatternUser, DirectCast(User, UserData).TrueName)
End Function
End Class End Class
End Namespace End Namespace

View File

@@ -48,6 +48,15 @@ Namespace API.TikTok
Friend Property TitleUseNative As Boolean = True Friend Property TitleUseNative As Boolean = True
Friend Property TitleAddVideoID As Boolean = True Friend Property TitleAddVideoID As Boolean = True
Private Property LastDownloadDate As Date? = Nothing Private Property LastDownloadDate As Date? = Nothing
Private _TrueName As String = String.Empty
Friend Property TrueName As String
Get
Return _TrueName.IfNullOrEmpty(Name)
End Get
Set(ByVal NewName As String)
_TrueName = NewName
End Set
End Property
#End Region #End Region
#Region "Exchange" #Region "Exchange"
Friend Overrides Function ExchangeOptionsGet() As Object Friend Overrides Function ExchangeOptionsGet() As Object
@@ -72,11 +81,13 @@ Namespace API.TikTok
TitleAddVideoID = .Value(Name_TitleAddVideoID).FromXML(Of Boolean)(True) TitleAddVideoID = .Value(Name_TitleAddVideoID).FromXML(Of Boolean)(True)
LastDownloadDate = AConvert(Of Date)(.Value(Name_LastDownloadDate), ADateTime.Formats.BaseDateTime, Nothing) LastDownloadDate = AConvert(Of Date)(.Value(Name_LastDownloadDate), ADateTime.Formats.BaseDateTime, Nothing)
If Not LastDownloadDate.HasValue Then LastDownloadDate = LastUpdated If Not LastDownloadDate.HasValue Then LastDownloadDate = LastUpdated
_TrueName = .Value(Name_TrueName)
Else Else
.Add(Name_RemoveTagsFromTitle, RemoveTagsFromTitle.BoolToInteger) .Add(Name_RemoveTagsFromTitle, RemoveTagsFromTitle.BoolToInteger)
.Add(Name_TitleUseNative, TitleUseNative.BoolToInteger) .Add(Name_TitleUseNative, TitleUseNative.BoolToInteger)
.Add(Name_TitleAddVideoID, TitleAddVideoID.BoolToInteger) .Add(Name_TitleAddVideoID, TitleAddVideoID.BoolToInteger)
.Add(Name_LastDownloadDate, AConvert(Of String)(LastDownloadDate, AModes.XML, ADateTime.Formats.BaseDateTime, String.Empty)) .Add(Name_LastDownloadDate, AConvert(Of String)(LastDownloadDate, AModes.XML, ADateTime.Formats.BaseDateTime, String.Empty))
.Add(Name_TrueName, _TrueName)
End If End If
End With End With
End Sub End Sub
@@ -89,14 +100,15 @@ Namespace API.TikTok
#End Region #End Region
#Region "Download functions" #Region "Download functions"
Protected Overrides Sub DownloadDataF(ByVal Token As CancellationToken) Protected Overrides Sub DownloadDataF(ByVal Token As CancellationToken)
Dim URL$ = $"https://www.tiktok.com/@{Name}" Dim URL$ = $"https://www.tiktok.com/@{TrueName}"
Using cache As CacheKeeper = CreateCache() Using cache As CacheKeeper = CreateCache()
Try Try
Dim postID$, title$, postUrl$ Dim postID$, title$, postUrl$, newName$
Dim postDate As Date? Dim postDate As Date?
Dim dateAfterC As Date? = Nothing Dim dateAfterC As Date? = Nothing
Dim dateBefore As Date? = DownloadDateTo Dim dateBefore As Date? = DownloadDateTo
Dim dateAfter As Date? = DownloadDateFrom Dim dateAfter As Date? = DownloadDateFrom
Dim baseDataObtained As Boolean = False
If _ContentList.Count > 0 Then If _ContentList.Count > 0 Then
With (From d In _ContentList Where d.Post.Date.HasValue Select d.Post.Date.Value) With (From d In _ContentList Where d.Post.Date.HasValue Select d.Post.Date.Value)
@@ -138,6 +150,20 @@ Namespace API.TikTok
j = JsonDocument.Parse(file.GetText, EDP.ReturnValue) j = JsonDocument.Parse(file.GetText, EDP.ReturnValue)
If j.ListExists Then If j.ListExists Then
If j.Value("_type").StringToLower = "video" Then If j.Value("_type").StringToLower = "video" Then
If Not baseDataObtained Then
baseDataObtained = True
If ID.IsEmptyString Then
ID = j.Value("uploader_id")
If Not ID.IsEmptyString Then _ForceSaveUserInfo = True
End If
newName = j.Value("uploader")
If Not newName.IsEmptyString Then
If Not _TrueName = newName Then _ForceSaveUserInfo = True
_TrueName = newName
End If
newName = j.Value("creator")
If Not newName.IsEmptyString Then UserSiteName = newName
End If
postID = j.Value("id") postID = j.Value("id")
If Not _TempPostsList.Contains(postID) Then If Not _TempPostsList.Contains(postID) Then
_TempPostsList.Add(postID) _TempPostsList.Add(postID)
@@ -211,6 +237,7 @@ Namespace API.TikTok
End If End If
If DateBefore.HasValue Then command &= $"--datebefore {DateBefore.Value.AddDays(1).ToStringDate(SimpleDateConverter)} " If DateBefore.HasValue Then command &= $"--datebefore {DateBefore.Value.AddDays(1).ToStringDate(SimpleDateConverter)} "
If DateAfter.HasValue Then command &= $"--dateafter {DateAfter.Value.AddDays(-1).ToStringDate(SimpleDateConverter)} " If DateAfter.HasValue Then command &= $"--dateafter {DateAfter.Value.AddDays(-1).ToStringDate(SimpleDateConverter)} "
If Not CBool(MySettings.UseParsedVideoDate.Value) Then command &= "--no-mtime "
If MySettings.CookiesNetscapeFile.Exists Then command &= $"--no-cookies-from-browser --cookies ""{MySettings.CookiesNetscapeFile}"" " If MySettings.CookiesNetscapeFile.Exists Then command &= $"--no-cookies-from-browser --cookies ""{MySettings.CookiesNetscapeFile}"" "
command &= $"{URL} " command &= $"{URL} "
If SupportOutput Then If SupportOutput Then

View File

@@ -12,6 +12,7 @@ Imports SCrawler.API.YouTube.Objects
Imports PersonalUtilities.Functions.XML Imports PersonalUtilities.Functions.XML
Imports PersonalUtilities.Functions.RegularExpressions Imports PersonalUtilities.Functions.RegularExpressions
Imports PersonalUtilities.Tools Imports PersonalUtilities.Tools
Imports PersonalUtilities.Tools.Web.Documents
Imports PersonalUtilities.Tools.Web.Documents.JSON Imports PersonalUtilities.Tools.Web.Documents.JSON
Imports UStates = SCrawler.API.Base.UserMedia.States Imports UStates = SCrawler.API.Base.UserMedia.States
Imports UTypes = SCrawler.API.Base.UserMedia.Types Imports UTypes = SCrawler.API.Base.UserMedia.Types
@@ -154,6 +155,7 @@ Namespace API.Twitter
Private Sub DownloadData_Timeline(ByVal Token As CancellationToken) Private Sub DownloadData_Timeline(ByVal Token As CancellationToken)
Dim URL$ = String.Empty Dim URL$ = String.Empty
Dim tCache As CacheKeeper = Nothing Dim tCache As CacheKeeper = Nothing
Dim jsonArgs As New WebDocumentEventArgs With {.DeclaredError = EDP.ThrowException}
Try Try
Const entry$ = "entry" Const entry$ = "entry"
Dim PostID$ = String.Empty Dim PostID$ = String.Empty
@@ -231,7 +233,8 @@ Namespace API.Twitter
For i = 0 To timelineFiles.Count - 1 : timelineFiles(i) = RenameGdlFile(timelineFiles(i), i) : Next For i = 0 To timelineFiles.Count - 1 : timelineFiles(i) = RenameGdlFile(timelineFiles(i), i) : Next
'parse files 'parse files
For i = 0 To timelineFiles.Count - 1 For i = 0 To timelineFiles.Count - 1
j = JsonDocument.Parse(timelineFiles(i).GetText) j = JsonDocument.Parse(timelineFiles(i).GetText, jsonArgs)
jsonArgs.Reset()
If Not j Is Nothing Then If Not j Is Nothing Then
If i = 0 Then If i = 0 Then
If Not userInfoParsed Then If Not userInfoParsed Then
@@ -339,12 +342,15 @@ Namespace API.Twitter
End If End If
DownloadModelForceApply = False DownloadModelForceApply = False
FirstDownloadComplete = True FirstDownloadComplete = True
Catch jsonNull_ex As ArgumentNullException When jsonArgs.State = WebDocumentEventArgs.States.Error
Throw New Plugin.ExitException($"{ToStringForLog()}: No deserialized data found")
Catch limit_ex As TwitterLimitException Catch limit_ex As TwitterLimitException
Throw limit_ex Throw limit_ex
Catch ex As Exception Catch ex As Exception
ProcessException(ex, Token, $"data downloading error [{URL}]") ProcessException(ex, Token, $"data downloading error [{URL}]")
Finally Finally
If Not tCache Is Nothing Then tCache.Dispose() If Not tCache Is Nothing Then tCache.Dispose()
jsonArgs.DisposeIfReady
If _TempPostsList.Count > 0 Then _TempPostsList.Sort() If _TempPostsList.Count > 0 Then _TempPostsList.Sort()
End Try End Try
End Sub End Sub

View File

@@ -375,9 +375,9 @@ Namespace API.XVIDEOS
_TempMediaList.ListAddList(data.Select(Function(d) d.ToUserMedia()), LNC) _TempMediaList.ListAddList(data.Select(Function(d) d.ToUserMedia()), LNC)
newPostsFound = cBefore <> _TempMediaList.Count newPostsFound = cBefore <> _TempMediaList.Count
ElseIf sessionPosts.Count > 0 AndAlso sessionPosts.ListContains(pids) Then ElseIf sessionPosts.Count > 0 AndAlso sessionPosts.ListContains(pids) Then
If pageRepeatSet Then pageRepeatSet = False : pageVideosRepeat -= 1 prevPostsFound = True
Else Else
If pageVideosRepeat > 2 Then If pageVideosRepeat >= 2 Then
Exit Do Exit Do
ElseIf Not pageRepeatSet And Not newPostsFound Then ElseIf Not pageRepeatSet And Not newPostsFound Then
pageRepeatSet = True pageRepeatSet = True
@@ -388,8 +388,10 @@ Namespace API.XVIDEOS
End If End If
End If End If
If limit > 0 And _TempMediaList.Count >= limit Then Exit Do If limit > 0 And _TempMediaList.Count >= limit Then Exit Do
If prevPostsFound And Not pageRepeatSet And Not newPostsFound Then pageRepeatSet = True : pageVideosRepeat += 1
If prevPostsFound And newPostsFound And pageRepeatSet Then pageVideosRepeat -= 1
If IsSearch Then If IsSearch Then
__continue = NextPage < 1000 And (newPostsFound Or (prevPostsFound And Not newPostsFound)) __continue = pageVideosRepeat < 2 And NextPage < 1000 And (newPostsFound Or (prevPostsFound And Not newPostsFound))
ElseIf __continue Then ElseIf __continue Then
__continue = Not cBefore = _TempMediaList.Count __continue = Not cBefore = _TempMediaList.Count
End If End If

View File

@@ -308,7 +308,6 @@ Namespace API.Xhamster
_TempMediaList.ListAddValue(m, LNC) _TempMediaList.ListAddValue(m, LNC)
SearchPostsCount += 1 SearchPostsCount += 1
newPostsFound = True newPostsFound = True
If pageRepeatSet Then pageRepeatSet = False : _PageVideosRepeat -= 1
If checkLimit.Invoke Then Exit Sub If checkLimit.Invoke Then Exit Sub
ElseIf Not IsVideo Then ElseIf Not IsVideo Then
If DirectCast(m.Object, ExchObj).IsPhoto Then If DirectCast(m.Object, ExchObj).IsPhoto Then
@@ -322,9 +321,8 @@ Namespace API.Xhamster
ElseIf IsVideo And _TempPostsList.Contains(m.Post.ID) Then ElseIf IsVideo And _TempPostsList.Contains(m.Post.ID) Then
If SessionPosts.Count > 0 AndAlso SessionPosts.Contains(m.Post.ID) Then If SessionPosts.Count > 0 AndAlso SessionPosts.Contains(m.Post.ID) Then
prevPostsFound = True prevPostsFound = True
If pageRepeatSet Then pageRepeatSet = False : _PageVideosRepeat -= 1
Continue For Continue For
ElseIf _PageVideosRepeat > 2 Then ElseIf _PageVideosRepeat >= 2 Then
Exit Sub Exit Sub
ElseIf Not pageRepeatSet And Not newPostsFound Then ElseIf Not pageRepeatSet And Not newPostsFound Then
pageRepeatSet = True pageRepeatSet = True
@@ -335,6 +333,8 @@ Namespace API.Xhamster
End If End If
End If End If
Next Next
If prevPostsFound And Not pageRepeatSet And Not newPostsFound Then pageRepeatSet = True : _PageVideosRepeat += 1
If prevPostsFound And newPostsFound And pageRepeatSet Then _PageVideosRepeat -= 1
SessionPosts.ListAddList(pids, LNC) SessionPosts.ListAddList(pids, LNC)
pids.Clear() pids.Clear()
Exit For Exit For
@@ -347,11 +347,11 @@ Namespace API.Xhamster
containerNodes.Clear() containerNodes.Clear()
If ( If _PageVideosRepeat < 2 And ((
(MaxPage = -1 Or Page < MaxPage) And (MaxPage = -1 Or Page < MaxPage) And
((Not _TempMediaList.Count = cBefore Or skipped) And (IsUser Or Page < 1000)) ((Not _TempMediaList.Count = cBefore Or skipped) And (IsUser Or Page < 1000))
) Or ) Or
(IsChannel Or (Not IsUser And Page < 1000 And prevPostsFound And Not newPostsFound)) Then DownloadData(Page + 1, IsVideo, Token) (IsChannel Or (Not IsUser And Page < 1000 And prevPostsFound And Not newPostsFound))) Then DownloadData(Page + 1, IsVideo, Token)
Catch ex As Exception Catch ex As Exception
ProcessException(ex, Token, $"data downloading error [{URL}]") ProcessException(ex, Token, $"data downloading error [{URL}]")
End Try End Try

View File

@@ -32,6 +32,7 @@ Namespace API.YouTube
DownloadPlaylists = New PropertyValue(False) DownloadPlaylists = New PropertyValue(False)
UseCookies = New PropertyValue(False) UseCookies = New PropertyValue(False)
_SubscriptionsAllowed = True _SubscriptionsAllowed = True
UseNetscapeCookies = True
End Sub End Sub
#End Region #End Region
#Region "GetInstance" #Region "GetInstance"

View File

@@ -184,6 +184,7 @@ Namespace DownloadObjects
#Region "XML Names" #Region "XML Names"
Private Const Name_Mode As String = "Mode" Private Const Name_Mode As String = "Mode"
Private Const Name_Groups As String = "Groups" Private Const Name_Groups As String = "Groups"
Private Const Name_IsManual As String = "IsManual"
Private Const Name_Timer As String = "Timer" Private Const Name_Timer As String = "Timer"
Private Const Name_StartupDelay As String = "StartupDelay" Private Const Name_StartupDelay As String = "StartupDelay"
Private Const Name_LastDownloadDate As String = "LastDownloadDate" Private Const Name_LastDownloadDate As String = "LastDownloadDate"
@@ -205,6 +206,7 @@ Namespace DownloadObjects
End Set End Set
End Property End Property
Friend ReadOnly Property Groups As List(Of String) Friend ReadOnly Property Groups As List(Of String)
Friend Property IsManual As Boolean = False
Friend Property Timer As Integer = DefaultTimer Friend Property Timer As Integer = DefaultTimer
Friend Property StartupDelay As Integer = 1 Friend Property StartupDelay As Integer = 1
Friend Property ShowNotifications As Boolean = True Friend Property ShowNotifications As Boolean = True
@@ -281,7 +283,11 @@ Namespace DownloadObjects
Return OutStr Return OutStr
End Function End Function
Public Overrides Function ToString() As String Public Overrides Function ToString() As String
If IsManual Then
Return $"{Name} (manual): last download date: {GetLastDateString()}"
Else
Return $"{Name} ({GetWorkingState()}): last download date: {GetLastDateString()}; next run: {GetNextDateString()}" Return $"{Name} ({GetWorkingState()}): last download date: {GetLastDateString()}; next run: {GetNextDateString()}"
End If
End Function End Function
#End Region #End Region
#End Region #End Region
@@ -307,6 +313,7 @@ Namespace DownloadObjects
If Name.IsEmptyString Then Name = "Default" If Name.IsEmptyString Then Name = "Default"
Groups.ListAddList(x.Value(Name_Groups).StringToList(Of String)("|"), LAP.NotContainsOnly) Groups.ListAddList(x.Value(Name_Groups).StringToList(Of String)("|"), LAP.NotContainsOnly)
IsManual = x.Value(Name_IsManual).FromXML(Of Boolean)(False)
Timer = x.Value(Name_Timer).FromXML(Of Integer)(DefaultTimer) Timer = x.Value(Name_Timer).FromXML(Of Integer)(DefaultTimer)
If Timer <= 0 Then Timer = DefaultTimer If Timer <= 0 Then Timer = DefaultTimer
StartupDelay = x.Value(Name_StartupDelay).FromXML(Of Integer)(0) StartupDelay = x.Value(Name_StartupDelay).FromXML(Of Integer)(0)
@@ -364,6 +371,7 @@ Namespace DownloadObjects
Return Export(New EContainer(Scheduler.Name_Plan, String.Empty) From { Return Export(New EContainer(Scheduler.Name_Plan, String.Empty) From {
New EContainer(Name_Mode, CInt(Mode)), New EContainer(Name_Mode, CInt(Mode)),
New EContainer(Name_Groups, Groups.ListToString("|")), New EContainer(Name_Groups, Groups.ListToString("|")),
New EContainer(Name_IsManual, IsManual.BoolToInteger),
New EContainer(Name_Timer, Timer), New EContainer(Name_Timer, Timer),
New EContainer(Name_StartupDelay, StartupDelay), New EContainer(Name_StartupDelay, StartupDelay),
New EContainer(Name_ShowNotifications, ShowNotifications.BoolToInteger), New EContainer(Name_ShowNotifications, ShowNotifications.BoolToInteger),
@@ -383,7 +391,8 @@ Namespace DownloadObjects
End Get End Get
End Property End Property
Private _StartTime As Date = Now Private _StartTime As Date = Now
Friend Sub Start(ByVal Init As Boolean) Friend Sub Start(ByVal Init As Boolean, Optional ByVal Force As Boolean = False)
If Not IsManual Or Force Then
If Init Then _StartTime = Now If Init Then _StartTime = Now
_IsNewPlan = False _IsNewPlan = False
If Not Working And Not Mode = Modes.None Then If Not Working And Not Mode = Modes.None Then
@@ -391,6 +400,7 @@ Namespace DownloadObjects
AThread.SetApartmentState(ApartmentState.MTA) AThread.SetApartmentState(ApartmentState.MTA)
AThread.Start() AThread.Start()
End If End If
End If
End Sub End Sub
Private _StopRequested As Boolean = False Private _StopRequested As Boolean = False
Private _Pause As PauseModes = PauseModes.Disabled Private _Pause As PauseModes = PauseModes.Disabled
@@ -456,6 +466,7 @@ Namespace DownloadObjects
End Sub End Sub
Friend Sub ForceStart() Friend Sub ForceStart()
_ForceStartRequested = True _ForceStartRequested = True
If IsManual Then Start(False, True)
End Sub End Sub
Private _ForceStartRequested As Boolean = False Private _ForceStartRequested As Boolean = False
Private _SpecialDelayUse As Boolean = False Private _SpecialDelayUse As Boolean = False
@@ -464,7 +475,8 @@ Namespace DownloadObjects
Try Try
Dim _StartDownload As Boolean Dim _StartDownload As Boolean
While (Not _StopRequested Or Downloader.Working) And Not Mode = Modes.None While (Not _StopRequested Or Downloader.Working) And Not Mode = Modes.None
If ((NextExecutionDate < Now And Not IsPaused) Or _ForceStartRequested) And Not _StopRequested And Not Mode = Modes.None Then If ((IsManual And _ForceStartRequested) Or (NextExecutionDate < Now And Not IsPaused) Or _ForceStartRequested) And
Not _StopRequested And Not Mode = Modes.None Then
If Downloader.Working Then If Downloader.Working Then
_SpecialDelayUse = True _SpecialDelayUse = True
Else Else
@@ -478,7 +490,10 @@ Namespace DownloadObjects
Else Else
_StartDownload = NextExecutionDate.AddMilliseconds(1000 * (Index + 1)).Ticks <= Now.Ticks _StartDownload = NextExecutionDate.AddMilliseconds(1000 * (Index + 1)).Ticks <= Now.Ticks
End If End If
If _StartDownload Then Download() If _StartDownload Then
Download()
If IsManual Then Exit While
End If
End If End If
End If End If
End If End If

View File

@@ -25,12 +25,12 @@ Namespace DownloadObjects
Me.components = New System.ComponentModel.Container() Me.components = New System.ComponentModel.Container()
Dim CONTAINER_MAIN As System.Windows.Forms.ToolStripContainer Dim CONTAINER_MAIN As System.Windows.Forms.ToolStripContainer
Dim TP_MODE As System.Windows.Forms.TableLayoutPanel Dim TP_MODE As System.Windows.Forms.TableLayoutPanel
Dim ActionButton1 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton() Dim ActionButton5 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(AutoDownloaderEditorForm)) Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(AutoDownloaderEditorForm))
Dim ActionButton2 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton() Dim ActionButton6 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
Dim TP_NOTIFY As System.Windows.Forms.TableLayoutPanel Dim TP_NOTIFY As System.Windows.Forms.TableLayoutPanel
Dim ActionButton3 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton() Dim ActionButton7 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
Dim ActionButton4 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton() Dim ActionButton8 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
Dim TT_MAIN As System.Windows.Forms.ToolTip Dim TT_MAIN As System.Windows.Forms.ToolTip
Me.DEF_GROUP = New SCrawler.DownloadObjects.Groups.GroupDefaults() Me.DEF_GROUP = New SCrawler.DownloadObjects.Groups.GroupDefaults()
Me.OPT_ALL = New System.Windows.Forms.RadioButton() Me.OPT_ALL = New System.Windows.Forms.RadioButton()
@@ -46,6 +46,7 @@ Namespace DownloadObjects
Me.TXT_TIMER = New PersonalUtilities.Forms.Controls.TextBoxExtended() Me.TXT_TIMER = New PersonalUtilities.Forms.Controls.TextBoxExtended()
Me.NUM_DELAY = New PersonalUtilities.Forms.Controls.TextBoxExtended() Me.NUM_DELAY = New PersonalUtilities.Forms.Controls.TextBoxExtended()
Me.LBL_LAST_TIME_UP = New System.Windows.Forms.Label() Me.LBL_LAST_TIME_UP = New System.Windows.Forms.Label()
Me.CH_MANUAL = New System.Windows.Forms.CheckBox()
CONTAINER_MAIN = New System.Windows.Forms.ToolStripContainer() CONTAINER_MAIN = New System.Windows.Forms.ToolStripContainer()
TP_MODE = New System.Windows.Forms.TableLayoutPanel() TP_MODE = New System.Windows.Forms.TableLayoutPanel()
TP_NOTIFY = New System.Windows.Forms.TableLayoutPanel() TP_NOTIFY = New System.Windows.Forms.TableLayoutPanel()
@@ -72,7 +73,7 @@ Namespace DownloadObjects
CONTAINER_MAIN.Location = New System.Drawing.Point(0, 0) CONTAINER_MAIN.Location = New System.Drawing.Point(0, 0)
CONTAINER_MAIN.Name = "CONTAINER_MAIN" CONTAINER_MAIN.Name = "CONTAINER_MAIN"
CONTAINER_MAIN.RightToolStripPanelVisible = False CONTAINER_MAIN.RightToolStripPanelVisible = False
CONTAINER_MAIN.Size = New System.Drawing.Size(476, 388) CONTAINER_MAIN.Size = New System.Drawing.Size(476, 413)
CONTAINER_MAIN.TabIndex = 0 CONTAINER_MAIN.TabIndex = 0
CONTAINER_MAIN.TopToolStripPanelVisible = False CONTAINER_MAIN.TopToolStripPanelVisible = False
' '
@@ -84,13 +85,14 @@ Namespace DownloadObjects
Me.DEF_GROUP.Controls.Add(TP_MODE, 0, 0) Me.DEF_GROUP.Controls.Add(TP_MODE, 0, 0)
Me.DEF_GROUP.Controls.Add(Me.TXT_GROUPS, 0, 8) Me.DEF_GROUP.Controls.Add(Me.TXT_GROUPS, 0, 8)
Me.DEF_GROUP.Controls.Add(TP_NOTIFY, 0, 9) Me.DEF_GROUP.Controls.Add(TP_NOTIFY, 0, 9)
Me.DEF_GROUP.Controls.Add(Me.TXT_TIMER, 0, 10) Me.DEF_GROUP.Controls.Add(Me.TXT_TIMER, 0, 11)
Me.DEF_GROUP.Controls.Add(Me.NUM_DELAY, 0, 11) Me.DEF_GROUP.Controls.Add(Me.NUM_DELAY, 0, 12)
Me.DEF_GROUP.Controls.Add(Me.LBL_LAST_TIME_UP, 0, 12) Me.DEF_GROUP.Controls.Add(Me.LBL_LAST_TIME_UP, 0, 13)
Me.DEF_GROUP.Controls.Add(Me.CH_MANUAL, 0, 10)
Me.DEF_GROUP.Dock = System.Windows.Forms.DockStyle.Fill Me.DEF_GROUP.Dock = System.Windows.Forms.DockStyle.Fill
Me.DEF_GROUP.Location = New System.Drawing.Point(0, 0) Me.DEF_GROUP.Location = New System.Drawing.Point(0, 0)
Me.DEF_GROUP.Name = "DEF_GROUP" Me.DEF_GROUP.Name = "DEF_GROUP"
Me.DEF_GROUP.RowCount = 14 Me.DEF_GROUP.RowCount = 15
Me.DEF_GROUP.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!)) Me.DEF_GROUP.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
Me.DEF_GROUP.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!)) Me.DEF_GROUP.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
Me.DEF_GROUP.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!)) Me.DEF_GROUP.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
@@ -101,11 +103,11 @@ Namespace DownloadObjects
Me.DEF_GROUP.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!)) Me.DEF_GROUP.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
Me.DEF_GROUP.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!)) Me.DEF_GROUP.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
Me.DEF_GROUP.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!)) Me.DEF_GROUP.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
Me.DEF_GROUP.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
Me.DEF_GROUP.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!)) Me.DEF_GROUP.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
Me.DEF_GROUP.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!)) Me.DEF_GROUP.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
Me.DEF_GROUP.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!)) Me.DEF_GROUP.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
Me.DEF_GROUP.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!)) Me.DEF_GROUP.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
Me.DEF_GROUP.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.DEF_GROUP.Size = New System.Drawing.Size(476, 388) Me.DEF_GROUP.Size = New System.Drawing.Size(476, 388)
Me.DEF_GROUP.TabIndex = 0 Me.DEF_GROUP.TabIndex = 0
' '
@@ -199,16 +201,15 @@ Namespace DownloadObjects
' '
'TXT_GROUPS 'TXT_GROUPS
' '
ActionButton1.BackgroundImage = CType(resources.GetObject("ActionButton1.BackgroundImage"), System.Drawing.Image) ActionButton5.BackgroundImage = CType(resources.GetObject("ActionButton5.BackgroundImage"), System.Drawing.Image)
ActionButton1.Name = "Edit" ActionButton5.Name = "Edit"
ActionButton2.BackgroundImage = CType(resources.GetObject("ActionButton2.BackgroundImage"), System.Drawing.Image) ActionButton6.BackgroundImage = CType(resources.GetObject("ActionButton6.BackgroundImage"), System.Drawing.Image)
ActionButton2.Name = "Clear" ActionButton6.Name = "Clear"
Me.TXT_GROUPS.Buttons.Add(ActionButton1) Me.TXT_GROUPS.Buttons.Add(ActionButton5)
Me.TXT_GROUPS.Buttons.Add(ActionButton2) Me.TXT_GROUPS.Buttons.Add(ActionButton6)
Me.TXT_GROUPS.CaptionText = "Groups" Me.TXT_GROUPS.CaptionText = "Groups"
Me.TXT_GROUPS.CaptionWidth = 50.0R Me.TXT_GROUPS.CaptionWidth = 50.0R
Me.TXT_GROUPS.Dock = System.Windows.Forms.DockStyle.Fill Me.TXT_GROUPS.Dock = System.Windows.Forms.DockStyle.Fill
Me.TXT_GROUPS.Lines = New String(-1) {}
Me.TXT_GROUPS.Location = New System.Drawing.Point(4, 224) Me.TXT_GROUPS.Location = New System.Drawing.Point(4, 224)
Me.TXT_GROUPS.Name = "TXT_GROUPS" Me.TXT_GROUPS.Name = "TXT_GROUPS"
Me.TXT_GROUPS.Size = New System.Drawing.Size(468, 22) Me.TXT_GROUPS.Size = New System.Drawing.Size(468, 22)
@@ -285,25 +286,24 @@ Namespace DownloadObjects
' '
'TXT_TIMER 'TXT_TIMER
' '
ActionButton3.BackgroundImage = CType(resources.GetObject("ActionButton3.BackgroundImage"), System.Drawing.Image) ActionButton7.BackgroundImage = CType(resources.GetObject("ActionButton7.BackgroundImage"), System.Drawing.Image)
ActionButton3.Name = "Refresh" ActionButton7.Name = "Refresh"
Me.TXT_TIMER.Buttons.Add(ActionButton3) Me.TXT_TIMER.Buttons.Add(ActionButton7)
Me.TXT_TIMER.CaptionText = "Timer" Me.TXT_TIMER.CaptionText = "Timer"
Me.TXT_TIMER.CaptionToolTipEnabled = True Me.TXT_TIMER.CaptionToolTipEnabled = True
Me.TXT_TIMER.CaptionToolTipText = "Timer (in minutes)" Me.TXT_TIMER.CaptionToolTipText = "Timer (in minutes)"
Me.TXT_TIMER.CaptionWidth = 50.0R Me.TXT_TIMER.CaptionWidth = 50.0R
Me.TXT_TIMER.Dock = System.Windows.Forms.DockStyle.Fill Me.TXT_TIMER.Dock = System.Windows.Forms.DockStyle.Fill
Me.TXT_TIMER.Lines = New String(-1) {} Me.TXT_TIMER.Location = New System.Drawing.Point(4, 308)
Me.TXT_TIMER.Location = New System.Drawing.Point(4, 282)
Me.TXT_TIMER.Name = "TXT_TIMER" Me.TXT_TIMER.Name = "TXT_TIMER"
Me.TXT_TIMER.Size = New System.Drawing.Size(468, 22) Me.TXT_TIMER.Size = New System.Drawing.Size(468, 22)
Me.TXT_TIMER.TabIndex = 3 Me.TXT_TIMER.TabIndex = 4
' '
'NUM_DELAY 'NUM_DELAY
' '
ActionButton4.BackgroundImage = CType(resources.GetObject("ActionButton4.BackgroundImage"), System.Drawing.Image) ActionButton8.BackgroundImage = CType(resources.GetObject("ActionButton8.BackgroundImage"), System.Drawing.Image)
ActionButton4.Name = "Refresh" ActionButton8.Name = "Refresh"
Me.NUM_DELAY.Buttons.Add(ActionButton4) Me.NUM_DELAY.Buttons.Add(ActionButton8)
Me.NUM_DELAY.CaptionText = "Delay" Me.NUM_DELAY.CaptionText = "Delay"
Me.NUM_DELAY.CaptionToolTipEnabled = True Me.NUM_DELAY.CaptionToolTipEnabled = True
Me.NUM_DELAY.CaptionToolTipText = "Startup delay" Me.NUM_DELAY.CaptionToolTipText = "Startup delay"
@@ -311,13 +311,12 @@ Namespace DownloadObjects
Me.NUM_DELAY.ClearTextByButtonClear = False Me.NUM_DELAY.ClearTextByButtonClear = False
Me.NUM_DELAY.ControlMode = PersonalUtilities.Forms.Controls.TextBoxExtended.ControlModes.NumericUpDown Me.NUM_DELAY.ControlMode = PersonalUtilities.Forms.Controls.TextBoxExtended.ControlModes.NumericUpDown
Me.NUM_DELAY.Dock = System.Windows.Forms.DockStyle.Fill Me.NUM_DELAY.Dock = System.Windows.Forms.DockStyle.Fill
Me.NUM_DELAY.Lines = New String(-1) {} Me.NUM_DELAY.Location = New System.Drawing.Point(4, 337)
Me.NUM_DELAY.Location = New System.Drawing.Point(4, 311)
Me.NUM_DELAY.Name = "NUM_DELAY" Me.NUM_DELAY.Name = "NUM_DELAY"
Me.NUM_DELAY.NumberMaximum = New Decimal(New Integer() {1440, 0, 0, 0}) Me.NUM_DELAY.NumberMaximum = New Decimal(New Integer() {1440, 0, 0, 0})
Me.NUM_DELAY.NumberUpDownAlign = System.Windows.Forms.LeftRightAlignment.Left Me.NUM_DELAY.NumberUpDownAlign = System.Windows.Forms.LeftRightAlignment.Left
Me.NUM_DELAY.Size = New System.Drawing.Size(468, 22) Me.NUM_DELAY.Size = New System.Drawing.Size(468, 22)
Me.NUM_DELAY.TabIndex = 4 Me.NUM_DELAY.TabIndex = 5
Me.NUM_DELAY.Text = "0" Me.NUM_DELAY.Text = "0"
' '
'LBL_LAST_TIME_UP 'LBL_LAST_TIME_UP
@@ -325,26 +324,39 @@ Namespace DownloadObjects
Me.LBL_LAST_TIME_UP.AutoSize = True Me.LBL_LAST_TIME_UP.AutoSize = True
Me.LBL_LAST_TIME_UP.Dock = System.Windows.Forms.DockStyle.Fill Me.LBL_LAST_TIME_UP.Dock = System.Windows.Forms.DockStyle.Fill
Me.LBL_LAST_TIME_UP.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, CType(204, Byte)) Me.LBL_LAST_TIME_UP.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, CType(204, Byte))
Me.LBL_LAST_TIME_UP.Location = New System.Drawing.Point(4, 337) Me.LBL_LAST_TIME_UP.Location = New System.Drawing.Point(4, 363)
Me.LBL_LAST_TIME_UP.Name = "LBL_LAST_TIME_UP" Me.LBL_LAST_TIME_UP.Name = "LBL_LAST_TIME_UP"
Me.LBL_LAST_TIME_UP.Size = New System.Drawing.Size(468, 25) Me.LBL_LAST_TIME_UP.Size = New System.Drawing.Size(468, 25)
Me.LBL_LAST_TIME_UP.TabIndex = 5 Me.LBL_LAST_TIME_UP.TabIndex = 6
Me.LBL_LAST_TIME_UP.Text = "Last download date: " Me.LBL_LAST_TIME_UP.Text = "Last download date: "
Me.LBL_LAST_TIME_UP.TextAlign = System.Drawing.ContentAlignment.TopCenter Me.LBL_LAST_TIME_UP.TextAlign = System.Drawing.ContentAlignment.TopCenter
' '
'CH_MANUAL
'
Me.CH_MANUAL.AutoSize = True
Me.CH_MANUAL.Dock = System.Windows.Forms.DockStyle.Fill
Me.CH_MANUAL.Location = New System.Drawing.Point(4, 282)
Me.CH_MANUAL.Name = "CH_MANUAL"
Me.CH_MANUAL.Size = New System.Drawing.Size(468, 19)
Me.CH_MANUAL.TabIndex = 3
Me.CH_MANUAL.Text = "Run this task manually"
TT_MAIN.SetToolTip(Me.CH_MANUAL, "If this checkbox is selected, this task can only be started manually (using the '" &
"Start (force)' button)")
Me.CH_MANUAL.UseVisualStyleBackColor = True
'
'AutoDownloaderEditorForm 'AutoDownloaderEditorForm
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(476, 388) Me.ClientSize = New System.Drawing.Size(476, 413)
Me.Controls.Add(CONTAINER_MAIN) Me.Controls.Add(CONTAINER_MAIN)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me.Icon = Global.SCrawler.My.Resources.Resources.ArrowDownIcon_Blue_24 Me.Icon = Global.SCrawler.My.Resources.Resources.ArrowDownIcon_Blue_24
Me.KeyPreview = True Me.KeyPreview = True
Me.MaximizeBox = False Me.MaximizeBox = False
Me.MaximumSize = New System.Drawing.Size(492, 427) Me.MaximumSize = New System.Drawing.Size(492, 452)
Me.MinimizeBox = False Me.MinimizeBox = False
Me.MinimumSize = New System.Drawing.Size(492, 427) Me.MinimumSize = New System.Drawing.Size(492, 452)
Me.Name = "AutoDownloaderEditorForm" Me.Name = "AutoDownloaderEditorForm"
Me.ShowInTaskbar = False Me.ShowInTaskbar = False
Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide
@@ -378,5 +390,6 @@ Namespace DownloadObjects
Private WithEvents CH_SHOW_PIC As CheckBox Private WithEvents CH_SHOW_PIC As CheckBox
Private WithEvents CH_SHOW_PIC_USER As CheckBox Private WithEvents CH_SHOW_PIC_USER As CheckBox
Private WithEvents CH_NOTIFY_SIMPLE As CheckBox Private WithEvents CH_NOTIFY_SIMPLE As CheckBox
Private WithEvents CH_MANUAL As CheckBox
End Class End Class
End Namespace End Namespace

View File

@@ -123,14 +123,8 @@
<metadata name="TP_MODE.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="TP_MODE.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value> <value>False</value>
</metadata> </metadata>
<metadata name="TT_MAIN.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="TT_MAIN.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="ActionButton1.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="ActionButton5.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@@ -188,7 +182,7 @@
AAAASUVORK5CYII= AAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="ActionButton2.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="ActionButton6.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
xAAADsQBlSsOGwAAAIZJREFUOE+1j10KwCAMgz2b755xl/IsvnaL2K20UfbDAmEako+ZROSTafjE12Go xAAADsQBlSsOGwAAAIZJREFUOE+1j10KwCAMgz2b755xl/IsvnaL2K20UfbDAmEako+ZROSTafjE12Go
@@ -199,41 +193,53 @@
<metadata name="TP_NOTIFY.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="TP_NOTIFY.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value> <value>False</value>
</metadata> </metadata>
<data name="ActionButton7.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsTAAALEwEAmpwYAAACOElE
QVQ4T2P4//8/QczOJyyqHpzfiE0OQwAZC8iqszAzs7CJ69o4BR768V/W2jcGXQ0KB4aFNS3dDQtnrbCb
ePCK48wTN1wXXXzge/jXf/clV55zC4hIIatF0cjIyMikElzc57z0wX+XHd/+2+//99/ywP//xlu//tdb
+eK/4Zp3/1WTOhYzARViNUAluKjTdf37/0ZTTn9TbdhwXblhwwW1/qOP1Ja9+K8w+95/6cm3/6v2Xvkv
qKjniGGAoIqRpW3/4e8S9uGdzFz82gwMDFxAzCxm4ZegtuLDf+VJ1/8rZM25IqLvnM/CximCYYCic1QN
v7x2JIwPwyrJ3XNUylddE9G2TWNmZOBDl4czmJiZMSRBmFdSyYyJgUEQmxwIYxWEYXZBCUls4sgYq6CA
prWNbtG8nXKeaVPR5XiVjSxEzf0yYXy4BBMLO6eQjoOXZvrkbbazrv53Xf/2v4CSbjBMXkhBl1/CMyNZ
qWnvGy5pNQ+YONwAfjXzAOupl/47LLr333L50/96q9/8l23YdES6cO5KuYqVW+R7Tj6SnfP0v4hryjyY
HhQDmFjYeHVKFp7WX/Xuv9Kq9/+Vd/z7r7rv/3+l7f//y676DEwDN/9L+BVvYkKLCTgDhNkkVUyVlr74
qbbz73/VOTc/qsy89kWx+9h7qbQpJwS1bbOAscGGrB6EUTggLOqf16C55ft/HlnNAFZOXgVWdi4FRgYG
VnR1MIwhwMTCyqEQ37qEmZVDFF0OE/9nAACtFF4Ey6OP+wAAAABJRU5ErkJggg==
</value>
</data>
<data name="ActionButton8.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsTAAALEwEAmpwYAAACOElE
QVQ4T2P4//8/QczOJyyqHpzfiE0OQwAZC8iqszAzs7CJ69o4BR768V/W2jcGXQ0KB4aFNS3dDQtnrbCb
ePCK48wTN1wXXXzge/jXf/clV55zC4hIIatF0cjIyMikElzc57z0wX+XHd/+2+//99/ywP//xlu//tdb
+eK/4Zp3/1WTOhYzARViNUAluKjTdf37/0ZTTn9TbdhwXblhwwW1/qOP1Ja9+K8w+95/6cm3/6v2Xvkv
qKjniGGAoIqRpW3/4e8S9uGdzFz82gwMDFxAzCxm4ZegtuLDf+VJ1/8rZM25IqLvnM/CximCYYCic1QN
v7x2JIwPwyrJ3XNUylddE9G2TWNmZOBDl4czmJiZMSRBmFdSyYyJgUEQmxwIYxWEYXZBCUls4sgYq6CA
prWNbtG8nXKeaVPR5XiVjSxEzf0yYXy4BBMLO6eQjoOXZvrkbbazrv53Xf/2v4CSbjBMXkhBl1/CMyNZ
qWnvGy5pNQ+YONwAfjXzAOupl/47LLr333L50/96q9/8l23YdES6cO5KuYqVW+R7Tj6SnfP0v4hryjyY
HhQDmFjYeHVKFp7WX/Xuv9Kq9/+Vd/z7r7rv/3+l7f//y676DEwDN/9L+BVvYkKLCTgDhNkkVUyVlr74
qbbz73/VOTc/qsy89kWx+9h7qbQpJwS1bbOAscGGrB6EUTggLOqf16C55ft/HlnNAFZOXgVWdi4FRgYG
VnR1MIwhwMTCyqEQ37qEmZVDFF0OE/9nAACtFF4Ey6OP+wAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="TT_MAIN.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="TT_MAIN.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="TT_MAIN.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="TT_MAIN.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="CH_NOTIFY_SIMPLE.ToolTip" xml:space="preserve"> <data name="CH_NOTIFY_SIMPLE.ToolTip" xml:space="preserve">
<value>Show a simple notification instead of a user notification. <value>Show a simple notification instead of a user notification.
This means that if any user data has been downloaded with the plan, a simple notification will be shown with the number of users downloaded. This means that if any user data has been downloaded with the plan, a simple notification will be shown with the number of users downloaded.
The 'Image' and 'User icon' parameters will be ignored.</value> The 'Image' and 'User icon' parameters will be ignored.</value>
</data> </data>
<data name="ActionButton3.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsTAAALEwEAmpwYAAACOElE
QVQ4T2P4//8/QczOJyyqHpzfiE0OQwAZC8iqszAzs7CJ69o4BR768V/W2jcGXQ0KB4aFNS3dDQtnrbCb
ePCK48wTN1wXXXzge/jXf/clV55zC4hIIatF0cjIyMikElzc57z0wX+XHd/+2+//99/ywP//xlu//tdb
+eK/4Zp3/1WTOhYzARViNUAluKjTdf37/0ZTTn9TbdhwXblhwwW1/qOP1Ja9+K8w+95/6cm3/6v2Xvkv
qKjniGGAoIqRpW3/4e8S9uGdzFz82gwMDFxAzCxm4ZegtuLDf+VJ1/8rZM25IqLvnM/CximCYYCic1QN
v7x2JIwPwyrJ3XNUylddE9G2TWNmZOBDl4czmJiZMSRBmFdSyYyJgUEQmxwIYxWEYXZBCUls4sgYq6CA
prWNbtG8nXKeaVPR5XiVjSxEzf0yYXy4BBMLO6eQjoOXZvrkbbazrv53Xf/2v4CSbjBMXkhBl1/CMyNZ
qWnvGy5pNQ+YONwAfjXzAOupl/47LLr333L50/96q9/8l23YdES6cO5KuYqVW+R7Tj6SnfP0v4hryjyY
HhQDmFjYeHVKFp7WX/Xuv9Kq9/+Vd/z7r7rv/3+l7f//y676DEwDN/9L+BVvYkKLCTgDhNkkVUyVlr74
qbbz73/VOTc/qsy89kWx+9h7qbQpJwS1bbOAscGGrB6EUTggLOqf16C55ft/HlnNAFZOXgVWdi4FRgYG
VnR1MIwhwMTCyqEQ37qEmZVDFF0OE/9nAACtFF4Ey6OP+wAAAABJRU5ErkJggg==
</value>
</data>
<data name="ActionButton4.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsTAAALEwEAmpwYAAACOElE
QVQ4T2P4//8/QczOJyyqHpzfiE0OQwAZC8iqszAzs7CJ69o4BR768V/W2jcGXQ0KB4aFNS3dDQtnrbCb
ePCK48wTN1wXXXzge/jXf/clV55zC4hIIatF0cjIyMikElzc57z0wX+XHd/+2+//99/ywP//xlu//tdb
+eK/4Zp3/1WTOhYzARViNUAluKjTdf37/0ZTTn9TbdhwXblhwwW1/qOP1Ja9+K8w+95/6cm3/6v2Xvkv
qKjniGGAoIqRpW3/4e8S9uGdzFz82gwMDFxAzCxm4ZegtuLDf+VJ1/8rZM25IqLvnM/CximCYYCic1QN
v7x2JIwPwyrJ3XNUylddE9G2TWNmZOBDl4czmJiZMSRBmFdSyYyJgUEQmxwIYxWEYXZBCUls4sgYq6CA
prWNbtG8nXKeaVPR5XiVjSxEzf0yYXy4BBMLO6eQjoOXZvrkbbazrv53Xf/2v4CSbjBMXkhBl1/CMyNZ
qWnvGy5pNQ+YONwAfjXzAOupl/47LLr333L50/96q9/8l23YdES6cO5KuYqVW+R7Tj6SnfP0v4hryjyY
HhQDmFjYeHVKFp7WX/Xuv9Kq9/+Vd/z7r7rv/3+l7f//y676DEwDN/9L+BVvYkKLCTgDhNkkVUyVlr74
qbbz73/VOTc/qsy89kWx+9h7qbQpJwS1bbOAscGGrB6EUTggLOqf16C55ft/HlnNAFZOXgVWdi4FRgYG
VnR1MIwhwMTCyqEQ37qEmZVDFF0OE/9nAACtFF4Ey6OP+wAAAABJRU5ErkJggg==
</value>
</data>
</root> </root>

View File

@@ -58,6 +58,7 @@ Namespace DownloadObjects
CH_NOTIFY_SIMPLE.Checked = .ShowSimpleNotification CH_NOTIFY_SIMPLE.Checked = .ShowSimpleNotification
CH_SHOW_PIC.Checked = .ShowPictureDownloaded CH_SHOW_PIC.Checked = .ShowPictureDownloaded
CH_SHOW_PIC_USER.Checked = .ShowPictureUser CH_SHOW_PIC_USER.Checked = .ShowPictureUser
CH_MANUAL.Checked = .IsManual
TXT_TIMER.Text = .Timer TXT_TIMER.Text = .Timer
NUM_DELAY.Value = .StartupDelay NUM_DELAY.Value = .StartupDelay
LBL_LAST_TIME_UP.Text = .Information LBL_LAST_TIME_UP.Text = .Information
@@ -94,8 +95,10 @@ Namespace DownloadObjects
.ShowSimpleNotification = CH_NOTIFY_SIMPLE.Checked .ShowSimpleNotification = CH_NOTIFY_SIMPLE.Checked
.ShowPictureDownloaded = CH_SHOW_PIC.Checked .ShowPictureDownloaded = CH_SHOW_PIC.Checked
.ShowPictureUser = CH_SHOW_PIC_USER.Checked .ShowPictureUser = CH_SHOW_PIC_USER.Checked
.IsManual = CH_MANUAL.Checked
.Timer = AConvert(Of Integer)(TXT_TIMER.Text, AutoDownloader.DefaultTimer) .Timer = AConvert(Of Integer)(TXT_TIMER.Text, AutoDownloader.DefaultTimer)
.StartupDelay = NUM_DELAY.Value .StartupDelay = NUM_DELAY.Value
If .IsManual Then .Stop()
.Update() .Update()
End With End With
MyDefs.CloseForm() MyDefs.CloseForm()

View File

@@ -27,6 +27,15 @@ Namespace DownloadObjects
Private ReadOnly PlansWaiter As Action(Of Predicate(Of AutoDownloader)) = Sub(ByVal Predicate As Predicate(Of AutoDownloader)) Private ReadOnly PlansWaiter As Action(Of Predicate(Of AutoDownloader)) = Sub(ByVal Predicate As Predicate(Of AutoDownloader))
While Plans.Exists(Predicate) : Thread.Sleep(200) : End While While Plans.Exists(Predicate) : Thread.Sleep(200) : End While
End Sub End Sub
Friend ReadOnly Property Name As String
Get
If Not File.Name.IsEmptyString AndAlso Not File.Name = FileNameDefault Then
Return File.Name.Replace(FileNameDefault, String.Empty).StringTrimStart("_").IfNullOrEmpty("Default")
Else
Return "Default"
End If
End Get
End Property
Friend Sub New() Friend Sub New()
Plans = New List(Of AutoDownloader) Plans = New List(Of AutoDownloader)
File = Settings.AutomationFile.Value.IfNullOrEmpty(FileDefault) File = Settings.AutomationFile.Value.IfNullOrEmpty(FileDefault)
@@ -132,6 +141,10 @@ Namespace DownloadObjects
Friend Async Function Start(ByVal Init As Boolean) As Task Friend Async Function Start(ByVal Init As Boolean) As Task
Try Try
Await Task.Run(Sub() Await Task.Run(Sub()
Dim r% = 0
Do
r += 1
Try
If Count > 0 Then If Count > 0 Then
If Plans.Exists(PlanDownloading) Then PlansWaiter(PlanDownloading) If Plans.Exists(PlanDownloading) Then PlansWaiter(PlanDownloading)
For Each Plan In Plans For Each Plan In Plans
@@ -140,6 +153,10 @@ Namespace DownloadObjects
Thread.Sleep(1000) Thread.Sleep(1000)
Next Next
End If End If
Exit Do
Catch io_ex As InvalidOperationException 'Collection was modified; enumeration operation may not execute
End Try
Loop While r < 10
End Sub) End Sub)
Catch ex As Exception Catch ex As Exception
If Init Then If Init Then

View File

@@ -14,6 +14,7 @@ Imports ADB = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons
Namespace DownloadObjects Namespace DownloadObjects
Friend Class SchedulerEditorForm Friend Class SchedulerEditorForm
#Region "Declarations" #Region "Declarations"
Private Const TitleDefault As String = "Scheduler"
Private WithEvents MyDefs As DefaultFormOptions Private WithEvents MyDefs As DefaultFormOptions
Private WithEvents BTT_SETTINGS As ToolStripButton Private WithEvents BTT_SETTINGS As ToolStripButton
Private WithEvents BTT_CLONE As ToolStripButton Private WithEvents BTT_CLONE As ToolStripButton
@@ -110,6 +111,7 @@ Namespace DownloadObjects
BTT_START, BTT_START_FORCE, MENU_SKIP, BTT_PAUSE}) BTT_START, BTT_START_FORCE, MENU_SKIP, BTT_PAUSE})
PauseArr.AddButtons(BTT_PAUSE, .MyEditToolbar.ToolStrip) PauseArr.AddButtons(BTT_PAUSE, .MyEditToolbar.ToolStrip)
Refill() Refill()
SetTitle()
.EndLoaderOperations(False) .EndLoaderOperations(False)
End With End With
End Sub End Sub
@@ -138,6 +140,17 @@ Namespace DownloadObjects
ErrorsDescriber.Execute(EDP.SendToLog, ex, "[DownloadObjects.SchedulerEditorForm.Refill]") ErrorsDescriber.Execute(EDP.SendToLog, ex, "[DownloadObjects.SchedulerEditorForm.Refill]")
End Try End Try
End Sub End Sub
Private Sub SetTitle()
Try
If GetSchedulerFiles.ListExists(2) Then
Text = $"{TitleDefault} [{Settings.Automation.Name}]"
Else
Text = TitleDefault
End If
Catch ex As Exception
ErrorsDescriber.Execute(EDP.SendToLog, ex, "[SchedulerEditorForm.SetTitle]")
End Try
End Sub
#Region "Add, Edit, Delete" #Region "Add, Edit, Delete"
Private Sub MyDefs_ButtonAddClick(ByVal Sender As Object, ByVal e As EventArgs) Handles MyDefs.ButtonAddClick, BTT_CLONE.Click Private Sub MyDefs_ButtonAddClick(ByVal Sender As Object, ByVal e As EventArgs) Handles MyDefs.ButtonAddClick, BTT_CLONE.Click
Dim a As AutoDownloader = Nothing Dim a As AutoDownloader = Nothing
@@ -199,12 +212,15 @@ Namespace DownloadObjects
End Sub End Sub
#End Region #End Region
#Region "Settings, Start, Skip, Pause" #Region "Settings, Start, Skip, Pause"
Private Function GetSchedulerFiles() As List(Of SFile)
Return SFile.GetFiles(SettingsFolderName.CSFileP, $"{Scheduler.FileNameDefault}*.xml",, EDP.ReturnValue)
End Function
Private Sub BTT_SETTINGS_Click(sender As Object, e As EventArgs) Handles BTT_SETTINGS.Click Private Sub BTT_SETTINGS_Click(sender As Object, e As EventArgs) Handles BTT_SETTINGS.Click
Const msgTitle$ = "Change scheduler" Const msgTitle$ = "Change scheduler"
Try Try
Const defName$ = "Default" Const defName$ = "Default"
Dim l As New Dictionary(Of SFile, String) Dim l As New Dictionary(Of SFile, String)
With SFile.GetFiles(SettingsFolderName.CSFileP, $"{Scheduler.FileNameDefault}*.xml",, EDP.ReturnValue) With GetSchedulerFiles()
If .ListExists Then .ForEach(Sub(ff) l.Add(ff, ff.Name.Replace(Scheduler.FileNameDefault, String.Empty).StringTrimStart("_").IfNullOrEmpty(defName))) If .ListExists Then .ForEach(Sub(ff) l.Add(ff, ff.Name.Replace(Scheduler.FileNameDefault, String.Empty).StringTrimStart("_").IfNullOrEmpty(defName)))
End With End With
If l.Count > 0 Then If l.Count > 0 Then
@@ -260,6 +276,7 @@ Namespace DownloadObjects
Next Next
End If End If
End If End If
SetTitle()
End If End If
End If End If
End With End With
@@ -281,7 +298,7 @@ Namespace DownloadObjects
Private Sub BTT_START_FORCE_Click(sender As Object, e As EventArgs) Handles BTT_START_FORCE.Click Private Sub BTT_START_FORCE_Click(sender As Object, e As EventArgs) Handles BTT_START_FORCE.Click
If _LatestSelected.ValueBetween(0, LIST_PLANS.Items.Count - 1) Then If _LatestSelected.ValueBetween(0, LIST_PLANS.Items.Count - 1) Then
With Settings.Automation(_LatestSelected) With Settings.Automation(_LatestSelected)
If .Working Then .ForceStart() : Refill() If .Working Or .IsManual Then .ForceStart() : Refill()
End With End With
End If End If
End Sub End Sub

View File

@@ -218,13 +218,17 @@ Namespace DownloadObjects
If Not BTT_STOP Is Nothing Then BTT_STOP.Dispose() If Not BTT_STOP Is Nothing Then BTT_STOP.Dispose()
If Not BTT_OPEN Is Nothing Then BTT_OPEN.Dispose() If Not BTT_OPEN Is Nothing Then BTT_OPEN.Dispose()
If Not Icon Is Nothing Then Icon.Dispose() If Not Icon Is Nothing Then Icon.Dispose()
PR_MAIN.Dispose() PR_MAIN.DisposeIfReady()
LBL_INFO.Dispose() LBL_INFO.DisposeIfReady()
If Not TP_CONTROLS Is Nothing Then
TP_CONTROLS.Controls.Clear() TP_CONTROLS.Controls.Clear()
TP_CONTROLS.Dispose() TP_CONTROLS.Dispose()
End If
If Not TP_MAIN Is Nothing Then
TP_MAIN.Controls.Clear() TP_MAIN.Controls.Clear()
TP_MAIN.Dispose() TP_MAIN.Dispose()
End If End If
End If
disposedValue = True disposedValue = True
End If End If
End Sub End Sub

View File

@@ -6,6 +6,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.API.Base
Imports PersonalUtilities.Tools Imports PersonalUtilities.Tools
Imports PersonalUtilities.Functions.XML Imports PersonalUtilities.Functions.XML
Imports UserMediaD = SCrawler.DownloadObjects.TDownloader.UserMediaD Imports UserMediaD = SCrawler.DownloadObjects.TDownloader.UserMediaD
@@ -120,6 +121,52 @@ Namespace DownloadObjects
End If End If
End Sub End Sub
#End Region #End Region
#Region "UpdateUsers"
Friend Overloads Sub UpdateUsers(ByVal InitialUser As UserInfo, ByVal NewUser As UserInfo)
Try
If Count > 0 Then
Dim changed As Boolean = False
Dim result As Boolean
Dim item As UserMediaD
For i% = 0 To Count - 1
item = Items(i)
result = False
item = UpdateUsers(item, InitialUser, NewUser, result)
If result Then changed = True : Items(i) = item
Next
If changed Then Save()
End If
Catch ex As Exception
ErrorsDescriber.Execute(EDP.SendToLog, ex, "[FeedSpecial.UpdateUsers]")
MainFrameObj.UpdateLogButton()
End Try
End Sub
Friend Overloads Shared Function UpdateUsers(ByVal Item As UserMediaD, ByVal InitialUser As UserInfo, ByVal NewUser As UserInfo,
ByRef Result As Boolean) As UserMediaD
Dim data As UserMedia
Dim user As IUserData
Dim path$ = InitialUser.File.CutPath.PathWithSeparator
Dim pathNew$ = NewUser.File.CutPath.PathWithSeparator
If Item.UserInfo.Equals(InitialUser) Or Item.UserInfo.Equals(NewUser) Then
If Item.Data.File.PathWithSeparator.Contains(path) Then
data = Item.Data
data.File = data.File.ToString.Replace(path, pathNew)
If Item.User Is Nothing Then
user = Settings.GetUser(NewUser)
Else
user = Item.User
End If
If Not If(user?.IsSubscription, False) Then
Item = New UserMediaD(data, user, Item.Session, Item.Date)
Result = True
Return Item
End If
End If
End If
Result = False
Return Item
End Function
#End Region
#Region "Add" #Region "Add"
Friend Overloads Function Add(ByVal Item As UserMediaD, Optional ByVal AutoSave As Boolean = True) As Boolean Friend Overloads Function Add(ByVal Item As UserMediaD, Optional ByVal AutoSave As Boolean = True) As Boolean
If Not Items.Contains(Item) Then If Not Items.Contains(Item) Then

View File

@@ -85,11 +85,14 @@ Namespace DownloadObjects
Friend ReadOnly Property Comparer As New FeedSpecial.SEComparer Friend ReadOnly Property Comparer As New FeedSpecial.SEComparer
Private ReadOnly Property ComparerFeeds As New FeedsComparer Private ReadOnly Property ComparerFeeds As New FeedsComparer
Friend ReadOnly Property FeedSpecialRemover As Predicate(Of SFile) = Function(f) f.Name.StartsWith(FeedSpecial.FavoriteName) Or f.Name.StartsWith(FeedSpecial.SpecialName) Friend ReadOnly Property FeedSpecialRemover As Predicate(Of SFile) = Function(f) f.Name.StartsWith(FeedSpecial.FavoriteName) Or f.Name.StartsWith(FeedSpecial.SpecialName)
''' <summary>InitialUser, NewUser</summary>
Friend ReadOnly Property PendingUsersToUpdate As List(Of KeyValuePair(Of UserInfo, UserInfo))
#End Region #End Region
#Region "Initializer, loader, feeds handlers" #Region "Initializer, loader, feeds handlers"
Friend Sub New() Friend Sub New()
FeedAddedEventHandlers = New List(Of FeedActionEventHandler) FeedAddedEventHandlers = New List(Of FeedActionEventHandler)
FeedRemovedEventHandlers = New List(Of FeedActionEventHandler) FeedRemovedEventHandlers = New List(Of FeedActionEventHandler)
PendingUsersToUpdate = New List(Of KeyValuePair(Of UserInfo, UserInfo))
Feeds = New List(Of FeedSpecial) Feeds = New List(Of FeedSpecial)
End Sub End Sub
Friend Sub Load() Friend Sub Load()
@@ -205,6 +208,23 @@ Namespace DownloadObjects
Return result Return result
End Function End Function
#End Region #End Region
#Region "UpdateUsers"
Friend Sub UpdateUsers(ByVal InitialUser As UserInfo, ByVal NewUser As UserInfo)
Try
Load()
If Count > 0 Then
Feeds.ForEach(Sub(f) f.UpdateUsers(InitialUser, NewUser))
If Downloader.Files.Count > 0 Then
PendingUsersToUpdate.Add(New KeyValuePair(Of UserInfo, UserInfo)(InitialUser, NewUser))
If Not Downloader.Working Then Downloader.FilesUpdatePendingUsers()
End If
End If
Catch ex As Exception
ErrorsDescriber.Execute(EDP.SendToLog, ex, "[FeedSpecialCollection.UpdateUsers]")
MainFrameObj.UpdateLogButton()
End Try
End Sub
#End Region
#Region "IEnumerable Support" #Region "IEnumerable Support"
Private Function GetEnumerator() As IEnumerator(Of FeedSpecial) Implements IEnumerable(Of FeedSpecial).GetEnumerator Private Function GetEnumerator() As IEnumerator(Of FeedSpecial) Implements IEnumerable(Of FeedSpecial).GetEnumerator
Return New MyEnumerator(Of FeedSpecial)(Me) Return New MyEnumerator(Of FeedSpecial)(Me)

View File

@@ -34,7 +34,7 @@ Namespace DownloadObjects.STDownloader
Dim FRM_URLS As System.Windows.Forms.GroupBox Dim FRM_URLS As System.Windows.Forms.GroupBox
Dim ActionButton5 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton() Dim ActionButton5 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
Me.TXT_OUTPUT = New PersonalUtilities.Forms.Controls.ComboBoxExtended() Me.TXT_OUTPUT = New PersonalUtilities.Forms.Controls.ComboBoxExtended()
Me.TXT_URLS = New System.Windows.Forms.RichTextBox() Me.TXT_URLS = New System.Windows.Forms.TextBox()
Me.CMB_ACCOUNT = New PersonalUtilities.Forms.Controls.ComboBoxExtended() Me.CMB_ACCOUNT = New PersonalUtilities.Forms.Controls.ComboBoxExtended()
CONTAINER_MAIN = New System.Windows.Forms.ToolStripContainer() CONTAINER_MAIN = New System.Windows.Forms.ToolStripContainer()
TP_MAIN = New System.Windows.Forms.TableLayoutPanel() TP_MAIN = New System.Windows.Forms.TableLayoutPanel()
@@ -53,7 +53,7 @@ Namespace DownloadObjects.STDownloader
'CONTAINER_MAIN.ContentPanel 'CONTAINER_MAIN.ContentPanel
' '
CONTAINER_MAIN.ContentPanel.Controls.Add(TP_MAIN) CONTAINER_MAIN.ContentPanel.Controls.Add(TP_MAIN)
CONTAINER_MAIN.ContentPanel.Size = New System.Drawing.Size(384, 236) CONTAINER_MAIN.ContentPanel.Size = New System.Drawing.Size(384, 261)
CONTAINER_MAIN.Dock = System.Windows.Forms.DockStyle.Fill CONTAINER_MAIN.Dock = System.Windows.Forms.DockStyle.Fill
CONTAINER_MAIN.LeftToolStripPanelVisible = False CONTAINER_MAIN.LeftToolStripPanelVisible = False
CONTAINER_MAIN.Location = New System.Drawing.Point(0, 0) CONTAINER_MAIN.Location = New System.Drawing.Point(0, 0)
@@ -77,7 +77,7 @@ Namespace DownloadObjects.STDownloader
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!)) TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!)) TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!)) TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
TP_MAIN.Size = New System.Drawing.Size(384, 236) TP_MAIN.Size = New System.Drawing.Size(384, 261)
TP_MAIN.TabIndex = 0 TP_MAIN.TabIndex = 0
' '
'TXT_OUTPUT 'TXT_OUTPUT
@@ -126,20 +126,20 @@ Namespace DownloadObjects.STDownloader
FRM_URLS.Dock = System.Windows.Forms.DockStyle.Fill FRM_URLS.Dock = System.Windows.Forms.DockStyle.Fill
FRM_URLS.Location = New System.Drawing.Point(3, 59) FRM_URLS.Location = New System.Drawing.Point(3, 59)
FRM_URLS.Name = "FRM_URLS" FRM_URLS.Name = "FRM_URLS"
FRM_URLS.Size = New System.Drawing.Size(378, 174) FRM_URLS.Size = New System.Drawing.Size(378, 199)
FRM_URLS.TabIndex = 2 FRM_URLS.TabIndex = 2
FRM_URLS.TabStop = False FRM_URLS.TabStop = False
FRM_URLS.Text = "URLs (new line as delimiter)" FRM_URLS.Text = "URLs (new line as delimiter)"
' '
'TXT_URLS 'TXT_URLS
' '
Me.TXT_URLS.DetectUrls = False
Me.TXT_URLS.Dock = System.Windows.Forms.DockStyle.Fill Me.TXT_URLS.Dock = System.Windows.Forms.DockStyle.Fill
Me.TXT_URLS.Location = New System.Drawing.Point(3, 16) Me.TXT_URLS.Location = New System.Drawing.Point(3, 16)
Me.TXT_URLS.MaxLength = 2147483647
Me.TXT_URLS.Multiline = True
Me.TXT_URLS.Name = "TXT_URLS" Me.TXT_URLS.Name = "TXT_URLS"
Me.TXT_URLS.Size = New System.Drawing.Size(372, 155) Me.TXT_URLS.Size = New System.Drawing.Size(372, 180)
Me.TXT_URLS.TabIndex = 0 Me.TXT_URLS.TabIndex = 0
Me.TXT_URLS.Text = ""
' '
'CMB_ACCOUNT 'CMB_ACCOUNT
' '
@@ -178,12 +178,13 @@ Namespace DownloadObjects.STDownloader
TP_MAIN.ResumeLayout(False) TP_MAIN.ResumeLayout(False)
CType(Me.TXT_OUTPUT, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.TXT_OUTPUT, System.ComponentModel.ISupportInitialize).EndInit()
FRM_URLS.ResumeLayout(False) FRM_URLS.ResumeLayout(False)
FRM_URLS.PerformLayout()
CType(Me.CMB_ACCOUNT, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.CMB_ACCOUNT, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False) Me.ResumeLayout(False)
End Sub End Sub
Private WithEvents TXT_OUTPUT As PersonalUtilities.Forms.Controls.ComboBoxExtended Private WithEvents TXT_OUTPUT As PersonalUtilities.Forms.Controls.ComboBoxExtended
Private WithEvents TXT_URLS As RichTextBox Private WithEvents TXT_URLS As TextBox
Private WithEvents CMB_ACCOUNT As PersonalUtilities.Forms.Controls.ComboBoxExtended Private WithEvents CMB_ACCOUNT As PersonalUtilities.Forms.Controls.ComboBoxExtended
End Class End Class
End Namespace End Namespace

View File

@@ -37,19 +37,28 @@ Namespace DownloadObjects
#End Region #End Region
Friend ReadOnly User As IUserData Friend ReadOnly User As IUserData
Friend ReadOnly Data As UserMedia Friend ReadOnly Data As UserMedia
Friend ReadOnly UserInfo As UserInfo
Friend ReadOnly [Date] As Date Friend ReadOnly [Date] As Date
Friend ReadOnly Session As Integer Friend ReadOnly Session As Integer
Friend Sub New(ByVal Data As UserMedia, ByVal User As IUserData, ByVal Session As Integer) Friend Sub New(ByVal Data As UserMedia, ByVal User As IUserData, ByVal Session As Integer)
Me.Data = Data Me.Data = Data
Me.User = User Me.User = User
If Not Me.User Is Nothing Then Me.UserInfo = DirectCast(Me.User, UserDataBase).User
[Date] = Now [Date] = Now
Me.Session = Session Me.Session = Session
End Sub End Sub
Friend Sub New(ByVal Data As UserMedia, ByVal User As IUserData, ByVal Session As Integer, ByVal _Date As Date)
Me.New(Data, User, Session)
[Date] = _Date
End Sub
Private Sub New(ByVal e As EContainer) Private Sub New(ByVal e As EContainer)
If Not e Is Nothing Then If Not e Is Nothing Then
If e.Contains(Name_User) Then If e.Contains(Name_User) Then
Dim u As UserInfo = e(Name_User) Dim u As UserInfo = e(Name_User)
If Not u.Name.IsEmptyString And Not u.Site.IsEmptyString Then User = Settings.GetUser(u) If Not u.Name.IsEmptyString And Not u.Site.IsEmptyString Then
User = Settings.GetUser(u)
If Not User Is Nothing Then UserInfo = DirectCast(User, UserDataBase).User
End If
End If End If
Data = New UserMedia(e(Name_Media), User) Data = New UserMedia(e(Name_Media), User)
[Date] = AConvert(Of Date)(e.Value(Name_Date), DateTimeDefaultProvider, Now) [Date] = AConvert(Of Date)(e.Value(Name_Date), DateTimeDefaultProvider, Now)
@@ -98,7 +107,7 @@ Namespace DownloadObjects
Return _FilesSessionActual Return _FilesSessionActual
End Get End Get
End Property End Property
Private Sub FilesSave() Friend Sub FilesSave()
Try Try
If Settings.FeedStoreSessionsData And Files.Count > 0 Then If Settings.FeedStoreSessionsData And Files.Count > 0 Then
ClearSessions() ClearSessions()
@@ -111,6 +120,46 @@ Namespace DownloadObjects
ErrorsDescriber.Execute(EDP.SendToLog, ex, "[DownloadObjects.TDownloader.FilesSave]") ErrorsDescriber.Execute(EDP.SendToLog, ex, "[DownloadObjects.TDownloader.FilesSave]")
End Try End Try
End Sub End Sub
Private _FilesUpdating As Boolean = False
Friend Sub FilesUpdatePendingUsers()
_FilesUpdating = True
Try
If Files.Count > 0 Then
With Settings.Feeds
Dim pUsers As List(Of KeyValuePair(Of UserInfo, UserInfo))
Dim pendingUser As KeyValuePair(Of UserInfo, UserInfo)
Dim item As UserMediaD
Dim result As Boolean
Dim changed As Boolean = False
While .PendingUsersToUpdate.Count > 0
pUsers = New List(Of KeyValuePair(Of UserInfo, UserInfo))(.PendingUsersToUpdate)
.PendingUsersToUpdate.Clear()
For Each pendingUser In pUsers
With Files
If .Count > 0 Then
For i% = 0 To .Count - 1
item = .Item(i)
result = False
item = FeedSpecial.UpdateUsers(item, pendingUser.Key, pendingUser.Value, result)
If result Then changed = True : .Item(i) = item
Next
End If
End With
If changed Then FilesSave()
Next
pUsers.Clear()
End While
End With
End If
Catch aex As ArgumentOutOfRangeException
Catch iex As IndexOutOfRangeException
Catch ex As Exception
ErrorsDescriber.Execute(EDP.SendToLog, ex, "[TDownloader.FilesUpdatePendingUsers]")
MainFrameObj.UpdateLogButton()
Finally
_FilesUpdating = False
End Try
End Sub
Friend Sub ClearSessions() Friend Sub ClearSessions()
Try Try
If Not _FilesSessionCleared Then If Not _FilesSessionCleared Then
@@ -159,7 +208,7 @@ Namespace DownloadObjects
Friend ReadOnly Property Working(Optional ByVal CheckThread As Boolean = True) As Boolean Friend ReadOnly Property Working(Optional ByVal CheckThread As Boolean = True) As Boolean
Get Get
Return _PoolReconfiguration Or (Pool.Count > 0 AndAlso Pool.Exists(Function(j) j.Working)) Or Return _PoolReconfiguration Or (Pool.Count > 0 AndAlso Pool.Exists(Function(j) j.Working)) Or
(CheckThread AndAlso If(CheckerThread?.IsAlive, False)) (CheckThread AndAlso If(CheckerThread?.IsAlive, False)) Or _FilesUpdating
End Get End Get
End Property End Property
Friend ReadOnly Property Count As Integer Friend ReadOnly Property Count As Integer
@@ -411,6 +460,7 @@ Namespace DownloadObjects
Files.Sort() Files.Sort()
FilesChanged = Not fBefore = Files.Count FilesChanged = Not fBefore = Files.Count
RaiseEvent Downloading(False) RaiseEvent Downloading(False)
FilesUpdatePendingUsers()
If FilesChanged Then FilesSave() : RaiseEvent FeedFilesChanged(True) If FilesChanged Then FilesSave() : RaiseEvent FeedFilesChanged(True)
End Try End Try
End Sub End Sub
@@ -453,7 +503,7 @@ Namespace DownloadObjects
Private Sub UpdateJobsLabel() Private Sub UpdateJobsLabel()
RaiseEvent JobsChange(Count) RaiseEvent JobsChange(Count)
End Sub End Sub
Friend Structure HostLimit Private Structure HostLimit
Friend Key As String Friend Key As String
Friend Limit As Integer Friend Limit As Integer
Friend Value As Integer Friend Value As Integer

View File

@@ -402,6 +402,7 @@ Namespace Editors
Else Else
COLOR_USER.ColorsGetUser(_UserBackColor, _UserForeColor) COLOR_USER.ColorsGetUser(_UserBackColor, _UserForeColor)
Dim tmpUser As UserInfo = User Dim tmpUser As UserInfo = User
Dim userBefore As UserInfo = User
Dim accOld$ = tmpUser.AccountName Dim accOld$ = tmpUser.AccountName
With tmpUser With tmpUser
.Name = TXT_USER.Text .Name = TXT_USER.Text
@@ -462,6 +463,7 @@ Namespace Editors
.ScriptUse = TXT_SCRIPT.Checked .ScriptUse = TXT_SCRIPT.Checked
.ScriptData = TXT_SCRIPT.Text .ScriptData = TXT_SCRIPT.Text
.UpdateUserInformation() .UpdateUserInformation()
Settings.Feeds.UpdateUsers(userBefore, User)
End With End With
End If End If
GoTo CloseForm GoTo CloseForm

View File

@@ -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.11.17.0")> <Assembly: AssemblyVersion("2023.11.24.0")>
<Assembly: AssemblyFileVersion("2023.11.17.0")> <Assembly: AssemblyFileVersion("2023.11.24.0")>
<Assembly: NeutralResourcesLanguage("en")> <Assembly: NeutralResourcesLanguage("en")>

View File

@@ -227,15 +227,17 @@ Namespace Plugin.Hosts
End Select End Select
If selectedAcc >= 0 Then If selectedAcc >= 0 Then
Dim tUser As UserInfo Dim tUser As UserInfo, userBefore As UserInfo
Dim tUserIndx% Dim tUserIndx%
Dim tUserBase As UserDataBase Dim tUserBase As UserDataBase
For Each tUser In users For Each tUser In users
userBefore = tUser
UpdateUserAccount(tUser, Obj, Hosts(selectedAcc), True, tUserIndx) UpdateUserAccount(tUser, Obj, Hosts(selectedAcc), True, tUserIndx)
tUserBase = .GetUser(tUser) tUserBase = .GetUser(tUser)
tUserBase.AccountName = String.Empty tUserBase.AccountName = String.Empty
tUserBase.User = tUser tUserBase.User = tUser
tUserBase.UpdateUserInformation() tUserBase.UpdateUserInformation()
Settings.Feeds.UpdateUsers(userBefore, tUser)
changedUsers.Add(tUserBase.ToStringForLog) changedUsers.Add(tUserBase.ToStringForLog)
Next Next
.UpdateUsersList() .UpdateUsersList()

View File

@@ -41,9 +41,7 @@ Friend Class UserSearchForm
End If End If
End Function End Function
Public Overrides Function Equals(ByVal Obj As Object) As Boolean Public Overrides Function Equals(ByVal Obj As Object) As Boolean
'TODO: [UserSearchForm]: updated equal function
With DirectCast(Obj, SearchResult) : Return Key = .Key : End With With DirectCast(Obj, SearchResult) : Return Key = .Key : End With
'With DirectCast(Obj, SearchResult) : Return Key = .Key And Mode = .Mode : End With
End Function End Function
End Structure End Structure
Public Sub New() Public Sub New()