Files
SCrawler/SCrawler.YouTube/Downloader/MediaItem.Designer.vb
Andy b2a9b22478 2023.4.28.0
Plugins
IPluginContentProvider: added DownloadSingleObject function; added tokens to GetMedia and Download functions; removed GetSpecialData function
Add IDownloadableMedia interface
Removed 'Channel' option from all functions and enums
ISiteSettings: added GetSingleMediaInstance function
ExchangeOptions: removed 'IsChannel'
UserMediaTypes: added Audio and AudioPre enums
IUserMedia, PluginUserMedia: changed ContentType and DownloadState from integers to their enums

SCrawler
Add YouTube standalone downloader
Add gallery-dl & yt-dlp support
Remove 'UserInfo' requirement from 'ProfilesSaved'
Update 'SiteSettingsBase' to use domains and Netscape cookies
UserDataBase: remove channels; remove old 'Merge' const; standardize SavedPosts file naming; move 'ValidateMD5' function from Twitter to UserDataBase to use it in other UserData classes; add 'DownloadSingleObject' environment for single posts; add validating file extension for m3u8 during download; add reindex of video file during download

Rewritten DomainsContainer
Create a universal settings form and PSettingsArttribute
Gfycat, Imgur: turn these classes into IUserData to download a single object

All plugins: update 'GetInstance' function for saved posts; update domains where implemented; remove 'OptionForm' where it exists; update options where they exist; update unix date providers; reconfigure channels where they exist

LPSG: fix attachments; update converters and regex
Add sites: ThisVid, Mastodon, Pinterest, YouTube, YouTube music
Reddit: standardize container parsing for all data types; new channel environment; fix 'ReparseMissing' function; redirect data downloading to the base download function, saved crossposts support
Twitter: fixed gif path bug; fixed downloading saved posts
PornHub: hide unnecessary errors; photo galleries bug
RedGifs: add 'UserAgent' option

Added icons to download progress

Rename some objects
Completely redesigned standalone downloader form and rewritten its environment
WebClient2: update to use tokens

Labels: update label form (save labels to file only when OK button is clicked); change removing labels.txt from recycle bin to permanent; disable storing label 'NoParsedUser'

UserCreatorForm: remove the 'Channel' checkbox and related functions; ability to extract the user's URL from the buffer and apply parameters if found
Remove temporary 'EncryptCookies' module

MainFrame: added simplified way to create new users (Ctrl+Insert to create a new user with default parameters from clipboard URL); removed SCrawler command line argument "-v" (remove the ability to run SCrawler as video downloader)
PropertyValueHost: update for option forms compatibility
SettingsHost: removed 'GetSpecialData' fork; added 'GetSingleMediaInstance' fork
UserDataHost: update functions with tokens; update events; add 'DownloadSingleObject' function
Settings: add the ability to get environment from 4 destinations; add the ability to set the program environment manually; add CMDEncoding; add cache; remove the old function 'RemoveUnusedPlugins'; add 'STDownloader' properties; add YT compatibility; add new notification options; add deleting user settings file when 'SettingsCLS.Dispose()' if where are no users in SCrawler
UserFinder: remove old 'Merge' const; remove channel option
UserInfo: remove channel option
2023-04-28 10:13:46 +03:00

257 lines
14 KiB
VB.net

