Skip to content

Commit aef4ce1

Browse files
committed
2024.6.10.0
YT YouTubeSettings: add 'VideoPlaylist_AddExtractedMP3' property MediaItem: improve visualization of height and bitrate YouTubeMediaContainerBase: fix bugs on default post-processing formats; add 'HeightBase' and 'BitrateBase' properties; add extracted MP3 to playlist VideoListForm: add 'UpdateLogButton' handlers SCrawler Feed: add settings to show/hide site name and file type from media title; add move/copy files of a loaded feed/session to another location; add the ability to reset current session DownloadFeedForm: when moving saved posts files without replacing the profile, some data is lost FeedVideo: add double-click handler to open video in external player API.Instagram: update settings
1 parent 93ea2a5 commit aef4ce1

23 files changed

+282
-88
lines changed

Changelog.md

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# 2024.6.10.0
2+
3+
*2024-06-10*
4+
5+
- Added
6+
- YouTube (standalone app): add option to add extracted MP3 to playlist (`Settings` - `Defaults Video` - `Add extracted MP3 to playlist`)
7+
- Feed
8+
- settings to show/hide site name and file type from media title
9+
- ability to move/copy files of a loaded feed/session to another location
10+
- ability to reset current session
11+
- Fixed
12+
- Minor bugs
13+
114
# 2024.6.6.0
215

316
*2024-06-06*
1.52 KB
Loading

SCrawler.YouTube/Base/YouTubeSettings.vb

+3
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,9 @@ Namespace API.YouTube.Base
382382
<Browsable(True), GridVisible, XMLVN({"DefaultsVideo"}, -1), Category("Defaults Video"), DisplayName("Highlight FPS (lower)"),
383383
Description("Highlight frame rates lower than this value." & vbCr & "Default: -1" & vbCr & "-1 to disable")>
384384
Public ReadOnly Property DefaultVideoHighlightFPS_L As XMLValue(Of Integer)
385+
<Browsable(True), GridVisible, XMLVN({"DefaultsVideo"}), Category("Defaults Video"), DisplayName("Add extracted MP3 to playlist"),
386+
Description("If you also extract MP3 when download the video, add the extracted MP3 to the playlist. Default: false.")>
387+
Public ReadOnly Property VideoPlaylist_AddExtractedMP3 As XMLValue(Of Boolean)
385388
#End Region
386389
#Region "Defaults Audio"
387390
<Browsable(True), GridVisible, XMLVN({"DefaultsAudio"}, "AAC"), Category("Defaults Audio"), DisplayName("Default codec"),

SCrawler.YouTube/Downloader/MediaItem.vb

+11-4
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,24 @@ Namespace DownloadObjects.STDownloader
134134
ICON_SITE.Image = .SiteIcon
135135
LBL_TIME.Text = AConvert(Of String)(.Duration, TimeToStringProvider, String.Empty)
136136
LBL_TITLE.Text = $"{If(MyYouTubeSettings.FileAddDateToFileName_VideoList.Value, $"[{ .DateAdded:yyyy-MM-dd}] ", String.Empty)}{ .ToString(True)}"
137+
Dim h%, b%
138+
If .Self.GetType Is GetType(YouTubeMediaContainerBase) OrElse (Not .Self.GetType.BaseType Is Nothing AndAlso .Self.GetType.BaseType Is GetType(YouTubeMediaContainerBase)) Then
139+
With DirectCast(.Self, YouTubeMediaContainerBase) : h = .HeightBase : b = .BitrateBase : End With
140+
Else
141+
h = .Height
142+
b = .Bitrate
143+
End If
137144
If Not .SiteKey = YouTubeSiteKey And .ContentType = Plugin.UserMediaTypes.Picture Then
138145
LBL_INFO.Text = .File.Extension.StringToUpper
139146
ElseIf Not .IsMusic And Not (.MediaType = Plugin.UserMediaTypes.Audio Or .MediaType = Plugin.UserMediaTypes.AudioPre) Then
140-
If .Height > 0 Then
141-
LBL_INFO.Text = $"{ .File.Extension.StringToUpper}{d}{ .Height}p"
147+
If h > 0 Then
148+
LBL_INFO.Text = $"{ .File.Extension.StringToUpper}{d}{h}p"
142149
Else
143150
LBL_INFO.Text = .File.Extension.StringToUpper
144151
End If
145152
Else
146-
If .Bitrate > 0 Then
147-
LBL_INFO.Text = $"{ .File.Extension.StringToUpper}{d}{ .Bitrate}k"
153+
If b > 0 Then
154+
LBL_INFO.Text = $"{ .File.Extension.StringToUpper}{d}{b}k"
148155
Else
149156
LBL_INFO.Text = .File.Extension.StringToUpper
150157
End If

