Changed XVIDEOS.M3U8 errors
Added TryCatch to XVIDEOS.UserData.Download
Removed old declarations in UserDataBase
Changed description replacement in UserDataHost
This commit is contained in:
Andy
2022-03-26 20:00:55 +03:00
parent 726fc486ce
commit 975d46715c
9 changed files with 55 additions and 35 deletions

View File

@@ -41,7 +41,8 @@ Friend NotInheritable Class M3U8
Return Nothing
Catch ex As Exception
Logger.Add(ex, "[M3U8.Save]")
Return Nothing
ex.HelpLink = 1
Throw ex
Finally
CachePath.Delete(SFO.Path, SFODelete.None, EDP.None)
End Try
@@ -61,8 +62,8 @@ Friend NotInheritable Class M3U8
End If
Return Nothing
Catch ex As Exception
Logger.Add(ex, "[M3U8.Download]")
Return Nothing
If Not ex.HelpLink = 1 Then Logger.Add(ex, "[M3U8.Download]")
Throw ex
End Try
End Function
End Class

View File

@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.0.1")>
<Assembly: AssemblyFileVersion("1.0.0.1")>
<Assembly: AssemblyVersion("1.0.0.2")>
<Assembly: AssemblyFileVersion("1.0.0.2")>
<Assembly: NeutralResourcesLanguage("en")>

View File

@@ -10,6 +10,8 @@ Imports PersonalUtilities.Functions.RegularExpressions
Imports PersonalUtilities.Functions.XML
Imports PersonalUtilities.Tools.WEB
Imports PersonalUtilities.Tools.WebDocuments.JSON
Imports UStates = SCrawler.Plugin.PluginUserMedia.States
Imports UTypes = SCrawler.Plugin.PluginUserMedia.Types
Public Class UserData : Implements IPluginContentProvider
#Region "Interface declarations"
Public Event ProgressChanged(Count As Integer) Implements IPluginContentProvider.ProgressChanged
@@ -71,7 +73,7 @@ Public Class UserData : Implements IPluginContentProvider
Thrower.ThrowAny()
r = Responser.GetResponse($"https://www.xvideos.com/{user}/videos/new/{If(NextPage = 0, String.Empty, NextPage)}",, e)
If Not r.IsEmptyString Then
If Not EnvirSet Then UserExists = True : UserSuspended = False
If Not EnvirSet Then UserExists = True : UserSuspended = False : EnvirSet = True
j = JsonDocument.Parse(r).XmlIfNothing
With j
If .Contains("videos") Then
@@ -165,7 +167,7 @@ Public Class UserData : Implements IPluginContentProvider
End If
If Not m.IsEmptyString Then
Return New PluginUserMedia With {
.ContentType = PluginUserMedia.Types.m3u8,
.ContentType = UTypes.m3u8,
.PostID = pID,
.URL = m,
.File = $"{t}.mp4",
@@ -195,9 +197,14 @@ Public Class UserData : Implements IPluginContentProvider
m = TempMediaList(i)
f = m.File
f.Path = DefPath
f = M3U8.Download(m.URL, m.SpecialFolder, Settings.FfmpegFile, f, LogProvider)
m.File = f
If Not f.IsEmptyString Then m.DownloadState = PluginUserMedia.States.Downloaded
m.DownloadState = UStates.Tried
Try
f = M3U8.Download(m.URL, m.SpecialFolder, Settings.FfmpegFile, f, LogProvider)
m.File = f
m.DownloadState = UStates.Downloaded
Catch ex As Exception
m.DownloadState = UStates.Skipped
End Try
TempMediaList(i) = m
RaiseEvent ProgressChanged(1)
Next