mirror of
https://github.com/AAndyProgram/SCrawler.git
synced 2026-03-14 15:52:18 +00:00
2025.8.30.0
YT Add video trim Fix downloading error Add artist name when downloading audio Embed chapters SCrawler Add correct handling of 'webp' files API.Redgifs: hide 'Responser.Save' error
This commit is contained in:
@@ -136,4 +136,34 @@ Namespace API.YouTube.Base
|
||||
End If
|
||||
End Function
|
||||
End Structure
|
||||
Public Structure TrimOption : Implements IComparable(Of TrimOption)
|
||||
Public Name As String
|
||||
Public Start As Integer
|
||||
Public ReadOnly Property StartTime As TimeSpan
|
||||
Get
|
||||
Return TimeSpan.FromSeconds(Start)
|
||||
End Get
|
||||
End Property
|
||||
Public [End] As Integer
|
||||
Public ReadOnly Property EndTime As TimeSpan
|
||||
Get
|
||||
Return TimeSpan.FromSeconds([End])
|
||||
End Get
|
||||
End Property
|
||||
Public Shared Widening Operator CType(ByVal t As TrimOption) As String
|
||||
Return t.ToString
|
||||
End Operator
|
||||
Public Overrides Function ToString() As String
|
||||
Dim v$ = $"{Start} - {[End]}"
|
||||
If Not Name.IsEmptyString Then v = $"[{v}] - {Name}"
|
||||
Return v
|
||||
End Function
|
||||
Public Overrides Function Equals(ByVal Obj As Object) As Boolean
|
||||
Try : With DirectCast(Obj, TrimOption) : Return Start = .Start And [End] = .End : End With : Catch : End Try
|
||||
Return False
|
||||
End Function
|
||||
Private Function CompareTo(ByVal Other As TrimOption) As Integer Implements IComparable(Of TrimOption).CompareTo
|
||||
Return Start.CompareTo(Other.Start)
|
||||
End Function
|
||||
End Structure
|
||||
End Namespace
|
||||
@@ -319,8 +319,11 @@ Namespace API.YouTube.Base
|
||||
Description("Convert non-AVC codecs (eg 'VP9') to AVC. Not recommended due to high CPU usage!")>
|
||||
Public ReadOnly Property DefaultVideoConvertNonAVC As XMLValue(Of Boolean)
|
||||
<Browsable(True), GridVisible, XMLVN({"DefaultsVideo"}, False), Category("Defaults Video"), DisplayName("Embed thumbnail (video)"),
|
||||
Description("Embed thumbnail in the video as cover art. Default: true.")>
|
||||
Description("Embed thumbnail in the video as cover art. Default: false.")>
|
||||
Public ReadOnly Property DefaultVideoEmbedThumbnail As XMLValue(Of Boolean)
|
||||
<Browsable(True), GridVisible, XMLVN({"DefaultsVideo"}, True), Category("Defaults Video"), DisplayName("Embed chapters"),
|
||||
Description("Embed chapters in the video. Default: true.")>
|
||||
Public ReadOnly Property DefaultVideoEmbedChapters As XMLValue(Of Boolean)
|
||||
<Browsable(True), GridVisible, XMLVN({"DefaultsVideo"}), Category("Defaults Video"), DisplayName("Include zero size formats"),
|
||||
Description("Include formats with zero size (or undefined size).")>
|
||||
Public ReadOnly Property DefaultVideoIncludeNullSize As XMLValue(Of Boolean)
|
||||
@@ -496,6 +499,26 @@ Namespace API.YouTube.Base
|
||||
Description("Additional format for downloading subtitles. This means that all subtitles will be converted to the formats you choose and saved as separate files.")>
|
||||
Public ReadOnly Property DefaultSubtitlesFormatAddit As XMLValuesCollection(Of String)
|
||||
#End Region
|
||||
#Region "Trim"
|
||||
<Browsable(True), GridVisible, XMLVN({"DefaultsTrim"}, False), Category("Defaults Trimming"), DisplayName("Delete original file"),
|
||||
Description("If true, the original file will be deleted after trimming")>
|
||||
Public ReadOnly Property TrimDeleteOriginalFile As XMLValue(Of Boolean)
|
||||
<Browsable(True), GridVisible, XMLVN({"DefaultsTrim"}, False), Category("Defaults Trimming"), DisplayName("Add to M3U8"),
|
||||
Description("If true, the trimmed files will be added to the M3U8 playlist (if selected)")>
|
||||
Public ReadOnly Property TrimAddTrimmedFilesToM3U8 As XMLValue(Of Boolean)
|
||||
<Browsable(True), GridVisible, XMLVN({"DefaultsTrim"}, False), Category("Defaults Trimming"), DisplayName("Separate folder"),
|
||||
Description("Place the trimmed files in a separate folder")>
|
||||
Public ReadOnly Property TrimSeparateFolder As XMLValue(Of Boolean)
|
||||
Friend Const TrimSeparateFolderNameDefault As String = "Trim"
|
||||
<Browsable(True), GridVisible, XMLVN({"DefaultsTrim"}, TrimSeparateFolderNameDefault), Category("Defaults Trimming"), DisplayName("Separate folder name"),
|
||||
Description("Name of a separate folder")>
|
||||
Public ReadOnly Property TrimSeparateFolderName As XMLValue(Of String)
|
||||
#End Region
|
||||
#Region "Errors"
|
||||
<Browsable(True), GridVisible, XMLVN({"Errors"}, True), Category("ERRORS"), DisplayName("Ignore downloading errors"),
|
||||
Description("Ignore download errors if some files are missing (e.g. subtitles) and continue downloading")>
|
||||
Public ReadOnly Property ErrorsIgnore As XMLValue(Of Boolean)
|
||||
#End Region
|
||||
#End Region
|
||||
#Region "Initializer"
|
||||
Public Sub New()
|
||||
|
||||
Reference in New Issue
Block a user