SCrawler.YouTube/Downloader/VideoListForm.vb

+23-3
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ Namespace DownloadObjects.STDownloader
5757
End If
5858
MyNotificator = New YTNotificator(Me)
5959
MyDownloaderSettings = MyYouTubeSettings
60+
ProgramLogInitialize()
61+
With ProgramLog
62+
AddHandler .TextAdded, AddressOf ProgramLog_TextAdded
63+
AddHandler .TextCleared, AddressOf ProgramLog_TextCleared
64+
End With
65+
UpdateLogButton()
6066
End If
6167

6268
With MyView : .Import() : .SetFormSize() : End With
@@ -157,7 +163,7 @@ Namespace DownloadObjects.STDownloader
157163
If PerformClick Then cnt.PerformClick()
158164
If Not DisableDownload And MyDownloaderSettings.DownloadAutomatically Then AddToDownload(cnt, True)
159165
End With
160-
End Sub, EDP.None)
166+
End Sub, EDP.SendToLog)
161167
End Sub
162168
#Region "Controls rendering"
163169
Private Overloads Sub OffsetControls()
@@ -449,12 +455,26 @@ Namespace DownloadObjects.STDownloader
449455
End Try
450456
End Sub
451457
#End Region
458+
#Region "LOG"
452459
Private Sub BTT_LOG_Click(sender As Object, e As EventArgs) Handles BTT_LOG.Click
453460
MyMainLOG_ShowForm(DesignXML,,,, AddressOf UpdateLogButton)
454461
End Sub
455-
Friend Sub UpdateLogButton()
456-
If AppMode Then MyMainLOG_UpdateLogButton(BTT_LOG, TOOLBAR_TOP)
462+
Private Sub UpdateLogButton()
463+
If AppMode Then
464+
Try : MyMainLOG_UpdateLogButton(BTT_LOG, TOOLBAR_TOP) : Catch : End Try
465+
End If
457466
End Sub
467+
Private _LogUpdateButtonSuspended As Boolean = False
468+
Private Sub ProgramLog_TextAdded(ByVal Sender As Object, ByVal e As EventArgs)
469+
If Not _LogUpdateButtonSuspended Then
470+
_LogUpdateButtonSuspended = True
471+
Try : ControlInvokeFast(TOOLBAR_TOP, BTT_LOG, AddressOf UpdateLogButton, EDP.None) : Catch : End Try
472+
End If
473+
End Sub
474+
Private Sub ProgramLog_TextCleared(ByVal Sender As Object, ByVal e As EventArgs)
475+
_LogUpdateButtonSuspended = False
476+
End Sub
477+
#End Region
458478
Private Sub BTT_BUG_REPORT_Click(sender As Object, e As EventArgs) Handles BTT_BUG_REPORT.Click
459479
Try
460480
With MyYouTubeSettings

SCrawler.YouTube/My Project/AssemblyInfo.vb

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
3232
' by using the '*' as shown below:
3333
' <Assembly: AssemblyVersion("1.0.*")>
3434

35-
<Assembly: AssemblyVersion("2024.6.6.0")>
36-
<Assembly: AssemblyFileVersion("2024.6.6.0")>
35+
<Assembly: AssemblyVersion("2024.6.10.0")>
36+
<Assembly: AssemblyFileVersion("2024.6.10.0")>
3737
<Assembly: NeutralResourcesLanguage("en")>

SCrawler.YouTube/Objects/YouTubeMediaContainerBase.vb