' Copyright (C) 2023 Andy https://github.com/AAndyProgram
' 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.STDownloader
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Public Class MediaItem : 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()
Me.components = New System.ComponentModel.Container()
Dim TP_MAIN As System.Windows.Forms.TableLayoutPanel
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(MediaItem))
Me.ICON_VIDEO = New System.Windows.Forms.PictureBox()
Me.CONTEXT_MAIN = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.BTT_DOWN = New System.Windows.Forms.ToolStripMenuItem()
Me.SEP_DOWN = New System.Windows.Forms.ToolStripSeparator()
Me.BTT_OPEN_FOLDER = New System.Windows.Forms.ToolStripMenuItem()
Me.SEP_FOLDER = New System.Windows.Forms.ToolStripSeparator()
Me.BTT_COPY_LINK = New System.Windows.Forms.ToolStripMenuItem()
Me.BTT_OPEN_IN_BROWSER = New System.Windows.Forms.ToolStripMenuItem()
Me.SEP_DOWN_AGAIN = New System.Windows.Forms.ToolStripSeparator()
Me.BTT_DOWN_AGAIN = New System.Windows.Forms.ToolStripMenuItem()
Me.SEP_DEL = New System.Windows.Forms.ToolStripSeparator()
Me.BTT_REMOVE_FROM_LIST = New System.Windows.Forms.ToolStripMenuItem()
Me.BTT_DELETE_FILE = New System.Windows.Forms.ToolStripMenuItem()
Me.TP_INFO = New System.Windows.Forms.TableLayoutPanel()
Me.TP_CHECKED_TITLE = New System.Windows.Forms.TableLayoutPanel()
Me.LBL_TITLE = New System.Windows.Forms.Label()
Me.CH_CHECKED = New System.Windows.Forms.CheckBox()
Me.BTT_VIEW_SETTINGS = New System.Windows.Forms.ToolStripMenuItem()
TP_MAIN = New System.Windows.Forms.TableLayoutPanel()
TP_MAIN.SuspendLayout()
CType(Me.ICON_VIDEO, System.ComponentModel.ISupportInitialize).BeginInit()
Me.CONTEXT_MAIN.SuspendLayout()
Me.TP_INFO.SuspendLayout()
Me.TP_CHECKED_TITLE.SuspendLayout()
Me.SuspendLayout()
'
'TP_MAIN
'
TP_MAIN.ColumnCount = 2
TP_MAIN.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 125.0!))
TP_MAIN.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
TP_MAIN.Controls.Add(Me.ICON_VIDEO, 0, 0)
TP_MAIN.Controls.Add(Me.TP_INFO, 1, 0)
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 = 1
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 65.0!))
TP_MAIN.Size = New System.Drawing.Size(549, 65)
TP_MAIN.TabIndex = 0
AddHandler TP_MAIN.Click, AddressOf Me.Controls_Click
'
'ICON_VIDEO
'
Me.ICON_VIDEO.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.ICON_VIDEO.ContextMenuStrip = Me.CONTEXT_MAIN
Me.ICON_VIDEO.Dock = System.Windows.Forms.DockStyle.Fill
Me.ICON_VIDEO.Location = New System.Drawing.Point(3, 3)
Me.ICON_VIDEO.Name = "ICON_VIDEO"
Me.ICON_VIDEO.Size = New System.Drawing.Size(119, 59)
Me.ICON_VIDEO.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
Me.ICON_VIDEO.TabIndex = 0
Me.ICON_VIDEO.TabStop = False
'
'CONTEXT_MAIN
'
Me.CONTEXT_MAIN.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BTT_DOWN, Me.SEP_DOWN, Me.BTT_OPEN_FOLDER, Me.SEP_FOLDER, Me.BTT_COPY_LINK, Me.BTT_OPEN_IN_BROWSER, Me.SEP_DOWN_AGAIN, Me.BTT_DOWN_AGAIN, Me.BTT_VIEW_SETTINGS, Me.SEP_DEL, Me.BTT_REMOVE_FROM_LIST, Me.BTT_DELETE_FILE})
Me.CONTEXT_MAIN.Name = "CONTEXT_MAIN"
Me.CONTEXT_MAIN.ShowItemToolTips = False
Me.CONTEXT_MAIN.Size = New System.Drawing.Size(185, 226)
'
'BTT_DOWN
'
Me.BTT_DOWN.Image = Global.SCrawler.My.Resources.Resources.ArrowDownPic_Blue_24
Me.BTT_DOWN.Name = "BTT_DOWN"
Me.BTT_DOWN.Size = New System.Drawing.Size(184, 22)
Me.BTT_DOWN.Text = "Download"
'
'SEP_DOWN
'
Me.SEP_DOWN.Name = "SEP_DOWN"
Me.SEP_DOWN.Size = New System.Drawing.Size(181, 6)
'
'BTT_OPEN_FOLDER
'
Me.BTT_OPEN_FOLDER.Image = CType(resources.GetObject("BTT_OPEN_FOLDER.Image"), System.Drawing.Image)
Me.BTT_OPEN_FOLDER.Name = "BTT_OPEN_FOLDER"
Me.BTT_OPEN_FOLDER.Size = New System.Drawing.Size(184, 22)
Me.BTT_OPEN_FOLDER.Text = "Open folder"
'
'SEP_FOLDER
'
Me.SEP_FOLDER.Name = "SEP_FOLDER"
Me.SEP_FOLDER.Size = New System.Drawing.Size(181, 6)
'
'BTT_COPY_LINK
'
Me.BTT_COPY_LINK.Image = Global.SCrawler.My.Resources.Resources.LinkPic_32
Me.BTT_COPY_LINK.Name = "BTT_COPY_LINK"
Me.BTT_COPY_LINK.Size = New System.Drawing.Size(184, 22)
Me.BTT_COPY_LINK.Text = "Copy link address"
'
'BTT_OPEN_IN_BROWSER
'
Me.BTT_OPEN_IN_BROWSER.Image = CType(resources.GetObject("BTT_OPEN_IN_BROWSER.Image"), System.Drawing.Image)
Me.BTT_OPEN_IN_BROWSER.Name = "BTT_OPEN_IN_BROWSER"
Me.BTT_OPEN_IN_BROWSER.Size = New System.Drawing.Size(184, 22)
Me.BTT_OPEN_IN_BROWSER.Text = "Open link in browser"
'
'SEP_DOWN_AGAIN
'
Me.SEP_DOWN_AGAIN.Name = "SEP_DOWN_AGAIN"
Me.SEP_DOWN_AGAIN.Size = New System.Drawing.Size(181, 6)
'
'BTT_DOWN_AGAIN
'
Me.BTT_DOWN_AGAIN.Image = CType(resources.GetObject("BTT_DOWN_AGAIN.Image"), System.Drawing.Image)
Me.BTT_DOWN_AGAIN.Name = "BTT_DOWN_AGAIN"
Me.BTT_DOWN_AGAIN.Size = New System.Drawing.Size(184, 22)
Me.BTT_DOWN_AGAIN.Text = "Download again"
'
'SEP_DEL
'
Me.SEP_DEL.Name = "SEP_DEL"
Me.SEP_DEL.Size = New System.Drawing.Size(181, 6)
'
'BTT_REMOVE_FROM_LIST
'
Me.BTT_REMOVE_FROM_LIST.Image = CType(resources.GetObject("BTT_REMOVE_FROM_LIST.Image"), System.Drawing.Image)
Me.BTT_REMOVE_FROM_LIST.Name = "BTT_REMOVE_FROM_LIST"
Me.BTT_REMOVE_FROM_LIST.Size = New System.Drawing.Size(184, 22)
Me.BTT_REMOVE_FROM_LIST.Text = "Remove from the list"
'
'BTT_DELETE_FILE
'
Me.BTT_DELETE_FILE.Image = CType(resources.GetObject("BTT_DELETE_FILE.Image"), System.Drawing.Image)
Me.BTT_DELETE_FILE.Name = "BTT_DELETE_FILE"
Me.BTT_DELETE_FILE.Size = New System.Drawing.Size(184, 22)
Me.BTT_DELETE_FILE.Text = "Delete file"
'
'TP_INFO
'
Me.TP_INFO.ColumnCount = 1
Me.TP_INFO.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
Me.TP_INFO.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TP_INFO.Controls.Add(Me.TP_CHECKED_TITLE, 0, 0)
Me.TP_INFO.Dock = System.Windows.Forms.DockStyle.Fill
Me.TP_INFO.Location = New System.Drawing.Point(125, 0)
Me.TP_INFO.Margin = New System.Windows.Forms.Padding(0)
Me.TP_INFO.Name = "TP_INFO"
Me.TP_INFO.RowCount = 2
Me.TP_INFO.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
Me.TP_INFO.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
Me.TP_INFO.Size = New System.Drawing.Size(424, 65)
Me.TP_INFO.TabIndex = 1
'
'TP_CHECKED_TITLE
'
Me.TP_CHECKED_TITLE.ColumnCount = 2
Me.TP_CHECKED_TITLE.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TP_CHECKED_TITLE.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
Me.TP_CHECKED_TITLE.Controls.Add(Me.LBL_TITLE, 1, 0)
Me.TP_CHECKED_TITLE.Controls.Add(Me.CH_CHECKED, 0, 0)
Me.TP_CHECKED_TITLE.Dock = System.Windows.Forms.DockStyle.Fill
Me.TP_CHECKED_TITLE.Location = New System.Drawing.Point(0, 0)
Me.TP_CHECKED_TITLE.Margin = New System.Windows.Forms.Padding(0)
Me.TP_CHECKED_TITLE.Name = "TP_CHECKED_TITLE"
Me.TP_CHECKED_TITLE.RowCount = 1
Me.TP_CHECKED_TITLE.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
Me.TP_CHECKED_TITLE.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 32.0!))
Me.TP_CHECKED_TITLE.Size = New System.Drawing.Size(424, 32)
Me.TP_CHECKED_TITLE.TabIndex = 0
'
'LBL_TITLE
'
Me.LBL_TITLE.ContextMenuStrip = Me.CONTEXT_MAIN
Me.LBL_TITLE.Dock = System.Windows.Forms.DockStyle.Fill
Me.LBL_TITLE.Font = New System.Drawing.Font("Arial", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(204, Byte))
Me.LBL_TITLE.Location = New System.Drawing.Point(23, 0)
Me.LBL_TITLE.Name = "LBL_TITLE"
Me.LBL_TITLE.Size = New System.Drawing.Size(398, 32)
Me.LBL_TITLE.TabIndex = 1
Me.LBL_TITLE.Text = "Video title"
Me.LBL_TITLE.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'CH_CHECKED
'
Me.CH_CHECKED.AutoSize = True
Me.CH_CHECKED.Dock = System.Windows.Forms.DockStyle.Fill
Me.CH_CHECKED.Location = New System.Drawing.Point(3, 3)
Me.CH_CHECKED.Name = "CH_CHECKED"
Me.CH_CHECKED.Size = New System.Drawing.Size(14, 26)
Me.CH_CHECKED.TabIndex = 0
Me.CH_CHECKED.UseVisualStyleBackColor = True
'
'BTT_VIEW_SETTINGS
'
Me.BTT_VIEW_SETTINGS.Image = Global.SCrawler.My.Resources.Resources.SettingsPic_16
Me.BTT_VIEW_SETTINGS.Name = "BTT_VIEW_SETTINGS"
Me.BTT_VIEW_SETTINGS.Size = New System.Drawing.Size(184, 22)
Me.BTT_VIEW_SETTINGS.Text = "View settings"
'
'MediaItem
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.Controls.Add(TP_MAIN)
Me.Name = "MediaItem"
Me.Size = New System.Drawing.Size(549, 65)
TP_MAIN.ResumeLayout(False)
CType(Me.ICON_VIDEO, System.ComponentModel.ISupportInitialize).EndInit()
Me.CONTEXT_MAIN.ResumeLayout(False)
Me.TP_INFO.ResumeLayout(False)
Me.TP_CHECKED_TITLE.ResumeLayout(False)
Me.TP_CHECKED_TITLE.PerformLayout()
Me.ResumeLayout(False)
End Sub
Private WithEvents ICON_VIDEO As PictureBox
Private WithEvents LBL_TITLE As Label
Private WithEvents CONTEXT_MAIN As ContextMenuStrip
Private WithEvents BTT_OPEN_FOLDER As ToolStripMenuItem
Private WithEvents BTT_COPY_LINK As ToolStripMenuItem
Private WithEvents BTT_OPEN_IN_BROWSER As ToolStripMenuItem
Private WithEvents BTT_DOWN_AGAIN As ToolStripMenuItem
Private WithEvents BTT_REMOVE_FROM_LIST As ToolStripMenuItem
Private WithEvents BTT_DELETE_FILE As ToolStripMenuItem
Private WithEvents BTT_DOWN As ToolStripMenuItem
Private WithEvents SEP_DOWN As ToolStripSeparator
Private WithEvents TP_INFO As TableLayoutPanel
Friend WithEvents TP_CHECKED_TITLE As TableLayoutPanel
Private WithEvents CH_CHECKED As CheckBox
Private WithEvents SEP_FOLDER As ToolStripSeparator
Private WithEvents SEP_DOWN_AGAIN As ToolStripSeparator
Private WithEvents SEP_DEL As ToolStripSeparator
Private WithEvents BTT_VIEW_SETTINGS As ToolStripMenuItem
End Class
End Namespace