mirror of
https://github.com/AAndyProgram/SCrawler.git
synced 2026-03-15 16:22:17 +00:00
Compare commits
3 Commits
2022.9.8.1
...
2022.9.16.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92be0994ae | ||
|
|
9567b0a367 | ||
|
|
c28c0e1ba3 |
26
Changelog.md
26
Changelog.md
@@ -1,3 +1,29 @@
|
|||||||
|
# 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.9.8.1
|
||||||
|
|
||||||
*2022-09-08*
|
*2022-09-08*
|
||||||
|
|||||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2022.9.8.0")>
|
<Assembly: AssemblyVersion("2022.9.10.0")>
|
||||||
<Assembly: AssemblyFileVersion("2022.9.8.0")>
|
<Assembly: AssemblyFileVersion("2022.9.10.0")>
|
||||||
<Assembly: NeutralResourcesLanguage("en")>
|
<Assembly: NeutralResourcesLanguage("en")>
|
||||||
|
|||||||
@@ -152,7 +152,8 @@ Public Class UserData : Implements IPluginContentProvider
|
|||||||
If Responser.Client.StatusCode = Net.HttpStatusCode.ServiceUnavailable Then
|
If Responser.Client.StatusCode = Net.HttpStatusCode.ServiceUnavailable Then
|
||||||
LogProvider.Add("LPSG not available")
|
LogProvider.Add("LPSG not available")
|
||||||
Else
|
Else
|
||||||
m.DownloadState = UStates.Skipped
|
m.DownloadState = UStates.Missing
|
||||||
|
m.Attempts += 1
|
||||||
End If
|
End If
|
||||||
End Try
|
End Try
|
||||||
RaiseEvent ProgressChanged(1)
|
RaiseEvent ProgressChanged(1)
|
||||||
|
|||||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2022.9.8.0")>
|
<Assembly: AssemblyVersion("2022.9.10.0")>
|
||||||
<Assembly: AssemblyFileVersion("2022.9.8.0")>
|
<Assembly: AssemblyFileVersion("2022.9.10.0")>
|
||||||
<Assembly: NeutralResourcesLanguage("en")>
|
<Assembly: NeutralResourcesLanguage("en")>
|
||||||
|
|||||||
@@ -208,7 +208,8 @@ Public Class UserData : Implements IPluginContentProvider
|
|||||||
m.File = f
|
m.File = f
|
||||||
m.DownloadState = UStates.Downloaded
|
m.DownloadState = UStates.Downloaded
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
m.DownloadState = UStates.Skipped
|
m.DownloadState = UStates.Missing
|
||||||
|
m.Attempts += 1
|
||||||
End Try
|
End Try
|
||||||
TempMediaList(i) = m
|
TempMediaList(i) = m
|
||||||
RaiseEvent ProgressChanged(1)
|
RaiseEvent ProgressChanged(1)
|
||||||
|
|||||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2022.9.8.0")>
|
<Assembly: AssemblyVersion("2022.9.10.0")>
|
||||||
<Assembly: AssemblyFileVersion("2022.9.8.0")>
|
<Assembly: AssemblyFileVersion("2022.9.10.0")>
|
||||||
<Assembly: NeutralResourcesLanguage("en")>
|
<Assembly: NeutralResourcesLanguage("en")>
|
||||||
|
|||||||
@@ -26,5 +26,6 @@ Namespace Plugin
|
|||||||
Public PostID As String
|
Public PostID As String
|
||||||
Public PostDate As Date?
|
Public PostDate As Date?
|
||||||
Public SpecialFolder As String
|
Public SpecialFolder As String
|
||||||
|
Public Attempts As Integer
|
||||||
End Structure
|
End Structure
|
||||||
End Namespace
|
End Namespace
|
||||||
@@ -52,6 +52,7 @@ Namespace API.Base
|
|||||||
Post = New UserPost With {.ID = m.PostID, .[Date] = m.PostDate}
|
Post = New UserPost With {.ID = m.PostID, .[Date] = m.PostDate}
|
||||||
State = m.DownloadState
|
State = m.DownloadState
|
||||||
SpecialFolder = m.SpecialFolder
|
SpecialFolder = m.SpecialFolder
|
||||||
|
Attempts = m.Attempts
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Public Shared Widening Operator CType(ByVal _URL As String) As UserMedia
|
Public Shared Widening Operator CType(ByVal _URL As String) As UserMedia
|
||||||
@@ -72,7 +73,8 @@ Namespace API.Base
|
|||||||
.URL = URL,
|
.URL = URL,
|
||||||
.SpecialFolder = SpecialFolder,
|
.SpecialFolder = SpecialFolder,
|
||||||
.PostID = Post.ID,
|
.PostID = Post.ID,
|
||||||
.PostDate = Post.Date
|
.PostDate = Post.Date,
|
||||||
|
.Attempts = Attempts
|
||||||
}
|
}
|
||||||
End Function
|
End Function
|
||||||
Friend Overloads Function Equals(ByVal Other As UserMedia) As Boolean Implements IEquatable(Of UserMedia).Equals
|
Friend Overloads Function Equals(ByVal Other As UserMedia) As Boolean Implements IEquatable(Of UserMedia).Equals
|
||||||
|
|||||||
@@ -830,7 +830,7 @@ BlockNullPicture:
|
|||||||
Else
|
Else
|
||||||
'ReparseMissing(Token)
|
'ReparseMissing(Token)
|
||||||
End If
|
End If
|
||||||
_TempMediaList.ListAddList(ContentMissing, LNC)
|
'_TempMediaList.ListAddList(ContentMissing, LNC)
|
||||||
|
|
||||||
If _TempMediaList.Count > 0 Then
|
If _TempMediaList.Count > 0 Then
|
||||||
If Not DownloadImages Then _TempMediaList.RemoveAll(Function(m) m.Type = UTypes.GIF Or m.Type = UTypes.Picture)
|
If Not DownloadImages Then _TempMediaList.RemoveAll(Function(m) m.Type = UTypes.GIF Or m.Type = UTypes.Picture)
|
||||||
@@ -845,9 +845,12 @@ BlockNullPicture:
|
|||||||
_ContentNew.ListAddList(_TempMediaList, LAP.ClearBeforeAdd)
|
_ContentNew.ListAddList(_TempMediaList, LAP.ClearBeforeAdd)
|
||||||
DownloadContent(Token)
|
DownloadContent(Token)
|
||||||
ThrowIfDisposed()
|
ThrowIfDisposed()
|
||||||
|
|
||||||
LatestData.ListAddList(_ContentNew.Where(_downContent), LNC)
|
LatestData.ListAddList(_ContentNew.Where(_downContent), LNC)
|
||||||
_ContentList.ListAddList(_ContentNew.Where(_downContent), LNC)
|
Dim mcb& = If(ContentMissingExists, _ContentList.LongCount(Function(c) MissingFinder(c)), 0)
|
||||||
If DownloadedTotal(False) > 0 Or EnvirChanged.Invoke Or _ContentList.Exists(MissingFinder) Then
|
_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
|
If __SaveData Then
|
||||||
LastUpdated = Now
|
LastUpdated = Now
|
||||||
RunScript()
|
RunScript()
|
||||||
@@ -1210,6 +1213,16 @@ BlockNullPicture:
|
|||||||
Return IIf(FriendlyName.IsEmptyString, Name, FriendlyName)
|
Return IIf(FriendlyName.IsEmptyString, Name, FriendlyName)
|
||||||
End If
|
End If
|
||||||
End Function
|
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"
|
#Region "Buttons actions"
|
||||||
Private Sub BTT_CONTEXT_DOWN_Click(sender As Object, e As EventArgs) Handles BTT_CONTEXT_DOWN.Click
|
Private Sub BTT_CONTEXT_DOWN_Click(sender As Object, e As EventArgs) Handles BTT_CONTEXT_DOWN.Click
|
||||||
Downloader.Add(Me)
|
Downloader.Add(Me)
|
||||||
|
|||||||
@@ -247,6 +247,7 @@ Namespace API.Instagram
|
|||||||
Try
|
Try
|
||||||
Dim n As EContainer, nn As EContainer, node As EContainer
|
Dim n As EContainer, nn As EContainer, node As EContainer
|
||||||
Dim HasNextPage As Boolean = False
|
Dim HasNextPage As Boolean = False
|
||||||
|
Dim Pinned As Boolean
|
||||||
Dim EndCursor$ = String.Empty
|
Dim EndCursor$ = String.Empty
|
||||||
Dim PostID$ = String.Empty, PostDate$ = String.Empty, SpecFolder$ = String.Empty
|
Dim PostID$ = String.Empty, PostDate$ = String.Empty, SpecFolder$ = String.Empty
|
||||||
Dim TaggedCount%
|
Dim TaggedCount%
|
||||||
@@ -296,7 +297,7 @@ Namespace API.Instagram
|
|||||||
RequestsCount += 1
|
RequestsCount += 1
|
||||||
ThrowAny(Token)
|
ThrowAny(Token)
|
||||||
|
|
||||||
'Data
|
'Parsing
|
||||||
If Not r.IsEmptyString Then
|
If Not r.IsEmptyString Then
|
||||||
Using j As EContainer = JsonDocument.Parse(r).XmlIfNothing
|
Using j As EContainer = JsonDocument.Parse(r).XmlIfNothing
|
||||||
n = j.ItemF(ENode).XmlIfNothing
|
n = j.ItemF(ENode).XmlIfNothing
|
||||||
@@ -321,13 +322,14 @@ Namespace API.Instagram
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
PostID = node.Value("id")
|
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)
|
_TempPostsList.Add(PostID)
|
||||||
PostDate = node.Value("taken_at_timestamp")
|
PostDate = node.Value("taken_at_timestamp")
|
||||||
If IsSavedPosts Then
|
If IsSavedPosts Then
|
||||||
_SavedPostsIDs.Add(PostID)
|
_SavedPostsIDs.Add(PostID)
|
||||||
Else
|
Else
|
||||||
If Not CheckDatesLimit(PostDate, DateProvider) Then Throw New ExitException(_DownloadComplete)
|
If Not CheckDatesLimit(PostDate, DateProvider) And Not Pinned Then Throw New ExitException(_DownloadComplete)
|
||||||
ObtainMedia(node, PostID, PostDate, SpecFolder)
|
ObtainMedia(node, PostID, PostDate, SpecFolder)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|||||||
@@ -164,6 +164,8 @@ Namespace API.Reddit
|
|||||||
End If
|
End If
|
||||||
If DownloadTopCount.HasValue Then DownloadLimitCount = DownloadTopCount
|
If DownloadTopCount.HasValue Then DownloadLimitCount = DownloadTopCount
|
||||||
End If
|
End If
|
||||||
|
If SaveToCache AndAlso Not Responser.Decoders.Contains(SymbolsConverter.Converters.HTML) Then _
|
||||||
|
Responser.Decoders.Add(SymbolsConverter.Converters.HTML)
|
||||||
DownloadDataChannel(String.Empty, Token)
|
DownloadDataChannel(String.Empty, Token)
|
||||||
If ChannelInfo Is Nothing Then _TempPostsList.ListAddList(_TempMediaList.Select(Function(m) m.Post.ID), LNC)
|
If ChannelInfo Is Nothing Then _TempPostsList.ListAddList(_TempMediaList.Select(Function(m) m.Post.ID), LNC)
|
||||||
Else
|
Else
|
||||||
@@ -371,9 +373,10 @@ Namespace API.Reddit
|
|||||||
ElseIf Not s.Value({"media", "reddit_video"}, "fallback_url").IsEmptyString Then
|
ElseIf Not s.Value({"media", "reddit_video"}, "fallback_url").IsEmptyString Then
|
||||||
tmpUrl = s.Value({"media", "reddit_video"}, "fallback_url")
|
tmpUrl = s.Value({"media", "reddit_video"}, "fallback_url")
|
||||||
If SaveToCache Then
|
If SaveToCache Then
|
||||||
tmpUrl = s.Value("thumbnail")
|
'tmpUrl = s.Value("thumbnail")
|
||||||
|
tmpUrl = GetVideoRedditPreview(s)
|
||||||
If Not tmpUrl.IsEmptyString Then
|
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
|
_TotalPostsDownloaded += 1
|
||||||
End If
|
End If
|
||||||
ElseIf UseM3U8 AndAlso Not s.Value({"media", "reddit_video"}, "hls_url").IsEmptyString Then
|
ElseIf UseM3U8 AndAlso Not s.Value({"media", "reddit_video"}, "hls_url").IsEmptyString Then
|
||||||
@@ -471,6 +474,38 @@ Namespace API.Reddit
|
|||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
End Function
|
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)
|
Protected Overrides Sub ReparseVideo(ByVal Token As CancellationToken)
|
||||||
Try
|
Try
|
||||||
ThrowAny(Token)
|
ThrowAny(Token)
|
||||||
@@ -593,12 +628,13 @@ Namespace API.Reddit
|
|||||||
#End Region
|
#End Region
|
||||||
#Region "Structure creator"
|
#Region "Structure creator"
|
||||||
Protected Shared Function MediaFromData(ByVal t As UTypes, ByVal _URL As String, ByVal PostID As String, ByVal PostDate As String,
|
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
|
If _URL.IsEmptyString And t = UTypes.Picture Then Return Nothing
|
||||||
_URL = LinkFormatterSecure(RegexReplace(_URL.Replace("\", String.Empty), LinkPattern))
|
_URL = LinkFormatterSecure(RegexReplace(_URL.Replace("\", String.Empty), LinkPattern))
|
||||||
Dim m As New UserMedia(_URL, t) With {.Post = New UserPost With {.ID = PostID, .UserID = _UserID}}
|
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 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
|
If Not PostDate.IsEmptyString Then m.Post.Date = AConvert(Of Date)(PostDate, DateTrueProvider(IsChannel), Nothing) Else m.Post.Date = Nothing
|
||||||
Return m
|
Return m
|
||||||
End Function
|
End Function
|
||||||
@@ -765,7 +801,11 @@ Namespace API.Reddit
|
|||||||
dCount += 1
|
dCount += 1
|
||||||
End If
|
End If
|
||||||
Catch wex As Exception
|
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
|
End Try
|
||||||
If ImgurUrls.Count > 0 Then ImgurUrls.RemoveAt(0)
|
If ImgurUrls.Count > 0 Then ImgurUrls.RemoveAt(0)
|
||||||
Loop While ImgurUrls.Count > 0
|
Loop While ImgurUrls.Count > 0
|
||||||
|
|||||||
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
|
Imports SCrawler.API.Base
|
||||||
Namespace DownloadObjects
|
Namespace DownloadObjects
|
||||||
Friend Class AutoDownloader : Inherits GroupParameters : Implements IEContainerProvider
|
Friend Class AutoDownloader : Inherits GroupParameters : Implements IEContainerProvider
|
||||||
Friend Shared ReadOnly Property CachePath As SFile
|
Private Shared ReadOnly Property CachePath As SFile
|
||||||
Get
|
Get
|
||||||
Return "_Cache\"
|
Return Settings.CachePath
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Friend Enum Modes As Integer
|
Friend Enum Modes As Integer
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ Namespace DownloadObjects
|
|||||||
Private Sub DownloadFeedForm_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Private Sub DownloadFeedForm_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
With MyDefs
|
With MyDefs
|
||||||
.MyViewInitialize()
|
.MyViewInitialize()
|
||||||
|
LastWinState = WindowState
|
||||||
With MyRange
|
With MyRange
|
||||||
.AutoToolTip = True
|
.AutoToolTip = True
|
||||||
.ButtonKey(RCI.Previous) = Keys.F3
|
.ButtonKey(RCI.Previous) = Keys.F3
|
||||||
@@ -91,7 +92,7 @@ Namespace DownloadObjects
|
|||||||
Dim p% = IIf(DataColumns = 1, 100, 50)
|
Dim p% = IIf(DataColumns = 1, 100, 50)
|
||||||
For i = 0 To DataColumns - 1 : .ColumnStyles.Add(New ColumnStyle(SizeType.Percent, p)) : Next
|
For i = 0 To DataColumns - 1 : .ColumnStyles.Add(New ColumnStyle(SizeType.Percent, p)) : Next
|
||||||
.ColumnCount = .ColumnStyles.Count
|
.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
|
.RowCount = .RowStyles.Count
|
||||||
.HorizontalScroll.Visible = False
|
.HorizontalScroll.Visible = False
|
||||||
End With
|
End With
|
||||||
@@ -177,8 +178,8 @@ Namespace DownloadObjects
|
|||||||
Friend ReadOnly Row As Integer
|
Friend ReadOnly Row As Integer
|
||||||
Friend ReadOnly Column As Integer
|
Friend ReadOnly Column As Integer
|
||||||
Friend Sub New(ByVal RowsCount As Integer, ByVal ColumnsCount As Integer)
|
Friend Sub New(ByVal RowsCount As Integer, ByVal ColumnsCount As Integer)
|
||||||
Me.RowsCount = RowsCount - 1
|
Me.RowsCount = RowsCount
|
||||||
Me.ColumnsCount = ColumnsCount - 1
|
Me.ColumnsCount = ColumnsCount
|
||||||
Row = 0
|
Row = 0
|
||||||
Column = 0
|
Column = 0
|
||||||
End Sub
|
End Sub
|
||||||
@@ -190,86 +191,71 @@ Namespace DownloadObjects
|
|||||||
Friend Function [Next]() As TPCELL
|
Friend Function [Next]() As TPCELL
|
||||||
Dim r% = Row
|
Dim r% = Row
|
||||||
Dim c% = Column + 1
|
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)
|
Return New TPCELL(RowsCount, ColumnsCount, r, c)
|
||||||
End Function
|
End Function
|
||||||
End Structure
|
End Structure
|
||||||
|
Private RefillInProgress As Boolean = False
|
||||||
Private Sub MyRange_IndexChanged(ByVal Sender As IRangeSwitcherProvider, ByVal e As EventArgs) Handles MyRange.IndexChanged
|
Private Sub MyRange_IndexChanged(ByVal Sender As IRangeSwitcherProvider, ByVal e As EventArgs) Handles MyRange.IndexChanged
|
||||||
Try
|
Try
|
||||||
If Sender.CurrentIndex >= 0 Then
|
If Not RefillInProgress AndAlso Sender.CurrentIndex >= 0 Then
|
||||||
|
RefillInProgress = True
|
||||||
AllowTopScroll = False
|
AllowTopScroll = False
|
||||||
ScrollSuspended = True
|
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%
|
Dim i%
|
||||||
If d.Count > 0 Then
|
If d.ListExists Then
|
||||||
ClearTable()
|
ClearTable()
|
||||||
If Sender.CurrentIndex > 0 And FeedEndless Then
|
If Sender.CurrentIndex > 0 And FeedEndless Then
|
||||||
i = MyRange.Indexes(Sender.CurrentIndex - 1, EDP.ReturnValue).DefaultIfEmpty(-1).Last
|
d2 = DirectCast(MyRange.Switcher, RangeSwitcher(Of UserMediaD)).Item(Sender.CurrentIndex - 1).ListTake(-2, DataColumns, EDP.ReturnValue).ListIfNothing
|
||||||
If i.ValueBetween(0, DataList.Count - 1) Then
|
If d2.Count > 0 Then d.InsertRange(0, d2) : d2.Clear()
|
||||||
If d.Count = 0 Then d.Add(i) Else d.Insert(0, i)
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
Dim w% = GetWidth()
|
Dim w% = GetWidth()
|
||||||
Dim hp% = PaddingE.GetOf({TP_DATA}).Vertical(2)
|
|
||||||
Dim p As New TPCELL(DataRows, DataColumns)
|
Dim p As New TPCELL(DataRows, DataColumns)
|
||||||
Dim fmList As New List(Of FeedMedia)
|
Dim fmList As New List(Of FeedMedia)
|
||||||
Dim rhd As New Dictionary(Of Integer, List(Of Integer))
|
d.ForEach(Sub(de) fmList.Add(New FeedMedia(de, w)))
|
||||||
For Each i In d
|
|
||||||
If i.ValueBetween(0, DataList.Count - 1) Then fmList.Add(New FeedMedia(DataList(i), w))
|
|
||||||
Next
|
|
||||||
If fmList.Count > 0 Then fmList.ListDisposeRemoveAll(Function(fm) fm Is Nothing OrElse fm.HasError)
|
If fmList.Count > 0 Then fmList.ListDisposeRemoveAll(Function(fm) fm Is Nothing OrElse fm.HasError)
|
||||||
If fmList.Count > 0 Then
|
If fmList.Count > 0 Then
|
||||||
For i = 0 To fmList.Count - 1
|
For i = 0 To fmList.Count - 1
|
||||||
If Not rhd.ContainsKey(p.Row) Then rhd.Add(p.Row, New List(Of Integer))
|
ControlInvoke(TP_DATA, Sub() TP_DATA.Controls.Add(fmList(i), p.Column, p.Row))
|
||||||
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)
|
|
||||||
p = p.Next
|
p = p.Next
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
ResizeGrid()
|
||||||
fmList.Clear()
|
fmList.Clear()
|
||||||
rhd.ListForEach(Sub(kv, ii) kv.Value.Clear())
|
|
||||||
rhd.Clear()
|
|
||||||
d.Clear()
|
d.Clear()
|
||||||
End If
|
End If
|
||||||
|
RefillInProgress = False
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ErrorsDescriber.Execute(EDP.SendInLog, ex, $"[DownloadObjects.DownloadFeedForm.Range.IndexChanged({Sender.CurrentIndex})]")
|
ErrorsDescriber.Execute(EDP.SendInLog, ex, $"[DownloadObjects.DownloadFeedForm.Range.IndexChanged({Sender.CurrentIndex})]")
|
||||||
|
RefillInProgress = False
|
||||||
Finally
|
Finally
|
||||||
ControlInvoke(TP_DATA, Sub()
|
If Not RefillInProgress Then
|
||||||
With TP_DATA.VerticalScroll
|
ControlInvoke(TP_DATA, Sub()
|
||||||
If Offset = 1 Then .Value = 0 Else .Value = .Maximum
|
With TP_DATA.VerticalScroll
|
||||||
End With
|
If Offset = 1 Then .Value = 0 Else .Value = .Maximum
|
||||||
End Sub)
|
End With
|
||||||
ScrollSuspended = False
|
End Sub)
|
||||||
DataPopulated = True
|
ScrollSuspended = False
|
||||||
|
DataPopulated = True
|
||||||
|
End If
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
#Region "Size"
|
#Region "Size"
|
||||||
|
Private LastWinState As FormWindowState = FormWindowState.Normal
|
||||||
Private Function GetWidth() As Integer
|
Private Function GetWidth() As Integer
|
||||||
Return (TP_DATA.Width - PaddingE.GetOf({Me, TP_DATA}).Horizontal(2)) / DataColumns
|
Return (TP_DATA.Width - PaddingE.GetOf({Me, TP_DATA}).Horizontal(2)) / DataColumns
|
||||||
End Function
|
End Function
|
||||||
Private Sub DownloadFeedForm_ResizeEnd(sender As Object, e As EventArgs) Handles Me.ResizeEnd
|
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()
|
ControlInvoke(TP_DATA, Sub()
|
||||||
With TP_DATA
|
With TP_DATA
|
||||||
If .Controls.Count > 0 Then
|
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))
|
If Not rh.ContainsKey(p.Row) Then rh.Add(p.Row, New List(Of Integer))
|
||||||
rh(p.Row).Add(cnt.Height)
|
rh(p.Row).Add(cnt.Height)
|
||||||
Next
|
Next
|
||||||
|
For i% = 0 To .RowStyles.Count - 1 : .RowStyles(i).Height = 0 : Next
|
||||||
If rh.Count > 0 Then
|
If rh.Count > 0 Then
|
||||||
For Each kv In rh
|
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()
|
kv.Value.Clear()
|
||||||
Next
|
Next
|
||||||
End If
|
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_2 As System.Windows.Forms.ToolStripSeparator
|
||||||
Dim CONTEXT_SEP_3 As System.Windows.Forms.ToolStripSeparator
|
Dim CONTEXT_SEP_3 As System.Windows.Forms.ToolStripSeparator
|
||||||
Dim TP_LBL As System.Windows.Forms.TableLayoutPanel
|
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.CH_CHECKED = New System.Windows.Forms.CheckBox()
|
||||||
Me.LBL_INFO = New System.Windows.Forms.Label()
|
Me.LBL_INFO = New System.Windows.Forms.Label()
|
||||||
Me.CONTEXT_DATA = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
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_INFO = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.BTT_CONTEXT_DELETE = New System.Windows.Forms.ToolStripMenuItem()
|
Me.BTT_CONTEXT_DELETE = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.TP_MAIN = New System.Windows.Forms.TableLayoutPanel()
|
Me.TP_MAIN = New System.Windows.Forms.TableLayoutPanel()
|
||||||
Me.MyVideo = New AxWMPLib.AxWindowsMediaPlayer()
|
|
||||||
CONTEXT_SEP_1 = New System.Windows.Forms.ToolStripSeparator()
|
CONTEXT_SEP_1 = New System.Windows.Forms.ToolStripSeparator()
|
||||||
CONTEXT_SEP_2 = New System.Windows.Forms.ToolStripSeparator()
|
CONTEXT_SEP_2 = New System.Windows.Forms.ToolStripSeparator()
|
||||||
CONTEXT_SEP_3 = New System.Windows.Forms.ToolStripSeparator()
|
CONTEXT_SEP_3 = New System.Windows.Forms.ToolStripSeparator()
|
||||||
@@ -47,7 +45,6 @@ Namespace DownloadObjects
|
|||||||
TP_LBL.SuspendLayout()
|
TP_LBL.SuspendLayout()
|
||||||
Me.CONTEXT_DATA.SuspendLayout()
|
Me.CONTEXT_DATA.SuspendLayout()
|
||||||
Me.TP_MAIN.SuspendLayout()
|
Me.TP_MAIN.SuspendLayout()
|
||||||
CType(Me.MyVideo, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
'CONTEXT_SEP_1
|
'CONTEXT_SEP_1
|
||||||
@@ -164,7 +161,6 @@ Namespace DownloadObjects
|
|||||||
Me.TP_MAIN.ColumnCount = 1
|
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.Percent, 100.0!))
|
||||||
Me.TP_MAIN.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20.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.Controls.Add(TP_LBL, 0, 0)
|
||||||
Me.TP_MAIN.Dock = System.Windows.Forms.DockStyle.Fill
|
Me.TP_MAIN.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
Me.TP_MAIN.Location = New System.Drawing.Point(0, 0)
|
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.Size = New System.Drawing.Size(146, 146)
|
||||||
Me.TP_MAIN.TabIndex = 0
|
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
|
'FeedMedia
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
@@ -201,7 +187,6 @@ Namespace DownloadObjects
|
|||||||
TP_LBL.PerformLayout()
|
TP_LBL.PerformLayout()
|
||||||
Me.CONTEXT_DATA.ResumeLayout(False)
|
Me.CONTEXT_DATA.ResumeLayout(False)
|
||||||
Me.TP_MAIN.ResumeLayout(False)
|
Me.TP_MAIN.ResumeLayout(False)
|
||||||
CType(Me.MyVideo, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
Me.ResumeLayout(False)
|
Me.ResumeLayout(False)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -213,7 +198,6 @@ Namespace DownloadObjects
|
|||||||
Private WithEvents BTT_CONTEXT_OPEN_USER_POST As ToolStripMenuItem
|
Private WithEvents BTT_CONTEXT_OPEN_USER_POST As ToolStripMenuItem
|
||||||
Private WithEvents BTT_CONTEXT_FIND_USER As ToolStripMenuItem
|
Private WithEvents BTT_CONTEXT_FIND_USER As ToolStripMenuItem
|
||||||
Private WithEvents BTT_CONTEXT_DELETE 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 BTT_CONTEXT_OPEN_USER As ToolStripMenuItem
|
||||||
Private WithEvents CH_CHECKED As CheckBox
|
Private WithEvents CH_CHECKED As CheckBox
|
||||||
Private WithEvents LBL_INFO As Label
|
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">
|
<metadata name="CONTEXT_DATA.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 17</value>
|
<value>17, 17</value>
|
||||||
</metadata>
|
</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>
|
</root>
|
||||||
@@ -11,7 +11,6 @@ Imports System.ComponentModel
|
|||||||
Imports PersonalUtilities.Forms
|
Imports PersonalUtilities.Forms
|
||||||
Imports PersonalUtilities.Tools
|
Imports PersonalUtilities.Tools
|
||||||
Imports SCrawler.API.Base
|
Imports SCrawler.API.Base
|
||||||
Imports AxWMPLib
|
|
||||||
Imports UserMediaD = SCrawler.DownloadObjects.TDownloader.UserMediaD
|
Imports UserMediaD = SCrawler.DownloadObjects.TDownloader.UserMediaD
|
||||||
Namespace DownloadObjects
|
Namespace DownloadObjects
|
||||||
<ToolboxItem(False), DesignTimeVisible(False)>
|
<ToolboxItem(False), DesignTimeVisible(False)>
|
||||||
@@ -20,6 +19,7 @@ Namespace DownloadObjects
|
|||||||
Private Const VideoHeight As Integer = 450
|
Private Const VideoHeight As Integer = 450
|
||||||
Private WithEvents MyPicture As PictureBox
|
Private WithEvents MyPicture As PictureBox
|
||||||
Private ReadOnly MyImage As ImageRenderer
|
Private ReadOnly MyImage As ImageRenderer
|
||||||
|
Private ReadOnly MyVideo As FeedVideo
|
||||||
Friend ReadOnly Property Exists As Boolean
|
Friend ReadOnly Property Exists As Boolean
|
||||||
Get
|
Get
|
||||||
Return Not MyPicture Is Nothing Or Not MyVideo Is Nothing
|
Return Not MyPicture Is Nothing Or Not MyVideo Is Nothing
|
||||||
@@ -106,16 +106,12 @@ Namespace DownloadObjects
|
|||||||
.Padding = New Padding(0),
|
.Padding = New Padding(0),
|
||||||
.ContextMenuStrip = CONTEXT_DATA
|
.ContextMenuStrip = CONTEXT_DATA
|
||||||
}
|
}
|
||||||
TP_MAIN.Controls.Remove(MyVideo)
|
|
||||||
MyVideo.Dispose()
|
|
||||||
MyVideo = Nothing
|
|
||||||
TP_MAIN.Controls.Add(MyPicture, 0, 1)
|
TP_MAIN.Controls.Add(MyPicture, 0, 1)
|
||||||
BTT_CONTEXT_OPEN_MEDIA.Text &= " picture"
|
BTT_CONTEXT_OPEN_MEDIA.Text &= " picture"
|
||||||
BTT_CONTEXT_DELETE.Text &= " picture"
|
BTT_CONTEXT_DELETE.Text &= " picture"
|
||||||
Case UserMedia.Types.Video
|
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)
|
TP_MAIN.Controls.Add(MyVideo, 0, 1)
|
||||||
MyVideo.URL = File.ToString
|
|
||||||
BTT_CONTEXT_OPEN_MEDIA.Text &= " video"
|
BTT_CONTEXT_OPEN_MEDIA.Text &= " video"
|
||||||
BTT_CONTEXT_DELETE.Text &= " video"
|
BTT_CONTEXT_DELETE.Text &= " video"
|
||||||
h = VideoHeight
|
h = VideoHeight
|
||||||
@@ -158,6 +154,7 @@ Namespace DownloadObjects
|
|||||||
Private Sub FeedImage_Disposed(sender As Object, e As EventArgs) Handles Me.Disposed
|
Private Sub FeedImage_Disposed(sender As Object, e As EventArgs) Handles Me.Disposed
|
||||||
If Not MyImage Is Nothing Then MyImage.Dispose()
|
If Not MyImage Is Nothing Then MyImage.Dispose()
|
||||||
If Not MyPicture Is Nothing Then MyPicture.Dispose()
|
If Not MyPicture Is Nothing Then MyPicture.Dispose()
|
||||||
|
If Not MyVideo Is Nothing Then MyVideo.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
#Region "LBL"
|
#Region "LBL"
|
||||||
@@ -172,21 +169,6 @@ Namespace DownloadObjects
|
|||||||
Private Sub MyPicture_DoubleClick(sender As Object, e As EventArgs) Handles MyPicture.DoubleClick
|
Private Sub MyPicture_DoubleClick(sender As Object, e As EventArgs) Handles MyPicture.DoubleClick
|
||||||
Try : Process.Start(File) : Catch : End Try
|
Try : Process.Start(File) : Catch : End Try
|
||||||
End Sub
|
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
|
#End Region
|
||||||
#Region "Context"
|
#Region "Context"
|
||||||
Private Sub BTT_CONTEXT_OPEN_MEDIA_Click(sender As Object, e As EventArgs) Handles BTT_CONTEXT_OPEN_MEDIA.Click
|
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})
|
If Not Silent Then MsgBoxE({"File deleted", msgTitle})
|
||||||
LBL_INFO.Height = 0
|
LBL_INFO.Height = 0
|
||||||
If Not MyPicture Is Nothing Then MyPicture.Size = New Size(0, 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
|
Height = 0
|
||||||
Return True
|
Return True
|
||||||
End If
|
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
|
#End Region
|
||||||
#Region "Post actions"
|
#Region "Post actions"
|
||||||
Private Sub BTT_DOWN_Click(sender As Object, e As EventArgs) Handles BTT_DOWN.Click
|
Private Sub BTT_DOWN_Click(sender As Object, e As EventArgs) Handles BTT_DOWN.Click
|
||||||
Try
|
'Try
|
||||||
If LIST_DATA.SelectedItems.Count > 0 Then
|
' If LIST_DATA.SelectedItems.Count > 0 Then
|
||||||
Dim users As List(Of IUserData) = LIST_DATA.SelectedItems.ToObjectsList.ListCast(Of ListViewItem)().
|
' 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)
|
' Select(Function(d) Settings.GetUser(CStr(d.Group.Tag))).ListWithRemove(Function(d) d Is Nothing)
|
||||||
If users.ListExists Then
|
' If users.ListExists Then
|
||||||
If MsgBoxE({"The following users will be added to the download queue:" & vbCr & vbCr &
|
' 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.Select(Function(u) u.ToString).ListToString(vbNewLine), "Download users"},,,, {"Process", "Cancel"}) = 0 Then
|
||||||
users.ForEach(Sub(u) u.DownloadMissingOnly = True)
|
' users.ForEach(Sub(u) u.DownloadMissingOnly = True)
|
||||||
Downloader.AddRange(users)
|
' Downloader.AddRange(users)
|
||||||
users.Clear()
|
' users.Clear()
|
||||||
End If
|
' End If
|
||||||
End If
|
' End If
|
||||||
Else
|
' Else
|
||||||
MsgBoxE("No selected posts")
|
' MsgBoxE("No selected posts")
|
||||||
End If
|
' End If
|
||||||
Catch ex As Exception
|
'Catch ex As Exception
|
||||||
ErrorsDescriber.Execute(EDP.SendInLog, ex, "[DownloadObjects.MissingPostsForm.Download]")
|
' ErrorsDescriber.Execute(EDP.SendInLog, ex, "[DownloadObjects.MissingPostsForm.Download]")
|
||||||
End Try
|
'End Try
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub BTT_OPEN_POST_Click(sender As Object, e As EventArgs) Handles BTT_OPEN_POST.Click
|
Private Sub BTT_OPEN_POST_Click(sender As Object, e As EventArgs) Handles BTT_OPEN_POST.Click
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -27,13 +27,22 @@ Namespace DownloadObjects
|
|||||||
Friend ReadOnly User As IUserData
|
Friend ReadOnly User As IUserData
|
||||||
Friend ReadOnly Data As UserMedia
|
Friend ReadOnly Data As UserMedia
|
||||||
Friend ReadOnly [Date] As Date
|
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.Data = Data
|
||||||
Me.User = User
|
Me.User = User
|
||||||
[Date] = Now
|
[Date] = Now
|
||||||
|
Me.Session = Session
|
||||||
End Sub
|
End Sub
|
||||||
Private Function CompareTo(ByVal Other As UserMediaD) As Integer Implements IComparable(Of UserMediaD).CompareTo
|
Private Function CompareTo(ByVal Other As UserMediaD) As Integer Implements IComparable(Of UserMediaD).CompareTo
|
||||||
Return [Date].Ticks.CompareTo(Other.Date.Ticks) * -1
|
'Return [Date].Ticks.CompareTo(Other.Date.Ticks) * -1
|
||||||
|
Return GetCompareValue(Me).CompareTo(GetCompareValue(Other)) * -1
|
||||||
|
End Function
|
||||||
|
Private Function GetCompareValue(ByVal m As UserMediaD) As Double
|
||||||
|
Dim v# = m.Session * 10000
|
||||||
|
If Not m.User Is Nothing Then v += m.User.GetHashCode
|
||||||
|
'v += m.[Date].Ticks
|
||||||
|
Return v
|
||||||
End Function
|
End Function
|
||||||
Private Overloads Function Equals(ByVal Other As UserMediaD) As Boolean Implements IEquatable(Of UserMediaD).Equals
|
Private Overloads Function Equals(ByVal Other As UserMediaD) As Boolean Implements IEquatable(Of UserMediaD).Equals
|
||||||
Return Data.File = Other.Data.File
|
Return Data.File = Other.Data.File
|
||||||
@@ -214,12 +223,14 @@ Namespace DownloadObjects
|
|||||||
#Region "Thread"
|
#Region "Thread"
|
||||||
Private CheckerThread As Thread
|
Private CheckerThread As Thread
|
||||||
Private MissingPostsDetected As Boolean = False
|
Private MissingPostsDetected As Boolean = False
|
||||||
|
Private Session As Integer = 0
|
||||||
Private Sub [Start]()
|
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 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
|
If Not If(CheckerThread?.IsAlive, False) Then
|
||||||
MainProgress.Visible = True
|
MainProgress.Visible = True
|
||||||
If Not AutoDownloaderWorking AndAlso InfoForm.ReadyToOpen Then InfoForm.Show() : MainFrameObj.Focus()
|
If Not AutoDownloaderWorking AndAlso InfoForm.ReadyToOpen Then InfoForm.Show() : MainFrameObj.Focus()
|
||||||
MissingPostsDetected = False
|
MissingPostsDetected = False
|
||||||
|
Session += 1
|
||||||
CheckerThread = New Thread(New ThreadStart(AddressOf JobsChecker))
|
CheckerThread = New Thread(New ThreadStart(AddressOf JobsChecker))
|
||||||
CheckerThread.SetApartmentState(ApartmentState.MTA)
|
CheckerThread.SetApartmentState(ApartmentState.MTA)
|
||||||
CheckerThread.Start()
|
CheckerThread.Start()
|
||||||
@@ -342,7 +353,7 @@ Namespace DownloadObjects
|
|||||||
If Not .Disposed AndAlso Not .IsCollection AndAlso .DownloadedTotal(False) > 0 Then
|
If Not .Disposed AndAlso Not .IsCollection AndAlso .DownloadedTotal(False) > 0 Then
|
||||||
If Not Downloaded.Contains(.Self) Then Downloaded.Add(Settings.GetUser(.Self))
|
If Not Downloaded.Contains(.Self) Then Downloaded.Add(Settings.GetUser(.Self))
|
||||||
With DirectCast(.Self, UserDataBase)
|
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
|
End With
|
||||||
dcc = True
|
dcc = True
|
||||||
End If
|
End If
|
||||||
|
|||||||
25
SCrawler/MainFrame.Designer.vb
generated
25
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_DELETE_USER = New System.Windows.Forms.ToolStripButton()
|
||||||
Me.BTT_REFRESH = New System.Windows.Forms.ToolStripButton()
|
Me.BTT_REFRESH = New System.Windows.Forms.ToolStripButton()
|
||||||
Me.BTT_SHOW_INFO = 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_CHANNELS = New System.Windows.Forms.ToolStripButton()
|
||||||
Me.BTT_DOWN_SAVED = New System.Windows.Forms.ToolStripButton()
|
Me.BTT_DOWN_SAVED = New System.Windows.Forms.ToolStripButton()
|
||||||
Me.BTT_DOWN_SELECTED = New System.Windows.Forms.ToolStripButton()
|
Me.BTT_DOWN_SELECTED = New System.Windows.Forms.ToolStripButton()
|
||||||
@@ -105,7 +106,6 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
|||||||
Me.BTT_TRAY_SHOW_HIDE = New System.Windows.Forms.ToolStripMenuItem()
|
Me.BTT_TRAY_SHOW_HIDE = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.BTT_TRAY_CLOSE = New System.Windows.Forms.ToolStripMenuItem()
|
Me.BTT_TRAY_CLOSE = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.BTT_TRAY_CLOSE_NO_SCRIPT = New System.Windows.Forms.ToolStripMenuItem()
|
Me.BTT_TRAY_CLOSE_NO_SCRIPT = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.BTT_FEED = New System.Windows.Forms.ToolStripButton()
|
|
||||||
SEP_1 = New System.Windows.Forms.ToolStripSeparator()
|
SEP_1 = New System.Windows.Forms.ToolStripSeparator()
|
||||||
SEP_2 = New System.Windows.Forms.ToolStripSeparator()
|
SEP_2 = New System.Windows.Forms.ToolStripSeparator()
|
||||||
CONTEXT_SEP_1 = New System.Windows.Forms.ToolStripSeparator()
|
CONTEXT_SEP_1 = New System.Windows.Forms.ToolStripSeparator()
|
||||||
@@ -147,7 +147,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
|||||||
'MENU_SETTINGS_SEP_1
|
'MENU_SETTINGS_SEP_1
|
||||||
'
|
'
|
||||||
MENU_SETTINGS_SEP_1.Name = "MENU_SETTINGS_SEP_1"
|
MENU_SETTINGS_SEP_1.Name = "MENU_SETTINGS_SEP_1"
|
||||||
MENU_SETTINGS_SEP_1.Size = New System.Drawing.Size(113, 6)
|
MENU_SETTINGS_SEP_1.Size = New System.Drawing.Size(177, 6)
|
||||||
'
|
'
|
||||||
'SEP_3
|
'SEP_3
|
||||||
'
|
'
|
||||||
@@ -228,7 +228,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
|||||||
'
|
'
|
||||||
Me.BTT_SETTINGS.Image = Global.SCrawler.My.Resources.Resources.SettingsPic_16
|
Me.BTT_SETTINGS.Image = Global.SCrawler.My.Resources.Resources.SettingsPic_16
|
||||||
Me.BTT_SETTINGS.Name = "BTT_SETTINGS"
|
Me.BTT_SETTINGS.Name = "BTT_SETTINGS"
|
||||||
Me.BTT_SETTINGS.Size = New System.Drawing.Size(116, 22)
|
Me.BTT_SETTINGS.Size = New System.Drawing.Size(180, 22)
|
||||||
Me.BTT_SETTINGS.Text = "Settings"
|
Me.BTT_SETTINGS.Text = "Settings"
|
||||||
'
|
'
|
||||||
'Toolbar_TOP
|
'Toolbar_TOP
|
||||||
@@ -269,12 +269,12 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
|||||||
'
|
'
|
||||||
'BTT_REFRESH
|
'BTT_REFRESH
|
||||||
'
|
'
|
||||||
Me.BTT_REFRESH.AutoToolTip = False
|
|
||||||
Me.BTT_REFRESH.Image = Global.SCrawler.My.Resources.Resources.Refresh
|
Me.BTT_REFRESH.Image = Global.SCrawler.My.Resources.Resources.Refresh
|
||||||
Me.BTT_REFRESH.ImageTransparentColor = System.Drawing.Color.Magenta
|
Me.BTT_REFRESH.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||||
Me.BTT_REFRESH.Name = "BTT_REFRESH"
|
Me.BTT_REFRESH.Name = "BTT_REFRESH"
|
||||||
Me.BTT_REFRESH.Size = New System.Drawing.Size(66, 22)
|
Me.BTT_REFRESH.Size = New System.Drawing.Size(66, 22)
|
||||||
Me.BTT_REFRESH.Text = "Refresh"
|
Me.BTT_REFRESH.Text = "Refresh"
|
||||||
|
Me.BTT_REFRESH.ToolTipText = "Refresh user list"
|
||||||
'
|
'
|
||||||
'BTT_SHOW_INFO
|
'BTT_SHOW_INFO
|
||||||
'
|
'
|
||||||
@@ -285,6 +285,15 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
|||||||
Me.BTT_SHOW_INFO.Text = "Info"
|
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 " &
|
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)."
|
"'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
|
'BTT_CHANNELS
|
||||||
'
|
'
|
||||||
@@ -776,14 +785,6 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
|||||||
Me.BTT_TRAY_CLOSE_NO_SCRIPT.ToolTipText = "Close the program without executing the script"
|
Me.BTT_TRAY_CLOSE_NO_SCRIPT.ToolTipText = "Close the program without executing the script"
|
||||||
Me.BTT_TRAY_CLOSE_NO_SCRIPT.Visible = False
|
Me.BTT_TRAY_CLOSE_NO_SCRIPT.Visible = False
|
||||||
'
|
'
|
||||||
'BTT_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"
|
|
||||||
'
|
|
||||||
'MainFrame
|
'MainFrame
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
|
|||||||
@@ -1171,10 +1171,10 @@ ResumeDownloadingOperation:
|
|||||||
Dim a As Action = Sub()
|
Dim a As Action = Sub()
|
||||||
Dim i% = LIST_PROFILES.Items.IndexOfKey(Key)
|
Dim i% = LIST_PROFILES.Items.IndexOfKey(Key)
|
||||||
If i < 0 Then
|
If i < 0 Then
|
||||||
i = Settings.Users.FindIndex(Function(u) u.Key = Key)
|
Dim u As IUserData = Settings.GetUser(Key, True)
|
||||||
If i >= 0 Then
|
If Not u Is Nothing Then
|
||||||
UserListUpdate(Settings.Users(i), True)
|
UserListUpdate(u, True)
|
||||||
i = LIST_PROFILES.Items.IndexOfKey(Key)
|
i = LIST_PROFILES.Items.IndexOfKey(u.Key)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If i >= 0 Then
|
If i >= 0 Then
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ Friend Module MainMod
|
|||||||
Friend MyProgressForm As ActiveDownloadingProgress
|
Friend MyProgressForm As ActiveDownloadingProgress
|
||||||
Friend MainFrameObj As MainFrameObjects
|
Friend MainFrameObj As MainFrameObjects
|
||||||
Friend ReadOnly ParsersDataDateProvider As New ADateTime(ADateTime.Formats.BaseDateTime)
|
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
|
Friend ReadOnly LogConnector As New LogHost
|
||||||
#Region "File name operations"
|
#Region "File name operations"
|
||||||
Friend FileDateAppenderProvider As IFormatProvider
|
Friend FileDateAppenderProvider As IFormatProvider
|
||||||
|
|||||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2022.9.8.1")>
|
<Assembly: AssemblyVersion("2022.9.16.0")>
|
||||||
<Assembly: AssemblyFileVersion("2022.9.8.1")>
|
<Assembly: AssemblyFileVersion("2022.9.16.0")>
|
||||||
<Assembly: NeutralResourcesLanguage("en")>
|
<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 Get
|
||||||
End Property
|
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>
|
'''<summary>
|
||||||
''' Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
|
''' Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
|
||||||
'''</summary>
|
'''</summary>
|
||||||
|
|||||||
@@ -211,4 +211,7 @@
|
|||||||
<data name="RSSPic" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<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>
|
<value>..\Content\Pictures\RSSPic.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</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>
|
</root>
|
||||||
@@ -29,6 +29,8 @@
|
|||||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||||
|
<NuGetPackageImportStamp>
|
||||||
|
</NuGetPackageImportStamp>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetPlatformVersion>10.0</TargetPlatformVersion>
|
<TargetPlatformVersion>10.0</TargetPlatformVersion>
|
||||||
@@ -111,10 +113,29 @@
|
|||||||
<ApplicationManifest>My Project\app.manifest</ApplicationManifest>
|
<ApplicationManifest>My Project\app.manifest</ApplicationManifest>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<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" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Deployment" />
|
<Reference Include="System.Deployment" />
|
||||||
<Reference Include="System.Drawing" />
|
<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.Windows.Forms" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
@@ -181,6 +202,12 @@
|
|||||||
<Compile Include="Download\FeedMedia.vb">
|
<Compile Include="Download\FeedMedia.vb">
|
||||||
<SubType>UserControl</SubType>
|
<SubType>UserControl</SubType>
|
||||||
</Compile>
|
</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\Groups\DownloadGroup.vb" />
|
||||||
<Compile Include="Download\DownloadProgress.vb" />
|
<Compile Include="Download\DownloadProgress.vb" />
|
||||||
<Compile Include="Download\Groups\DownloadGroupCollection.vb" />
|
<Compile Include="Download\Groups\DownloadGroupCollection.vb" />
|
||||||
@@ -372,6 +399,9 @@
|
|||||||
<EmbeddedResource Include="Download\FeedMedia.resx">
|
<EmbeddedResource Include="Download\FeedMedia.resx">
|
||||||
<DependentUpon>FeedMedia.vb</DependentUpon>
|
<DependentUpon>FeedMedia.vb</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Download\FeedVideo.resx">
|
||||||
|
<DependentUpon>FeedVideo.vb</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Download\Groups\GroupEditorForm.resx">
|
<EmbeddedResource Include="Download\Groups\GroupEditorForm.resx">
|
||||||
<DependentUpon>GroupEditorForm.vb</DependentUpon>
|
<DependentUpon>GroupEditorForm.vb</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
@@ -428,6 +458,7 @@
|
|||||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||||
</None>
|
</None>
|
||||||
<None Include="App.config" />
|
<None Include="App.config" />
|
||||||
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\..\MyUtilities\PersonalUtilities.Notifications\PersonalUtilities.Notifications.vbproj">
|
<ProjectReference Include="..\..\..\MyUtilities\PersonalUtilities.Notifications\PersonalUtilities.Notifications.vbproj">
|
||||||
@@ -460,6 +491,7 @@
|
|||||||
<None Include="Content\Pictures\RSSPic.png" />
|
<None Include="Content\Pictures\RSSPic.png" />
|
||||||
<None Include="Content\Icons\RedGifsIcon.ico" />
|
<None Include="Content\Icons\RedGifsIcon.ico" />
|
||||||
<None Include="Content\Icons\RSSIcon.ico" />
|
<None Include="Content\Icons\RSSIcon.ico" />
|
||||||
|
<None Include="Content\Pictures\StopPic32.png" />
|
||||||
<Content Include="ffmpeg.exe">
|
<Content Include="ffmpeg.exe">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
@@ -477,33 +509,14 @@
|
|||||||
<Install>false</Install>
|
<Install>false</Install>
|
||||||
</BootstrapperPackage>
|
</BootstrapperPackage>
|
||||||
</ItemGroup>
|
</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="$(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>
|
</Project>
|
||||||
@@ -29,6 +29,7 @@ Friend Class SettingsCLS : Implements IDisposable
|
|||||||
Return OS64 And FfmpegExists
|
Return OS64 And FfmpegExists
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
Friend ReadOnly Property CachePath As SFile = "_Cache\"
|
||||||
Friend ReadOnly Plugins As List(Of PluginHost)
|
Friend ReadOnly Plugins As List(Of PluginHost)
|
||||||
Friend ReadOnly Property Users As List(Of IUserData)
|
Friend ReadOnly Property Users As List(Of IUserData)
|
||||||
Friend ReadOnly Property UsersList As List(Of UserInfo)
|
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)
|
FastProfilesLoading = New XMLValue(Of Boolean)("FastProfilesLoading", False, MyXML)
|
||||||
MaxLargeImageHeight = New XMLValue(Of Integer)("MaxLargeImageHeight", 150, MyXML)
|
MaxLargeImageHeight = New XMLValue(Of Integer)("MaxLargeImageHeight", 150, MyXML)
|
||||||
MaxLargeImageHeight.ReplaceByValue("MaxLargeImageHeigh",, MyXML)
|
|
||||||
MaxSmallImageHeight = New XMLValue(Of Integer)("MaxSmallImageHeight", 15, MyXML)
|
MaxSmallImageHeight = New XMLValue(Of Integer)("MaxSmallImageHeight", 15, MyXML)
|
||||||
MaxSmallImageHeight.ReplaceByValue("MaxSmallImageHeigh",, MyXML)
|
|
||||||
DownloadOpenInfo = New XMLValueAttribute(Of Boolean, Boolean)("DownloadOpenInfo", "OpenAgain", False, False, MyXML)
|
DownloadOpenInfo = New XMLValueAttribute(Of Boolean, Boolean)("DownloadOpenInfo", "OpenAgain", False, False, MyXML)
|
||||||
DownloadOpenProgress = New XMLValueAttribute(Of Boolean, Boolean)("DownloadOpenProgress", "OpenAgain", False, False, MyXML)
|
DownloadOpenProgress = New XMLValueAttribute(Of Boolean, Boolean)("DownloadOpenProgress", "OpenAgain", False, False, MyXML)
|
||||||
DownloadsCompleteCommand = New XMLValueAttribute(Of String, Boolean)("DownloadsCompleteCommand", "Use",,, MyXML)
|
DownloadsCompleteCommand = New XMLValueAttribute(Of String, Boolean)("DownloadsCompleteCommand", "Use",,, MyXML)
|
||||||
@@ -342,47 +341,24 @@ Friend Class SettingsCLS : Implements IDisposable
|
|||||||
_UserListUpdateRequired = True
|
_UserListUpdateRequired = True
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
Friend Overloads Function GetUser(ByVal User As IUserData) As IUserData
|
Friend Overloads Function GetUser(ByVal User As IUserData, Optional ByVal GetCollection As Boolean = False) As IUserData
|
||||||
If Users.Count > 0 Then
|
Return GetUser(If(User?.Key, String.Empty), GetCollection)
|
||||||
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
|
|
||||||
End Function
|
End Function
|
||||||
Friend Overloads Function GetUser(ByVal UserKey As String) As IUserData
|
Friend Overloads Function GetUser(ByVal UserKey As String, Optional ByVal GetCollection As Boolean = False) As IUserData
|
||||||
If Users.Count > 0 Then
|
If Users.Count > 0 And Not UserKey.IsEmptyString Then
|
||||||
Dim finder As Predicate(Of IUserData) = Function(u) u.Key = UserKey
|
Dim finder As Predicate(Of IUserData) = Function(u) u.Key = UserKey
|
||||||
Dim i%, ii%
|
Dim i%, ii%
|
||||||
For i = 0 To Users.Count - 1
|
For i = 0 To Users.Count - 1
|
||||||
With Users(i)
|
With Users(i)
|
||||||
If .IsCollection Then
|
If finder.Invoke(.Self) Then
|
||||||
|
Return .Self
|
||||||
|
ElseIf .IsCollection Then
|
||||||
With DirectCast(.Self, UserDataBind)
|
With DirectCast(.Self, UserDataBind)
|
||||||
If .Count > 0 Then
|
If .Count > 0 Then
|
||||||
ii = .Collections.FindIndex(finder)
|
ii = .Collections.FindIndex(finder)
|
||||||
If ii >= 0 Then Return .Collections(ii)
|
If ii >= 0 Then Return If(GetCollection, .Self, .Collections(ii))
|
||||||
End If
|
End If
|
||||||
End With
|
End With
|
||||||
Else
|
|
||||||
If finder.Invoke(.Self) Then Return .Self
|
|
||||||
End If
|
End If
|
||||||
End With
|
End With
|
||||||
Next
|
Next
|
||||||
@@ -555,7 +531,7 @@ Friend Class SettingsCLS : Implements IDisposable
|
|||||||
DeleteCachePath()
|
DeleteCachePath()
|
||||||
End If
|
End If
|
||||||
If Not Automation Is Nothing Then Automation.Dispose()
|
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()
|
Plugins.Clear()
|
||||||
Users.ListClearDispose
|
Users.ListClearDispose
|
||||||
UsersList.Clear()
|
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