mirror of
https://github.com/AAndyProgram/SCrawler.git
synced 2026-03-15 00:02:17 +00:00
Compare commits
4 Commits
2022.9.8.1
...
2022.9.17.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb28255de3 | ||
|
|
92be0994ae | ||
|
|
9567b0a367 | ||
|
|
c28c0e1ba3 |
42
Changelog.md
42
Changelog.md
@@ -1,3 +1,45 @@
|
||||
# 2022.9.17.0
|
||||
|
||||
*2022-09-17*
|
||||
|
||||
- Added
|
||||
- Added two date filters to filter users (in range, not in range)
|
||||
- (Request #71) Download data for a specific date range
|
||||
- The ability to disable site downloading (in the site settings form)
|
||||
- Updated
|
||||
- Plugins
|
||||
- Fixed
|
||||
- (Issue #71) ```Download data to the date``` doesn't work for Twitter
|
||||
- Download data for a specific date range doesn't work for multiple users
|
||||
- Incorrect feed sorting algorithm
|
||||
- Minor bugs
|
||||
|
||||
# 2022.9.16.0
|
||||
|
||||
*2022-09-16*
|
||||
|
||||
- Fixed
|
||||
- Failed to get video thumbnail for channel video post
|
||||
- Incorrect rendering of the 'Feed' table when the number of columns is more than one
|
||||
- Minor design bugs
|
||||
|
||||
# 2022.9.13.0
|
||||
|
||||
*2022-09-13*
|
||||
|
||||
- Added
|
||||
- Video duration to the feed
|
||||
- Fixed
|
||||
- (Issue #70) Instagram posts not downloading if there are pinned posts that have already been downloaded
|
||||
- Minor bugs
|
||||
|
||||
# 2022.9.10.0
|
||||
|
||||
*2022-09-10*
|
||||
|
||||
- Fixed
|
||||
- The memory is still leaking. This time because of the video. *Using WMP was not the best choice.*
|
||||
|
||||
# 2022.9.8.1
|
||||
|
||||
*2022-09-08*
|
||||
|
||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2022.9.8.0")>
|
||||
<Assembly: AssemblyFileVersion("2022.9.8.0")>
|
||||
<Assembly: AssemblyVersion("2022.9.17.0")>
|
||||
<Assembly: AssemblyFileVersion("2022.9.17.0")>
|
||||
<Assembly: NeutralResourcesLanguage("en")>
|
||||
|
||||
@@ -38,7 +38,8 @@ Public Class UserData : Implements IPluginContentProvider
|
||||
Public Property SeparateVideoFolder As Boolean Implements IPluginContentProvider.SeparateVideoFolder
|
||||
Public Property DataPath As String Implements IPluginContentProvider.DataPath
|
||||
Public Property PostsNumberLimit As Integer? Implements IPluginContentProvider.PostsNumberLimit
|
||||
Public Property PostsDateLimit As Date? Implements IPluginContentProvider.PostsDateLimit
|
||||
Public Property DownloadDateFrom As Date? Implements IPluginContentProvider.DownloadDateFrom
|
||||
Public Property DownloadDateTo As Date? Implements IPluginContentProvider.DownloadDateTo
|
||||
#End Region
|
||||
#Region "Interface exchange options"
|
||||
Public Sub ExchangeOptionsSet(ByVal Obj As Object) Implements IPluginContentProvider.ExchangeOptionsSet
|
||||
@@ -152,7 +153,8 @@ Public Class UserData : Implements IPluginContentProvider
|
||||
If Responser.Client.StatusCode = Net.HttpStatusCode.ServiceUnavailable Then
|
||||
LogProvider.Add("LPSG not available")
|
||||
Else
|
||||
m.DownloadState = UStates.Skipped
|
||||
m.DownloadState = UStates.Missing
|
||||
m.Attempts += 1
|
||||
End If
|
||||
End Try
|
||||
RaiseEvent ProgressChanged(1)
|
||||
|
||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2022.9.8.0")>
|
||||
<Assembly: AssemblyFileVersion("2022.9.8.0")>
|
||||
<Assembly: AssemblyVersion("2022.9.17.0")>
|
||||
<Assembly: AssemblyFileVersion("2022.9.17.0")>
|
||||
<Assembly: NeutralResourcesLanguage("en")>
|
||||
|
||||
@@ -37,7 +37,8 @@ Public Class UserData : Implements IPluginContentProvider
|
||||
Public Property SeparateVideoFolder As Boolean Implements IPluginContentProvider.SeparateVideoFolder
|
||||
Public Property DataPath As String Implements IPluginContentProvider.DataPath
|
||||
Public Property PostsNumberLimit As Integer? Implements IPluginContentProvider.PostsNumberLimit
|
||||
Public Property PostsDateLimit As Date? Implements IPluginContentProvider.PostsDateLimit
|
||||
Public Property DownloadDateFrom As Date? Implements IPluginContentProvider.DownloadDateFrom
|
||||
Public Property DownloadDateTo As Date? Implements IPluginContentProvider.DownloadDateTo
|
||||
#End Region
|
||||
#Region "Interface exchange options"
|
||||
Public Sub ExchangeOptionsSet(ByVal Obj As Object) Implements IPluginContentProvider.ExchangeOptionsSet
|
||||
@@ -208,7 +209,8 @@ Public Class UserData : Implements IPluginContentProvider
|
||||
m.File = f
|
||||
m.DownloadState = UStates.Downloaded
|
||||
Catch ex As Exception
|
||||
m.DownloadState = UStates.Skipped
|
||||
m.DownloadState = UStates.Missing
|
||||
m.Attempts += 1
|
||||
End Try
|
||||
TempMediaList(i) = m
|
||||
RaiseEvent ProgressChanged(1)
|
||||
|
||||
@@ -26,7 +26,8 @@ Namespace Plugin
|
||||
Property SeparateVideoFolder As Boolean
|
||||
Property DataPath As String
|
||||
Property PostsNumberLimit As Integer?
|
||||
Property PostsDateLimit As Date?
|
||||
Property DownloadDateFrom As Date?
|
||||
Property DownloadDateTo As Date?
|
||||
Function ExchangeOptionsGet() As Object
|
||||
Sub ExchangeOptionsSet(ByVal Obj As Object)
|
||||
Sub XmlFieldsSet(ByVal Fields As List(Of KeyValuePair(Of String, String)))
|
||||
|
||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2022.9.8.0")>
|
||||
<Assembly: AssemblyFileVersion("2022.9.8.0")>
|
||||
<Assembly: AssemblyVersion("2022.9.17.0")>
|
||||
<Assembly: AssemblyFileVersion("2022.9.17.0")>
|
||||
<Assembly: NeutralResourcesLanguage("en")>
|
||||
|
||||
@@ -26,5 +26,6 @@ Namespace Plugin
|
||||
Public PostID As String
|
||||
Public PostDate As Date?
|
||||
Public SpecialFolder As String
|
||||
Public Attempts As Integer
|
||||
End Structure
|
||||
End Namespace
|
||||
@@ -52,6 +52,7 @@ Namespace API.Base
|
||||
Post = New UserPost With {.ID = m.PostID, .[Date] = m.PostDate}
|
||||
State = m.DownloadState
|
||||
SpecialFolder = m.SpecialFolder
|
||||
Attempts = m.Attempts
|
||||
End If
|
||||
End Sub
|
||||
Public Shared Widening Operator CType(ByVal _URL As String) As UserMedia
|
||||
@@ -72,7 +73,8 @@ Namespace API.Base
|
||||
.URL = URL,
|
||||
.SpecialFolder = SpecialFolder,
|
||||
.PostID = Post.ID,
|
||||
.PostDate = Post.Date
|
||||
.PostDate = Post.Date,
|
||||
.Attempts = Attempts
|
||||
}
|
||||
End Function
|
||||
Friend Overloads Function Equals(ByVal Other As UserMedia) As Boolean Implements IEquatable(Of UserMedia).Equals
|
||||
|
||||
@@ -550,23 +550,31 @@ BlockNullPicture:
|
||||
End Function
|
||||
Friend Overridable ReadOnly Property FitToAddParams As Boolean Implements IUserData.FitToAddParams
|
||||
Get
|
||||
If Settings.LastUpdatedDate.HasValue AndAlso LastUpdated.HasValue AndAlso
|
||||
LastUpdated.Value.Date > Settings.LastUpdatedDate.Value.Date Then Return False
|
||||
If Not Settings.Labels.ExcludedIgnore AndAlso Settings.Labels.Excluded.ValuesList.ListContains(Labels) Then Return False
|
||||
If Settings.SelectedSites.Count = 0 OrElse Settings.SelectedSites.Contains(Site) Then
|
||||
Select Case Settings.ShowingMode.Value
|
||||
Case ShowingModes.Regular : Return Not Temporary And Not Favorite
|
||||
Case ShowingModes.Temporary : Return Temporary
|
||||
Case ShowingModes.Favorite : Return Favorite
|
||||
Case ShowingModes.Deleted : Return Not UserExists
|
||||
Case ShowingModes.Suspended : Return UserSuspended
|
||||
Case ShowingModes.Labels : Return Settings.Labels.Current.ValuesList.ListContains(Labels)
|
||||
Case ShowingModes.NoLabels : Return Labels.Count = 0
|
||||
Case Else : Return True
|
||||
End Select
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
With Settings
|
||||
If LastUpdated.HasValue And Not .ViewDateMode.Value = ShowingDates.Off Then
|
||||
Dim f As Date = If(.ViewDateFrom.HasValue, .ViewDateFrom.Value.Date, Date.MinValue.Date)
|
||||
Dim t As Date = If(.ViewDateTo.HasValue, .ViewDateTo.Value.Date, Date.MaxValue.Date)
|
||||
Select Case DirectCast(.ViewMode.Value, ShowingDates)
|
||||
Case ShowingDates.In : If Not LastUpdated.Value.ValueBetween(f, t) Then Return False
|
||||
Case ShowingDates.Not : If LastUpdated.Value.ValueBetween(f, t) Then Return False
|
||||
End Select
|
||||
End If
|
||||
If Not .Labels.ExcludedIgnore AndAlso .Labels.Excluded.ValuesList.ListContains(Labels) Then Return False
|
||||
If .SelectedSites.Count = 0 OrElse .SelectedSites.Contains(Site) Then
|
||||
Select Case .ShowingMode.Value
|
||||
Case ShowingModes.Regular : Return Not Temporary And Not Favorite
|
||||
Case ShowingModes.Temporary : Return Temporary
|
||||
Case ShowingModes.Favorite : Return Favorite
|
||||
Case ShowingModes.Deleted : Return Not UserExists
|
||||
Case ShowingModes.Suspended : Return UserSuspended
|
||||
Case ShowingModes.Labels : Return Settings.Labels.Current.ValuesList.ListContains(Labels)
|
||||
Case ShowingModes.NoLabels : Return Labels.Count = 0
|
||||
Case Else : Return True
|
||||
End Select
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End With
|
||||
End Get
|
||||
End Property
|
||||
Friend Function GetLVIGroup(ByVal Destination As ListView) As ListViewGroup Implements IUserData.GetLVIGroup
|
||||
@@ -792,9 +800,52 @@ BlockNullPicture:
|
||||
GlobalOpenPath(MyFile.CutPath)
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Download functions and options"
|
||||
#Region "Download limits"
|
||||
Protected Enum DateResult : [Continue] : [Skip] : [Exit] : End Enum
|
||||
Friend Overridable Property DownloadTopCount As Integer? = Nothing Implements IUserData.DownloadTopCount, IPluginContentProvider.PostsNumberLimit
|
||||
Friend Overridable Property DownloadToDate As Date? = Nothing Implements IUserData.DownloadToDate, IPluginContentProvider.PostsDateLimit
|
||||
Private _DownloadDateFrom As Date? = Nothing
|
||||
Private _DownloadDateFromF As Date
|
||||
Friend Overridable Property DownloadDateFrom As Date? Implements IUserData.DownloadDateFrom, IPluginContentProvider.DownloadDateFrom
|
||||
Get
|
||||
Return _DownloadDateFrom
|
||||
End Get
|
||||
Set(ByVal d As Date?)
|
||||
_DownloadDateFrom = d
|
||||
If _DownloadDateFrom.HasValue Then _DownloadDateFromF = _DownloadDateFrom.Value.Date Else _DownloadDateFromF = Date.MinValue.Date
|
||||
End Set
|
||||
End Property
|
||||
Private _DownloadDateTo As Date? = Nothing
|
||||
Private _DownloadDateToF As Date
|
||||
Friend Overridable Property DownloadDateTo As Date? Implements IUserData.DownloadDateTo, IPluginContentProvider.DownloadDateTo
|
||||
Get
|
||||
Return _DownloadDateTo
|
||||
End Get
|
||||
Set(ByVal d As Date?)
|
||||
_DownloadDateTo = d
|
||||
If _DownloadDateTo.HasValue Then _DownloadDateToF = _DownloadDateTo.Value Else _DownloadDateToF = Date.MaxValue.Date
|
||||
End Set
|
||||
End Property
|
||||
Protected Function CheckDatesLimit(ByVal DateString As String, ByVal DateProvider As IFormatProvider) As DateResult
|
||||
Try
|
||||
If (DownloadDateFrom.HasValue Or DownloadDateTo.HasValue) And Not DateString.IsEmptyString Then
|
||||
Dim td As Date? = AConvert(Of Date)(DateString, DateProvider, Nothing)
|
||||
If td.HasValue Then
|
||||
If td.Value.ValueBetween(_DownloadDateFromF, _DownloadDateToF) Then
|
||||
Return DateResult.Continue
|
||||
ElseIf td.Value > _DownloadDateToF Then
|
||||
Return DateResult.Skip
|
||||
Else
|
||||
Return DateResult.Exit
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Return DateResult.Continue
|
||||
Catch ex As Exception
|
||||
Return ErrorsDescriber.Execute(EDP.SendInLog, ex, $"[UserDataBase.CheckDatesLimit({DateString})]", DateResult.Continue)
|
||||
End Try
|
||||
End Function
|
||||
#End Region
|
||||
#Region "Download functions and options"
|
||||
Protected Responser As Response
|
||||
Friend Overridable Sub DownloadData(ByVal Token As CancellationToken) Implements IContentProvider.DownloadData
|
||||
Dim Canceled As Boolean = False
|
||||
@@ -830,7 +881,7 @@ BlockNullPicture:
|
||||
Else
|
||||
'ReparseMissing(Token)
|
||||
End If
|
||||
_TempMediaList.ListAddList(ContentMissing, LNC)
|
||||
'_TempMediaList.ListAddList(ContentMissing, LNC)
|
||||
|
||||
If _TempMediaList.Count > 0 Then
|
||||
If Not DownloadImages Then _TempMediaList.RemoveAll(Function(m) m.Type = UTypes.GIF Or m.Type = UTypes.Picture)
|
||||
@@ -845,9 +896,12 @@ BlockNullPicture:
|
||||
_ContentNew.ListAddList(_TempMediaList, LAP.ClearBeforeAdd)
|
||||
DownloadContent(Token)
|
||||
ThrowIfDisposed()
|
||||
|
||||
LatestData.ListAddList(_ContentNew.Where(_downContent), LNC)
|
||||
_ContentList.ListAddList(_ContentNew.Where(_downContent), LNC)
|
||||
If DownloadedTotal(False) > 0 Or EnvirChanged.Invoke Or _ContentList.Exists(MissingFinder) Then
|
||||
Dim mcb& = If(ContentMissingExists, _ContentList.LongCount(Function(c) MissingFinder(c)), 0)
|
||||
_ContentList.ListAddList(_ContentNew.Where(Function(c) _downContent(c) Or MissingFinder(c)), LNC)
|
||||
Dim mca& = If(ContentMissingExists, _ContentList.LongCount(Function(c) MissingFinder(c)), 0)
|
||||
If DownloadedTotal(False) > 0 Or EnvirChanged.Invoke Or Not mcb = mca Then
|
||||
If __SaveData Then
|
||||
LastUpdated = Now
|
||||
RunScript()
|
||||
@@ -880,21 +934,11 @@ BlockNullPicture:
|
||||
If Not Canceled Then _DataParsed = True
|
||||
_ContentNew.Clear()
|
||||
DownloadTopCount = Nothing
|
||||
DownloadToDate = Nothing
|
||||
DownloadDateFrom = Nothing
|
||||
DownloadDateTo = Nothing
|
||||
DownloadMissingOnly = False
|
||||
End Try
|
||||
End Sub
|
||||
Protected Function CheckDatesLimit(ByVal DateString As String, ByVal DateProvider As IFormatProvider) As Boolean
|
||||
Try
|
||||
If DownloadToDate.HasValue And Not DateString.IsEmptyString Then
|
||||
Dim td As Date? = AConvert(Of Date)(DateString, DateProvider, Nothing)
|
||||
If td.HasValue Then Return td.Value < DownloadToDate.Value
|
||||
End If
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Return ErrorsDescriber.Execute(EDP.SendInLog, ex, $"[UserDataBase.CheckDatesLimit({DateString})]", True)
|
||||
End Try
|
||||
End Function
|
||||
Protected Sub UpdateDataFiles()
|
||||
If Not User.File.IsEmptyString Then
|
||||
MyFileData = User.File
|
||||
@@ -1210,6 +1254,16 @@ BlockNullPicture:
|
||||
Return IIf(FriendlyName.IsEmptyString, Name, FriendlyName)
|
||||
End If
|
||||
End Function
|
||||
Public Overrides Function GetHashCode() As Integer
|
||||
Dim hcStr$
|
||||
If Not CollectionName.IsEmptyString Then
|
||||
hcStr = CollectionName
|
||||
Else
|
||||
hcStr = IIf(FriendlyName.IsEmptyString, Name, FriendlyName)
|
||||
End If
|
||||
If hcStr.IsEmptyString Then hcStr = LVIKey
|
||||
Return hcStr.GetHashCode
|
||||
End Function
|
||||
#Region "Buttons actions"
|
||||
Private Sub BTT_CONTEXT_DOWN_Click(sender As Object, e As EventArgs) Handles BTT_CONTEXT_DOWN.Click
|
||||
Downloader.Add(Me)
|
||||
@@ -1347,7 +1401,8 @@ BlockNullPicture:
|
||||
Sub OpenFolder()
|
||||
ReadOnly Property Self As IUserData
|
||||
Property DownloadTopCount As Integer?
|
||||
Property DownloadToDate As Date?
|
||||
Property DownloadDateFrom As Date?
|
||||
Property DownloadDateTo As Date?
|
||||
Sub SetEnvironment(ByRef h As SettingsHost, ByVal u As UserInfo, ByVal _LoadUserInformation As Boolean,
|
||||
Optional ByVal AttachUserInfo As Boolean = True)
|
||||
ReadOnly Property Disposed As Boolean
|
||||
|
||||
@@ -247,6 +247,7 @@ Namespace API.Instagram
|
||||
Try
|
||||
Dim n As EContainer, nn As EContainer, node As EContainer
|
||||
Dim HasNextPage As Boolean = False
|
||||
Dim Pinned As Boolean
|
||||
Dim EndCursor$ = String.Empty
|
||||
Dim PostID$ = String.Empty, PostDate$ = String.Empty, SpecFolder$ = String.Empty
|
||||
Dim TaggedCount%
|
||||
@@ -296,7 +297,7 @@ Namespace API.Instagram
|
||||
RequestsCount += 1
|
||||
ThrowAny(Token)
|
||||
|
||||
'Data
|
||||
'Parsing
|
||||
If Not r.IsEmptyString Then
|
||||
Using j As EContainer = JsonDocument.Parse(r).XmlIfNothing
|
||||
n = j.ItemF(ENode).XmlIfNothing
|
||||
@@ -321,13 +322,17 @@ Namespace API.Instagram
|
||||
End If
|
||||
End If
|
||||
PostID = node.Value("id")
|
||||
If Not PostID.IsEmptyString And _TempPostsList.Contains(PostID) Then Throw New ExitException(_DownloadComplete)
|
||||
Pinned = CBool(If(node("pinned_for_users")?.Count, 0))
|
||||
If Not PostID.IsEmptyString And _TempPostsList.Contains(PostID) And Not Pinned Then Throw New ExitException(_DownloadComplete)
|
||||
_TempPostsList.Add(PostID)
|
||||
PostDate = node.Value("taken_at_timestamp")
|
||||
If IsSavedPosts Then
|
||||
_SavedPostsIDs.Add(PostID)
|
||||
Else
|
||||
If Not CheckDatesLimit(PostDate, DateProvider) Then Throw New ExitException(_DownloadComplete)
|
||||
Select Case CheckDatesLimit(PostDate, DateProvider)
|
||||
Case DateResult.Skip : Continue For
|
||||
Case DateResult.Exit : If Not Pinned Then Throw New ExitException(_DownloadComplete)
|
||||
End Select
|
||||
ObtainMedia(node, PostID, PostDate, SpecFolder)
|
||||
End If
|
||||
Next
|
||||
|
||||
@@ -164,6 +164,8 @@ Namespace API.Reddit
|
||||
End If
|
||||
If DownloadTopCount.HasValue Then DownloadLimitCount = DownloadTopCount
|
||||
End If
|
||||
If SaveToCache AndAlso Not Responser.Decoders.Contains(SymbolsConverter.Converters.HTML) Then _
|
||||
Responser.Decoders.Add(SymbolsConverter.Converters.HTML)
|
||||
DownloadDataChannel(String.Empty, Token)
|
||||
If ChannelInfo Is Nothing Then _TempPostsList.ListAddList(_TempMediaList.Select(Function(m) m.Post.ID), LNC)
|
||||
Else
|
||||
@@ -228,7 +230,10 @@ Namespace API.Reddit
|
||||
Continue For
|
||||
End If
|
||||
If nn.Contains("created") Then PostDate = nn("created").Value Else PostDate = String.Empty
|
||||
If DownloadToDate.HasValue AndAlso Not CheckDatesLimit(PostDate, DateTrueProvider(IsChannel)) Then Exit Sub
|
||||
Select Case CheckDatesLimit(PostDate, DateTrueProvider(IsChannel))
|
||||
Case DateResult.Skip : Continue For
|
||||
Case DateResult.Exit : Exit Sub
|
||||
End Select
|
||||
|
||||
_ItemsBefore = _TempMediaList.Count
|
||||
added = True
|
||||
@@ -371,9 +376,10 @@ Namespace API.Reddit
|
||||
ElseIf Not s.Value({"media", "reddit_video"}, "fallback_url").IsEmptyString Then
|
||||
tmpUrl = s.Value({"media", "reddit_video"}, "fallback_url")
|
||||
If SaveToCache Then
|
||||
tmpUrl = s.Value("thumbnail")
|
||||
'tmpUrl = s.Value("thumbnail")
|
||||
tmpUrl = GetVideoRedditPreview(s)
|
||||
If Not tmpUrl.IsEmptyString Then
|
||||
_TempMediaList.ListAddValue(MediaFromData(UTypes.Picture, tmpUrl, PostID, PostDate, _UserID, IsChannel), LNC)
|
||||
_TempMediaList.ListAddValue(MediaFromData(UTypes.Picture, tmpUrl, PostID, PostDate, _UserID, IsChannel, False), LNC)
|
||||
_TotalPostsDownloaded += 1
|
||||
End If
|
||||
ElseIf UseM3U8 AndAlso Not s.Value({"media", "reddit_video"}, "hls_url").IsEmptyString Then
|
||||
@@ -471,6 +477,38 @@ Namespace API.Reddit
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Private Function GetVideoRedditPreview(ByVal Node As EContainer) As String
|
||||
Try
|
||||
If Not Node Is Nothing Then
|
||||
Dim n As EContainer = Node.ItemF({"preview", "images", 0})
|
||||
Dim DestNode$() = Nothing
|
||||
If If(n?.Count, 0) > 0 Then
|
||||
If If(n("resolutions")?.Count, 0) > 0 Then
|
||||
DestNode = {"resolutions"}
|
||||
ElseIf If(n({"variants", "nsfw", "resolutions"})?.Count, 0) > 0 Then
|
||||
DestNode = {"variants", "nsfw", "resolutions"}
|
||||
End If
|
||||
If Not DestNode Is Nothing Then
|
||||
With n(DestNode)
|
||||
Dim sl As List(Of Sizes) = .Select(Function(e) New Sizes(e.Value("width"), e.Value("url"))).
|
||||
ListWithRemove(Function(ss) ss.HasError Or ss.Data.IsEmptyString)
|
||||
If sl.ListExists Then
|
||||
Dim s As Sizes
|
||||
sl.Sort()
|
||||
s = sl.First
|
||||
sl.Clear()
|
||||
Return s.Data
|
||||
End If
|
||||
End With
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Return String.Empty
|
||||
Catch ex As Exception
|
||||
ProcessException(ex, Nothing, "reddit video preview parsing error", False)
|
||||
Return String.Empty
|
||||
End Try
|
||||
End Function
|
||||
Protected Overrides Sub ReparseVideo(ByVal Token As CancellationToken)
|
||||
Try
|
||||
ThrowAny(Token)
|
||||
@@ -593,12 +631,13 @@ Namespace API.Reddit
|
||||
#End Region
|
||||
#Region "Structure creator"
|
||||
Protected Shared Function MediaFromData(ByVal t As UTypes, ByVal _URL As String, ByVal PostID As String, ByVal PostDate As String,
|
||||
Optional ByVal _UserID As String = "", Optional ByVal IsChannel As Boolean = False) As UserMedia
|
||||
Optional ByVal _UserID As String = "", Optional ByVal IsChannel As Boolean = False,
|
||||
Optional ByVal ReplacePreview As Boolean = True) As UserMedia
|
||||
If _URL.IsEmptyString And t = UTypes.Picture Then Return Nothing
|
||||
_URL = LinkFormatterSecure(RegexReplace(_URL.Replace("\", String.Empty), LinkPattern))
|
||||
Dim m As New UserMedia(_URL, t) With {.Post = New UserPost With {.ID = PostID, .UserID = _UserID}}
|
||||
If t = UTypes.Picture Or t = UTypes.GIF Then m.File = UrlToFile(m.URL) Else m.File = Nothing
|
||||
If m.URL.Contains("preview") Then m.URL = $"https://i.redd.it/{m.File.File}"
|
||||
If ReplacePreview And m.URL.Contains("preview") Then m.URL = $"https://i.redd.it/{m.File.File}"
|
||||
If Not PostDate.IsEmptyString Then m.Post.Date = AConvert(Of Date)(PostDate, DateTrueProvider(IsChannel), Nothing) Else m.Post.Date = Nothing
|
||||
Return m
|
||||
End Function
|
||||
@@ -765,7 +804,11 @@ Namespace API.Reddit
|
||||
dCount += 1
|
||||
End If
|
||||
Catch wex As Exception
|
||||
If Not IsChannel And Not IsImgurStuff And MissingErrorsAdd Then ErrorDownloading(f, v.URL)
|
||||
If Not IsChannel Then
|
||||
If Not IsImgurStuff And MissingErrorsAdd Then ErrorDownloading(f, v.URL)
|
||||
v.Attempts += 1
|
||||
v.State = UStates.Missing
|
||||
End If
|
||||
End Try
|
||||
If ImgurUrls.Count > 0 Then ImgurUrls.RemoveAt(0)
|
||||
Loop While ImgurUrls.Count > 0
|
||||
|
||||
@@ -37,7 +37,10 @@ Namespace API.RedGifs
|
||||
pTotal = j.Value("pages").FromXML(Of Integer)(0)
|
||||
For Each g As EContainer In j("gifs")
|
||||
postDate = g.Value("createDate")
|
||||
If Not CheckDatesLimit(postDate, DateProvider) Then Exit Sub
|
||||
Select Case CheckDatesLimit(postDate, DateProvider)
|
||||
Case DateResult.Skip : Continue For
|
||||
Case DateResult.Exit : Exit Sub
|
||||
End Select
|
||||
postID = g.Value("id")
|
||||
If Not _TempPostsList.Contains(postID) Then _TempPostsList.Add(postID) Else Exit For
|
||||
ObtainMedia(g, postID, postDate)
|
||||
|
||||
@@ -86,7 +86,10 @@ Namespace API.Twitter
|
||||
'Date Pattern:
|
||||
'Sat Jan 01 01:10:15 +0000 2000
|
||||
If nn.Contains("created_at") Then PostDate = nn("created_at").Value Else PostDate = String.Empty
|
||||
If Not CheckDatesLimit(PostDate, Declarations.DateProvider) Then Exit Sub
|
||||
Select Case CheckDatesLimit(PostDate, Declarations.DateProvider)
|
||||
Case DateResult.Skip : Continue For
|
||||
Case DateResult.Exit : Exit Sub
|
||||
End Select
|
||||
|
||||
If Not _TempPostsList.Contains(PostID) Then
|
||||
NewPostDetected = True
|
||||
|
||||
BIN
SCrawler/Content/Pictures/StopPic32.png
Normal file
BIN
SCrawler/Content/Pictures/StopPic32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 652 B |
@@ -16,9 +16,9 @@ Imports SCrawler.API
|
||||
Imports SCrawler.API.Base
|
||||
Namespace DownloadObjects
|
||||
Friend Class AutoDownloader : Inherits GroupParameters : Implements IEContainerProvider
|
||||
Friend Shared ReadOnly Property CachePath As SFile
|
||||
Private Shared ReadOnly Property CachePath As SFile
|
||||
Get
|
||||
Return "_Cache\"
|
||||
Return Settings.CachePath
|
||||
End Get
|
||||
End Property
|
||||
Friend Enum Modes As Integer
|
||||
|
||||
@@ -44,6 +44,7 @@ Namespace DownloadObjects
|
||||
Private Sub DownloadFeedForm_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
With MyDefs
|
||||
.MyViewInitialize()
|
||||
LastWinState = WindowState
|
||||
With MyRange
|
||||
.AutoToolTip = True
|
||||
.ButtonKey(RCI.Previous) = Keys.F3
|
||||
@@ -91,7 +92,7 @@ Namespace DownloadObjects
|
||||
Dim p% = IIf(DataColumns = 1, 100, 50)
|
||||
For i = 0 To DataColumns - 1 : .ColumnStyles.Add(New ColumnStyle(SizeType.Percent, p)) : Next
|
||||
.ColumnCount = .ColumnStyles.Count
|
||||
For i = 0 To DataRows - 1 : .RowStyles.Add(New RowStyle(SizeType.Absolute, 0)) : Next
|
||||
For i = 0 To DataRows : .RowStyles.Add(New RowStyle(SizeType.Absolute, 0)) : Next
|
||||
.RowCount = .RowStyles.Count
|
||||
.HorizontalScroll.Visible = False
|
||||
End With
|
||||
@@ -177,8 +178,8 @@ Namespace DownloadObjects
|
||||
Friend ReadOnly Row As Integer
|
||||
Friend ReadOnly Column As Integer
|
||||
Friend Sub New(ByVal RowsCount As Integer, ByVal ColumnsCount As Integer)
|
||||
Me.RowsCount = RowsCount - 1
|
||||
Me.ColumnsCount = ColumnsCount - 1
|
||||
Me.RowsCount = RowsCount
|
||||
Me.ColumnsCount = ColumnsCount
|
||||
Row = 0
|
||||
Column = 0
|
||||
End Sub
|
||||
@@ -190,86 +191,71 @@ Namespace DownloadObjects
|
||||
Friend Function [Next]() As TPCELL
|
||||
Dim r% = Row
|
||||
Dim c% = Column + 1
|
||||
If Not c.ValueBetween(0, ColumnsCount) Then c = 0 : r += 1
|
||||
If Not c.ValueBetween(0, ColumnsCount - 1) Then c = 0 : r += 1
|
||||
Return New TPCELL(RowsCount, ColumnsCount, r, c)
|
||||
End Function
|
||||
End Structure
|
||||
Private RefillInProgress As Boolean = False
|
||||
Private Sub MyRange_IndexChanged(ByVal Sender As IRangeSwitcherProvider, ByVal e As EventArgs) Handles MyRange.IndexChanged
|
||||
Try
|
||||
If Sender.CurrentIndex >= 0 Then
|
||||
If Not RefillInProgress AndAlso Sender.CurrentIndex >= 0 Then
|
||||
RefillInProgress = True
|
||||
AllowTopScroll = False
|
||||
ScrollSuspended = True
|
||||
Dim d As List(Of Integer) = MyRange.Indexes(Sender.CurrentIndex, EDP.ReturnValue).ListIfNothing
|
||||
Dim d As List(Of UserMediaD) = MyRange.Current
|
||||
Dim d2 As List(Of UserMediaD)
|
||||
Dim i%
|
||||
If d.Count > 0 Then
|
||||
If d.ListExists Then
|
||||
ClearTable()
|
||||
If Sender.CurrentIndex > 0 And FeedEndless Then
|
||||
i = MyRange.Indexes(Sender.CurrentIndex - 1, EDP.ReturnValue).DefaultIfEmpty(-1).Last
|
||||
If i.ValueBetween(0, DataList.Count - 1) Then
|
||||
If d.Count = 0 Then d.Add(i) Else d.Insert(0, i)
|
||||
End If
|
||||
d2 = DirectCast(MyRange.Switcher, RangeSwitcher(Of UserMediaD)).Item(Sender.CurrentIndex - 1).ListTake(-2, DataColumns, EDP.ReturnValue).ListIfNothing
|
||||
If d2.Count > 0 Then d.InsertRange(0, d2) : d2.Clear()
|
||||
End If
|
||||
Dim w% = GetWidth()
|
||||
Dim hp% = PaddingE.GetOf({TP_DATA}).Vertical(2)
|
||||
Dim p As New TPCELL(DataRows, DataColumns)
|
||||
Dim fmList As New List(Of FeedMedia)
|
||||
Dim rhd As New Dictionary(Of Integer, List(Of Integer))
|
||||
For Each i In d
|
||||
If i.ValueBetween(0, DataList.Count - 1) Then fmList.Add(New FeedMedia(DataList(i), w))
|
||||
Next
|
||||
d.ForEach(Sub(de) fmList.Add(New FeedMedia(de, w)))
|
||||
If fmList.Count > 0 Then fmList.ListDisposeRemoveAll(Function(fm) fm Is Nothing OrElse fm.HasError)
|
||||
If fmList.Count > 0 Then
|
||||
For i = 0 To fmList.Count - 1
|
||||
If Not rhd.ContainsKey(p.Row) Then rhd.Add(p.Row, New List(Of Integer))
|
||||
rhd(p.Row).Add(fmList(i).Height)
|
||||
p = p.Next
|
||||
Next
|
||||
p = New TPCELL(DataRows, DataColumns)
|
||||
ControlInvoke(TP_DATA, Sub()
|
||||
With TP_DATA
|
||||
With .RowStyles
|
||||
For i = 0 To .Count - 1
|
||||
With .Item(i) : .SizeType = SizeType.Absolute : .Height = 0 : End With
|
||||
Next
|
||||
End With
|
||||
.AutoScroll = False
|
||||
.AutoScroll = True
|
||||
End With
|
||||
End Sub)
|
||||
For i = 0 To fmList.Count - 1
|
||||
ControlInvoke(TP_DATA, Sub()
|
||||
With TP_DATA
|
||||
With .RowStyles(p.Row) : .SizeType = SizeType.Absolute : .Height = rhd(p.Row).Max : End With
|
||||
.Controls.Add(fmList(i), p.Column, p.Row)
|
||||
End With
|
||||
End Sub)
|
||||
ControlInvoke(TP_DATA, Sub() TP_DATA.Controls.Add(fmList(i), p.Column, p.Row))
|
||||
p = p.Next
|
||||
Next
|
||||
End If
|
||||
ResizeGrid()
|
||||
fmList.Clear()
|
||||
rhd.ListForEach(Sub(kv, ii) kv.Value.Clear())
|
||||
rhd.Clear()
|
||||
d.Clear()
|
||||
End If
|
||||
RefillInProgress = False
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ErrorsDescriber.Execute(EDP.SendInLog, ex, $"[DownloadObjects.DownloadFeedForm.Range.IndexChanged({Sender.CurrentIndex})]")
|
||||
RefillInProgress = False
|
||||
Finally
|
||||
ControlInvoke(TP_DATA, Sub()
|
||||
With TP_DATA.VerticalScroll
|
||||
If Offset = 1 Then .Value = 0 Else .Value = .Maximum
|
||||
End With
|
||||
End Sub)
|
||||
ScrollSuspended = False
|
||||
DataPopulated = True
|
||||
If Not RefillInProgress Then
|
||||
ControlInvoke(TP_DATA, Sub()
|
||||
With TP_DATA.VerticalScroll
|
||||
If Offset = 1 Then .Value = 0 Else .Value = .Maximum
|
||||
End With
|
||||
End Sub)
|
||||
ScrollSuspended = False
|
||||
DataPopulated = True
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Size"
|
||||
Private LastWinState As FormWindowState = FormWindowState.Normal
|
||||
Private Function GetWidth() As Integer
|
||||
Return (TP_DATA.Width - PaddingE.GetOf({Me, TP_DATA}).Horizontal(2)) / DataColumns
|
||||
End Function
|
||||
Private Sub DownloadFeedForm_ResizeEnd(sender As Object, e As EventArgs) Handles Me.ResizeEnd
|
||||
ResizeGrid()
|
||||
End Sub
|
||||
Private Sub DownloadFeedForm_SizeChanged(sender As Object, e As EventArgs) Handles Me.SizeChanged
|
||||
If Not LastWinState = WindowState And Not If(MyDefs?.Initializing, True) Then LastWinState = WindowState : ResizeGrid()
|
||||
End Sub
|
||||
Private Sub ResizeGrid()
|
||||
ControlInvoke(TP_DATA, Sub()
|
||||
With TP_DATA
|
||||
If .Controls.Count > 0 Then
|
||||
@@ -282,9 +268,10 @@ Namespace DownloadObjects
|
||||
If Not rh.ContainsKey(p.Row) Then rh.Add(p.Row, New List(Of Integer))
|
||||
rh(p.Row).Add(cnt.Height)
|
||||
Next
|
||||
For i% = 0 To .RowStyles.Count - 1 : .RowStyles(i).Height = 0 : Next
|
||||
If rh.Count > 0 Then
|
||||
For Each kv In rh
|
||||
With .RowStyles(kv.Key) : .SizeType = SizeType.Absolute : .Height = kv.Value.Max : End With
|
||||
.RowStyles(kv.Key).Height = kv.Value.Max
|
||||
kv.Value.Clear()
|
||||
Next
|
||||
End If
|
||||
|
||||
16
SCrawler/Download/FeedMedia.Designer.vb
generated
16
SCrawler/Download/FeedMedia.Designer.vb
generated
@@ -27,7 +27,6 @@ Namespace DownloadObjects
|
||||
Dim CONTEXT_SEP_2 As System.Windows.Forms.ToolStripSeparator
|
||||
Dim CONTEXT_SEP_3 As System.Windows.Forms.ToolStripSeparator
|
||||
Dim TP_LBL As System.Windows.Forms.TableLayoutPanel
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FeedMedia))
|
||||
Me.CH_CHECKED = New System.Windows.Forms.CheckBox()
|
||||
Me.LBL_INFO = New System.Windows.Forms.Label()
|
||||
Me.CONTEXT_DATA = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
@@ -39,7 +38,6 @@ Namespace DownloadObjects
|
||||
Me.BTT_CONTEXT_INFO = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_CONTEXT_DELETE = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.TP_MAIN = New System.Windows.Forms.TableLayoutPanel()
|
||||
Me.MyVideo = New AxWMPLib.AxWindowsMediaPlayer()
|
||||
CONTEXT_SEP_1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
CONTEXT_SEP_2 = New System.Windows.Forms.ToolStripSeparator()
|
||||
CONTEXT_SEP_3 = New System.Windows.Forms.ToolStripSeparator()
|
||||
@@ -47,7 +45,6 @@ Namespace DownloadObjects
|
||||
TP_LBL.SuspendLayout()
|
||||
Me.CONTEXT_DATA.SuspendLayout()
|
||||
Me.TP_MAIN.SuspendLayout()
|
||||
CType(Me.MyVideo, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'CONTEXT_SEP_1
|
||||
@@ -164,7 +161,6 @@ Namespace DownloadObjects
|
||||
Me.TP_MAIN.ColumnCount = 1
|
||||
Me.TP_MAIN.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
Me.TP_MAIN.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
|
||||
Me.TP_MAIN.Controls.Add(Me.MyVideo, 0, 1)
|
||||
Me.TP_MAIN.Controls.Add(TP_LBL, 0, 0)
|
||||
Me.TP_MAIN.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TP_MAIN.Location = New System.Drawing.Point(0, 0)
|
||||
@@ -176,16 +172,6 @@ Namespace DownloadObjects
|
||||
Me.TP_MAIN.Size = New System.Drawing.Size(146, 146)
|
||||
Me.TP_MAIN.TabIndex = 0
|
||||
'
|
||||
'MyVideo
|
||||
'
|
||||
Me.MyVideo.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.MyVideo.Enabled = True
|
||||
Me.MyVideo.Location = New System.Drawing.Point(3, 28)
|
||||
Me.MyVideo.Name = "MyVideo"
|
||||
Me.MyVideo.OcxState = CType(resources.GetObject("MyVideo.OcxState"), System.Windows.Forms.AxHost.State)
|
||||
Me.MyVideo.Size = New System.Drawing.Size(140, 115)
|
||||
Me.MyVideo.TabIndex = 1
|
||||
'
|
||||
'FeedMedia
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -201,7 +187,6 @@ Namespace DownloadObjects
|
||||
TP_LBL.PerformLayout()
|
||||
Me.CONTEXT_DATA.ResumeLayout(False)
|
||||
Me.TP_MAIN.ResumeLayout(False)
|
||||
CType(Me.MyVideo, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
@@ -213,7 +198,6 @@ Namespace DownloadObjects
|
||||
Private WithEvents BTT_CONTEXT_OPEN_USER_POST As ToolStripMenuItem
|
||||
Private WithEvents BTT_CONTEXT_FIND_USER As ToolStripMenuItem
|
||||
Private WithEvents BTT_CONTEXT_DELETE As ToolStripMenuItem
|
||||
Private WithEvents MyVideo As AxWMPLib.AxWindowsMediaPlayer
|
||||
Private WithEvents BTT_CONTEXT_OPEN_USER As ToolStripMenuItem
|
||||
Private WithEvents CH_CHECKED As CheckBox
|
||||
Private WithEvents LBL_INFO As Label
|
||||
|
||||
@@ -132,15 +132,4 @@
|
||||
<metadata name="CONTEXT_DATA.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="MyVideo.OcxState" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAtwAAAAIB
|
||||
AAAAAQAAAAAAAAAAAAAAAKIAAAAAAwAACAAAAAAABQAAAAAAAADwPwMAAAAAAAUAAAAAAAAAAAAIAAIA
|
||||
AAAAAAMAAQAAAAsA//8DAAAAAAALAP//CAACAAAAAAADADIAAAALAAAACAAKAAAAZgB1AGwAbAAAAAsA
|
||||
AAALAAAACwD//wsA//8LAAAACAACAAAAAAAIAAIAAAAAAAgAAgAAAAAACAACAAAAAAALAAAA4g4AAE0M
|
||||
AAAL
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -11,7 +11,6 @@ Imports System.ComponentModel
|
||||
Imports PersonalUtilities.Forms
|
||||
Imports PersonalUtilities.Tools
|
||||
Imports SCrawler.API.Base
|
||||
Imports AxWMPLib
|
||||
Imports UserMediaD = SCrawler.DownloadObjects.TDownloader.UserMediaD
|
||||
Namespace DownloadObjects
|
||||
<ToolboxItem(False), DesignTimeVisible(False)>
|
||||
@@ -20,6 +19,7 @@ Namespace DownloadObjects
|
||||
Private Const VideoHeight As Integer = 450
|
||||
Private WithEvents MyPicture As PictureBox
|
||||
Private ReadOnly MyImage As ImageRenderer
|
||||
Private ReadOnly MyVideo As FeedVideo
|
||||
Friend ReadOnly Property Exists As Boolean
|
||||
Get
|
||||
Return Not MyPicture Is Nothing Or Not MyVideo Is Nothing
|
||||
@@ -106,16 +106,12 @@ Namespace DownloadObjects
|
||||
.Padding = New Padding(0),
|
||||
.ContextMenuStrip = CONTEXT_DATA
|
||||
}
|
||||
TP_MAIN.Controls.Remove(MyVideo)
|
||||
MyVideo.Dispose()
|
||||
MyVideo = Nothing
|
||||
TP_MAIN.Controls.Add(MyPicture, 0, 1)
|
||||
BTT_CONTEXT_OPEN_MEDIA.Text &= " picture"
|
||||
BTT_CONTEXT_DELETE.Text &= " picture"
|
||||
Case UserMedia.Types.Video
|
||||
MyVideo.Tag = File
|
||||
MyVideo = New FeedVideo(File) With {.Tag = File, .Dock = DockStyle.Fill, .ContextMenuStrip = CONTEXT_DATA}
|
||||
TP_MAIN.Controls.Add(MyVideo, 0, 1)
|
||||
MyVideo.URL = File.ToString
|
||||
BTT_CONTEXT_OPEN_MEDIA.Text &= " video"
|
||||
BTT_CONTEXT_DELETE.Text &= " video"
|
||||
h = VideoHeight
|
||||
@@ -158,6 +154,7 @@ Namespace DownloadObjects
|
||||
Private Sub FeedImage_Disposed(sender As Object, e As EventArgs) Handles Me.Disposed
|
||||
If Not MyImage Is Nothing Then MyImage.Dispose()
|
||||
If Not MyPicture Is Nothing Then MyPicture.Dispose()
|
||||
If Not MyVideo Is Nothing Then MyVideo.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "LBL"
|
||||
@@ -172,21 +169,6 @@ Namespace DownloadObjects
|
||||
Private Sub MyPicture_DoubleClick(sender As Object, e As EventArgs) Handles MyPicture.DoubleClick
|
||||
Try : Process.Start(File) : Catch : End Try
|
||||
End Sub
|
||||
Private VideoPaused As Boolean = False
|
||||
Private Sub MyVideo_PlayStateChange(sender As Object, e As _WMPOCXEvents_PlayStateChangeEvent) Handles MyVideo.PlayStateChange
|
||||
Try
|
||||
If Not VideoPaused Then
|
||||
With MyVideo
|
||||
If .playState = WMPLib.WMPPlayState.wmppsPlaying Then
|
||||
.Ctlcontrols.currentPosition = 1
|
||||
.Ctlcontrols.pause()
|
||||
VideoPaused = True
|
||||
End If
|
||||
End With
|
||||
End If
|
||||
Catch
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Context"
|
||||
Private Sub BTT_CONTEXT_OPEN_MEDIA_Click(sender As Object, e As EventArgs) Handles BTT_CONTEXT_OPEN_MEDIA.Click
|
||||
@@ -236,6 +218,7 @@ Namespace DownloadObjects
|
||||
If Not Silent Then MsgBoxE({"File deleted", msgTitle})
|
||||
LBL_INFO.Height = 0
|
||||
If Not MyPicture Is Nothing Then MyPicture.Size = New Size(0, 0)
|
||||
If Not MyVideo Is Nothing Then MyVideo.MinimumSize = New Size(0, 0) : MyVideo.Size = New Size(0, 0)
|
||||
Height = 0
|
||||
Return True
|
||||
End If
|
||||
|
||||
182
SCrawler/Download/FeedVideo.Designer.vb
generated
Normal file
182
SCrawler/Download/FeedVideo.Designer.vb
generated
Normal file
@@ -0,0 +1,182 @@
|
||||
' Copyright (C) 2022 Andy
|
||||
' This program is free software: you can redistribute it and/or modify
|
||||
' it under the terms of the GNU General Public License as published by
|
||||
' the Free Software Foundation, either version 3 of the License, or
|
||||
' (at your option) any later version.
|
||||
'
|
||||
' This program is distributed in the hope that it will be useful,
|
||||
' but WITHOUT ANY WARRANTY
|
||||
Namespace DownloadObjects
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Public Class FeedVideo : Inherits System.Windows.Forms.UserControl
|
||||
<System.Diagnostics.DebuggerNonUserCode()>
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
Private components As System.ComponentModel.IContainer
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Dim TP_MAIN As System.Windows.Forms.TableLayoutPanel
|
||||
Dim TP_BUTTONS As System.Windows.Forms.TableLayoutPanel
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FeedVideo))
|
||||
Me.MyVideo = New LibVLCSharp.WinForms.VideoView()
|
||||
Me.TR_POSITION = New System.Windows.Forms.TrackBar()
|
||||
Me.TR_VOLUME = New System.Windows.Forms.TrackBar()
|
||||
Me.LBL_TIME = New System.Windows.Forms.Label()
|
||||
Me.BTT_PLAY = New System.Windows.Forms.Button()
|
||||
Me.BTT_PAUSE = New System.Windows.Forms.Button()
|
||||
Me.BTT_STOP = New System.Windows.Forms.Button()
|
||||
TP_MAIN = New System.Windows.Forms.TableLayoutPanel()
|
||||
TP_BUTTONS = New System.Windows.Forms.TableLayoutPanel()
|
||||
TP_MAIN.SuspendLayout()
|
||||
CType(Me.MyVideo, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.TR_POSITION, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
TP_BUTTONS.SuspendLayout()
|
||||
CType(Me.TR_VOLUME, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'TP_MAIN
|
||||
'
|
||||
TP_MAIN.ColumnCount = 1
|
||||
TP_MAIN.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
TP_MAIN.Controls.Add(Me.MyVideo, 0, 0)
|
||||
TP_MAIN.Controls.Add(Me.TR_POSITION, 0, 1)
|
||||
TP_MAIN.Controls.Add(TP_BUTTONS, 0, 2)
|
||||
TP_MAIN.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
TP_MAIN.Location = New System.Drawing.Point(0, 0)
|
||||
TP_MAIN.Margin = New System.Windows.Forms.Padding(0)
|
||||
TP_MAIN.Name = "TP_MAIN"
|
||||
TP_MAIN.RowCount = 3
|
||||
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.Absolute, 25.0!))
|
||||
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
||||
TP_MAIN.Size = New System.Drawing.Size(180, 160)
|
||||
TP_MAIN.TabIndex = 0
|
||||
'
|
||||
'MyVideo
|
||||
'
|
||||
Me.MyVideo.BackColor = System.Drawing.Color.Black
|
||||
Me.MyVideo.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.MyVideo.Location = New System.Drawing.Point(1, 1)
|
||||
Me.MyVideo.Margin = New System.Windows.Forms.Padding(1)
|
||||
Me.MyVideo.MediaPlayer = Nothing
|
||||
Me.MyVideo.Name = "MyVideo"
|
||||
Me.MyVideo.Size = New System.Drawing.Size(178, 105)
|
||||
Me.MyVideo.TabIndex = 0
|
||||
'
|
||||
'TR_POSITION
|
||||
'
|
||||
Me.TR_POSITION.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TR_POSITION.Location = New System.Drawing.Point(3, 110)
|
||||
Me.TR_POSITION.Name = "TR_POSITION"
|
||||
Me.TR_POSITION.Size = New System.Drawing.Size(174, 19)
|
||||
Me.TR_POSITION.TabIndex = 1
|
||||
'
|
||||
'TP_BUTTONS
|
||||
'
|
||||
TP_BUTTONS.ColumnCount = 5
|
||||
TP_BUTTONS.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
TP_BUTTONS.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
TP_BUTTONS.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
TP_BUTTONS.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
TP_BUTTONS.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100.0!))
|
||||
TP_BUTTONS.Controls.Add(Me.BTT_PLAY, 0, 0)
|
||||
TP_BUTTONS.Controls.Add(Me.BTT_PAUSE, 1, 0)
|
||||
TP_BUTTONS.Controls.Add(Me.BTT_STOP, 2, 0)
|
||||
TP_BUTTONS.Controls.Add(Me.TR_VOLUME, 4, 0)
|
||||
TP_BUTTONS.Controls.Add(Me.LBL_TIME, 3, 0)
|
||||
TP_BUTTONS.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
TP_BUTTONS.Location = New System.Drawing.Point(1, 133)
|
||||
TP_BUTTONS.Margin = New System.Windows.Forms.Padding(1)
|
||||
TP_BUTTONS.Name = "TP_BUTTONS"
|
||||
TP_BUTTONS.RowCount = 1
|
||||
TP_BUTTONS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
TP_BUTTONS.Size = New System.Drawing.Size(178, 26)
|
||||
TP_BUTTONS.TabIndex = 2
|
||||
'
|
||||
'TR_VOLUME
|
||||
'
|
||||
Me.TR_VOLUME.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TR_VOLUME.Location = New System.Drawing.Point(81, 3)
|
||||
Me.TR_VOLUME.Name = "TR_VOLUME"
|
||||
Me.TR_VOLUME.Size = New System.Drawing.Size(94, 20)
|
||||
Me.TR_VOLUME.TabIndex = 3
|
||||
'
|
||||
'LBL_TIME
|
||||
'
|
||||
Me.LBL_TIME.AutoSize = True
|
||||
Me.LBL_TIME.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.LBL_TIME.Location = New System.Drawing.Point(78, 0)
|
||||
Me.LBL_TIME.Name = "LBL_TIME"
|
||||
Me.LBL_TIME.Size = New System.Drawing.Size(1, 26)
|
||||
Me.LBL_TIME.TabIndex = 4
|
||||
Me.LBL_TIME.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'BTT_PLAY
|
||||
'
|
||||
Me.BTT_PLAY.BackgroundImage = Global.SCrawler.My.Resources.Resources.StartPic_01_Green_16
|
||||
Me.BTT_PLAY.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.BTT_PLAY.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.BTT_PLAY.Location = New System.Drawing.Point(1, 1)
|
||||
Me.BTT_PLAY.Margin = New System.Windows.Forms.Padding(1)
|
||||
Me.BTT_PLAY.Name = "BTT_PLAY"
|
||||
Me.BTT_PLAY.Size = New System.Drawing.Size(23, 24)
|
||||
Me.BTT_PLAY.TabIndex = 0
|
||||
Me.BTT_PLAY.UseVisualStyleBackColor = True
|
||||
'
|
||||
'BTT_PAUSE
|
||||
'
|
||||
Me.BTT_PAUSE.BackgroundImage = Global.SCrawler.My.Resources.Resources.Pause_Blue_16
|
||||
Me.BTT_PAUSE.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.BTT_PAUSE.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.BTT_PAUSE.Location = New System.Drawing.Point(26, 1)
|
||||
Me.BTT_PAUSE.Margin = New System.Windows.Forms.Padding(1)
|
||||
Me.BTT_PAUSE.Name = "BTT_PAUSE"
|
||||
Me.BTT_PAUSE.Size = New System.Drawing.Size(23, 24)
|
||||
Me.BTT_PAUSE.TabIndex = 1
|
||||
Me.BTT_PAUSE.UseVisualStyleBackColor = True
|
||||
'
|
||||
'BTT_STOP
|
||||
'
|
||||
Me.BTT_STOP.BackgroundImage = CType(resources.GetObject("BTT_STOP.BackgroundImage"), System.Drawing.Image)
|
||||
Me.BTT_STOP.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.BTT_STOP.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.BTT_STOP.Location = New System.Drawing.Point(51, 1)
|
||||
Me.BTT_STOP.Margin = New System.Windows.Forms.Padding(1)
|
||||
Me.BTT_STOP.Name = "BTT_STOP"
|
||||
Me.BTT_STOP.Size = New System.Drawing.Size(23, 24)
|
||||
Me.BTT_STOP.TabIndex = 2
|
||||
Me.BTT_STOP.UseVisualStyleBackColor = True
|
||||
'
|
||||
'FeedVideo
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.Controls.Add(TP_MAIN)
|
||||
Me.Name = "FeedVideo"
|
||||
Me.Size = New System.Drawing.Size(180, 160)
|
||||
TP_MAIN.ResumeLayout(False)
|
||||
TP_MAIN.PerformLayout()
|
||||
CType(Me.MyVideo, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.TR_POSITION, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
TP_BUTTONS.ResumeLayout(False)
|
||||
TP_BUTTONS.PerformLayout()
|
||||
CType(Me.TR_VOLUME, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
Private WithEvents MyVideo As LibVLCSharp.WinForms.VideoView
|
||||
Private WithEvents TR_POSITION As TrackBar
|
||||
Private WithEvents BTT_PLAY As Button
|
||||
Private WithEvents BTT_PAUSE As Button
|
||||
Private WithEvents BTT_STOP As Button
|
||||
Private WithEvents TR_VOLUME As TrackBar
|
||||
Private WithEvents LBL_TIME As Label
|
||||
End Class
|
||||
End Namespace
|
||||
140
SCrawler/Download/FeedVideo.resx
Normal file
140
SCrawler/Download/FeedVideo.resx
Normal file
@@ -0,0 +1,140 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="TP_MAIN.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="TP_BUTTONS.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="BTT_STOP.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAGLSURBVFhH7Vc7TsNAEPUNaDhAxAl8EaT0UKRFoqdNTcsp
|
||||
qHIEHyGn4CNAiihwu7w3mTFrZeI466Ch4Emv8O7Mm9nd8X6qsWjbtgaXYAOmPWQfbWp1mw6ILcA16AUc
|
||||
In0WKnM84DwDu9F+vb6kzcN9eru6TM8XZ+npvOqRbeyjDW3NTzVmKjsOcJiDGwpQ7P3meifgIdInS4Ra
|
||||
c5UfBgw55eL4uXp0RzuW9KWG6VFbw/iAAUcuxh93t65oCalluoyh4fpAB9dcpv2UwY1ZEoyxWxNolILj
|
||||
lHkCp2C2HI2G3QINsu4smilrfojUzgrzpx7wIf/5vmovhafFGJrA2oJzh5PMPAeyFJ4Wmc1CzQS4dcoG
|
||||
4hmTpfC0SMbSBJZd8XEX84zJUnhaJGNpAg0TkI+h4iuFp0UylsXtEvAMjaXwtIz/Cfy9BCKLMPw3DN+I
|
||||
YrdiPQ/iDiMCHxHHcf9mhIa4CwmBxtgrGYGOuEupAQZx13IDDOMeJgY4xD3NcsB5yuP0uFEPAWK/8Dyv
|
||||
qm/Ki638CNApKAAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
114
SCrawler/Download/FeedVideo.vb
Normal file
114
SCrawler/Download/FeedVideo.vb
Normal file
@@ -0,0 +1,114 @@
|
||||
' Copyright (C) 2022 Andy
|
||||
' This program is free software: you can redistribute it and/or modify
|
||||
' it under the terms of the GNU General Public License as published by
|
||||
' the Free Software Foundation, either version 3 of the License, or
|
||||
' (at your option) any later version.
|
||||
'
|
||||
' This program is distributed in the hope that it will be useful,
|
||||
' but WITHOUT ANY WARRANTY
|
||||
Imports LibVLCSharp
|
||||
Imports System.ComponentModel
|
||||
Imports PersonalUtilities.Tools
|
||||
Imports PersonalUtilities.Tools.WEB
|
||||
Imports VLCState = LibVLCSharp.Shared.VLCState
|
||||
Namespace DownloadObjects
|
||||
<ToolboxItem(False), DesignTimeVisible(False)>
|
||||
Public Class FeedVideo
|
||||
Private WithEvents MediaPlayer As [Shared].MediaPlayer
|
||||
Private ReadOnly TimeChange As Action = Sub()
|
||||
Dim v# = DivideWithZeroChecking(MediaPlayer.Time, MediaPlayer.Length) * 10
|
||||
If v > 10 Then TR_POSITION.Value = 10 Else TR_POSITION.Value = v
|
||||
End Sub
|
||||
Private ReadOnly TimeChangeLabel As Action = Sub()
|
||||
If MediaPlayer.Time >= 0 Then
|
||||
Dim t As TimeSpan = TimeSpan.FromMilliseconds(MediaPlayer.Time)
|
||||
If Not VideoLength.HasValue Then
|
||||
VideoLength = TimeSpan.FromMilliseconds(MediaPlayer.Length)
|
||||
VideoLengthStr = VideoLength.Value.ToStringTime(FeedVideoLengthProvider)
|
||||
End If
|
||||
LBL_TIME.Text = $"{t.ToStringTime(FeedVideoLengthProvider)}/{VideoLengthStr}"
|
||||
End If
|
||||
End Sub
|
||||
Private ReadOnly MyImage As ImageRenderer
|
||||
Private VideoLength As TimeSpan?
|
||||
Private VideoLengthStr As String
|
||||
Public Sub New()
|
||||
InitializeComponent()
|
||||
End Sub
|
||||
Friend Sub New(ByVal File As SFile)
|
||||
InitializeComponent()
|
||||
Dim debugLogs As Boolean = False
|
||||
#If DEBUG Then
|
||||
debugLogs = True
|
||||
#End If
|
||||
MediaPlayer = New [Shared].MediaPlayer(New [Shared].Media(New [Shared].LibVLC(enableDebugLogs:=debugLogs), New Uri(File.ToString)))
|
||||
MyVideo.MediaPlayer = MediaPlayer
|
||||
TR_VOLUME.Value = MediaPlayer.Volume / 10
|
||||
If Settings.UseM3U8 Then
|
||||
Dim f As SFile = $"{Settings.CachePath.PathWithSeparator}FeedSnapshots\{File.GetHashCode}.png"
|
||||
If Not f.Exists Then f = FFMPEG.TakeSnapshot(File, f, Settings.FfmpegFile, TimeSpan.FromSeconds(1))
|
||||
If f.Exists Then
|
||||
MyImage = New ImageRenderer(f, EDP.None)
|
||||
If Not MyImage.HasError Then
|
||||
MyVideo.BackgroundImage = MyImage
|
||||
MyVideo.BackgroundImageLayout = ImageLayout.Zoom
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
UpdateButtons()
|
||||
End Sub
|
||||
Private Sub FeedVideo_Disposed(sender As Object, e As EventArgs) Handles Me.Disposed
|
||||
If Not MediaPlayer Is Nothing Then MediaPlayer.Dispose()
|
||||
If Not MyImage Is Nothing Then MyImage.Dispose()
|
||||
End Sub
|
||||
Private Sub BTT_PLAY_Click(sender As Object, e As EventArgs) Handles BTT_PLAY.Click
|
||||
Try
|
||||
Select Case MediaPlayer.State
|
||||
Case VLCState.NothingSpecial, VLCState.Stopped, VLCState.Paused : MediaPlayer.Play()
|
||||
Case VLCState.Ended : MediaPlayer.Stop() : MediaPlayer.Play()
|
||||
End Select
|
||||
Catch
|
||||
Finally
|
||||
UpdateButtons()
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub BTT_PAUSE_Click(sender As Object, e As EventArgs) Handles BTT_PAUSE.Click
|
||||
Try : MediaPlayer.Pause() : Catch : End Try
|
||||
UpdateButtons()
|
||||
End Sub
|
||||
Private Sub BTT_STOP_Click(sender As Object, e As EventArgs) Handles BTT_STOP.Click
|
||||
Try : MediaPlayer.Stop() : Catch : End Try
|
||||
UpdateButtons()
|
||||
End Sub
|
||||
Private Sub MediaPlayer_TimeChanged(sender As Object, e As [Shared].MediaPlayerTimeChangedEventArgs) Handles MediaPlayer.TimeChanged
|
||||
If TR_POSITION.InvokeRequired Then TR_POSITION.Invoke(TimeChange) Else TimeChange.Invoke
|
||||
If LBL_TIME.InvokeRequired Then LBL_TIME.Invoke(TimeChangeLabel) Else TimeChangeLabel.Invoke
|
||||
End Sub
|
||||
Private Sub TR_POSITION_MouseUp(sender As Object, e As MouseEventArgs) Handles TR_POSITION.MouseUp
|
||||
Try : MediaPlayer.Time = (MediaPlayer.Length / 100) * (TR_POSITION.Value * 10) : Catch : End Try
|
||||
End Sub
|
||||
Private Sub TR_VOLUME_MouseUp(sender As Object, e As MouseEventArgs) Handles TR_VOLUME.MouseUp
|
||||
Try : MediaPlayer.Volume = TR_VOLUME.Value * 10 : Catch : End Try
|
||||
End Sub
|
||||
Private Sub MediaPlayer_Stopped(sender As Object, e As EventArgs) Handles MediaPlayer.Stopped
|
||||
Dim a As Action = Sub() TR_POSITION.Value = TR_POSITION.Maximum
|
||||
If TR_POSITION.InvokeRequired Then TR_POSITION.Invoke(a) Else a.Invoke
|
||||
UpdateButtons()
|
||||
End Sub
|
||||
Private Sub UpdateButtons() Handles MediaPlayer.Playing, MediaPlayer.Paused, MediaPlayer.Opening
|
||||
Try
|
||||
Dim _play As Boolean = False, _pause As Boolean = False, _stop As Boolean = False
|
||||
Select Case MediaPlayer.State
|
||||
Case VLCState.NothingSpecial, VLCState.Stopped : _play = True
|
||||
Case VLCState.Paused : _play = True : _stop = True
|
||||
Case VLCState.Ended : _play = True
|
||||
Case VLCState.Playing : _pause = True : _stop = True
|
||||
End Select
|
||||
ControlInvoke(BTT_PLAY, Sub() BTT_PLAY.Enabled = _play)
|
||||
ControlInvoke(BTT_PAUSE, Sub() BTT_PAUSE.Enabled = _pause)
|
||||
ControlInvoke(BTT_STOP, Sub() BTT_STOP.Enabled = _stop)
|
||||
Catch
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -112,24 +112,24 @@ Namespace DownloadObjects
|
||||
#End Region
|
||||
#Region "Post actions"
|
||||
Private Sub BTT_DOWN_Click(sender As Object, e As EventArgs) Handles BTT_DOWN.Click
|
||||
Try
|
||||
If LIST_DATA.SelectedItems.Count > 0 Then
|
||||
Dim users As List(Of IUserData) = LIST_DATA.SelectedItems.ToObjectsList.ListCast(Of ListViewItem)().
|
||||
Select(Function(d) Settings.GetUser(CStr(d.Group.Tag))).ListWithRemove(Function(d) d Is Nothing)
|
||||
If users.ListExists Then
|
||||
If MsgBoxE({"The following users will be added to the download queue:" & vbCr & vbCr &
|
||||
users.Select(Function(u) u.ToString).ListToString(vbNewLine), "Download users"},,,, {"Process", "Cancel"}) = 0 Then
|
||||
users.ForEach(Sub(u) u.DownloadMissingOnly = True)
|
||||
Downloader.AddRange(users)
|
||||
users.Clear()
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
MsgBoxE("No selected posts")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ErrorsDescriber.Execute(EDP.SendInLog, ex, "[DownloadObjects.MissingPostsForm.Download]")
|
||||
End Try
|
||||
'Try
|
||||
' If LIST_DATA.SelectedItems.Count > 0 Then
|
||||
' Dim users As List(Of IUserData) = LIST_DATA.SelectedItems.ToObjectsList.ListCast(Of ListViewItem)().
|
||||
' Select(Function(d) Settings.GetUser(CStr(d.Group.Tag))).ListWithRemove(Function(d) d Is Nothing)
|
||||
' If users.ListExists Then
|
||||
' If MsgBoxE({"The following users will be added to the download queue:" & vbCr & vbCr &
|
||||
' users.Select(Function(u) u.ToString).ListToString(vbNewLine), "Download users"},,,, {"Process", "Cancel"}) = 0 Then
|
||||
' users.ForEach(Sub(u) u.DownloadMissingOnly = True)
|
||||
' Downloader.AddRange(users)
|
||||
' users.Clear()
|
||||
' End If
|
||||
' End If
|
||||
' Else
|
||||
' MsgBoxE("No selected posts")
|
||||
' End If
|
||||
'Catch ex As Exception
|
||||
' ErrorsDescriber.Execute(EDP.SendInLog, ex, "[DownloadObjects.MissingPostsForm.Download]")
|
||||
'End Try
|
||||
End Sub
|
||||
Private Sub BTT_OPEN_POST_Click(sender As Object, e As EventArgs) Handles BTT_OPEN_POST.Click
|
||||
Try
|
||||
|
||||
@@ -27,13 +27,21 @@ Namespace DownloadObjects
|
||||
Friend ReadOnly User As IUserData
|
||||
Friend ReadOnly Data As UserMedia
|
||||
Friend ReadOnly [Date] As Date
|
||||
Friend Sub New(ByVal Data As UserMedia, ByVal User As IUserData)
|
||||
Private ReadOnly Session As Integer
|
||||
Friend Sub New(ByVal Data As UserMedia, ByVal User As IUserData, ByVal Session As Integer)
|
||||
Me.Data = Data
|
||||
Me.User = User
|
||||
[Date] = Now
|
||||
Me.Session = Session
|
||||
End Sub
|
||||
Private Function CompareTo(ByVal Other As UserMediaD) As Integer Implements IComparable(Of UserMediaD).CompareTo
|
||||
Return [Date].Ticks.CompareTo(Other.Date.Ticks) * -1
|
||||
If Not Session = Other.Session Then
|
||||
Return Session.CompareTo(Other.Session) * -1
|
||||
ElseIf Not If(User?.GetHashCode, 0) = If(Other.User?.GetHashCode, 0) Then
|
||||
Return If(User?.GetHashCode, 0).CompareTo(If(Other.User?.GetHashCode, 0))
|
||||
Else
|
||||
Return [Date].Ticks.CompareTo(Other.Date.Ticks) * -1
|
||||
End If
|
||||
End Function
|
||||
Private Overloads Function Equals(ByVal Other As UserMediaD) As Boolean Implements IEquatable(Of UserMediaD).Equals
|
||||
Return Data.File = Other.Data.File
|
||||
@@ -214,12 +222,14 @@ Namespace DownloadObjects
|
||||
#Region "Thread"
|
||||
Private CheckerThread As Thread
|
||||
Private MissingPostsDetected As Boolean = False
|
||||
Private Session As Integer = 0
|
||||
Private Sub [Start]()
|
||||
If Not AutoDownloaderWorking AndAlso MyProgressForm.ReadyToOpen AndAlso Pool.LongCount(Function(p) p.Count > 0) > 1 Then MyProgressForm.Show() : MainFrameObj.Focus()
|
||||
If Not If(CheckerThread?.IsAlive, False) Then
|
||||
MainProgress.Visible = True
|
||||
If Not AutoDownloaderWorking AndAlso InfoForm.ReadyToOpen Then InfoForm.Show() : MainFrameObj.Focus()
|
||||
MissingPostsDetected = False
|
||||
Session += 1
|
||||
CheckerThread = New Thread(New ThreadStart(AddressOf JobsChecker))
|
||||
CheckerThread.SetApartmentState(ApartmentState.MTA)
|
||||
CheckerThread.Start()
|
||||
@@ -342,7 +352,7 @@ Namespace DownloadObjects
|
||||
If Not .Disposed AndAlso Not .IsCollection AndAlso .DownloadedTotal(False) > 0 Then
|
||||
If Not Downloaded.Contains(.Self) Then Downloaded.Add(Settings.GetUser(.Self))
|
||||
With DirectCast(.Self, UserDataBase)
|
||||
If .LatestData.Count > 0 Then Files.ListAddList(.LatestData.Select(Function(d) New UserMediaD(d, .Self)), FilesLP)
|
||||
If .LatestData.Count > 0 Then Files.ListAddList(.LatestData.Select(Function(d) New UserMediaD(d, .Self, Session)), FilesLP)
|
||||
End With
|
||||
dcc = True
|
||||
End If
|
||||
|
||||
82
SCrawler/Editors/SiteEditorForm.Designer.vb
generated
82
SCrawler/Editors/SiteEditorForm.Designer.vb
generated
@@ -15,6 +15,7 @@
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim CONTAINER_MAIN As System.Windows.Forms.ToolStripContainer
|
||||
Dim ActionButton1 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(SiteEditorForm))
|
||||
Dim ActionButton2 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
@@ -22,7 +23,6 @@
|
||||
Dim ActionButton4 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 ActionButton6 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim CONTAINER_MAIN As System.Windows.Forms.ToolStripContainer
|
||||
Me.TP_MAIN = New System.Windows.Forms.TableLayoutPanel()
|
||||
Me.TXT_PATH = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.TXT_COOKIES = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
@@ -30,34 +30,53 @@
|
||||
Me.TXT_PATH_SAVED_POSTS = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.CH_GET_USER_MEDIA_ONLY = New System.Windows.Forms.CheckBox()
|
||||
Me.TT_MAIN = New System.Windows.Forms.ToolTip(Me.components)
|
||||
Me.CH_DOWNLOAD_SITE_DATA = New System.Windows.Forms.CheckBox()
|
||||
CONTAINER_MAIN = New System.Windows.Forms.ToolStripContainer()
|
||||
CONTAINER_MAIN.ContentPanel.SuspendLayout()
|
||||
CONTAINER_MAIN.SuspendLayout()
|
||||
Me.TP_MAIN.SuspendLayout()
|
||||
CType(Me.TXT_PATH, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.TXT_COOKIES, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.TXT_PATH_SAVED_POSTS, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CONTAINER_MAIN.ContentPanel.SuspendLayout()
|
||||
CONTAINER_MAIN.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'CONTAINER_MAIN
|
||||
'
|
||||
'
|
||||
'CONTAINER_MAIN.ContentPanel
|
||||
'
|
||||
CONTAINER_MAIN.ContentPanel.Controls.Add(Me.TP_MAIN)
|
||||
CONTAINER_MAIN.ContentPanel.Size = New System.Drawing.Size(544, 218)
|
||||
CONTAINER_MAIN.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
CONTAINER_MAIN.LeftToolStripPanelVisible = False
|
||||
CONTAINER_MAIN.Location = New System.Drawing.Point(0, 0)
|
||||
CONTAINER_MAIN.Name = "CONTAINER_MAIN"
|
||||
CONTAINER_MAIN.RightToolStripPanelVisible = False
|
||||
CONTAINER_MAIN.Size = New System.Drawing.Size(544, 243)
|
||||
CONTAINER_MAIN.TabIndex = 0
|
||||
CONTAINER_MAIN.TopToolStripPanelVisible = False
|
||||
'
|
||||
'TP_MAIN
|
||||
'
|
||||
Me.TP_MAIN.ColumnCount = 1
|
||||
Me.TP_MAIN.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
Me.TP_MAIN.Controls.Add(Me.TXT_PATH, 0, 0)
|
||||
Me.TP_MAIN.Controls.Add(Me.TXT_COOKIES, 0, 2)
|
||||
Me.TP_MAIN.Controls.Add(Me.TP_SITE_PROPS, 0, 4)
|
||||
Me.TP_MAIN.Controls.Add(Me.TP_SITE_PROPS, 0, 5)
|
||||
Me.TP_MAIN.Controls.Add(Me.TXT_PATH_SAVED_POSTS, 0, 1)
|
||||
Me.TP_MAIN.Controls.Add(Me.CH_GET_USER_MEDIA_ONLY, 0, 3)
|
||||
Me.TP_MAIN.Controls.Add(Me.CH_GET_USER_MEDIA_ONLY, 0, 4)
|
||||
Me.TP_MAIN.Controls.Add(Me.CH_DOWNLOAD_SITE_DATA, 0, 3)
|
||||
Me.TP_MAIN.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TP_MAIN.Location = New System.Drawing.Point(0, 0)
|
||||
Me.TP_MAIN.Name = "TP_MAIN"
|
||||
Me.TP_MAIN.RowCount = 5
|
||||
Me.TP_MAIN.RowCount = 6
|
||||
Me.TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
||||
Me.TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
||||
Me.TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
||||
Me.TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
Me.TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
Me.TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
Me.TP_MAIN.Size = New System.Drawing.Size(544, 219)
|
||||
Me.TP_MAIN.Size = New System.Drawing.Size(544, 218)
|
||||
Me.TP_MAIN.TabIndex = 0
|
||||
'
|
||||
'TXT_PATH
|
||||
@@ -101,15 +120,15 @@
|
||||
Me.TP_SITE_PROPS.ColumnCount = 1
|
||||
Me.TP_SITE_PROPS.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
Me.TP_SITE_PROPS.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TP_SITE_PROPS.Location = New System.Drawing.Point(3, 112)
|
||||
Me.TP_SITE_PROPS.Location = New System.Drawing.Point(3, 137)
|
||||
Me.TP_SITE_PROPS.Name = "TP_SITE_PROPS"
|
||||
Me.TP_SITE_PROPS.RowCount = 4
|
||||
Me.TP_SITE_PROPS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
Me.TP_SITE_PROPS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
Me.TP_SITE_PROPS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
Me.TP_SITE_PROPS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
Me.TP_SITE_PROPS.Size = New System.Drawing.Size(538, 104)
|
||||
Me.TP_SITE_PROPS.TabIndex = 4
|
||||
Me.TP_SITE_PROPS.Size = New System.Drawing.Size(538, 78)
|
||||
Me.TP_SITE_PROPS.TabIndex = 5
|
||||
'
|
||||
'TXT_PATH_SAVED_POSTS
|
||||
'
|
||||
@@ -130,54 +149,52 @@
|
||||
'
|
||||
Me.CH_GET_USER_MEDIA_ONLY.AutoSize = True
|
||||
Me.CH_GET_USER_MEDIA_ONLY.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.CH_GET_USER_MEDIA_ONLY.Location = New System.Drawing.Point(3, 87)
|
||||
Me.CH_GET_USER_MEDIA_ONLY.Location = New System.Drawing.Point(3, 112)
|
||||
Me.CH_GET_USER_MEDIA_ONLY.Name = "CH_GET_USER_MEDIA_ONLY"
|
||||
Me.CH_GET_USER_MEDIA_ONLY.Padding = New System.Windows.Forms.Padding(100, 0, 0, 0)
|
||||
Me.CH_GET_USER_MEDIA_ONLY.Size = New System.Drawing.Size(538, 19)
|
||||
Me.CH_GET_USER_MEDIA_ONLY.TabIndex = 3
|
||||
Me.CH_GET_USER_MEDIA_ONLY.TabIndex = 4
|
||||
Me.CH_GET_USER_MEDIA_ONLY.Text = "Get user media only"
|
||||
Me.CH_GET_USER_MEDIA_ONLY.UseVisualStyleBackColor = True
|
||||
'
|
||||
'CONTAINER_MAIN
|
||||
'CH_DOWNLOAD_SITE_DATA
|
||||
'
|
||||
'
|
||||
'CONTAINER_MAIN.ContentPanel
|
||||
'
|
||||
CONTAINER_MAIN.ContentPanel.Controls.Add(Me.TP_MAIN)
|
||||
CONTAINER_MAIN.ContentPanel.Size = New System.Drawing.Size(544, 219)
|
||||
CONTAINER_MAIN.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
CONTAINER_MAIN.LeftToolStripPanelVisible = False
|
||||
CONTAINER_MAIN.Location = New System.Drawing.Point(0, 0)
|
||||
CONTAINER_MAIN.Name = "CONTAINER_MAIN"
|
||||
CONTAINER_MAIN.RightToolStripPanelVisible = False
|
||||
CONTAINER_MAIN.Size = New System.Drawing.Size(544, 219)
|
||||
CONTAINER_MAIN.TabIndex = 0
|
||||
CONTAINER_MAIN.TopToolStripPanelVisible = False
|
||||
Me.CH_DOWNLOAD_SITE_DATA.AutoSize = True
|
||||
Me.CH_DOWNLOAD_SITE_DATA.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.CH_DOWNLOAD_SITE_DATA.Location = New System.Drawing.Point(3, 87)
|
||||
Me.CH_DOWNLOAD_SITE_DATA.Name = "CH_DOWNLOAD_SITE_DATA"
|
||||
Me.CH_DOWNLOAD_SITE_DATA.Padding = New System.Windows.Forms.Padding(100, 0, 0, 0)
|
||||
Me.CH_DOWNLOAD_SITE_DATA.Size = New System.Drawing.Size(538, 19)
|
||||
Me.CH_DOWNLOAD_SITE_DATA.TabIndex = 3
|
||||
Me.CH_DOWNLOAD_SITE_DATA.Text = "Download site data"
|
||||
Me.TT_MAIN.SetToolTip(Me.CH_DOWNLOAD_SITE_DATA, "If disabled, this site's data will not be downloaded." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "You can disable downloadin" &
|
||||
"g data from the site if you need it.")
|
||||
Me.CH_DOWNLOAD_SITE_DATA.UseVisualStyleBackColor = True
|
||||
'
|
||||
'SiteEditorForm
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(544, 219)
|
||||
Me.ClientSize = New System.Drawing.Size(544, 243)
|
||||
Me.Controls.Add(CONTAINER_MAIN)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
Me.KeyPreview = True
|
||||
Me.MaximizeBox = False
|
||||
Me.MaximumSize = New System.Drawing.Size(560, 258)
|
||||
Me.MaximumSize = New System.Drawing.Size(560, 282)
|
||||
Me.MinimizeBox = False
|
||||
Me.MinimumSize = New System.Drawing.Size(560, 258)
|
||||
Me.MinimumSize = New System.Drawing.Size(560, 282)
|
||||
Me.Name = "SiteEditorForm"
|
||||
Me.ShowInTaskbar = False
|
||||
Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide
|
||||
Me.Text = "Site"
|
||||
CONTAINER_MAIN.ContentPanel.ResumeLayout(False)
|
||||
CONTAINER_MAIN.ResumeLayout(False)
|
||||
CONTAINER_MAIN.PerformLayout()
|
||||
Me.TP_MAIN.ResumeLayout(False)
|
||||
Me.TP_MAIN.PerformLayout()
|
||||
CType(Me.TXT_PATH, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.TXT_COOKIES, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.TXT_PATH_SAVED_POSTS, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CONTAINER_MAIN.ContentPanel.ResumeLayout(False)
|
||||
CONTAINER_MAIN.ResumeLayout(False)
|
||||
CONTAINER_MAIN.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
@@ -188,5 +205,6 @@
|
||||
Private WithEvents TP_SITE_PROPS As SiteDefaults
|
||||
Private WithEvents CH_GET_USER_MEDIA_ONLY As CheckBox
|
||||
Private WithEvents TT_MAIN As ToolTip
|
||||
Private WithEvents CH_DOWNLOAD_SITE_DATA As CheckBox
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -117,6 +117,9 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="CONTAINER_MAIN.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<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">
|
||||
<value>
|
||||
@@ -222,9 +225,6 @@
|
||||
AFuc5QFgn6ClHh5iOQVAKNixyucB8NY0vG9JOzzyhrdq5IRgAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="CONTAINER_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>
|
||||
|
||||
@@ -11,6 +11,7 @@ Imports PersonalUtilities.Forms.Controls
|
||||
Imports PersonalUtilities.Forms.Controls.Base
|
||||
Imports PersonalUtilities.Tools.WEB
|
||||
Imports CookieControl = PersonalUtilities.Tools.WEB.CookieListForm.CookieControl
|
||||
Imports ADB = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons
|
||||
Imports SCrawler.Plugin
|
||||
Imports SCrawler.Plugin.Hosts
|
||||
Namespace Editors
|
||||
@@ -63,7 +64,8 @@ Namespace Editors
|
||||
|
||||
TXT_PATH.Text = .Path(False)
|
||||
TXT_PATH_SAVED_POSTS.Text = .SavedPostsPath(False)
|
||||
CH_GET_USER_MEDIA_ONLY.Checked = .GetUserMediaOnly.Value
|
||||
CH_DOWNLOAD_SITE_DATA.Checked = .DownloadSiteData
|
||||
CH_GET_USER_MEDIA_ONLY.Checked = .GetUserMediaOnly
|
||||
|
||||
SiteDefaultsFunctions.SetChecker(TP_SITE_PROPS, Host)
|
||||
|
||||
@@ -131,6 +133,7 @@ Namespace Editors
|
||||
TXT_PATH.CaptionWidth = offset
|
||||
TXT_PATH_SAVED_POSTS.CaptionWidth = offset
|
||||
TXT_COOKIES.CaptionWidth = offset
|
||||
CH_DOWNLOAD_SITE_DATA.Padding = New PaddingE(CH_DOWNLOAD_SITE_DATA.Padding) With {.Left = offset}
|
||||
CH_GET_USER_MEDIA_ONLY.Padding = New PaddingE(CH_GET_USER_MEDIA_ONLY.Padding) With {.Left = offset}
|
||||
If c > 0 Or Not Host.IsMyClass Then
|
||||
Dim ss As New Size(Size.Width, Size.Height + h + c)
|
||||
@@ -183,6 +186,7 @@ Namespace Editors
|
||||
SiteDefaultsFunctions.SetPropByChecker(TP_SITE_PROPS, Host)
|
||||
If TXT_PATH.IsEmptyString Then .Path = Nothing Else .Path = TXT_PATH.Text
|
||||
.SavedPostsPath = TXT_PATH_SAVED_POSTS.Text
|
||||
.DownloadSiteData.Value = CH_DOWNLOAD_SITE_DATA.Checked
|
||||
.GetUserMediaOnly.Value = CH_GET_USER_MEDIA_ONLY.Checked
|
||||
|
||||
If .PropList.Count > 0 Then .PropList.ForEach(Sub(p) If Not p.Options Is Nothing Then p.UpdateValueByControl())
|
||||
@@ -203,14 +207,14 @@ Namespace Editors
|
||||
ChangePath(Sender, Host.SavedPostsPath(False), TXT_PATH_SAVED_POSTS)
|
||||
End Sub
|
||||
Private Sub ChangePath(ByVal Sender As ActionButton, ByVal PathValue As SFile, ByRef CNT As TextBoxExtended)
|
||||
If Sender.DefaultButton = ActionButton.DefaultButtons.Open Then
|
||||
If Sender.DefaultButton = ADB.Open Then
|
||||
Dim f As SFile = SFile.SelectPath(PathValue)
|
||||
If Not f.IsEmptyString Then CNT.Text = f
|
||||
End If
|
||||
End Sub
|
||||
Private Sub TXT_COOKIES_ActionOnButtonClick(ByVal Sender As ActionButton, ByVal e As EventArgs) Handles TXT_COOKIES.ActionOnButtonClick
|
||||
Select Case Sender.DefaultButton
|
||||
Case ActionButton.DefaultButtons.Edit
|
||||
Case ADB.Edit
|
||||
If Not Host.Responser Is Nothing Then
|
||||
Using f As New CookieListForm(Host.Responser) With {
|
||||
.MyDesignXML = Settings.Design,
|
||||
@@ -220,7 +224,7 @@ Namespace Editors
|
||||
End Using
|
||||
SetCookieText()
|
||||
End If
|
||||
Case ActionButton.DefaultButtons.Clear
|
||||
Case ADB.Clear
|
||||
If Not Host.Responser Is Nothing Then
|
||||
With Host.Responser
|
||||
If Not .Cookies Is Nothing Then .Cookies.Dispose()
|
||||
|
||||
76
SCrawler/FDatePickerForm.Designer.vb
generated
76
SCrawler/FDatePickerForm.Designer.vb
generated
@@ -22,10 +22,16 @@ Partial Friend Class FDatePickerForm : Inherits System.Windows.Forms.Form
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Dim CONTAINER_MAIN As System.Windows.Forms.ToolStripContainer
|
||||
Me.DT = New System.Windows.Forms.DateTimePicker()
|
||||
Dim TP_MAIN As System.Windows.Forms.TableLayoutPanel
|
||||
Me.DT_FROM = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.DT_TO = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
CONTAINER_MAIN = New System.Windows.Forms.ToolStripContainer()
|
||||
TP_MAIN = New System.Windows.Forms.TableLayoutPanel()
|
||||
CONTAINER_MAIN.ContentPanel.SuspendLayout()
|
||||
CONTAINER_MAIN.SuspendLayout()
|
||||
TP_MAIN.SuspendLayout()
|
||||
CType(Me.DT_FROM, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.DT_TO, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'CONTAINER_MAIN
|
||||
@@ -33,38 +39,73 @@ Partial Friend Class FDatePickerForm : Inherits System.Windows.Forms.Form
|
||||
'
|
||||
'CONTAINER_MAIN.ContentPanel
|
||||
'
|
||||
CONTAINER_MAIN.ContentPanel.Controls.Add(Me.DT)
|
||||
CONTAINER_MAIN.ContentPanel.Size = New System.Drawing.Size(209, 47)
|
||||
CONTAINER_MAIN.ContentPanel.Controls.Add(TP_MAIN)
|
||||
CONTAINER_MAIN.ContentPanel.Size = New System.Drawing.Size(395, 28)
|
||||
CONTAINER_MAIN.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
CONTAINER_MAIN.LeftToolStripPanelVisible = False
|
||||
CONTAINER_MAIN.Location = New System.Drawing.Point(0, 0)
|
||||
CONTAINER_MAIN.Name = "CONTAINER_MAIN"
|
||||
CONTAINER_MAIN.RightToolStripPanelVisible = False
|
||||
CONTAINER_MAIN.Size = New System.Drawing.Size(209, 47)
|
||||
CONTAINER_MAIN.Size = New System.Drawing.Size(395, 53)
|
||||
CONTAINER_MAIN.TabIndex = 0
|
||||
CONTAINER_MAIN.TopToolStripPanelVisible = False
|
||||
'
|
||||
'DT
|
||||
'TP_MAIN
|
||||
'
|
||||
Me.DT.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.DT.Location = New System.Drawing.Point(0, 0)
|
||||
Me.DT.Name = "DT"
|
||||
Me.DT.ShowCheckBox = True
|
||||
Me.DT.Size = New System.Drawing.Size(209, 20)
|
||||
Me.DT.TabIndex = 0
|
||||
TP_MAIN.ColumnCount = 2
|
||||
TP_MAIN.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
|
||||
TP_MAIN.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
|
||||
TP_MAIN.Controls.Add(Me.DT_FROM, 0, 0)
|
||||
TP_MAIN.Controls.Add(Me.DT_TO, 1, 0)
|
||||
TP_MAIN.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
TP_MAIN.Location = New System.Drawing.Point(0, 0)
|
||||
TP_MAIN.Name = "TP_MAIN"
|
||||
TP_MAIN.RowCount = 1
|
||||
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.Absolute, 53.0!))
|
||||
TP_MAIN.Size = New System.Drawing.Size(395, 28)
|
||||
TP_MAIN.TabIndex = 1
|
||||
'
|
||||
'DT_FROM
|
||||
'
|
||||
Me.DT_FROM.CaptionMode = PersonalUtilities.Forms.Controls.Base.ICaptionControl.Modes.CheckBox
|
||||
Me.DT_FROM.CaptionText = "From"
|
||||
Me.DT_FROM.CaptionWidth = 50.0R
|
||||
Me.DT_FROM.ControlMode = PersonalUtilities.Forms.Controls.TextBoxExtended.ControlModes.DateTimePicker
|
||||
Me.DT_FROM.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.DT_FROM.Location = New System.Drawing.Point(3, 3)
|
||||
Me.DT_FROM.Name = "DT_FROM"
|
||||
Me.DT_FROM.Size = New System.Drawing.Size(191, 22)
|
||||
Me.DT_FROM.TabIndex = 0
|
||||
Me.DT_FROM.Text = "17.09.2022 2:13:36"
|
||||
Me.DT_FROM.TextBoxWidthMinimal = 50
|
||||
'
|
||||
'DT_TO
|
||||
'
|
||||
Me.DT_TO.CaptionMode = PersonalUtilities.Forms.Controls.Base.ICaptionControl.Modes.CheckBox
|
||||
Me.DT_TO.CaptionText = "To"
|
||||
Me.DT_TO.CaptionWidth = 50.0R
|
||||
Me.DT_TO.ControlMode = PersonalUtilities.Forms.Controls.TextBoxExtended.ControlModes.DateTimePicker
|
||||
Me.DT_TO.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.DT_TO.Location = New System.Drawing.Point(200, 3)
|
||||
Me.DT_TO.Name = "DT_TO"
|
||||
Me.DT_TO.Size = New System.Drawing.Size(192, 22)
|
||||
Me.DT_TO.TabIndex = 1
|
||||
Me.DT_TO.Text = "17.09.2022 2:13:40"
|
||||
Me.DT_TO.TextBoxWidthMinimal = 50
|
||||
'
|
||||
'FDatePickerForm
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(209, 47)
|
||||
Me.ClientSize = New System.Drawing.Size(395, 53)
|
||||
Me.Controls.Add(CONTAINER_MAIN)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
Me.KeyPreview = True
|
||||
Me.MaximizeBox = False
|
||||
Me.MaximumSize = New System.Drawing.Size(225, 86)
|
||||
Me.MaximumSize = New System.Drawing.Size(411, 92)
|
||||
Me.MinimizeBox = False
|
||||
Me.MinimumSize = New System.Drawing.Size(225, 86)
|
||||
Me.MinimumSize = New System.Drawing.Size(411, 92)
|
||||
Me.Name = "FDatePickerForm"
|
||||
Me.ShowIcon = False
|
||||
Me.ShowInTaskbar = False
|
||||
@@ -73,8 +114,13 @@ Partial Friend Class FDatePickerForm : Inherits System.Windows.Forms.Form
|
||||
CONTAINER_MAIN.ContentPanel.ResumeLayout(False)
|
||||
CONTAINER_MAIN.ResumeLayout(False)
|
||||
CONTAINER_MAIN.PerformLayout()
|
||||
TP_MAIN.ResumeLayout(False)
|
||||
CType(Me.DT_FROM, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.DT_TO, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
Private WithEvents DT As DateTimePicker
|
||||
|
||||
Private WithEvents DT_FROM As PersonalUtilities.Forms.Controls.TextBoxExtended
|
||||
Private WithEvents DT_TO As PersonalUtilities.Forms.Controls.TextBoxExtended
|
||||
End Class
|
||||
@@ -120,4 +120,7 @@
|
||||
<metadata name="CONTAINER_MAIN.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="TP_MAIN.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -9,27 +9,28 @@
|
||||
Imports PersonalUtilities.Forms
|
||||
Friend Class FDatePickerForm
|
||||
Private ReadOnly MyDefs As DefaultFormOptions
|
||||
Friend ReadOnly Property SelectedDate As Date?
|
||||
Friend ReadOnly Property DateFrom As Date?
|
||||
Get
|
||||
If DT.Checked Then Return DT.Value.Date Else Return Nothing
|
||||
If DT_FROM.Checked Then Return CDate(DT_FROM.Value).Date Else Return Nothing
|
||||
End Get
|
||||
End Property
|
||||
Private ReadOnly _InitialValue As Date?
|
||||
Friend Sub New(ByVal d As Date?)
|
||||
Friend ReadOnly Property DateTo As Date?
|
||||
Get
|
||||
If DT_TO.Checked Then Return CDate(DT_TO.Value).Date Else Return Nothing
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub New(ByVal DateFrom As Date?, ByVal DateTo As Date?)
|
||||
InitializeComponent()
|
||||
_InitialValue = d
|
||||
MyDefs = New DefaultFormOptions(Me, Settings.Design)
|
||||
If DateFrom.HasValue Then DT_FROM.Value = DateFrom.Value
|
||||
If DateTo.HasValue Then DT_TO.Value = DateTo.Value
|
||||
DT_FROM.Checked = DateFrom.HasValue
|
||||
DT_TO.Checked = DateTo.HasValue
|
||||
End Sub
|
||||
Private Sub FDatePickerForm_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
With MyDefs
|
||||
.MyViewInitialize(True)
|
||||
.AddOkCancelToolbar(True)
|
||||
If _InitialValue.HasValue Then
|
||||
DT.Checked = True
|
||||
DT.Value = _InitialValue.Value.Date
|
||||
Else
|
||||
DT.Checked = False
|
||||
End If
|
||||
.DelegateClosingChecker = False
|
||||
.EndLoaderOperations()
|
||||
MyDefs.MyOkCancel.EnableOK = True
|
||||
|
||||
45
SCrawler/MainFrame.Designer.vb
generated
45
SCrawler/MainFrame.Designer.vb
generated
@@ -40,6 +40,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Me.BTT_DELETE_USER = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BTT_REFRESH = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BTT_SHOW_INFO = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BTT_FEED = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BTT_CHANNELS = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BTT_DOWN_SAVED = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BTT_DOWN_SELECTED = New System.Windows.Forms.ToolStripButton()
|
||||
@@ -71,7 +72,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Me.BTT_SHOW_EXCLUDED_LABELS = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_SHOW_EXCLUDED_LABELS_IGNORE = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_SHOW_SHOW_GROUPS = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_SHOW_LIMIT_DATES = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_SHOW_LIMIT_DATES_NOT = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_LOG = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BTT_VERSION_INFO = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BTT_DONATE = New System.Windows.Forms.ToolStripButton()
|
||||
@@ -105,7 +106,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Me.BTT_TRAY_SHOW_HIDE = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_TRAY_CLOSE = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_TRAY_CLOSE_NO_SCRIPT = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_FEED = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BTT_SHOW_LIMIT_DATES_IN = New System.Windows.Forms.ToolStripMenuItem()
|
||||
SEP_1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
SEP_2 = New System.Windows.Forms.ToolStripSeparator()
|
||||
CONTEXT_SEP_1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
@@ -269,12 +270,12 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
'
|
||||
'BTT_REFRESH
|
||||
'
|
||||
Me.BTT_REFRESH.AutoToolTip = False
|
||||
Me.BTT_REFRESH.Image = Global.SCrawler.My.Resources.Resources.Refresh
|
||||
Me.BTT_REFRESH.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.BTT_REFRESH.Name = "BTT_REFRESH"
|
||||
Me.BTT_REFRESH.Size = New System.Drawing.Size(66, 22)
|
||||
Me.BTT_REFRESH.Text = "Refresh"
|
||||
Me.BTT_REFRESH.ToolTipText = "Refresh user list"
|
||||
'
|
||||
'BTT_SHOW_INFO
|
||||
'
|
||||
@@ -285,6 +286,15 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Me.BTT_SHOW_INFO.Text = "Info"
|
||||
Me.BTT_SHOW_INFO.ToolTipText = "Left-click: open the 'Info' form (show download summary)." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "Right click: open the " &
|
||||
"'Missing' form (show information about missing posts)."
|
||||
'
|
||||
'BTT_FEED
|
||||
'
|
||||
Me.BTT_FEED.Image = Global.SCrawler.My.Resources.Resources.RSSPic
|
||||
Me.BTT_FEED.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.BTT_FEED.Name = "BTT_FEED"
|
||||
Me.BTT_FEED.Size = New System.Drawing.Size(52, 22)
|
||||
Me.BTT_FEED.Text = "Feed"
|
||||
Me.BTT_FEED.ToolTipText = "Feed of recently downloaded data"
|
||||
'
|
||||
'BTT_CHANNELS
|
||||
'
|
||||
@@ -406,7 +416,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
'
|
||||
Me.MENU_VIEW.AutoToolTip = False
|
||||
Me.MENU_VIEW.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
|
||||
Me.MENU_VIEW.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BTT_VIEW_LARGE, Me.BTT_VIEW_SMALL, Me.BTT_VIEW_LIST, Me.BTT_VIEW_DETAILS, MENU_VIEW_SEP_1, Me.BTT_SITE_ALL, Me.BTT_SITE_SPECIFIC, MENU_VIEW_SEP_2, Me.BTT_SHOW_ALL, Me.BTT_SHOW_REGULAR, Me.BTT_SHOW_TEMP, Me.BTT_SHOW_FAV, Me.BTT_SHOW_DELETED, Me.BTT_SHOW_SUSPENDED, Me.BTT_SHOW_LABELS, Me.BTT_SHOW_NO_LABELS, Me.BTT_SHOW_EXCLUDED_LABELS, Me.BTT_SHOW_EXCLUDED_LABELS_IGNORE, Me.BTT_SHOW_SHOW_GROUPS, MENU_VIEW_SEP_3, Me.BTT_SHOW_LIMIT_DATES})
|
||||
Me.MENU_VIEW.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BTT_VIEW_LARGE, Me.BTT_VIEW_SMALL, Me.BTT_VIEW_LIST, Me.BTT_VIEW_DETAILS, MENU_VIEW_SEP_1, Me.BTT_SITE_ALL, Me.BTT_SITE_SPECIFIC, MENU_VIEW_SEP_2, Me.BTT_SHOW_ALL, Me.BTT_SHOW_REGULAR, Me.BTT_SHOW_TEMP, Me.BTT_SHOW_FAV, Me.BTT_SHOW_DELETED, Me.BTT_SHOW_SUSPENDED, Me.BTT_SHOW_LABELS, Me.BTT_SHOW_NO_LABELS, Me.BTT_SHOW_EXCLUDED_LABELS, Me.BTT_SHOW_EXCLUDED_LABELS_IGNORE, Me.BTT_SHOW_SHOW_GROUPS, MENU_VIEW_SEP_3, Me.BTT_SHOW_LIMIT_DATES_NOT, Me.BTT_SHOW_LIMIT_DATES_IN})
|
||||
Me.MENU_VIEW.Image = CType(resources.GetObject("MENU_VIEW.Image"), System.Drawing.Image)
|
||||
Me.MENU_VIEW.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.MENU_VIEW.Name = "MENU_VIEW"
|
||||
@@ -519,13 +529,13 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Me.BTT_SHOW_SHOW_GROUPS.Size = New System.Drawing.Size(231, 22)
|
||||
Me.BTT_SHOW_SHOW_GROUPS.Text = "Show groups instead of labels"
|
||||
'
|
||||
'BTT_SHOW_LIMIT_DATES
|
||||
'BTT_SHOW_LIMIT_DATES_NOT
|
||||
'
|
||||
Me.BTT_SHOW_LIMIT_DATES.AutoToolTip = True
|
||||
Me.BTT_SHOW_LIMIT_DATES.Name = "BTT_SHOW_LIMIT_DATES"
|
||||
Me.BTT_SHOW_LIMIT_DATES.Size = New System.Drawing.Size(231, 22)
|
||||
Me.BTT_SHOW_LIMIT_DATES.Text = "Limit dates"
|
||||
Me.BTT_SHOW_LIMIT_DATES.ToolTipText = "Show profiles that haven't downloaded new data since date..."
|
||||
Me.BTT_SHOW_LIMIT_DATES_NOT.AutoToolTip = True
|
||||
Me.BTT_SHOW_LIMIT_DATES_NOT.Name = "BTT_SHOW_LIMIT_DATES_NOT"
|
||||
Me.BTT_SHOW_LIMIT_DATES_NOT.Size = New System.Drawing.Size(231, 22)
|
||||
Me.BTT_SHOW_LIMIT_DATES_NOT.Text = "Limit dates (not in range)"
|
||||
Me.BTT_SHOW_LIMIT_DATES_NOT.ToolTipText = "Filter users whose last download date is not in the selected date range"
|
||||
'
|
||||
'BTT_LOG
|
||||
'
|
||||
@@ -776,13 +786,13 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Me.BTT_TRAY_CLOSE_NO_SCRIPT.ToolTipText = "Close the program without executing the script"
|
||||
Me.BTT_TRAY_CLOSE_NO_SCRIPT.Visible = False
|
||||
'
|
||||
'BTT_FEED
|
||||
'BTT_SHOW_LIMIT_DATES_IN
|
||||
'
|
||||
Me.BTT_FEED.Image = Global.SCrawler.My.Resources.Resources.RSSPic
|
||||
Me.BTT_FEED.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.BTT_FEED.Name = "BTT_FEED"
|
||||
Me.BTT_FEED.Size = New System.Drawing.Size(52, 22)
|
||||
Me.BTT_FEED.Text = "Feed"
|
||||
Me.BTT_SHOW_LIMIT_DATES_IN.AutoToolTip = True
|
||||
Me.BTT_SHOW_LIMIT_DATES_IN.Name = "BTT_SHOW_LIMIT_DATES_IN"
|
||||
Me.BTT_SHOW_LIMIT_DATES_IN.Size = New System.Drawing.Size(231, 22)
|
||||
Me.BTT_SHOW_LIMIT_DATES_IN.Text = "Limit dates (in range)"
|
||||
Me.BTT_SHOW_LIMIT_DATES_IN.ToolTipText = "Filter users whose last download date is in the selected date range"
|
||||
'
|
||||
'MainFrame
|
||||
'
|
||||
@@ -859,7 +869,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Private WithEvents BTT_DONATE As ToolStripButton
|
||||
Private WithEvents BTT_SHOW_DELETED As ToolStripMenuItem
|
||||
Private WithEvents BTT_SHOW_SUSPENDED As ToolStripMenuItem
|
||||
Private WithEvents BTT_SHOW_LIMIT_DATES As ToolStripMenuItem
|
||||
Private WithEvents BTT_SHOW_LIMIT_DATES_NOT As ToolStripMenuItem
|
||||
Private WithEvents BTT_VIEW_DETAILS As ToolStripMenuItem
|
||||
Private WithEvents COL_DEF As ColumnHeader
|
||||
Private WithEvents MENU_SETTINGS As ToolStripDropDownButton
|
||||
@@ -881,4 +891,5 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Friend WithEvents BTT_LOG As ToolStripButton
|
||||
Friend WithEvents Toolbar_TOP As ToolStrip
|
||||
Private WithEvents BTT_FEED As ToolStripButton
|
||||
Private WithEvents BTT_SHOW_LIMIT_DATES_IN As ToolStripMenuItem
|
||||
End Class
|
||||
@@ -312,35 +312,6 @@
|
||||
<metadata name="TRAY_CONTEXT.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>623, 17</value>
|
||||
</metadata>
|
||||
<data name="BTT_TRAY_CLOSE.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAVoSURBVEhLhZVrTJNXGMdfrtNSQIoadKRz2o0CorU3
|
||||
WkDIVBRaaGNbwAteh+AARRQlitEYTTRekiX7sH3YPmyZH9wtziybigLRCWTaCW5sCBWhlrb0Ci9zSxbo
|
||||
2f+UliGX7SS/tO85z/k9T57zXhhCCPO7Wh3VIhB83JKQ0Nu4bNlHm5YseZ1hmHC69n+Y5HLFcz7/ft/S
|
||||
pY+vr1hhwL4oEBJcZ0x793If5uZ+1VNfT/qvXCHP6+p8tzMymqRxcW8hMGKqbDo9MlmWddu2AfbiRTJ6
|
||||
+TIZKC52fyAUVi2JiYkLJmGaBYIPnx4+TPrOnCH9p08TC4LNx46RWwrF/ZXR0W/PleRZZuY669atZvbS
|
||||
JcJiL9vQQEZPnSKmwkLPjcTE97GPB8KZlvh4C5X31dWRgRMniAVBtvPnyWB9ve+2XP7jmtjYpOlJTOnp
|
||||
G60lJRZaOZWPQs4ePUpGUZh3xw7SnJDQhT0KEM3c5fOv9paVkX4kMAPL8ePEig1D584RG9rVpFS2rY6J
|
||||
EQaTmKTSjbbiYsvIhQuERTGjKIrFvtHaWjK8fz9plsudexYu/BLxKsBj9ALBGzel0vt9e/b4XiBoENhQ
|
||||
zRDOxIWWOY4cIS0KRZs4Nja5QyLJtRoM1pGzZ/0tYVExi/ayNTVkBPJ76enuJA7nM4j3gVWAHjgTIYqL
|
||||
E96SStvMu3YR64EDxF5dTYYOHSJOJPNA5Kiu9rUrlZ1mrdbCnjzpr5jFGotYtqpqQi6TuVM4nKvwlYHU
|
||||
gDzU31OMSGl8fPJtsbjVsn27z15RQRzAVVlJ3BB4kcx78CAZQbUjVIxrFtd+OdrbmpHhEXG5VE4rTwHz
|
||||
wMRdFDw4jEgFj5dyRyRqsxYVEcfu3cQFPPv2ES8qHEbCYRzgsFZLvO+8Q7xKJXGDVoXCK46Ovob95YBW
|
||||
Ph/8+xwE/wSTyHi81OZVq9qsGs2Ye8sW4srPJy6JhDgTE4kzOpo4IyKIMyyMOLhcX9Py5R4lj0cPtAKs
|
||||
BBwwKfc7p174J5BEhHY9FIk6bBDaIRuiQkDFfsLDSbdU+pdBKPwe8e+BNDBD7vdNn6BYd+6stK5da7bP
|
||||
nz9TDujcoEAw1lJY+CyFz9dCHDubnDJjwltRccS5fr3TjurnlIMBYE5NJY8Nhq7SrCwREsz6xL9y4S4v
|
||||
b3Bt2uSyR0XNkDvQe9ouKu8HvaGh5FfQIxL5OgyG30qUStqmGUkm/3jKy0+48vLcs1XuiI8nL/Ly/rYl
|
||||
JfmovCcgN4JW+l8iGe8oKuoqzcyckSQob3CpVB47l+sXv9KWxYtJt0r1x9ns7HZjQYHNnJxMfoH0EXgA
|
||||
7oFm0CmTjRsNhs6Na9bQF+Tkq57xlJXVu9Rqz9Bs8kWLSG9BwcsqieQONlXnpaaWdul0z7rR+6C8CTSC
|
||||
m8Aol4+36/XGT7VaevCRIIRx6/WWoQULZq2cyveLxY0IrAT0IHm1OTmZT3Q6U2da2qT8B/Ad+BZ05OSM
|
||||
GXW6p4hdBiIZZ1FRt5vPn6vyuwiqCsj9Xyq6qXbDBkWnXm/6OS3NN1X+dUgIeZSdPXZPoxlEXC6IY9pL
|
||||
S7faNBqXC9Iplf95YBb5ZF+RpGbdunQcbO/D1avJ9YC8LT19/Iv8/BeqpKRPEDORAGNeY3HxSYtG43Eq
|
||||
FL5etfpljUzWhPlZ5VOTlGVliR+hHUbs+0mpHP9GpRqM5XAuY20zmGgRRohYKIx9rNd/3qfTOa7l5uLu
|
||||
C63BvARw6fp0eRCMyBslJe8+2bx58EFhoVMlFNJvgQ4kgggQEgykvV0ApEAd+J3z8Z8KxmuA3pr0zikA
|
||||
b4LJZ2FqYBigFdOPNf0NC679Fxi0OPr+XxiAJgwURph/AJfOQQebMR8TAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="TrayIcon.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAMDAAAAEAIACoJQAAFgAAACgAAAAwAAAAYAAAAAEAIAAAAAAAACQAAMMOAADDDgAAAAAAAAAA
|
||||
@@ -505,6 +476,35 @@
|
||||
AAAAAAAAH/8AAAAAAAA//wAAAAAAAH//AAAAAAAA//8AAAAAAAP//wAAAAAAB///AAAAAAAP//8AAAAA
|
||||
AB///wAAAAAAf///AAAAAAH///8AAAAAB////wAAAAAf////AAAAAP////8AAAAH/////wAAAH//////
|
||||
AAA=
|
||||
</value>
|
||||
</data>
|
||||
<data name="BTT_TRAY_CLOSE.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAVoSURBVEhLhZVrTJNXGMdfrtNSQIoadKRz2o0CorU3
|
||||
WkDIVBRaaGNbwAteh+AARRQlitEYTTRekiX7sH3YPmyZH9wtziybigLRCWTaCW5sCBWhlrb0Ci9zSxbo
|
||||
2f+UliGX7SS/tO85z/k9T57zXhhCCPO7Wh3VIhB83JKQ0Nu4bNlHm5YseZ1hmHC69n+Y5HLFcz7/ft/S
|
||||
pY+vr1hhwL4oEBJcZ0x793If5uZ+1VNfT/qvXCHP6+p8tzMymqRxcW8hMGKqbDo9MlmWddu2AfbiRTJ6
|
||||
+TIZKC52fyAUVi2JiYkLJmGaBYIPnx4+TPrOnCH9p08TC4LNx46RWwrF/ZXR0W/PleRZZuY669atZvbS
|
||||
JcJiL9vQQEZPnSKmwkLPjcTE97GPB8KZlvh4C5X31dWRgRMniAVBtvPnyWB9ve+2XP7jmtjYpOlJTOnp
|
||||
G60lJRZaOZWPQs4ePUpGUZh3xw7SnJDQhT0KEM3c5fOv9paVkX4kMAPL8ePEig1D584RG9rVpFS2rY6J
|
||||
EQaTmKTSjbbiYsvIhQuERTGjKIrFvtHaWjK8fz9plsudexYu/BLxKsBj9ALBGzel0vt9e/b4XiBoENhQ
|
||||
zRDOxIWWOY4cIS0KRZs4Nja5QyLJtRoM1pGzZ/0tYVExi/ayNTVkBPJ76enuJA7nM4j3gVWAHjgTIYqL
|
||||
E96SStvMu3YR64EDxF5dTYYOHSJOJPNA5Kiu9rUrlZ1mrdbCnjzpr5jFGotYtqpqQi6TuVM4nKvwlYHU
|
||||
gDzU31OMSGl8fPJtsbjVsn27z15RQRzAVVlJ3BB4kcx78CAZQbUjVIxrFtd+OdrbmpHhEXG5VE4rTwHz
|
||||
wMRdFDw4jEgFj5dyRyRqsxYVEcfu3cQFPPv2ES8qHEbCYRzgsFZLvO+8Q7xKJXGDVoXCK46Ovob95YBW
|
||||
Ph/8+xwE/wSTyHi81OZVq9qsGs2Ye8sW4srPJy6JhDgTE4kzOpo4IyKIMyyMOLhcX9Py5R4lj0cPtAKs
|
||||
BBwwKfc7p174J5BEhHY9FIk6bBDaIRuiQkDFfsLDSbdU+pdBKPwe8e+BNDBD7vdNn6BYd+6stK5da7bP
|
||||
nz9TDujcoEAw1lJY+CyFz9dCHDubnDJjwltRccS5fr3TjurnlIMBYE5NJY8Nhq7SrCwREsz6xL9y4S4v
|
||||
b3Bt2uSyR0XNkDvQe9ouKu8HvaGh5FfQIxL5OgyG30qUStqmGUkm/3jKy0+48vLcs1XuiI8nL/Ly/rYl
|
||||
JfmovCcgN4JW+l8iGe8oKuoqzcyckSQob3CpVB47l+sXv9KWxYtJt0r1x9ns7HZjQYHNnJxMfoH0EXgA
|
||||
7oFm0CmTjRsNhs6Na9bQF+Tkq57xlJXVu9Rqz9Bs8kWLSG9BwcsqieQONlXnpaaWdul0z7rR+6C8CTSC
|
||||
m8Aol4+36/XGT7VaevCRIIRx6/WWoQULZq2cyveLxY0IrAT0IHm1OTmZT3Q6U2da2qT8B/Ad+BZ05OSM
|
||||
GXW6p4hdBiIZZ1FRt5vPn6vyuwiqCsj9Xyq6qXbDBkWnXm/6OS3NN1X+dUgIeZSdPXZPoxlEXC6IY9pL
|
||||
S7faNBqXC9Iplf95YBb5ZF+RpGbdunQcbO/D1avJ9YC8LT19/Iv8/BeqpKRPEDORAGNeY3HxSYtG43Eq
|
||||
FL5etfpljUzWhPlZ5VOTlGVliR+hHUbs+0mpHP9GpRqM5XAuY20zmGgRRohYKIx9rNd/3qfTOa7l5uLu
|
||||
C63BvARw6fp0eRCMyBslJe8+2bx58EFhoVMlFNJvgQ4kgggQEgykvV0ApEAd+J3z8Z8KxmuA3pr0zikA
|
||||
b4LJZ2FqYBigFdOPNf0NC679Fxi0OPr+XxiAJgwURph/AJfOQQebMR8TAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
|
||||
@@ -87,7 +87,10 @@ Public Class MainFrame
|
||||
CheckVersion(False)
|
||||
BTT_SITE_ALL.Checked = Settings.SelectedSites.Count = 0
|
||||
BTT_SITE_SPECIFIC.Checked = Settings.SelectedSites.Count > 0
|
||||
BTT_SHOW_LIMIT_DATES.Checked = Settings.LastUpdatedDate.HasValue
|
||||
BTT_SHOW_LIMIT_DATES_NOT.Tag = ShowingDates.Not
|
||||
BTT_SHOW_LIMIT_DATES_NOT.Checked = Settings.ViewDateMode.Value = ShowingDates.Not
|
||||
BTT_SHOW_LIMIT_DATES_IN.Tag = ShowingDates.In
|
||||
BTT_SHOW_LIMIT_DATES_IN.Checked = Settings.ViewDateMode.Value = ShowingDates.In
|
||||
With Settings.Groups
|
||||
AddHandler .Added, AddressOf GROUPS_Added
|
||||
AddHandler .Deleted, AddressOf GROUPS_Deleted
|
||||
@@ -595,26 +598,40 @@ CloseResume:
|
||||
End If
|
||||
End Using
|
||||
End Function
|
||||
Private Sub BTT_SHOW_LIMIT_DATES_Click(sender As Object, e As EventArgs) Handles BTT_SHOW_LIMIT_DATES.Click
|
||||
Private Sub BTT_SHOW_LIMIT_DATES_NOT_IN_Click(ByVal Sender As ToolStripMenuItem, ByVal e As EventArgs) Handles BTT_SHOW_LIMIT_DATES_NOT.Click,
|
||||
BTT_SHOW_LIMIT_DATES_IN.Click
|
||||
Dim r As Boolean = False
|
||||
Dim snd As Action(Of Date?) = Sub(ByVal d As Date?)
|
||||
With Settings.LastUpdatedDate
|
||||
If .HasValue And d.HasValue Then
|
||||
r = Not .Value.Date = d.Value.Date
|
||||
Else
|
||||
r = True
|
||||
End If
|
||||
End With
|
||||
Settings.LastUpdatedDate = d
|
||||
End Sub
|
||||
Using f As New FDatePickerForm(Settings.LastUpdatedDate)
|
||||
Dim UpSettings As Action(Of Date?, Date?, ShowingDates) = Sub(ByVal _from As Date?, ByVal _to As Date?, ByVal Mode As ShowingDates)
|
||||
With Settings
|
||||
.BeginUpdate()
|
||||
If Not .ViewDateMode.Value = CInt(Mode) Then r = True
|
||||
.ViewDateMode.Value = CInt(Mode)
|
||||
If Not Mode = ShowingDates.Off Then
|
||||
If .ViewDateFrom.HasValue And _from.HasValue Then
|
||||
If Not .ViewDateFrom.Value.Date = _from.Value.Date Then r = True
|
||||
Else
|
||||
r = True
|
||||
End If
|
||||
.ViewDateFrom = _from
|
||||
If .ViewDateTo.HasValue And _to.HasValue Then
|
||||
If Not .ViewDateTo.Value.Date = _to.Value.Date Then r = True
|
||||
Else
|
||||
r = True
|
||||
End If
|
||||
.ViewDateTo = _to
|
||||
End If
|
||||
.EndUpdate()
|
||||
End With
|
||||
End Sub
|
||||
Using f As New FDatePickerForm(Settings.ViewDateFrom, Settings.ViewDateTo)
|
||||
f.ShowDialog()
|
||||
Select Case f.DialogResult
|
||||
Case DialogResult.Abort : snd(Nothing)
|
||||
Case DialogResult.OK : snd(f.SelectedDate)
|
||||
Case DialogResult.Abort : UpSettings(f.DateFrom, f.DateTo, ShowingDates.Off)
|
||||
Case DialogResult.OK : UpSettings(f.DateFrom, f.DateTo, Sender.Tag)
|
||||
End Select
|
||||
End Using
|
||||
BTT_SHOW_LIMIT_DATES.Checked = Settings.LastUpdatedDate.HasValue
|
||||
BTT_SHOW_LIMIT_DATES_NOT.Checked = Settings.ViewDateMode.Value = ShowingDates.Not
|
||||
BTT_SHOW_LIMIT_DATES_IN.Checked = Settings.ViewDateMode.Value = ShowingDates.In
|
||||
If r Then RefillList()
|
||||
End Sub
|
||||
#End Region
|
||||
@@ -1090,22 +1107,25 @@ CloseResume:
|
||||
End Sub
|
||||
Private Enum DownUserLimits : None : Number : [Date] : End Enum
|
||||
Private Sub DownloadSelectedUser(ByVal UseLimits As DownUserLimits)
|
||||
Const MsgTitle$ = "Download limit"
|
||||
Dim users As List(Of IUserData) = GetSelectedUserArray()
|
||||
If users.ListExists Then
|
||||
Dim l%? = Nothing
|
||||
Dim d As Date? = Nothing
|
||||
Dim limit%? = Nothing
|
||||
Dim _from As Date? = Nothing
|
||||
Dim _to As Date? = Nothing
|
||||
Dim _fromStr$, _toStr$
|
||||
If UseLimits = DownUserLimits.Number Then
|
||||
Do
|
||||
l = AConvert(Of Integer)(InputBoxE("Enter top posts limit for downloading:", "Download limit", 10), AModes.Var, Nothing)
|
||||
If l.HasValue Then
|
||||
Select Case MsgBoxE(New MMessage($"You are set up downloading top [{l.Value}] posts", "Download limit",
|
||||
limit = AConvert(Of Integer)(InputBoxE("Enter top posts limit for downloading:", MsgTitle, 10), AModes.Var, Nothing)
|
||||
If limit.HasValue Then
|
||||
Select Case MsgBoxE(New MMessage($"You are set up downloading top [{limit.Value}] posts", MsgTitle,
|
||||
{"Confirm", "Try again", "Disable limit", "Cancel"}) With {.ButtonsPerRow = 2}).Index
|
||||
Case 0 : Exit Do
|
||||
Case 2 : l = Nothing : Exit Do
|
||||
Case 2 : limit = Nothing : Exit Do
|
||||
Case 3 : GoTo CancelDownloadingOperation
|
||||
End Select
|
||||
Else
|
||||
Select Case MsgBoxE({"You are not set up downloading limit", "Download limit"},,,, {"Confirm", "Try again", "Cancel"}).Index
|
||||
Select Case MsgBoxE({"You are not set up downloading limit", MsgTitle},,,, {"Confirm", "Try again", "Cancel"}).Index
|
||||
Case 0 : Exit Do
|
||||
Case 2 : GoTo CancelDownloadingOperation
|
||||
End Select
|
||||
@@ -1113,24 +1133,30 @@ CloseResume:
|
||||
Loop
|
||||
ElseIf UseLimits = DownUserLimits.Date Then
|
||||
Do
|
||||
Using fd As New FDatePickerForm(Nothing)
|
||||
Using fd As New FDatePickerForm(Nothing, Nothing)
|
||||
fd.ShowDialog()
|
||||
If fd.DialogResult = DialogResult.OK Then
|
||||
d = fd.SelectedDate
|
||||
_from = fd.DateFrom
|
||||
_to = fd.DateTo
|
||||
ElseIf fd.DialogResult = DialogResult.Abort Then
|
||||
d = Nothing
|
||||
_from = Nothing
|
||||
_to = Nothing
|
||||
End If
|
||||
End Using
|
||||
If d.HasValue Then
|
||||
Select Case MsgBoxE(New MMessage($"You are set up downloading posts until [{d.Value.Date.ToStringDate(ADateTime.Formats.BaseDate)}]",
|
||||
"Download limit",
|
||||
{"Confirm", "Try again", "Disable limit", "Cancel"}) With {.ButtonsPerRow = 2}).Index
|
||||
If _from.HasValue Or _to.HasValue Then
|
||||
_fromStr = AConvert(Of String)(_from, ADateTime.Formats.BaseDate, String.Empty)
|
||||
_toStr = AConvert(Of String)(_to, ADateTime.Formats.BaseDate, String.Empty)
|
||||
If Not _fromStr.IsEmptyString Then _fromStr = $"FROM [{_fromStr}]"
|
||||
If Not _toStr.IsEmptyString Then _toStr = $"TO [{_toStr}]"
|
||||
If Not _toStr.IsEmptyString And Not _fromStr.IsEmptyString Then _fromStr &= " "
|
||||
Select Case MsgBoxE(New MMessage($"You have set a date limit for downloading posts: {_fromStr}{_toStr}", MsgTitle,
|
||||
{"Confirm", "Try again", "Disable limit", "Cancel"}) With {.ButtonsPerRow = 2}).Index
|
||||
Case 0 : Exit Do
|
||||
Case 2 : d = Nothing : Exit Do
|
||||
Case 2 : _from = Nothing : _to = Nothing : Exit Do
|
||||
Case 3 : GoTo CancelDownloadingOperation
|
||||
End Select
|
||||
Else
|
||||
Select Case MsgBoxE({"You are not set up a date limit", "Download limit"},,,, {"Confirm", "Try again", "Cancel"}).Index
|
||||
Select Case MsgBoxE({"You have not set a date limit", MsgTitle},,,, {"Confirm", "Try again", "Cancel"}).Index
|
||||
Case 0 : Exit Do
|
||||
Case 2 : GoTo CancelDownloadingOperation
|
||||
End Select
|
||||
@@ -1144,18 +1170,17 @@ CancelDownloadingOperation:
|
||||
MsgBoxE("Operation canceled")
|
||||
Exit Sub
|
||||
ResumeDownloadingOperation:
|
||||
If users.Count = 1 Then
|
||||
users(0).DownloadTopCount = l
|
||||
users(0).DownloadToDate = d
|
||||
Downloader.Add(users(0))
|
||||
Else
|
||||
Dim uStr$ = users.Select(Function(u) u.ToString()).ListToString(vbNewLine)
|
||||
If MsgBoxE({$"You are select {users.Count} users' profiles{vbNewLine}Do you want to download all of them?{vbNewLine.StringDup(2)}" &
|
||||
$"Selected users:{vbNewLine}{uStr}", "A few users selected"},
|
||||
MsgBoxStyle.Question + MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
users.ForEach(Sub(u) u.DownloadTopCount = l)
|
||||
Downloader.AddRange(users)
|
||||
End If
|
||||
Dim uStr$ = If(users.Count = 1, String.Empty, users.Select(Function(u) u.ToString()).ListToString(vbNewLine))
|
||||
If users.Count = 1 OrElse MsgBoxE({$"You have selected {users.Count} user profiles" & vbCr &
|
||||
$"Do you want to download them all?{vbNewLine.StringDup(2)}" &
|
||||
$"Selected users:{vbNewLine}{uStr}", "Multiple users selected"},
|
||||
MsgBoxStyle.Question + MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
users.ForEach(Sub(u)
|
||||
u.DownloadTopCount = limit
|
||||
u.DownloadDateFrom = _from
|
||||
u.DownloadDateTo = _to
|
||||
End Sub)
|
||||
Downloader.AddRange(users)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
@@ -1171,10 +1196,10 @@ ResumeDownloadingOperation:
|
||||
Dim a As Action = Sub()
|
||||
Dim i% = LIST_PROFILES.Items.IndexOfKey(Key)
|
||||
If i < 0 Then
|
||||
i = Settings.Users.FindIndex(Function(u) u.Key = Key)
|
||||
If i >= 0 Then
|
||||
UserListUpdate(Settings.Users(i), True)
|
||||
i = LIST_PROFILES.Items.IndexOfKey(Key)
|
||||
Dim u As IUserData = Settings.GetUser(Key, True)
|
||||
If Not u Is Nothing Then
|
||||
UserListUpdate(u, True)
|
||||
i = LIST_PROFILES.Items.IndexOfKey(u.Key)
|
||||
End If
|
||||
End If
|
||||
If i >= 0 Then
|
||||
|
||||
@@ -83,6 +83,11 @@ Friend Module MainMod
|
||||
Deleted = 10000
|
||||
Suspended = 12000
|
||||
End Enum
|
||||
Friend Enum ShowingDates As Integer
|
||||
[Off] = 0
|
||||
[Not] = 1
|
||||
[In] = 2
|
||||
End Enum
|
||||
Friend Enum FileNameReplaceMode As Integer
|
||||
None = 0
|
||||
Replace = 1
|
||||
@@ -95,6 +100,7 @@ Friend Module MainMod
|
||||
Friend MyProgressForm As ActiveDownloadingProgress
|
||||
Friend MainFrameObj As MainFrameObjects
|
||||
Friend ReadOnly ParsersDataDateProvider As New ADateTime(ADateTime.Formats.BaseDateTime)
|
||||
Friend ReadOnly FeedVideoLengthProvider As New ADateTime("hh\:mm\:ss") With {.TimeParseMode = ADateTime.TimeModes.TimeSpan}
|
||||
Friend ReadOnly LogConnector As New LogHost
|
||||
#Region "File name operations"
|
||||
Friend FileDateAppenderProvider As IFormatProvider
|
||||
|
||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2022.9.8.1")>
|
||||
<Assembly: AssemblyFileVersion("2022.9.8.1")>
|
||||
<Assembly: AssemblyVersion("2022.9.17.0")>
|
||||
<Assembly: AssemblyFileVersion("2022.9.17.0")>
|
||||
<Assembly: NeutralResourcesLanguage("en")>
|
||||
|
||||
10
SCrawler/My Project/Resources.Designer.vb
generated
10
SCrawler/My Project/Resources.Designer.vb
generated
@@ -350,6 +350,16 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property StopPic32() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("StopPic32", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
|
||||
'''</summary>
|
||||
|
||||
@@ -211,4 +211,7 @@
|
||||
<data name="RSSPic" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Content\Pictures\RSSPic.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="StopPic32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Content\Pictures\StopPic32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -93,6 +93,7 @@ Namespace Plugin.Hosts
|
||||
End Property
|
||||
#End Region
|
||||
#Region "Base properties compatibility"
|
||||
Friend ReadOnly Property DownloadSiteData As XMLValue(Of Boolean)
|
||||
Friend ReadOnly Property Temporary As XMLValue(Of Boolean)
|
||||
Friend ReadOnly Property DownloadImages As XMLValue(Of Boolean)
|
||||
Friend ReadOnly Property DownloadVideos As XMLValue(Of Boolean)
|
||||
@@ -263,6 +264,8 @@ Namespace Plugin.Hosts
|
||||
DownloadVideos.SetExtended("DownloadVideos", True, _XML, n)
|
||||
DownloadVideos.SetDefault(_Vids)
|
||||
|
||||
DownloadSiteData = New XMLValue(Of Boolean)("DownloadSiteData", True, _XML, n)
|
||||
|
||||
GetUserMediaOnly = New XMLValue(Of Boolean)("GetUserMediaOnly", True, _XML, n)
|
||||
If PropList.Count > 0 Then
|
||||
Dim MaxOffset% = Math.Max(PropList.Max(Function(pp) pp.LeftOffset), PropertyValueHost.LeftOffsetDefault)
|
||||
@@ -318,11 +321,15 @@ Namespace Plugin.Hosts
|
||||
Private _AvailableAsked As Boolean = False
|
||||
Private _ActiveTaskCount As Integer = 0
|
||||
Friend Function Available(ByVal What As Download, ByVal Silent As Boolean) As Boolean
|
||||
If Not _AvailableAsked Then
|
||||
_AvailableValue = Source.Available(What, Silent)
|
||||
_AvailableAsked = True
|
||||
If DownloadSiteData Then
|
||||
If Not _AvailableAsked Then
|
||||
_AvailableValue = Source.Available(What, Silent)
|
||||
_AvailableAsked = True
|
||||
End If
|
||||
Return _AvailableValue
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
Return _AvailableValue
|
||||
End Function
|
||||
Friend Sub DownloadStarted(ByVal What As Download)
|
||||
_ActiveTaskCount += 1
|
||||
|
||||
@@ -53,7 +53,8 @@ Namespace Plugin.Hosts
|
||||
.SeparateVideoFolder = SeparateVideoFolderF
|
||||
.DataPath = MyFile.CutPath.PathNoSeparator
|
||||
.PostsNumberLimit = DownloadTopCount
|
||||
.PostsDateLimit = DownloadToDate
|
||||
.DownloadDateFrom = DownloadDateFrom
|
||||
.DownloadDateTo = DownloadDateTo
|
||||
|
||||
.ExistingContentList = New List(Of PluginUserMedia)
|
||||
.TempMediaList = New List(Of PluginUserMedia)
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TargetPlatformVersion>10.0</TargetPlatformVersion>
|
||||
@@ -111,10 +113,29 @@
|
||||
<ApplicationManifest>My Project\app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="LibVLCSharp, Version=3.6.6.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\LibVLCSharp.3.6.6\lib\net40\LibVLCSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="LibVLCSharp.WinForms, Version=3.6.6.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\LibVLCSharp.WinForms.3.6.6\lib\net40\LibVLCSharp.WinForms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Threading.Tasks.Extensions, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop, Version=1.0.168.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net" />
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
@@ -181,6 +202,12 @@
|
||||
<Compile Include="Download\FeedMedia.vb">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Download\FeedVideo.Designer.vb">
|
||||
<DependentUpon>FeedVideo.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Download\FeedVideo.vb">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Download\Groups\DownloadGroup.vb" />
|
||||
<Compile Include="Download\DownloadProgress.vb" />
|
||||
<Compile Include="Download\Groups\DownloadGroupCollection.vb" />
|
||||
@@ -372,6 +399,9 @@
|
||||
<EmbeddedResource Include="Download\FeedMedia.resx">
|
||||
<DependentUpon>FeedMedia.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Download\FeedVideo.resx">
|
||||
<DependentUpon>FeedVideo.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Download\Groups\GroupEditorForm.resx">
|
||||
<DependentUpon>GroupEditorForm.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -428,6 +458,7 @@
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="App.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\MyUtilities\PersonalUtilities.Notifications\PersonalUtilities.Notifications.vbproj">
|
||||
@@ -460,6 +491,7 @@
|
||||
<None Include="Content\Pictures\RSSPic.png" />
|
||||
<None Include="Content\Icons\RedGifsIcon.ico" />
|
||||
<None Include="Content\Icons\RSSIcon.ico" />
|
||||
<None Include="Content\Pictures\StopPic32.png" />
|
||||
<Content Include="ffmpeg.exe">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
@@ -477,33 +509,14 @@
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<COMReference Include="AxWMPLib">
|
||||
<Guid>{6BF52A50-394A-11D3-B153-00C04F79FAA6}</Guid>
|
||||
<VersionMajor>1</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>aximp</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
</COMReference>
|
||||
<COMReference Include="stdole">
|
||||
<Guid>{00020430-0000-0000-C000-000000000046}</Guid>
|
||||
<VersionMajor>2</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>primary</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</COMReference>
|
||||
<COMReference Include="WMPLib">
|
||||
<Guid>{6BF52A50-394A-11D3-B153-00C04F79FAA6}</Guid>
|
||||
<VersionMajor>1</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>tlbimp</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</COMReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<Import Project="..\packages\VideoLAN.LibVLC.Windows.3.0.17.4\build\VideoLAN.LibVLC.Windows.targets" Condition="Exists('..\packages\VideoLAN.LibVLC.Windows.3.0.17.4\build\VideoLAN.LibVLC.Windows.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\VideoLAN.LibVLC.Windows.3.0.17.4\build\VideoLAN.LibVLC.Windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\VideoLAN.LibVLC.Windows.3.0.17.4\build\VideoLAN.LibVLC.Windows.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
|
||||
</Project>
|
||||
@@ -29,6 +29,7 @@ Friend Class SettingsCLS : Implements IDisposable
|
||||
Return OS64 And FfmpegExists
|
||||
End Get
|
||||
End Property
|
||||
Friend ReadOnly Property CachePath As SFile = "_Cache\"
|
||||
Friend ReadOnly Plugins As List(Of PluginHost)
|
||||
Friend ReadOnly Property Users As List(Of IUserData)
|
||||
Friend ReadOnly Property UsersList As List(Of UserInfo)
|
||||
@@ -76,9 +77,7 @@ Friend Class SettingsCLS : Implements IDisposable
|
||||
|
||||
FastProfilesLoading = New XMLValue(Of Boolean)("FastProfilesLoading", False, MyXML)
|
||||
MaxLargeImageHeight = New XMLValue(Of Integer)("MaxLargeImageHeight", 150, MyXML)
|
||||
MaxLargeImageHeight.ReplaceByValue("MaxLargeImageHeigh",, MyXML)
|
||||
MaxSmallImageHeight = New XMLValue(Of Integer)("MaxSmallImageHeight", 15, MyXML)
|
||||
MaxSmallImageHeight.ReplaceByValue("MaxSmallImageHeigh",, MyXML)
|
||||
DownloadOpenInfo = New XMLValueAttribute(Of Boolean, Boolean)("DownloadOpenInfo", "OpenAgain", False, False, MyXML)
|
||||
DownloadOpenProgress = New XMLValueAttribute(Of Boolean, Boolean)("DownloadOpenProgress", "OpenAgain", False, False, MyXML)
|
||||
DownloadsCompleteCommand = New XMLValueAttribute(Of String, Boolean)("DownloadsCompleteCommand", "Use",,, MyXML)
|
||||
@@ -96,8 +95,13 @@ Friend Class SettingsCLS : Implements IDisposable
|
||||
|
||||
LatestSavingPath = New XMLValue(Of SFile)("LatestSavingPath", Nothing, MyXML,, New XMLValueBase.ToFilePath)
|
||||
LatestSelectedChannel = New XMLValue(Of String)("LatestSelectedChannel",, MyXML)
|
||||
LastUpdatedLimit = New XMLValue(Of Date)
|
||||
LastUpdatedLimit.SetExtended("LastUpdatedLimit",, MyXML)
|
||||
|
||||
_ViewDateFrom = New XMLValue(Of Date)
|
||||
_ViewDateFrom.SetExtended("ViewDateFrom",, MyXML)
|
||||
_ViewDateTo = New XMLValue(Of Date)
|
||||
_ViewDateTo.SetExtended("ViewDateTo",, MyXML)
|
||||
ViewDateMode = New XMLValue(Of Integer)("ViewDateMode", ShowingDates.Off, MyXML)
|
||||
|
||||
LatestDownloadedSites = New XMLValuesCollection(Of String)(XMLValueBase.ListModes.String, "LatestDownloadedSites", MyXML)
|
||||
|
||||
SelectedSites = New XMLValuesCollection(Of String)(XMLValueBase.ListModes.String, "SelectedSites", MyXML, {Name_Node_Sites})
|
||||
@@ -342,47 +346,24 @@ Friend Class SettingsCLS : Implements IDisposable
|
||||
_UserListUpdateRequired = True
|
||||
End Try
|
||||
End Sub
|
||||
Friend Overloads Function GetUser(ByVal User As IUserData) As IUserData
|
||||
If Users.Count > 0 Then
|
||||
Dim uSimple As Predicate(Of IUserData) = Function(u) u.Equals(DirectCast(User, UserDataBase))
|
||||
Dim uCol As Predicate(Of IUserData) = Function(ByVal u As IUserData) As Boolean
|
||||
If u.IsCollection Then
|
||||
Return DirectCast(u, UserDataBind).Collections.Exists(uSimple)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
Dim uu As Predicate(Of IUserData)
|
||||
If User.IncludedInCollection Then uu = uCol Else uu = uSimple
|
||||
Dim i% = Users.FindIndex(uu)
|
||||
If i >= 0 Then
|
||||
If Users(i).IsCollection Then
|
||||
With DirectCast(Users(i), UserDataBind)
|
||||
i = .Collections.FindIndex(uSimple)
|
||||
If i >= 0 Then Return .Collections(i)
|
||||
End With
|
||||
Else
|
||||
Return Users(i)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Return Nothing
|
||||
Friend Overloads Function GetUser(ByVal User As IUserData, Optional ByVal GetCollection As Boolean = False) As IUserData
|
||||
Return GetUser(If(User?.Key, String.Empty), GetCollection)
|
||||
End Function
|
||||
Friend Overloads Function GetUser(ByVal UserKey As String) As IUserData
|
||||
If Users.Count > 0 Then
|
||||
Friend Overloads Function GetUser(ByVal UserKey As String, Optional ByVal GetCollection As Boolean = False) As IUserData
|
||||
If Users.Count > 0 And Not UserKey.IsEmptyString Then
|
||||
Dim finder As Predicate(Of IUserData) = Function(u) u.Key = UserKey
|
||||
Dim i%, ii%
|
||||
For i = 0 To Users.Count - 1
|
||||
With Users(i)
|
||||
If .IsCollection Then
|
||||
If finder.Invoke(.Self) Then
|
||||
Return .Self
|
||||
ElseIf .IsCollection Then
|
||||
With DirectCast(.Self, UserDataBind)
|
||||
If .Count > 0 Then
|
||||
ii = .Collections.FindIndex(finder)
|
||||
If ii >= 0 Then Return .Collections(ii)
|
||||
If ii >= 0 Then Return If(GetCollection, .Self, .Collections(ii))
|
||||
End If
|
||||
End With
|
||||
Else
|
||||
If finder.Invoke(.Self) Then Return .Self
|
||||
End If
|
||||
End With
|
||||
Next
|
||||
@@ -497,15 +478,27 @@ Friend Class SettingsCLS : Implements IDisposable
|
||||
Friend ReadOnly Property UseGrouping As XMLValue(Of Boolean)
|
||||
Friend ReadOnly Property ShowGroupsInsteadLabels As XMLValue(Of Boolean)
|
||||
Friend ReadOnly Property SelectedSites As XMLValuesCollection(Of String)
|
||||
Private ReadOnly LastUpdatedLimit As XMLValue(Of Date)
|
||||
Friend Property LastUpdatedDate As Date?
|
||||
#Region "View dates"
|
||||
Private ReadOnly _ViewDateFrom As XMLValue(Of Date)
|
||||
Friend Property ViewDateFrom As Date?
|
||||
Get
|
||||
If LastUpdatedLimit.ValueF.Exists Then Return LastUpdatedLimit.Value Else Return Nothing
|
||||
If _ViewDateFrom.ValueF.Exists Then Return _ViewDateFrom.Value Else Return Nothing
|
||||
End Get
|
||||
Set(ByVal NewDate As Date?)
|
||||
If Not NewDate.HasValue Then LastUpdatedLimit.ValueF = Nothing Else LastUpdatedLimit.Value = NewDate.Value
|
||||
Set(ByVal d As Date?)
|
||||
If Not d.HasValue Then _ViewDateFrom.ValueF = Nothing Else _ViewDateFrom.Value = d.Value
|
||||
End Set
|
||||
End Property
|
||||
Private ReadOnly _ViewDateTo As XMLValue(Of Date)
|
||||
Friend Property ViewDateTo As Date?
|
||||
Get
|
||||
If _ViewDateTo.ValueF.Exists Then Return _ViewDateTo.Value Else Return Nothing
|
||||
End Get
|
||||
Set(ByVal d As Date?)
|
||||
If Not d.HasValue Then _ViewDateTo.ValueF = Nothing Else _ViewDateTo.Value = d.Value
|
||||
End Set
|
||||
End Property
|
||||
Friend ReadOnly Property ViewDateMode As XMLValue(Of Integer)
|
||||
#End Region
|
||||
#End Region
|
||||
#Region "Latest values"
|
||||
Friend ReadOnly Property LatestSavingPath As XMLValue(Of SFile)
|
||||
@@ -555,7 +548,7 @@ Friend Class SettingsCLS : Implements IDisposable
|
||||
DeleteCachePath()
|
||||
End If
|
||||
If Not Automation Is Nothing Then Automation.Dispose()
|
||||
AutoDownloader.CachePath.Delete(SFO.Path, SFODelete.DeletePermanently, EDP.None)
|
||||
CachePath.Delete(SFO.Path, SFODelete.DeletePermanently, EDP.None)
|
||||
Plugins.Clear()
|
||||
Users.ListClearDispose
|
||||
UsersList.Clear()
|
||||
|
||||
10
SCrawler/packages.config
Normal file
10
SCrawler/packages.config
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="LibVLCSharp" version="3.6.6" targetFramework="net461" />
|
||||
<package id="LibVLCSharp.WinForms" version="3.6.6" targetFramework="net461" />
|
||||
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net461" />
|
||||
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net461" />
|
||||
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net461" />
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
|
||||
<package id="VideoLAN.LibVLC.Windows" version="3.0.17.4" targetFramework="net461" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user