+46-21
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,11 @@ Namespace API.YouTube.Objects
267267
<XMLEC(CollectionMode:=CollectionModes.String)>
268268
Friend ReadOnly Property PostProcessing_OutputAudioFormats As List(Of String)
269269
Friend Sub PostProcessing_OutputAudioFormats_Reset()
270-
PostProcessing_OutputAudioFormats.Clear()
271-
PostProcessing_OutputAudioFormats.ListAddList(MyYouTubeSettings.DefaultAudioCodecAddit)
272-
If PostProcessing_OutputAudioFormats.Count > 0 Then
273-
PostProcessing_OutputAudioFormats.Sort()
274-
PostProcessing_OutputAudioFormats.RemoveAll(Function(s) s = -1)
275-
End If
270+
With PostProcessing_OutputAudioFormats
271+
.Clear()
272+
.ListAddList(MyYouTubeSettings.DefaultAudioCodecAddit)
273+
If .Count > 0 Then .Sort()
274+
End With
276275
End Sub
277276
<XMLEC("OutputAudioBitrate")> Protected _OutputAudioBitrate As Integer = -1
278277
Friend Property OutputAudioBitrate As Integer
@@ -322,21 +321,19 @@ Namespace API.YouTube.Objects
322321
<XMLEC(CollectionMode:=CollectionModes.String)>
323322
Friend ReadOnly Property PostProcessing_OutputSubtitlesFormats As List(Of String)
324323
Friend Sub PostProcessing_OutputSubtitlesFormats_Reset()
325-
PostProcessing_OutputSubtitlesFormats.Clear()
326-
PostProcessing_OutputSubtitlesFormats.ListAddList(MyYouTubeSettings.DefaultSubtitlesFormatAddit)
327-
If PostProcessing_OutputSubtitlesFormats.Count > 0 Then
328-
PostProcessing_OutputSubtitlesFormats.Sort()
329-
PostProcessing_OutputSubtitlesFormats.RemoveAll(Function(s) s = -1)
330-
End If
324+
With PostProcessing_OutputSubtitlesFormats
325+
.Clear()
326+
.ListAddList(MyYouTubeSettings.DefaultSubtitlesFormatAddit)
327+
If .Count > 0 Then .Sort()
328+
End With
331329
End Sub
332330
Friend Sub SubtitlesSelectedIndexesReset()
333-
SubtitlesSelectedIndexes.Clear()
334-
Dim subs As List(Of Subtitles) = Subtitles
335-
SubtitlesSelectedIndexes.ListAddList(MyYouTubeSettings.DefaultSubtitles.Select(Function(s) subs.FindIndex(Function(ss) ss.ID = s)))
336-
If SubtitlesSelectedIndexes.Count > 0 Then
337-
SubtitlesSelectedIndexes.Sort()
338-
SubtitlesSelectedIndexes.RemoveAll(Function(s) s = -1)
339-
End If
331+
With SubtitlesSelectedIndexes
332+
.Clear()
333+
Dim subs As List(Of Subtitles) = Subtitles
334+
.ListAddList(MyYouTubeSettings.DefaultSubtitles.Select(Function(s) subs.FindIndex(Function(ss) ss.ID = s)))
335+
If .Count > 0 Then .Sort() : .RemoveAll(Function(s) s = -1)
336+
End With
340337
End Sub
341338
Private Sub SetElementsSubtitles(ByVal Source As YouTubeMediaContainerBase)
342339
If Not Source Is Nothing And HasElements Then
@@ -442,6 +439,19 @@ Namespace API.YouTube.Objects
442439
End Get
443440
End Property
444441
<XMLEC> Public Property Height As Integer Implements IYouTubeMediaContainer.Height
442+
Friend ReadOnly Property HeightBase As Integer
443+
Get
444+
If Height > 0 Then
445+
Return Height
446+
ElseIf SelectedVideoIndex.ValueBetween(0, MediaObjects.Count - 1) Then
447+
Return SelectedVideo.Height
448+
ElseIf SelectedAudioIndex.ValueBetween(0, MediaObjects.Count - 1) Then
449+
Return SelectedAudio.Height
450+
Else
451+
Return 0
452+
End If
453+
End Get
454+
End Property
445455
Protected _Bitrate As Integer = 0
446456
<XMLEC> Public Overridable Property Bitrate As Integer Implements IYouTubeMediaContainer.Bitrate
447457
Get
@@ -459,6 +469,20 @@ Namespace API.YouTube.Objects
459469
Me._Bitrate = _Bitrate
460470
End Set
461471
End Property
472+
Friend ReadOnly Property BitrateBase As Integer
473+
Get
474+
If Bitrate > 0 Then
475+
Return Bitrate
476+
ElseIf OutputAudioBitrate > 0 Then
477+
Return OutputAudioBitrate
478+
ElseIf HasElements Then
479+
Try : Return Elements.Average(Function(e) DirectCast(e, YouTubeMediaContainerBase).BitrateBase) : Catch : End Try
480+
ElseIf SelectedAudioIndex.ValueBetween(0, MediaObjects.Count - 1) Then
481+
Return SelectedAudio.Bitrate
482+
End If
483+
Return 0
484+
End Get
485+
End Property
462486
<XMLEC> Public Property DateCreated As Date = Now Implements IYouTubeMediaContainer.DateCreated
463487
<XMLEC> Public Property DateAdded As Date Implements IYouTubeMediaContainer.DateAdded
464488
Private Property IUserMedia_PostDate As Date? Implements IUserMedia.PostDate
@@ -975,7 +999,7 @@ Namespace API.YouTube.Objects
975999
.Visible = True
9761000
.Value = 0
9771001
.Maximum = DownloadGetElemCountSingle()
978-
.Information = $"Download {ObjectType}"
1002+
.Information = "Downloading"
9791003
End With
9801004
End If
9811005

@@ -1120,7 +1144,7 @@ Namespace API.YouTube.Objects
11201144
.Value = 0
11211145
.Maximum = 100
11221146
.Provider = ProgressProvider
1123-
.Information = $"Download {MediaType}"
1147+
.Information = "Downloading"
11241148
End With
11251149
End If
11261150
.MainProcessName = MyYouTubeSettings.YTDLP.Name '"yt-dlp"
@@ -1305,6 +1329,7 @@ Namespace API.YouTube.Objects
13051329
If format = mp3 And Not mp3ThumbEmbedded And MyYouTubeSettings.DefaultAudioEmbedThumbnail_ExtractedFiles Then _
13061330
embedThumbTo.Invoke(f) : mp3ThumbEmbedded = True
13071331
If Not M3U8_PlaylistFiles.ListExists AndAlso f.Exists Then M3U8_Append(f)
1332+
If format = mp3 AndAlso f.Exists AndAlso MyYouTubeSettings.VideoPlaylist_AddExtractedMP3.Value Then M3U8_Append(f)
13081333
End If
13091334
Next
13101335
End If

SCrawler.YouTubeDownloader/My Project/AssemblyInfo.vb

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
3232
' by using the '*' as shown below:
3333
' <Assembly: AssemblyVersion("1.0.*")>
3434

35-
<Assembly: AssemblyVersion("2024.6.6.0")>
36-
<Assembly: AssemblyFileVersion("2024.6.6.0")>
35+
<Assembly: AssemblyVersion("2024.6.10.0")>
36+
<Assembly: AssemblyFileVersion("2024.6.10.0")>
3737
<Assembly: NeutralResourcesLanguage("en")>

SCrawler/API/Instagram/SiteSettings.vb

+5-4
Original file line numberDiff line numberDiff line change
@@ -446,10 +446,11 @@ Namespace API.Instagram
446446
Friend Overrides Sub EndInit()
447447
Try : MyLastRequests.Add(LastDownloadDate.Value, LastRequestsCount.Value) : Catch : End Try
448448
If Not CBool(HH_IG_WWW_CLAIM_USE.Value) Then Responser.Headers.Remove(Header_IG_WWW_CLAIM)
449-
If CInt(SettingsVersion.Value) < 1 Then
450-
SettingsVersion.Value = 1
451-
HH_IG_WWW_CLAIM_UPDATE_INTERVAL.Value = 59
452-
HH_IG_WWW_CLAIM_USE_DEFAULT_ALGO.Value = 0
449+
If CInt(SettingsVersion.Value) < 2 Then
450+
SettingsVersion.Value = 2
451+
HH_IG_WWW_CLAIM_UPDATE_INTERVAL.Value = 120
452+
HH_IG_WWW_CLAIM_USE_DEFAULT_ALGO.Value = 1
453+
HH_IG_WWW_CLAIM_RESET_EACH_TARGET.Value = 0
453454
End If
454455
MyBase.EndInit()
455456
End Sub

SCrawler/API/OnlyFans/SiteSettings.vb

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ Namespace API.OnlyFans
228228
Friend Overrides Sub Update()
229229
If _SiteEditorFormOpened Then
230230
If Not __UseOldAuthRules = CBool(UseOldAuthRules.Value) Or Not AEquals(Of String)(__DynamicRules, DynamicRules.Value) Then _
231-
LastDateUpdated = LastDateUpdated.AddYears(-1)
231+
LastDateUpdated = Now.AddYears(-1)
232232
Responser.Cookies.Changed = False
233233
End If
234234
MyBase.Update()

SCrawler/API/OnlyFans/UserData.vb

+1-1
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ Namespace API.OnlyFans
619619
Dim checkFormat As Func(Of EContainer, Boolean) =
620620
Function(jj) Not jj.Value("format").IsEmptyString OrElse
621621
(Not jj.Value("prefix").IsEmptyString And Not jj.Value("suffix").IsEmptyString) OrElse
622-
(Not jj.Value("start").IsEmptyString And Not jj.Value("start").IsEmptyString)
622+
(Not jj.Value("start").IsEmptyString And Not jj.Value("end").IsEmptyString)
623623
If Not r.IsEmptyString Then
624624
Using j As EContainer = JsonDocument.Parse(r, EDP.ReturnValue)
625625
If j.ListExists Then

0 commit comments

Comments
 (0)