Compare commits
18 Commits
2023.6.9.0
...
2023.9.21.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
77443cedc4 | ||
|
|
a446df1f66 | ||
|
|
0026e905a4 | ||
|
|
f8116fd048 | ||
|
|
8d33fdc8f3 | ||
|
|
dab94acc32 | ||
|
|
c61c817585 | ||
|
|
3ea59a6acd | ||
|
|
2a60ace18f | ||
|
|
f0014d2874 | ||
|
|
28ae44f0ae | ||
|
|
1b1226025a | ||
|
|
58927b3113 | ||
|
|
df06a86651 | ||
|
|
bade8666d5 | ||
|
|
c70caa0035 | ||
|
|
ac532dbc6f | ||
|
|
82ef4f4410 |
5
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -30,7 +30,9 @@ A clear and concise description of what you expected to happen.
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Release information (please complete the following information):**
|
||||
**Release information:**
|
||||
|
||||
**Please complete the following information or replace the following text with data copied from SCrawler (click the top right info button in the main window, then the `Environment` button, then the `Copy` button, and paste the copied text here).**
|
||||
- OS: [e.g. Windows 10, Windows 11]
|
||||
- Architecture: [e.g. x86, x64]
|
||||
- Version: [e.g. 2023.3.5.0]
|
||||
@@ -38,6 +40,7 @@ If applicable, add screenshots to help explain your problem.
|
||||
- ffmpeg version (command `ffmpeg -version`):
|
||||
- yt-dlp version (command `yt-dlp --version`):
|
||||
- gallery-dl version (command `gallery-dl --version`):
|
||||
- cURL version (command `curl --version`):
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
|
||||
3
.gitignore
vendored
@@ -10,8 +10,7 @@
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
.obsidian/
|
||||
ToDo.txt
|
||||
ToDo.md
|
||||
BugReporterFormDiscordWebHook.vb
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
150
Changelog.md
@@ -1,3 +1,153 @@
|
||||
# 2023.9.21.0
|
||||
|
||||
*2023-09-21*
|
||||
|
||||
- Fixed
|
||||
- PornHub: videos are not downloading
|
||||
|
||||
# 2023.9.20.0
|
||||
|
||||
*2023-09-20*
|
||||
|
||||
- Added
|
||||
- **Instagram: user active (non-pinned) stories (Issue #17)**
|
||||
- Reddit: reduce the number of token updates (refresh the token if there are Reddit users in the download queue)
|
||||
- YouTube (standalone app): priority download protocol *(`Settings` - `Defaults` - `Protocol`)* (you can now select the default protocol you want to download media on: `Any`, `https`, `m3u8`))
|
||||
- Automation: ability to change schedulers (`Download` - `Automation` - `Script icon`)
|
||||
- Collections: update colors for the added user
|
||||
- Fixed
|
||||
- YouTube: can't detect `shorts` links
|
||||
- Incorrect MD5 validation initial value
|
||||
- Instagram: handle error 500
|
||||
- Collections: update labels only for the added user
|
||||
|
||||
# 2023.8.27.0
|
||||
|
||||
*2023-08-27*
|
||||
|
||||
- Added
|
||||
- **JustForFans**
|
||||
- Advanced download (`Download` - `Download (advanced)`)
|
||||
- Advanced filter (`View` - `Advanced filter`)
|
||||
- Auto downloader: cloning plans
|
||||
- Feed: add button to go to custom page
|
||||
- Special log for non-existent users
|
||||
- Twitter: group 'limit' notifications
|
||||
- Ability to set custom color for subscription users
|
||||
- Other improvements
|
||||
- Fixed
|
||||
- Auto downloader: new plan date display bug
|
||||
- Auto downloader: downloading stuck
|
||||
- Minor bugs
|
||||
|
||||
# 2023.8.6.0
|
||||
|
||||
*2023-08-06*
|
||||
|
||||
- Added
|
||||
- The ability to remove user data and/or download history for redownload
|
||||
- **Subscription** mode
|
||||
- Settings to change the program title and information in the program information
|
||||
- Settings for saving video thumbnail along with the file or in the cache (temporary cache or permanent cache)
|
||||
- A bug report form to create a bug report or say something nice to the developer :blush:
|
||||
- Prevent adding site-specific labels when adding to a collection
|
||||
- Ability to select custom user highlighting in the main window and feed.
|
||||
- Add a notification to the log if the user is not found on the site
|
||||
- Added visualization of users download queue
|
||||
- Ability to set more than one global paths
|
||||
- Improve user paths changing: now you can also simply move the user/collection to another global location
|
||||
- Ability to move multiple user/collection to another location
|
||||
- Download groups: added `Subscription` options
|
||||
- Download groups: the ability to set the number of users to download
|
||||
- Auto downloader: new group options
|
||||
- Auto downloader: additional skip options
|
||||
- Auto downloader: added force start
|
||||
- Feed: press `Ctrl+G` to go to a specific page
|
||||
- Feed: added site icon to post
|
||||
- Feed: always using `Friendly name` instead of `UserName` if it exists
|
||||
- Missing posts: the ability to delete all missing posts
|
||||
- Standalone downloader: add the ability to store download locations and quickly select after
|
||||
- Standalone downloader: add `Ctrl+O` hotkey to select destination path
|
||||
- Standalone downloader: add `Alt+O` hotkey to select destination path and save it to download locations
|
||||
- User editor: ability to hide/show site-specific labels in collection editing mode
|
||||
- Main window: filters by subscription and user
|
||||
- Instagram: if the user is not found on the site, SCrawler will check for a new user name
|
||||
- OnlyFans: handling of `504` and `429` errors
|
||||
- OnlyFans: the `sec-ch-ua` header is now optional
|
||||
- OnlyFans: ability to download 'Highlights" and media from chats
|
||||
- PathPlugin: incorrect detection of path existence
|
||||
- PornHub: completely rewritten videos parser
|
||||
- PornHub: now you choose which videos you want to download (uploaded, tagged, private, favorites)
|
||||
- PornHub: subscription mode
|
||||
- PornHub: ability to download search queries and search categories
|
||||
- Reddit: ability to set the number of concurrent downloads
|
||||
- Reddit: added bearer token (optional)
|
||||
- Reddit: added OAuth authorization (optional)
|
||||
- Reddit: options to use the bearer token for the timeline and/or saved posts
|
||||
- Reddit: option to disable the use of cookies for the timeline
|
||||
- ThisVid: now you can also download user's favorite videos
|
||||
- ThisVid: ability to download search queries, search categories and search tags
|
||||
- ThisVid: subscription mode
|
||||
- Twitter: new options: `Use the appropriate model`, `New endpoint: search`, `New endpoint: profiles`, `Abort on limit`, `Download already parsed` and `Media Model: allow non-user tweets`
|
||||
- Twitter: new user option `Force apply`
|
||||
- xHamster: ability to download search queries, search categories and search tags
|
||||
- xHamster: subscription mode
|
||||
- xHamster: pornstars download
|
||||
- XVideos: ability to download search queries, search categories and search tags
|
||||
- XVideos: subscription mode
|
||||
- YouTube: added `Output path: ask for a name` and `Output path: auto add` settings
|
||||
- YouTube: added the ability to store download locations and quickly select after
|
||||
- YouTube: subscription mode
|
||||
- Plugins.Attributes: added `DependentFields` attribute
|
||||
- Plugins.Attributes: replace `Dependencies` with `Arguments` (`PropertyUpdater` attribute)
|
||||
- Plugins.IPluginContentProvider: added `Options` and `IsSubscription` properties
|
||||
- Plugins.ISiteSettings: added `SubscriptionsAllowed` property
|
||||
- Plugins.ExchangeOptions: added `Options` field
|
||||
- Plugins: added `ExitException`
|
||||
- Other improvements
|
||||
- Updated
|
||||
- gallery-dl up to version 1.25.8
|
||||
- yt-dlp up to version 2023.07.06
|
||||
- LibVLCSharp up to 3.7.0
|
||||
- VideoLAN up to 3.0.18
|
||||
- Fixed
|
||||
- **TikTok** supported again!
|
||||
- Auto downloader: excluded labels and sites in default mode are not respected
|
||||
- Download info: does not remember the last size and location
|
||||
- Download info: hide unnecessary error
|
||||
- Feed: `webm` photos not showing
|
||||
- Search users: incorrect search by name
|
||||
- OnlyFans: incorrect parsing of username containing dots
|
||||
- OnlyFans: incorrect error handler
|
||||
- Reddit: Handling error 502 (Reddit data not downloading)
|
||||
- RedGifs: incorrect behavior when updating token
|
||||
- Twitter: gifs are not downloading
|
||||
- xHamster: some channels cannot be downloaded or are not fully downloaded
|
||||
- YouTube: re-saving elements when loading a video list
|
||||
- YouTube: files were not deleted when the delete button was clicked
|
||||
- YouTube: a bug that caused the video to redownload
|
||||
- Minor bugs
|
||||
|
||||
# 2023.6.19.0
|
||||
|
||||
*2023-06-19*
|
||||
|
||||
- Added
|
||||
- **OnlyFans**
|
||||
- YouTube: make the playlists parsing progress more informative
|
||||
- YouTube: add `Add` button to tray
|
||||
- YouTube: add `Ctrl+Click` on tray icon to add download
|
||||
- YouTube: add setting `Download on click in tray: show form`
|
||||
- Minor improvements to progress bars
|
||||
- Other improvements
|
||||
- Fixed
|
||||
- YouTube: incorrect sorting algorithm
|
||||
- LPSG: some files didn't download
|
||||
- Reddit: downloaded gifs are static (Issue #141)
|
||||
- xHamster: videos are not downloading or downloading incorrectly (Issue #144)
|
||||
- Progress bar bugs
|
||||
- Minor bugs
|
||||
|
||||
# 2023.6.9.0
|
||||
|
||||
*2023-06-09*
|
||||
|
||||
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 33 KiB |
BIN
ProgramScreenshots/BugReport.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 483 KiB After Width: | Height: | Size: 491 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 11 KiB |
BIN
ProgramScreenshots/LocationsChanger.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 363 KiB After Width: | Height: | Size: 359 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 21 KiB |
BIN
ProgramScreenshots/SettingsGlobalDesign.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 36 KiB |
BIN
ProgramScreenshots/SettingsSiteJustForFans.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
ProgramScreenshots/SettingsSiteOnlyFans.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 5.2 KiB |
BIN
ProgramScreenshots/UserDefaultQueryOptions.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
@@ -117,7 +117,7 @@ https://github.com/RipMeApp/ripme
|
||||
| **Free options** | The program is completely free | The program is completely free, but site limits are not declared |
|
||||
| Operating Systems | Windows 10+ | Windows, MacOS, Linux |
|
||||
| Select want content type to download | Yes | Yes |
|
||||
| Suported sites | 15 internal and any site using plugins | 86+ sites (declared) |
|
||||
| Suported sites | 15+ internal and any site using plugins | 86+ sites (declared) |
|
||||
| Other sites support | **Yes** | No |
|
||||
| Still supported | **Yes** | **No (last release date May 4, 2021)** |
|
||||
|
||||
|
||||
60
README.md
@@ -1,5 +1,5 @@
|
||||
# :rainbow_flag: Happy LGBT Pride Month :tada:
|
||||
|
||||
<!-- # :rainbow_flag: Happy LGBT Pride Month :tada:
|
||||
-->
|
||||
# :rainbow_flag: Social networks crawler :rainbow_flag:
|
||||
|
||||
[](https://github.com/AAndyProgram/SCrawler/releases/latest)
|
||||
@@ -11,13 +11,15 @@
|
||||
:eu:
|
||||
:greece:
|
||||
|
||||
A program to download photo and video from [any site](#supported-sites) (e.g. YouTube, YouTube Music, Reddit, Twitter, Mastodon, Instagram, TikTok, RedGifs, PornHub, XHamster, XVIDEOS, ThisVid, LPSG, Pinterest).
|
||||
A program to download photo and video from [any site](#supported-sites) (e.g. YouTube, YouTube Music, OnlyFans, Reddit, Twitter, Mastodon, Instagram, TikTok, RedGifs, JustForFans, PornHub, XHamster, XVIDEOS, ThisVid, LPSG, Pinterest).
|
||||
|
||||
**If you like SCrawler, please like the program on [this site](https://alternativeto.net/software/scrawler/about/) and/or [this](https://www.softpedia.com/get/Internet/Download-Managers/Social-networks-crawler.shtml)**
|
||||
<!---Do you like this program? Consider adding to my coffee fund by making a donation to show your support. :blush:
|
||||
[](https://ko-fi.com/andyprogram)--->
|
||||
**Bitcoin**: BC1Q0NH839FT5TA44DD7L7RLR97XDQAG9V8D6N7XET
|
||||
|
||||
[](https://www.softpedia.com/get/Internet/Download-Managers/Social-networks-crawler.shtml#status)
|
||||
|
||||

|
||||

|
||||
|
||||
@@ -31,26 +33,29 @@ A program to download photo and video from [any site](#supported-sites) (e.g. Yo
|
||||
- Reddit images, galleries of images, videos, saved posts;
|
||||
- Redgifs videos (https://www.redgifs.com/);
|
||||
- Twitter images and videos, saved (bookmarked) posts;
|
||||
- OnlyFans images and videos, saved (bookmarked) posts;
|
||||
- JustForFans images and videos, saved (bookmarked) posts;
|
||||
- Mastodon images and videos, saved (bookmarked) posts;
|
||||
- Instagram images and videos, tagged posts, stories, saved posts;
|
||||
- TikTok videos (*currently broken*; [limited](https://github.com/AAndyProgram/SCrawler/wiki/Settings#tiktok-limits));
|
||||
- TikTok videos;
|
||||
- Pinterest boards, users, saved posts;
|
||||
- Imgur images, galleries and videos;
|
||||
- Gfycat videos;
|
||||
- PornHub images, videos, save (liked) posts;
|
||||
- XHamster images, videos, saved posts;
|
||||
- XVIDEOS videos, saved posts;
|
||||
- ThisVid images, videos, saved posts;
|
||||
- PornHub images, videos, save (liked) posts, search queries, search categories;
|
||||
- XHamster images, videos, saved posts, search queries, search categories, search tags;
|
||||
- XVIDEOS videos, saved posts, search queries, search categories;
|
||||
- ThisVid images, videos, saved posts, search queries, search categories, search tags;
|
||||
- [Other](#supported-sites) supported sites
|
||||
- Parse [channel and view data](https://github.com/AAndyProgram/SCrawler/wiki/Channels)
|
||||
- Download [saved Reddit, Twitter and Instagram posts](https://github.com/AAndyProgram/SCrawler/wiki/Home#saved-posts)
|
||||
- Parse [Reddit channel and view data](https://github.com/AAndyProgram/SCrawler/wiki/Channels)
|
||||
- Download [saved posts](https://github.com/AAndyProgram/SCrawler/wiki/Home#saved-posts)
|
||||
- Add users from parsed channel
|
||||
- **Advanced user management**
|
||||
- **Automation** ([downloading data automatically](https://github.com/AAndyProgram/SCrawler/wiki/Settings#automation) every ```X``` minutes)
|
||||
- **Feed** ([feed](https://github.com/AAndyProgram/SCrawler/wiki#feed) of downloaded media files)
|
||||
- **Feed** ([feed](https://github.com/AAndyProgram/SCrawler/wiki#feed) of downloaded media files and subscriptions posts)
|
||||
- Labeling users
|
||||
- Create [download groups](https://github.com/AAndyProgram/SCrawler/wiki/Settings#download-groups)
|
||||
- Adding users to favorites and temporary
|
||||
- Adding users and search queries in the **Subscription** mode (download post preview, but do not download the media file)
|
||||
- [Filter exists users](https://github.com/AAndyProgram/SCrawler/wiki#view) by label or group
|
||||
- Selection of media types you want to download (images only, videos only, both)
|
||||
- [Download a special video](https://github.com/AAndyProgram/SCrawler/wiki#download-separate-video), image or gallery
|
||||
@@ -65,9 +70,11 @@ A program to download photo and video from [any site](#supported-sites) (e.g. Yo
|
||||
- **YouTube Music**
|
||||
- **Reddit**
|
||||
- **Twitter**
|
||||
- **OnlyFans**
|
||||
- **Mastodon**
|
||||
- **Instagram**
|
||||
- TikTok (*currently broken*; [limited](https://github.com/AAndyProgram/SCrawler/wiki/Settings#tiktok-limits))
|
||||
- JustForFans
|
||||
- TikTok
|
||||
- RedGifs
|
||||
- Pinterest
|
||||
- Imgur
|
||||
@@ -85,14 +92,6 @@ A program to download photo and video from [any site](#supported-sites) (e.g. Yo
|
||||
|
||||
First, the program downloads the full profile. After the program downloads only new posts. The program remembers downloaded posts.
|
||||
|
||||
## Reddit
|
||||
|
||||
The program parses user posts, obtain MD5 images hash and compares them with existing ones to remove duplicates. Then the media will be downloaded.
|
||||
|
||||
## Other sites
|
||||
|
||||
The program parses user posts and compares file names with existing ones to remove duplicates. Then the media will be downloaded.
|
||||
|
||||
## How to request a new site
|
||||
|
||||
<!---Read [here](CONTRIBUTING.md#how-to-request-a-new-site) about--->
|
||||
@@ -122,16 +121,18 @@ The program parses user posts and compares file names with existing ones to remo
|
||||
- **[SITES REQUIREMENTS](https://github.com/AAndyProgram/SCrawler/wiki/Settings#sites-requirements)**
|
||||
- [Reddit](https://github.com/AAndyProgram/SCrawler/wiki/Settings#reddit)
|
||||
- [Twitter](https://github.com/AAndyProgram/SCrawler/wiki/Settings#twitter)
|
||||
- [Mastodon](https://github.com/AAndyProgram/SCrawler/wiki/Settings#Mastodon)
|
||||
- [OnlyFans](https://github.com/AAndyProgram/SCrawler/wiki/Settings#onlyfans)
|
||||
- [Mastodon](https://github.com/AAndyProgram/SCrawler/wiki/Settings#mastodon)
|
||||
- [Instagram](https://github.com/AAndyProgram/SCrawler/wiki/Settings#instagram)
|
||||
- [JustForFans](https://github.com/AAndyProgram/SCrawler/wiki/Settings#justforfans)
|
||||
- [TikTok](https://github.com/AAndyProgram/SCrawler/wiki/Settings#tiktok)
|
||||
- [RedGifs](https://github.com/AAndyProgram/SCrawler/wiki/Settings#redgifs)
|
||||
- [YouTube](https://github.com/AAndyProgram/SCrawler/wiki/Settings#YouTube)
|
||||
- [YouTube](https://github.com/AAndyProgram/SCrawler/wiki/Settings#youtube)
|
||||
- [Pinterest](https://github.com/AAndyProgram/SCrawler/wiki/Settings#Pinterest)
|
||||
- [PornHub](https://github.com/AAndyProgram/SCrawler/wiki/Settings#pornhub)
|
||||
- [XHamster](https://github.com/AAndyProgram/SCrawler/wiki/Settings#xhamster)
|
||||
- [XVIDEOS](https://github.com/AAndyProgram/SCrawler/wiki/Settings#xvideos)
|
||||
- [ThisVid](https://github.com/AAndyProgram/SCrawler/wiki/Settings#ThisVid)
|
||||
- [ThisVid](https://github.com/AAndyProgram/SCrawler/wiki/Settings#thisvid)
|
||||
- [LPSG](https://github.com/AAndyProgram/SCrawler/wiki/Settings#lpsg)
|
||||
|
||||
**Full guide you can find [here](https://github.com/AAndyProgram/SCrawler/wiki)**
|
||||
@@ -188,6 +189,17 @@ F5-->[*]
|
||||
|
||||
# Contact me
|
||||
|
||||
Discord server: https://discord.gg/uFNUXvFFmg
|
||||
|
||||
[e-mail](mailto:andyprogram@proton.me): andyprogram@proton.me
|
||||
<!--
|
||||
[e-mail](mailto:andyprogram@proton.me): andyprogram@proton.me
|
||||
|
||||
Matrix (Element): https://matrix.to/#/@andyprogram:matrix.org
|
||||
|
||||
Discord: AndyProgram#3804
|
||||
Discord (contact the developer): andyprogram
|
||||
|
||||
Discord server: https://discord.gg/uFNUXvFFmg
|
||||
|
||||
[Wire](https://account.wire.com/user-profile/?id=93985052-cf2c-4b72-ac75-bbe3231cf544): @andyprogram
|
||||
-->
|
||||
@@ -44,6 +44,16 @@ Namespace Plugin.Attributes
|
||||
Name = PropertyName
|
||||
End Sub
|
||||
End Class
|
||||
''' <summary>Set the dependent fields that need to be updated when this property is changed internally.</summary>
|
||||
<AttributeUsage(AttributeTargets.Property, AllowMultiple:=False, Inherited:=False)> Public NotInheritable Class DependentFields : Inherits Attribute
|
||||
Public ReadOnly Fields As String()
|
||||
Public Sub New(ByVal Field As String)
|
||||
Fields = {Field}
|
||||
End Sub
|
||||
Public Sub New(ByVal Fields As String())
|
||||
Me.Fields = Fields
|
||||
End Sub
|
||||
End Class
|
||||
''' <summary>Store property value in settings XML file</summary>
|
||||
<AttributeUsage(AttributeTargets.Property, AllowMultiple:=False, Inherited:=False)> Public NotInheritable Class PXML : Inherits Attribute
|
||||
Public ReadOnly ElementName As String
|
||||
@@ -59,16 +69,16 @@ Namespace Plugin.Attributes
|
||||
''' <summary>Special property updater</summary>
|
||||
<AttributeUsage(AttributeTargets.Method, AllowMultiple:=True, Inherited:=False)> Public NotInheritable Class PropertyUpdater : Inherits Attribute
|
||||
Public ReadOnly Name As String
|
||||
Public ReadOnly Dependencies As String()
|
||||
Public ReadOnly Arguments As String()
|
||||
''' <inheritdoc cref="PropertyUpdater.New(String, String())"/>
|
||||
Public Sub New(ByVal UpdatingPropertyName As String)
|
||||
Name = UpdatingPropertyName
|
||||
End Sub
|
||||
''' <summary>Initialize a new PropertyUpdater attribute</summary>
|
||||
''' <param name="UpdatingPropertyName">The name of the property to be updated</param>
|
||||
Public Sub New(ByVal UpdatingPropertyName As String, ByVal Dependent As String())
|
||||
Public Sub New(ByVal UpdatingPropertyName As String, ByVal Arguments As String())
|
||||
Name = UpdatingPropertyName
|
||||
Dependencies = Dependent
|
||||
Me.Arguments = Arguments
|
||||
End Sub
|
||||
End Class
|
||||
''' <summary>Plugin key</summary>
|
||||
|
||||
@@ -17,6 +17,7 @@ Namespace Plugin
|
||||
Property Settings As ISiteSettings
|
||||
Property Name As String
|
||||
Property ID As String
|
||||
Property Options As String
|
||||
Property ParseUserMediaOnly As Boolean
|
||||
Property UserDescription As String
|
||||
Property ExistingContentList As List(Of IUserMedia)
|
||||
@@ -25,6 +26,7 @@ Namespace Plugin
|
||||
Property UserExists As Boolean
|
||||
Property UserSuspended As Boolean
|
||||
Property IsSavedPosts As Boolean
|
||||
Property IsSubscription As Boolean
|
||||
Property SeparateVideoFolder As Boolean
|
||||
Property DataPath As String
|
||||
Property PostsNumberLimit As Integer?
|
||||
|
||||
@@ -17,6 +17,7 @@ Namespace Plugin
|
||||
ReadOnly Property Icon As Icon
|
||||
ReadOnly Property Image As Image
|
||||
ReadOnly Property Site As String
|
||||
ReadOnly Property SubscriptionsAllowed As Boolean
|
||||
Property Logger As ILogProvider
|
||||
Function GetUserUrl(ByVal User As IPluginContentProvider) As String
|
||||
Function IsMyUser(ByVal UserURL As String) As ExchangeOptions
|
||||
|
||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2023.5.12.0")>
|
||||
<Assembly: AssemblyFileVersion("2023.5.12.0")>
|
||||
<Assembly: AssemblyVersion("2023.8.6.0")>
|
||||
<Assembly: AssemblyFileVersion("2023.8.6.0")>
|
||||
<Assembly: NeutralResourcesLanguage("en")>
|
||||
|
||||
@@ -11,6 +11,7 @@ Namespace Plugin
|
||||
Public UserName As String
|
||||
Public SiteName As String
|
||||
Public HostKey As String
|
||||
Public Options As String
|
||||
Public Exists As Boolean
|
||||
Public Sub New(ByVal Site As String, ByVal Name As String)
|
||||
UserName = Name
|
||||
|
||||
36
SCrawler.PluginProvider/Objects/ExitException.vb
Normal file
@@ -0,0 +1,36 @@
|
||||
' 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 Plugin
|
||||
''' <summary>Represents errors that occur during downloading to be thrown to the root downloading function.</summary>
|
||||
Public Class ExitException : Inherits Exception
|
||||
''' <summary>Add only the message to the log, without adding a <see cref="StackTrace"/>. Default: <see langword="True"/>.</summary>
|
||||
''' <returns><see langword="True"/> if only the message should be added to the log; otherwise the stack trace will also be added.</returns>
|
||||
Public Property SimpleLogLine As Boolean = True
|
||||
''' <summary>Don't add a message to the log. Default: <see langword="False"/>.</summary>
|
||||
''' <returns><see langword="True"/> if the error is exit-only and there is no need to add a message to the log; otherwise add a message to the log.</returns>
|
||||
Public Property Silent As Boolean = False
|
||||
''' <summary>Initializes a new instance of the <see cref="ExitException"/> class.</summary>
|
||||
Public Sub New()
|
||||
End Sub
|
||||
''' <summary>Initializes a new instance of the <see cref="ExitException"/> class with a specified error message.</summary>
|
||||
''' <param name="Message">The message that describes the error.</param>
|
||||
Public Sub New(ByVal Message As String)
|
||||
MyBase.New(Message)
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' Initializes a new instance of the <see cref="ExitException"/> class with a specified error message
|
||||
''' and a reference to the inner exception that is the cause of this exception.
|
||||
''' </summary>
|
||||
''' <param name="Message">The error message that explains the reason for the exception.</param>
|
||||
''' <param name="InnerException">The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.</param>
|
||||
Public Sub New(ByVal Message As String, ByVal InnerException As Exception)
|
||||
MyBase.New(Message, InnerException)
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -107,6 +107,7 @@
|
||||
<Compile Include="Objects\ExchangeOptions.vb" />
|
||||
<Compile Include="ObjectInterfaces\ILogProvider.vb" />
|
||||
<Compile Include="Interfaces\IPluginContentProvider.vb" />
|
||||
<Compile Include="Objects\ExitException.vb" />
|
||||
<Compile Include="Objects\PluginUserMedia.vb" />
|
||||
<Compile Include="Interfaces\ISiteSettings.vb" />
|
||||
<Compile Include="ObjectInterfaces\IThrower.vb" />
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
'
|
||||
' This program is distributed in the hope that it will be useful,
|
||||
' but WITHOUT ANY WARRANTY
|
||||
Imports System.Drawing.Design
|
||||
Imports System.ComponentModel
|
||||
Imports PersonalUtilities.Tools.Grid.Attributes
|
||||
Imports PersonalUtilities.Tools.Grid.EnumObjects
|
||||
Namespace API.YouTube.Base
|
||||
Public Structure Thumbnail : Implements IIndexable, IComparable(Of Thumbnail)
|
||||
Public ID As String
|
||||
@@ -47,6 +51,14 @@ Namespace API.YouTube.Base
|
||||
Channel = 2
|
||||
PlayList = 3
|
||||
End Enum
|
||||
<Editor(GetType(EnumDropDownEditor), GetType(UITypeEditor))>
|
||||
Public Enum Protocols As Integer
|
||||
<EnumValue(ExcludeFromList:=True)>
|
||||
Undefined = -1
|
||||
Any = 0
|
||||
https = 1
|
||||
m3u8 = 2
|
||||
End Enum
|
||||
Public Structure MediaObject : Implements IIndexable, IComparable(Of MediaObject)
|
||||
Public Type As Plugin.UserMediaTypes
|
||||
Public ID As String
|
||||
@@ -58,7 +70,18 @@ Namespace API.YouTube.Base
|
||||
''' <summary>Kb</summary>
|
||||
Public Size As Double
|
||||
Public Codec As String
|
||||
Public Info As String
|
||||
Public Protocol As String
|
||||
Public ReadOnly Property ProtocolType As Protocols
|
||||
Get
|
||||
If Not Protocol.IsEmptyString Then
|
||||
Select Case Protocol.StringToLower.StringTrim
|
||||
Case "http", "https" : Return Protocols.https
|
||||
Case "m3u8" : Return Protocols.m3u8
|
||||
End Select
|
||||
End If
|
||||
Return Protocols.Undefined
|
||||
End Get
|
||||
End Property
|
||||
Public URL As String
|
||||
Public Property Index As Integer Implements IIndexable.Index
|
||||
Private Function SetIndex(ByVal Obj As Object, ByVal Index As Integer) As Object Implements IIndexable.SetIndex
|
||||
|
||||
@@ -23,17 +23,19 @@ Namespace API.YouTube.Base
|
||||
Public Shared Function IsMyUrl(ByVal URL As String) As Boolean
|
||||
Return Not Info_GetUrlType(URL) = YouTubeMediaType.Undefined
|
||||
End Function
|
||||
Public Shared Function Info_GetUrlType(ByVal URL As String, Optional ByRef IsMusic As Boolean = False,
|
||||
Public Shared Function Info_GetUrlType(ByVal URL As String, Optional ByRef IsMusic As Boolean = False, Optional ByRef IsShorts As Boolean = False,
|
||||
Optional ByRef IsChannelUser As Boolean = False, Optional ByRef Id As String = Nothing) As YouTubeMediaType
|
||||
If Not URL.IsEmptyString Then
|
||||
IsMusic = URL.Contains("music.youtube.com")
|
||||
IsChannelUser = False
|
||||
IsShorts = False
|
||||
Dim data As List(Of String) = RegexReplace(URL, RParams.DMS(UrlTypePattern, 0, RegexReturn.ListByMatch, EDP.ReturnValue))
|
||||
If data.ListExists Then
|
||||
If data.Count >= 6 Then Id = data(5)
|
||||
If data.Count >= 3 And Not data(2).IsEmptyString Then
|
||||
Select Case data(2).ToLower
|
||||
Case "watch" : Return YouTubeMediaType.Single
|
||||
Case "shorts" : IsShorts = True : Return YouTubeMediaType.Single
|
||||
Case "playlist" : Return YouTubeMediaType.PlayList
|
||||
Case UserChannelOption, "@" : IsChannelUser = data(2).ToLower = UserChannelOption : Return YouTubeMediaType.Channel
|
||||
End Select
|
||||
@@ -64,8 +66,8 @@ Namespace API.YouTube.Base
|
||||
Dim urlOrig$ = URL
|
||||
URL = RegexReplace(URL, TrueUrlRegEx)
|
||||
If URL.IsEmptyString Then Throw New ArgumentNullException("URL", $"Can't get true URL from [{urlOrig}]")
|
||||
Dim isMusic As Boolean = False
|
||||
Dim objType As YouTubeMediaType = Info_GetUrlType(URL, isMusic)
|
||||
Dim isMusic As Boolean = False, isShorts As Boolean = False
|
||||
Dim objType As YouTubeMediaType = Info_GetUrlType(URL, isMusic, isShorts)
|
||||
If Not objType = YouTubeMediaType.Undefined Then
|
||||
Dim __GetDefault As Boolean = If(GetDefault, True)
|
||||
Dim __GetShorts As Boolean = If(GetShorts, True)
|
||||
@@ -105,7 +107,7 @@ Namespace API.YouTube.Base
|
||||
|
||||
If result Then
|
||||
container.Parse(Nothing, _CachePathDefault, isMusic, Token, Progress)
|
||||
If Not container.HasError Then container.URL = URL : Return container
|
||||
If Not container.HasError Then container.URL = URL : container.IsShorts = isShorts : Return container
|
||||
End If
|
||||
container.Dispose()
|
||||
End If
|
||||
|
||||
@@ -34,13 +34,36 @@ Namespace API.YouTube.Base
|
||||
<Browsable(False)> Friend ReadOnly Property DesignXml As XmlFile
|
||||
<Browsable(False)> Private Property Mode As GridUpdateModes = GridUpdateModes.OnConfirm Implements IGridValuesContainer.Mode
|
||||
<Browsable(False), XMLVV(-1)> Friend ReadOnly Property PlaylistFormSplitterDistance As XMLValue(Of Integer)
|
||||
<Browsable(False)> Friend ReadOnly Property DownloadLocations As DownloadLocationsCollection
|
||||
#Region "Environment"
|
||||
<Browsable(True), GridVisible(False), XMLVN({"Environment"}), Category("Environment"), DisplayName("Path to yt-dlp.exe"),
|
||||
#Region "Programs"
|
||||
<Browsable(True), GridVisible(False), XMLVN({"Environment"}), Category("Environment programs"), DisplayName("Path to yt-dlp.exe"),
|
||||
Description("Path to yt-dlp.exe file")>
|
||||
Public ReadOnly Property YTDLP As XMLValue(Of SFile)
|
||||
<Browsable(True), GridVisible(False), XMLVN({"Environment"}), Category("Environment"), DisplayName("Path to ffmpeg.exe"),
|
||||
<Browsable(True), GridVisible(False), XMLVN({"Environment"}), Category("Environment programs"), DisplayName("Path to ffmpeg.exe"),
|
||||
Description("Path to ffmpeg.exe file")>
|
||||
Public ReadOnly Property FFMPEG As XMLValue(Of SFile)
|
||||
<Browsable(False)> Private ReadOnly Property ENVIR_FFMPEG As SFile Implements IDownloaderSettings.ENVIR_FFMPEG
|
||||
Get
|
||||
Return FFMPEG
|
||||
End Get
|
||||
End Property
|
||||
<Browsable(False)> Private ReadOnly Property ENVIR_YTDLP As SFile Implements IDownloaderSettings.ENVIR_YTDLP
|
||||
Get
|
||||
Return YTDLP
|
||||
End Get
|
||||
End Property
|
||||
<Browsable(False)> Private ReadOnly Property ENVIR_GDL As SFile Implements IDownloaderSettings.ENVIR_GDL
|
||||
Get
|
||||
Return Nothing
|
||||
End Get
|
||||
End Property
|
||||
<Browsable(False)> Private ReadOnly Property ENVIR_CURL As SFile Implements IDownloaderSettings.ENVIR_CURL
|
||||
Get
|
||||
Return Nothing
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
<Browsable(True), GridVisible(False), Category("Environment"), Description("YouTube cookies"), GridCollectionForm(GetType(CookieListForm2)),
|
||||
EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Content)>
|
||||
Public ReadOnly Property Cookies As CookieKeeper
|
||||
@@ -62,6 +85,22 @@ Namespace API.YouTube.Base
|
||||
<Browsable(True), GridVisible(False), XMLVN({"Environment"}), Category("Environment"), DisplayName("Output path auto change"),
|
||||
Description("Automatically change the output path when a new destination is selected in the opening forms.")>
|
||||
Public ReadOnly Property OutputPathAutoChange As XMLValue(Of Boolean)
|
||||
<Browsable(True), GridVisible(False), XMLVN({"Environment"}, True), Category("Environment"), DisplayName("Output path: ask for a name"),
|
||||
Description("Ask for a name when adding a new output path to the list.")>
|
||||
Public ReadOnly Property OutputPathAskForName As XMLValue(Of Boolean)
|
||||
Private ReadOnly Property IDownloaderSettings_OutputPathAskForName As Boolean Implements IDownloaderSettings.OutputPathAskForName
|
||||
Get
|
||||
Return OutputPathAskForName
|
||||
End Get
|
||||
End Property
|
||||
<Browsable(True), GridVisible(False), XMLVN({"Environment"}, True), Category("Environment"), DisplayName("Output path: auto add"),
|
||||
Description("Add new paths to the list automatically.")>
|
||||
Public ReadOnly Property OutputPathAutoAddPaths As XMLValue(Of Boolean)
|
||||
Private ReadOnly Property IDownloaderSettings_OutputPathAutoAddPaths As Boolean Implements IDownloaderSettings.OutputPathAutoAddPaths
|
||||
Get
|
||||
Return OutputPathAutoAddPaths
|
||||
End Get
|
||||
End Property
|
||||
<Browsable(True), GridVisible(False), XMLVN({"Environment"}, DoubleClickBehavior.Folder), Category("Environment"), DisplayName("On item double click"),
|
||||
Description("What should program open when you double-click on an item...")>
|
||||
Public ReadOnly Property OnItemDoubleClick As XMLValue(Of DoubleClickBehavior)
|
||||
@@ -100,6 +139,9 @@ Namespace API.YouTube.Base
|
||||
<Browsable(True), GridVisible, XMLVN({"Defaults"}), Category("Defaults"), DisplayName("Use cookies"),
|
||||
Description("By default, use cookies when downloading from YouTube.")>
|
||||
Public ReadOnly Property DefaultUseCookies As XMLValue(Of Boolean)
|
||||
<Browsable(True), GridVisible, XMLVN({"Defaults"}, Protocols.Any), Category("Defaults"), DisplayName("Protocol"),
|
||||
Description("Priority download protocol. Default: 'Any'")>
|
||||
Public ReadOnly Property DefaultProtocol As XMLValue(Of Protocols)
|
||||
<Browsable(True), GridVisible(False), XMLVN({"Defaults"}), Category("Defaults"),
|
||||
DisplayName("Auto remove"), Description("Automatically remove downloaded items from the list.")>
|
||||
Public ReadOnly Property RemoveDownloadedAutomatically As XMLValue(Of Boolean)
|
||||
@@ -152,6 +194,15 @@ Namespace API.YouTube.Base
|
||||
<Browsable(True), GridVisible(False), XMLVN({"Defaults"}, False), Category("Defaults"), DisplayName("Confirm exit"),
|
||||
Description("Exit confirmation when closing the program.")>
|
||||
Public ReadOnly Property ExitConfirm As XMLValue(Of Boolean)
|
||||
<Browsable(True), GridVisible(False), XMLVN({"Defaults"}), Category("Defaults"), DisplayName("Download on click in tray: show form"),
|
||||
Description("Show main window when download by clicking (Ctrl+Click) the tray icon. Default: false")>
|
||||
Public ReadOnly Property ShowFormDownTrayClick As XMLValue(Of Boolean)
|
||||
<Browsable(True), GridVisible(False), XMLVN({"Defaults"}), Category("Defaults"), DisplayName("Program title"),
|
||||
Description("Change the title of the main window if you need to")>
|
||||
Friend ReadOnly Property ProgramText As XMLValue(Of String)
|
||||
<Browsable(True), GridVisible(False), XMLVN({"Defaults"}), Category("Defaults"), DisplayName("Program description"),
|
||||
Description("Add some additional info to the program info if you need")>
|
||||
Friend ReadOnly Property ProgramDescription As XMLValue(Of String)
|
||||
#End Region
|
||||
#Region "Defaults Video"
|
||||
<Browsable(True), GridVisible, XMLVN({"DefaultsVideo"}, "MKV"), Category("Defaults Video"), DisplayName("Default format"),
|
||||
@@ -164,6 +215,9 @@ Namespace API.YouTube.Base
|
||||
<Browsable(True), GridVisible, XMLVN({"DefaultsVideo"}, 1080), Category("Defaults Video"), DisplayName("Default definition"),
|
||||
Description("The default maximum video resolution. -1 for max definition")>
|
||||
Public ReadOnly Property DefaultVideoDefinition As XMLValue(Of Integer)
|
||||
<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)
|
||||
#End Region
|
||||
#Region "Defaults Audio"
|
||||
<Browsable(True), GridVisible, XMLVN({"DefaultsAudio"}, "AAC"), Category("Defaults Audio"), DisplayName("Default codec"),
|
||||
@@ -230,6 +284,8 @@ Namespace API.YouTube.Base
|
||||
#End Region
|
||||
#Region "Initializer"
|
||||
Public Sub New()
|
||||
DownloadLocations = New DownloadLocationsCollection
|
||||
DownloadLocations.Load(False, True)
|
||||
XML = New XmlFile(YouTubeSettingsFile,, False) With {.AutoUpdateFile = True}
|
||||
XML.LoadData(EDP.None)
|
||||
DesignXml = New XmlFile("Settings\DesignDownloader.xml", Protector.Modes.All, False)
|
||||
|
||||
BIN
SCrawler.YouTube/Content/Pictures/MailPic_16.png
Normal file
|
After Width: | Height: | Size: 209 B |
@@ -41,6 +41,10 @@ Namespace API.YouTube.Controls
|
||||
Dim ActionButton6 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim ActionButton7 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim ActionButton8 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim ActionButton9 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim ActionButton10 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim ListColumn1 As PersonalUtilities.Forms.Controls.Base.ListColumn = New PersonalUtilities.Forms.Controls.Base.ListColumn()
|
||||
Dim ListColumn2 As PersonalUtilities.Forms.Controls.Base.ListColumn = New PersonalUtilities.Forms.Controls.Base.ListColumn()
|
||||
Dim TT_MAIN As System.Windows.Forms.ToolTip
|
||||
Me.BTT_DOWN = New System.Windows.Forms.Button()
|
||||
Me.BTT_CANCEL = New System.Windows.Forms.Button()
|
||||
@@ -53,7 +57,7 @@ Namespace API.YouTube.Controls
|
||||
Me.CMB_FORMATS = New System.Windows.Forms.ComboBox()
|
||||
Me.TXT_SUBS = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.CH_DOWN_LYRICS = New System.Windows.Forms.CheckBox()
|
||||
Me.TXT_OUTPUT_PATH = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.TXT_OUTPUT_PATH = New PersonalUtilities.Forms.Controls.ComboBoxExtended()
|
||||
TP_MAIN = New System.Windows.Forms.TableLayoutPanel()
|
||||
TP_BUTTONS = New System.Windows.Forms.TableLayoutPanel()
|
||||
TP_PLS = New System.Windows.Forms.TableLayoutPanel()
|
||||
@@ -408,18 +412,41 @@ Namespace API.YouTube.Controls
|
||||
ActionButton7.BackgroundImage = CType(resources.GetObject("ActionButton7.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton7.Name = "Open"
|
||||
ActionButton7.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Open
|
||||
ActionButton7.ToolTipText = "Choose a new location (Ctrl+O)"
|
||||
ActionButton8.BackgroundImage = CType(resources.GetObject("ActionButton8.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton8.Name = "Clear"
|
||||
ActionButton8.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Clear
|
||||
ActionButton8.Name = "Add"
|
||||
ActionButton8.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Add
|
||||
ActionButton8.ToolTipText = "Choose a new location and add it to the list (Alt+O)"
|
||||
ActionButton9.BackgroundImage = CType(resources.GetObject("ActionButton9.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton9.Name = "Clear"
|
||||
ActionButton9.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Clear
|
||||
ActionButton10.BackgroundImage = CType(resources.GetObject("ActionButton10.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton10.Name = "ArrowDown"
|
||||
ActionButton10.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.ArrowDown
|
||||
Me.TXT_OUTPUT_PATH.Buttons.Add(ActionButton7)
|
||||
Me.TXT_OUTPUT_PATH.Buttons.Add(ActionButton8)
|
||||
Me.TXT_OUTPUT_PATH.Buttons.Add(ActionButton9)
|
||||
Me.TXT_OUTPUT_PATH.Buttons.Add(ActionButton10)
|
||||
Me.TXT_OUTPUT_PATH.CaptionMode = PersonalUtilities.Forms.Controls.Base.ICaptionControl.Modes.Label
|
||||
Me.TXT_OUTPUT_PATH.CaptionText = "Output path"
|
||||
Me.TXT_OUTPUT_PATH.CaptionVisible = True
|
||||
Me.TXT_OUTPUT_PATH.CaptionWidth = 112.0R
|
||||
ListColumn1.Name = "COL_NAME"
|
||||
ListColumn1.Text = "Name"
|
||||
ListColumn1.Width = -1
|
||||
ListColumn2.DisplayMember = True
|
||||
ListColumn2.Name = "COL_VALUE"
|
||||
ListColumn2.Text = "Value"
|
||||
ListColumn2.ValueMember = True
|
||||
ListColumn2.Visible = False
|
||||
Me.TXT_OUTPUT_PATH.Columns.Add(ListColumn1)
|
||||
Me.TXT_OUTPUT_PATH.Columns.Add(ListColumn2)
|
||||
Me.TXT_OUTPUT_PATH.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TXT_OUTPUT_PATH.Location = New System.Drawing.Point(3, 59)
|
||||
Me.TXT_OUTPUT_PATH.Name = "TXT_OUTPUT_PATH"
|
||||
Me.TXT_OUTPUT_PATH.Size = New System.Drawing.Size(428, 22)
|
||||
Me.TXT_OUTPUT_PATH.TabIndex = 2
|
||||
Me.TXT_OUTPUT_PATH.TextBoxBorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
'
|
||||
'MusicPlaylistsForm
|
||||
'
|
||||
@@ -464,6 +491,6 @@ Namespace API.YouTube.Controls
|
||||
Private WithEvents CMB_FORMATS As ComboBox
|
||||
Private WithEvents SPLITTER_MAIN As SplitContainer
|
||||
Private WithEvents CH_DOWN_LYRICS As CheckBox
|
||||
Private WithEvents TXT_OUTPUT_PATH As PersonalUtilities.Forms.Controls.TextBoxExtended
|
||||
Private WithEvents TXT_OUTPUT_PATH As PersonalUtilities.Forms.Controls.ComboBoxExtended
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -233,11 +233,123 @@
|
||||
</value>
|
||||
</data>
|
||||
<data name="ActionButton8.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
|
||||
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsTAAALEwEAmpwYAAADmUlE
|
||||
QVRIS62WWWxMURjHL220JW1HausmlFrDFKUhnUGH6bRFzJ2idImlC0Vp2mlji1A8iNhCPIjIRES8EU+W
|
||||
h2oEtbSDTk3HNNM7S01VKsXjkb/vXBo3k1Ee7sMvmZzzzf//ne/+z50RAAxL1MUIG4G/YAv3HSVhF5Vw
|
||||
IYNdz3LadVj9RgdTB+HQYYPHIJuE1ocSdlEJFzG+1bPRLQLinglIeCkg+XUkKvz56hnkOfQs/rmA8S9H
|
||||
YEp7FDI64tAQtKhnsMapZ7zzNHsUFnbGY4VzIk70l6hnIH4wsDR7NBZ3apDrSqL5T8eFgUr1DLZ78lim
|
||||
Q4N8VzK29MxEpZSBa4M16hnU+c3M9CEFpdJsVHsXos63DDcHrf9nQEXD5VymwW/5USLNwl5vJhp7dTgW
|
||||
NML2pR7jbsUMS+KdMTa5Q8NQxinfBU4dRFcOyjy52OtbhwOBDTgZLKPPmTgY0ON4MBdNfSbYBupxY8Aq
|
||||
G10dqMG5/nIc7ytGQ6CQRliAamkTN/g1Ai4e95Qy3iogpX0UtBRDnhRzdxq2SXOxz5eFQ70rScCEU335
|
||||
ssGxj0YS06HSm4GN3ekwdE2C1hGH1LZR0JDOJof5jwHvnIvzTa0jlooTYfktvt+fhcOBHDQFTWRgxJGP
|
||||
ObAGsulZLMLWnjlY756K5c4JmNcRi6T2SGheCIihS2l5ozAo6NRhMolnUAcGV6IcwwqvFrX+JTjYuwKH
|
||||
SfRAYDms/mzs9y1GFe2VSnOw1j0FejqpLN4WCX4ZufiIBwLMLxQGm12rsLQzgWKYgmLPLNTQw6ynpDSS
|
||||
IBet8y+TqaVRVdFIeJrWuCcj+/0EzH43BomvIhBLI45uFiDcJ+6QwROFwa6+Amb9bGFNg6Xs9Ncd7Oy3
|
||||
Knb2eyU7/20nu9y/m136tIvEl6BC0qKoZwby3alo9JVhj7T5R7m/kJVIIityi8zyXmTiW+I10SqyIQNb
|
||||
uIgNwYuuf25kFd75KPKkI49OmUWnrfYWyXv/wBb2cijhhVf6a9lGei65XclYRDd6mj0GWz2iLBJaH0rY
|
||||
RSVc5Eywmhm7kuQXHX+bJlBStrh+zTi0PpSwi0q4yNFAOVvgiEcKJWUsxZn/NhT+znlofShhF5VwkRpv
|
||||
MUtti4KGYjj6sYCIh5QSu4oG27stjItHU+cjeQzvkcFzFQ2KnSKLoc4FukDCXeI2GbSoaFD4ziyPxNxK
|
||||
0AUyNxOP1DOwcaG/8I+/LRB+At7psBnyDBG0AAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="ActionButton9.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
xAAADsQBlSsOGwAAAIZJREFUOE+1j10KwCAMgz2b755xl/IsvnaL2K20UfbDAmEako+ZROSTafjE12Go
|
||||
tbbB43rK5xSAQq1VYFtmeQBoqZTSreVZvgTknM8yyyjA/qodsDF9gspD2Bj6B+DH+NqzhQQAG+POMnSX
|
||||
AFuc5QFgn6ClHh5iOQVAKNixyucB8NY0vG9JOzzyhrdq5IRgAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="ActionButton10.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
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Crawler.API.YouTube.Objects
|
||||
Imports SCrawler.DownloadObjects.STDownloader
|
||||
Imports PersonalUtilities.Forms
|
||||
Imports PersonalUtilities.Forms.Controls
|
||||
Imports PersonalUtilities.Forms.Controls.Base
|
||||
@@ -50,6 +51,8 @@ Namespace API.YouTube.Controls
|
||||
MyView.SetFormSize()
|
||||
End If
|
||||
|
||||
MyYouTubeSettings.DownloadLocations.PopulateComboBox(TXT_OUTPUT_PATH)
|
||||
|
||||
CMB_FORMATS.Items.AddRange(AvailableAudioFormats)
|
||||
If MyYouTubeSettings.PlaylistFormSplitterDistance > 0 Then SPLITTER_MAIN.SplitterDistancePercentageSet(MyYouTubeSettings.PlaylistFormSplitterDistance)
|
||||
|
||||
@@ -102,6 +105,17 @@ Namespace API.YouTube.Controls
|
||||
MyYouTubeSettings.PlaylistFormSplitterDistance.Value = SPLITTER_MAIN.SplitterDistancePercentageGet
|
||||
MyView.DisposeIfReady()
|
||||
End Sub
|
||||
Private Sub MusicPlaylistsForm_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown
|
||||
Dim b As Boolean = True
|
||||
If e.KeyCode = Keys.O And e.Control Then
|
||||
MyYouTubeSettings.DownloadLocations.ChooseNewLocation(TXT_OUTPUT_PATH, False, MyDownloaderSettings.OutputPathAskForName)
|
||||
ElseIf e.KeyCode = Keys.O And e.Alt Then
|
||||
MyYouTubeSettings.DownloadLocations.ChooseNewLocation(TXT_OUTPUT_PATH, True, MyDownloaderSettings.OutputPathAskForName)
|
||||
Else
|
||||
b = False
|
||||
End If
|
||||
If b Then e.Handled = True
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Form text"
|
||||
Private _InitialFormText As String = String.Empty
|
||||
@@ -159,10 +173,8 @@ Namespace API.YouTube.Controls
|
||||
End With
|
||||
End Sub
|
||||
Private Sub TXT_OUTPUT_PATH_ActionOnButtonClick(ByVal Sender As ActionButton, ByVal e As ActionButtonEventArgs) Handles TXT_OUTPUT_PATH.ActionOnButtonClick
|
||||
If Sender.DefaultButton = ADB.Open Then
|
||||
Dim f As SFile = SFile.SelectPath(TXT_OUTPUT_PATH.Text, "Select files destination", EDP.ReturnValue)
|
||||
If Not f.IsEmptyString Then TXT_OUTPUT_PATH.Text = f
|
||||
End If
|
||||
If Sender.DefaultButton = ADB.Open Or Sender.DefaultButton = ADB.Add Then _
|
||||
MyYouTubeSettings.DownloadLocations.ChooseNewLocation(TXT_OUTPUT_PATH, Sender.DefaultButton = ADB.Add, MyDownloaderSettings.OutputPathAskForName)
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Lists' handlers"
|
||||
@@ -256,6 +268,7 @@ Namespace API.YouTube.Controls
|
||||
If Not TXT_FORMATS_ADDIT.Checked Then .PostProcessing_OutputAudioFormats.Clear()
|
||||
.File = TXT_OUTPUT_PATH.Text.CSFileP
|
||||
If MyYouTubeSettings.OutputPathAutoChange Then MyYouTubeSettings.OutputPath.Value = .File
|
||||
If MyDownloaderSettings.OutputPathAutoAddPaths Then MyYouTubeSettings.DownloadLocations.Add(.File, False)
|
||||
End With
|
||||
DialogResult = DialogResult.OK
|
||||
Close()
|
||||
|
||||
@@ -82,7 +82,6 @@ Namespace API.YouTube.Controls
|
||||
Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
||||
Me.Text = "Parsing progress"
|
||||
Me.TopMost = True
|
||||
TP_MAIN.ResumeLayout(False)
|
||||
TP_MAIN.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
@@ -17,9 +17,27 @@ Namespace API.YouTube.Controls
|
||||
Return TokenSource.Token
|
||||
End Get
|
||||
End Property
|
||||
Public Sub New()
|
||||
Private ReadOnly CountMax As Integer
|
||||
Private CountCurrent As Integer = 1
|
||||
Friend Sub NextPlaylist()
|
||||
CountCurrent += 1
|
||||
MyProgress.InformationTemporary(True) = InfoStr
|
||||
MyProgress.Information = InfoStr
|
||||
End Sub
|
||||
Private ReadOnly Property InfoStr As String
|
||||
Get
|
||||
Const MainMsg$ = "Data parsing in progress"
|
||||
If CountMax > 1 Then
|
||||
Return $"{MainMsg} [{CountCurrent - 1}/{CountMax}]"
|
||||
Else
|
||||
Return MainMsg
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
Public Sub New(Optional ByVal _Count As Integer = 1)
|
||||
InitializeComponent()
|
||||
MyProgress = New MyProgress(PR_MAIN, LBL_MAIN, "Data parsing in progress") With {.ResetProgressOnMaximumChanges = False}
|
||||
CountMax = _Count
|
||||
MyProgress = New MyProgress(PR_MAIN, LBL_MAIN, InfoStr) With {.ResetProgressOnMaximumChanges = False}
|
||||
TokenSource = New CancellationTokenSource
|
||||
End Sub
|
||||
Public Sub SetInitialValues(ByVal Count As Integer, ByVal Info As String)
|
||||
|
||||
@@ -52,6 +52,7 @@ Namespace API.YouTube.Controls
|
||||
End If
|
||||
LBL_DEFINITION.Text = $"{m.Height}p"
|
||||
LBL_CODECS.Text = $"{m.Extension.StringToUpper}{d}{m.Codec.StringToUpper}{d}{m.FPS}fps{d}{m.Bitrate}k"
|
||||
If Not m.Protocol.IsEmptyString Then LBL_CODECS.Text &= $" ({m.Protocol})"
|
||||
If Not SelectedAudio.ID.IsEmptyString Then LBL_CODECS.Text &= $" / {SelectedAudio.Extension}{d}{SelectedAudio.Codec}{d}{SelectedAudio.Bitrate}k"
|
||||
End If
|
||||
|
||||
|
||||
107
SCrawler.YouTube/Controls/VideoOptionsForm.Designer.vb
generated
@@ -29,6 +29,10 @@ Namespace API.YouTube.Controls
|
||||
Dim ICON_LINK As System.Windows.Forms.PictureBox
|
||||
Dim TP_FOOTER As System.Windows.Forms.TableLayoutPanel
|
||||
Dim TP_DESTINATION As System.Windows.Forms.TableLayoutPanel
|
||||
Dim ActionButton1 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(VideoOptionsForm))
|
||||
Dim ListColumn1 As PersonalUtilities.Forms.Controls.Base.ListColumn = New PersonalUtilities.Forms.Controls.Base.ListColumn()
|
||||
Dim ListColumn2 As PersonalUtilities.Forms.Controls.Base.ListColumn = New PersonalUtilities.Forms.Controls.Base.ListColumn()
|
||||
Dim TP_OK_CANCEL As System.Windows.Forms.TableLayoutPanel
|
||||
Dim LB_SEP_1 As System.Windows.Forms.Label
|
||||
Dim LB_SEP_2 As System.Windows.Forms.Label
|
||||
@@ -37,8 +41,6 @@ Namespace API.YouTube.Controls
|
||||
Dim LBL_FORMAT As System.Windows.Forms.Label
|
||||
Dim LBL_SUBS_FORMAT As System.Windows.Forms.Label
|
||||
Dim TT_MAIN As System.Windows.Forms.ToolTip
|
||||
Dim ActionButton1 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(VideoOptionsForm))
|
||||
Dim ActionButton2 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim ActionButton3 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim ActionButton4 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
@@ -47,12 +49,13 @@ Namespace API.YouTube.Controls
|
||||
Dim ActionButton7 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim ActionButton8 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim ActionButton9 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim ActionButton10 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Me.ICON_VIDEO = New System.Windows.Forms.PictureBox()
|
||||
Me.LBL_TITLE = New System.Windows.Forms.Label()
|
||||
Me.TP_HEADER_INFO_2 = New System.Windows.Forms.TableLayoutPanel()
|
||||
Me.LBL_TIME = New System.Windows.Forms.Label()
|
||||
Me.LBL_URL = New System.Windows.Forms.LinkLabel()
|
||||
Me.TXT_FILE = New System.Windows.Forms.TextBox()
|
||||
Me.TXT_FILE = New PersonalUtilities.Forms.Controls.ComboBoxExtended()
|
||||
Me.BTT_BROWSE = New System.Windows.Forms.Button()
|
||||
Me.BTT_DOWN = New System.Windows.Forms.Button()
|
||||
Me.BTT_CANCEL = New System.Windows.Forms.Button()
|
||||
@@ -93,6 +96,7 @@ Namespace API.YouTube.Controls
|
||||
CType(ICON_LINK, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
TP_FOOTER.SuspendLayout()
|
||||
TP_DESTINATION.SuspendLayout()
|
||||
CType(Me.TXT_FILE, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
TP_OK_CANCEL.SuspendLayout()
|
||||
TP_WHAT.SuspendLayout()
|
||||
Me.TP_HEADER_BASE.SuspendLayout()
|
||||
@@ -267,12 +271,27 @@ Namespace API.YouTube.Controls
|
||||
'
|
||||
'TXT_FILE
|
||||
'
|
||||
ActionButton1.BackgroundImage = CType(resources.GetObject("ActionButton1.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton1.Name = "ArrowDown"
|
||||
ActionButton1.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.ArrowDown
|
||||
Me.TXT_FILE.Buttons.Add(ActionButton1)
|
||||
ListColumn1.Name = "COL_NAME"
|
||||
ListColumn1.Text = "Name"
|
||||
ListColumn1.Width = -1
|
||||
ListColumn2.DisplayMember = True
|
||||
ListColumn2.Name = "COL_VALUE"
|
||||
ListColumn2.Text = "Value"
|
||||
ListColumn2.ValueMember = True
|
||||
ListColumn2.Visible = False
|
||||
Me.TXT_FILE.Columns.Add(ListColumn1)
|
||||
Me.TXT_FILE.Columns.Add(ListColumn2)
|
||||
Me.TXT_FILE.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TXT_FILE.Location = New System.Drawing.Point(3, 3)
|
||||
Me.TXT_FILE.Location = New System.Drawing.Point(1, 1)
|
||||
Me.TXT_FILE.Margin = New System.Windows.Forms.Padding(1)
|
||||
Me.TXT_FILE.Name = "TXT_FILE"
|
||||
Me.TXT_FILE.Size = New System.Drawing.Size(503, 20)
|
||||
Me.TXT_FILE.Size = New System.Drawing.Size(507, 22)
|
||||
Me.TXT_FILE.TabIndex = 0
|
||||
Me.TXT_FILE.WordWrap = False
|
||||
Me.TXT_FILE.TextBoxBorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
'
|
||||
'BTT_BROWSE
|
||||
'
|
||||
@@ -283,7 +302,7 @@ Namespace API.YouTube.Controls
|
||||
Me.BTT_BROWSE.Size = New System.Drawing.Size(74, 22)
|
||||
Me.BTT_BROWSE.TabIndex = 1
|
||||
Me.BTT_BROWSE.Text = "Browse"
|
||||
TT_MAIN.SetToolTip(Me.BTT_BROWSE, "Choose an output file")
|
||||
TT_MAIN.SetToolTip(Me.BTT_BROWSE, "Choose an output file (Right click for add a new location to the list)")
|
||||
Me.BTT_BROWSE.UseVisualStyleBackColor = True
|
||||
'
|
||||
'TP_OK_CANCEL
|
||||
@@ -473,21 +492,21 @@ Namespace API.YouTube.Controls
|
||||
'
|
||||
'TXT_SUBS
|
||||
'
|
||||
ActionButton1.BackgroundImage = CType(resources.GetObject("ActionButton1.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton1.Name = "Open"
|
||||
ActionButton1.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Open
|
||||
ActionButton1.ToolTipText = "Choose subtitles"
|
||||
ActionButton2.BackgroundImage = CType(resources.GetObject("ActionButton2.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton2.Name = "Refresh"
|
||||
ActionButton2.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Refresh
|
||||
ActionButton2.ToolTipText = "Reset subtitles to initial selected"
|
||||
ActionButton2.Name = "Open"
|
||||
ActionButton2.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Open
|
||||
ActionButton2.ToolTipText = "Choose subtitles"
|
||||
ActionButton3.BackgroundImage = CType(resources.GetObject("ActionButton3.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton3.Name = "Clear"
|
||||
ActionButton3.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Clear
|
||||
ActionButton3.ToolTipText = "Clear subtitles selection (don't download subtitles)"
|
||||
Me.TXT_SUBS.Buttons.Add(ActionButton1)
|
||||
ActionButton3.Name = "Refresh"
|
||||
ActionButton3.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Refresh
|
||||
ActionButton3.ToolTipText = "Reset subtitles to initial selected"
|
||||
ActionButton4.BackgroundImage = CType(resources.GetObject("ActionButton4.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton4.Name = "Clear"
|
||||
ActionButton4.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Clear
|
||||
ActionButton4.ToolTipText = "Clear subtitles selection (don't download subtitles)"
|
||||
Me.TXT_SUBS.Buttons.Add(ActionButton2)
|
||||
Me.TXT_SUBS.Buttons.Add(ActionButton3)
|
||||
Me.TXT_SUBS.Buttons.Add(ActionButton4)
|
||||
Me.TXT_SUBS.CaptionText = "Subtitles"
|
||||
Me.TXT_SUBS.CaptionToolTipEnabled = True
|
||||
Me.TXT_SUBS.CaptionToolTipText = "The selected subtitles will also be downloaded"
|
||||
@@ -611,24 +630,24 @@ Namespace API.YouTube.Controls
|
||||
'
|
||||
'TXT_SUBS_ADDIT
|
||||
'
|
||||
ActionButton4.BackgroundImage = CType(resources.GetObject("ActionButton4.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton4.Enabled = False
|
||||
ActionButton4.Name = "Open"
|
||||
ActionButton4.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Open
|
||||
ActionButton4.ToolTipText = "Choose additional formats"
|
||||
ActionButton5.BackgroundImage = CType(resources.GetObject("ActionButton5.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton5.Enabled = False
|
||||
ActionButton5.Name = "Refresh"
|
||||
ActionButton5.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Refresh
|
||||
ActionButton5.ToolTipText = "Fill in additional formats from the defaults"
|
||||
ActionButton5.Name = "Open"
|
||||
ActionButton5.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Open
|
||||
ActionButton5.ToolTipText = "Choose additional formats"
|
||||
ActionButton6.BackgroundImage = CType(resources.GetObject("ActionButton6.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton6.Enabled = False
|
||||
ActionButton6.Name = "Clear"
|
||||
ActionButton6.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Clear
|
||||
ActionButton6.ToolTipText = "Remove all additional formats"
|
||||
Me.TXT_SUBS_ADDIT.Buttons.Add(ActionButton4)
|
||||
ActionButton6.Name = "Refresh"
|
||||
ActionButton6.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Refresh
|
||||
ActionButton6.ToolTipText = "Fill in additional formats from the defaults"
|
||||
ActionButton7.BackgroundImage = CType(resources.GetObject("ActionButton7.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton7.Enabled = False
|
||||
ActionButton7.Name = "Clear"
|
||||
ActionButton7.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Clear
|
||||
ActionButton7.ToolTipText = "Remove all additional formats"
|
||||
Me.TXT_SUBS_ADDIT.Buttons.Add(ActionButton5)
|
||||
Me.TXT_SUBS_ADDIT.Buttons.Add(ActionButton6)
|
||||
Me.TXT_SUBS_ADDIT.Buttons.Add(ActionButton7)
|
||||
Me.TXT_SUBS_ADDIT.CaptionMode = PersonalUtilities.Forms.Controls.Base.ICaptionControl.Modes.CheckBox
|
||||
Me.TXT_SUBS_ADDIT.CaptionText = "Additional subtitle formats"
|
||||
Me.TXT_SUBS_ADDIT.CaptionToolTipEnabled = True
|
||||
@@ -646,24 +665,24 @@ Namespace API.YouTube.Controls
|
||||
'
|
||||
'TXT_EXTRA_AUDIO_FORMATS
|
||||
'
|
||||
ActionButton7.BackgroundImage = CType(resources.GetObject("ActionButton7.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton7.Enabled = False
|
||||
ActionButton7.Name = "Open"
|
||||
ActionButton7.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Open
|
||||
ActionButton7.ToolTipText = "Choose additional formats"
|
||||
ActionButton8.BackgroundImage = CType(resources.GetObject("ActionButton8.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton8.Enabled = False
|
||||
ActionButton8.Name = "Refresh"
|
||||
ActionButton8.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Refresh
|
||||
ActionButton8.ToolTipText = "Fill in additional formats from the defaults"
|
||||
ActionButton8.Name = "Open"
|
||||
ActionButton8.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Open
|
||||
ActionButton8.ToolTipText = "Choose additional formats"
|
||||
ActionButton9.BackgroundImage = CType(resources.GetObject("ActionButton9.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton9.Enabled = False
|
||||
ActionButton9.Name = "Clear"
|
||||
ActionButton9.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Clear
|
||||
ActionButton9.ToolTipText = "Choose additional formats"
|
||||
Me.TXT_EXTRA_AUDIO_FORMATS.Buttons.Add(ActionButton7)
|
||||
ActionButton9.Name = "Refresh"
|
||||
ActionButton9.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Refresh
|
||||
ActionButton9.ToolTipText = "Fill in additional formats from the defaults"
|
||||
ActionButton10.BackgroundImage = CType(resources.GetObject("ActionButton10.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton10.Enabled = False
|
||||
ActionButton10.Name = "Clear"
|
||||
ActionButton10.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Clear
|
||||
ActionButton10.ToolTipText = "Choose additional formats"
|
||||
Me.TXT_EXTRA_AUDIO_FORMATS.Buttons.Add(ActionButton8)
|
||||
Me.TXT_EXTRA_AUDIO_FORMATS.Buttons.Add(ActionButton9)
|
||||
Me.TXT_EXTRA_AUDIO_FORMATS.Buttons.Add(ActionButton10)
|
||||
Me.TXT_EXTRA_AUDIO_FORMATS.CaptionMode = PersonalUtilities.Forms.Controls.Base.ICaptionControl.Modes.CheckBox
|
||||
Me.TXT_EXTRA_AUDIO_FORMATS.CaptionText = "Additional audio formats"
|
||||
Me.TXT_EXTRA_AUDIO_FORMATS.CaptionToolTipEnabled = True
|
||||
@@ -704,7 +723,7 @@ Namespace API.YouTube.Controls
|
||||
CType(ICON_LINK, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
TP_FOOTER.ResumeLayout(False)
|
||||
TP_DESTINATION.ResumeLayout(False)
|
||||
TP_DESTINATION.PerformLayout()
|
||||
CType(Me.TXT_FILE, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
TP_OK_CANCEL.ResumeLayout(False)
|
||||
TP_WHAT.ResumeLayout(False)
|
||||
TP_WHAT.PerformLayout()
|
||||
@@ -740,7 +759,7 @@ Namespace API.YouTube.Controls
|
||||
Private WithEvents CMB_SUBS_FORMAT As ComboBox
|
||||
Private WithEvents TXT_SUBS_ADDIT As PersonalUtilities.Forms.Controls.TextBoxExtended
|
||||
Private WithEvents TXT_EXTRA_AUDIO_FORMATS As PersonalUtilities.Forms.Controls.TextBoxExtended
|
||||
Private WithEvents TXT_FILE As TextBox
|
||||
Private WithEvents TXT_FILE As PersonalUtilities.Forms.Controls.ComboBoxExtended
|
||||
Private WithEvents BTT_BROWSE As Button
|
||||
Private WithEvents BTT_DOWN As Button
|
||||
Private WithEvents BTT_CANCEL As Button
|
||||
|
||||
@@ -135,6 +135,97 @@
|
||||
<metadata name="TP_DESTINATION.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="ActionButton1.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABGdBTUEAALGPC/xhBQAAE65JREFUeF7t
|
||||
3X2sJWddB/DdLi2lQG2hdOHuvfM887J7Cxca4ELTQMDWKigIFpBAEAgi9g+CJpJo9Q8NJhgBiYZIYspL
|
||||
GlAKCkhEC4KgQlsLQkqhKi/lrYWWlxaw3dLddrerz/Q89+7dc2fbfTn3npf5fJJv2rS758z85nnOzJz5
|
||||
nZktAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6LEtW/4flgYiLD1qeX0A
|
||||
AAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="TT_MAIN.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
@@ -162,8 +253,7 @@
|
||||
<metadata name="LBL_SUBS_FORMAT.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="ActionButton1.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<data name="ActionButton2.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAAR5JREFUOE+VkjFqwzAUhn2D9iShRyi+QhYbGujg3ZATZPKYdC6FQhPwlAMkg3dP
|
||||
@@ -174,7 +264,7 @@
|
||||
cMaRN0UdBBkAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="ActionButton2.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<data name="ActionButton3.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
|
||||
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsTAAALEwEAmpwYAAACOElE
|
||||
@@ -188,17 +278,17 @@
|
||||
HhQDmFjYeHVKFp7WX/Xuv9Kq9/+Vd/z7r7rv/3+l7f//y676DEwDN/9L+BVvYkKLCTgDhNkkVUyVlr74
|
||||
qbbz73/VOTc/qsy89kWx+9h7qbQpJwS1bbOAscGGrB6EUTggLOqf16C55ft/HlnNAFZOXgVWdi4FRgYG
|
||||
VnR1MIwhwMTCyqEQ37qEmZVDFF0OE/9nAACtFF4Ey6OP+wAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="ActionButton3.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
xAAADsQBlSsOGwAAAIZJREFUOE+1j10KwCAMgz2b755xl/IsvnaL2K20UfbDAmEako+ZROSTafjE12Go
|
||||
tbbB43rK5xSAQq1VYFtmeQBoqZTSreVZvgTknM8yyyjA/qodsDF9gspD2Bj6B+DH+NqzhQQAG+POMnSX
|
||||
AFuc5QFgn6ClHh5iOQVAKNixyucB8NY0vG9JOzzyhrdq5IRgAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="ActionButton4.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
xAAADsQBlSsOGwAAAIZJREFUOE+1j10KwCAMgz2b755xl/IsvnaL2K20UfbDAmEako+ZROSTafjE12Go
|
||||
tbbB43rK5xSAQq1VYFtmeQBoqZTSreVZvgTknM8yyyjA/qodsDF9gspD2Bj6B+DH+NqzhQQAG+POMnSX
|
||||
AFuc5QFgn6ClHh5iOQVAKNixyucB8NY0vG9JOzzyhrdq5IRgAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="ActionButton5.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAAR5JREFUOE+VkjFqwzAUhn2D9iShRyi+QhYbGujg3ZATZPKYdC6FQhPwlAMkg3dP
|
||||
@@ -209,7 +299,7 @@
|
||||
cMaRN0UdBBkAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="ActionButton5.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<data name="ActionButton6.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
|
||||
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsTAAALEwEAmpwYAAACOElE
|
||||
@@ -225,7 +315,7 @@
|
||||
VnR1MIwhwMTCyqEQ37qEmZVDFF0OE/9nAACtFF4Ey6OP+wAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="ActionButton6.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<data name="ActionButton7.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
xAAADsQBlSsOGwAAAIZJREFUOE+1j10KwCAMgz2b755xl/IsvnaL2K20UfbDAmEako+ZROSTafjE12Go
|
||||
@@ -233,7 +323,7 @@
|
||||
AFuc5QFgn6ClHh5iOQVAKNixyucB8NY0vG9JOzzyhrdq5IRgAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="ActionButton7.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<data name="ActionButton8.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAAR5JREFUOE+VkjFqwzAUhn2D9iShRyi+QhYbGujg3ZATZPKYdC6FQhPwlAMkg3dP
|
||||
@@ -244,7 +334,7 @@
|
||||
cMaRN0UdBBkAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="ActionButton8.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<data name="ActionButton9.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
|
||||
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsTAAALEwEAmpwYAAACOElE
|
||||
@@ -260,7 +350,7 @@
|
||||
VnR1MIwhwMTCyqEQ37qEmZVDFF0OE/9nAACtFF4Ey6OP+wAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="ActionButton9.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<data name="ActionButton10.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
xAAADsQBlSsOGwAAAIZJREFUOE+1j10KwCAMgz2b755xl/IsvnaL2K20UfbDAmEako+ZROSTafjE12Go
|
||||
|
||||
@@ -47,6 +47,8 @@ Namespace API.YouTube.Controls
|
||||
MyView.SetFormSize()
|
||||
End If
|
||||
|
||||
MyYouTubeSettings.DownloadLocations.PopulateComboBox(TXT_FILE)
|
||||
|
||||
If Not MyContainer Is Nothing Then
|
||||
With MyContainer
|
||||
Dim i%
|
||||
@@ -299,7 +301,7 @@ Namespace API.YouTube.Controls
|
||||
.FileSetManually = True
|
||||
.UpdateInfoFields()
|
||||
'#If DEBUG Then
|
||||
' Debug.WriteLine(.Command(False))
|
||||
'Debug.WriteLine(.Command(False))
|
||||
'#End If
|
||||
Else
|
||||
If OPT_AUDIO.Checked Then
|
||||
@@ -312,6 +314,7 @@ Namespace API.YouTube.Controls
|
||||
End With
|
||||
|
||||
If MyYouTubeSettings.OutputPathAutoChange Then MyYouTubeSettings.OutputPath.Value = f
|
||||
If MyDownloaderSettings.OutputPathAutoAddPaths Then MyYouTubeSettings.DownloadLocations.Add(f, False)
|
||||
|
||||
DialogResult = DialogResult.OK
|
||||
Close()
|
||||
@@ -430,7 +433,7 @@ Namespace API.YouTube.Controls
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Footer"
|
||||
Private Sub BTT_BROWSE_Click(sender As Object, e As EventArgs) Handles BTT_BROWSE.Click
|
||||
Private Sub BTT_BROWSE_MouseClick(sender As Object, e As MouseEventArgs) Handles BTT_BROWSE.MouseClick
|
||||
Dim f As SFile
|
||||
#Disable Warning BC40000
|
||||
If MyContainer.HasElements Then
|
||||
@@ -444,7 +447,13 @@ Namespace API.YouTube.Controls
|
||||
f = SFile.SaveAs(f, "Select the destination of the video file",,, sPattern, EDP.ReturnValue)
|
||||
End If
|
||||
#Enable Warning
|
||||
If Not f.IsEmptyString Then TXT_FILE.Text = f
|
||||
If Not f.IsEmptyString Then
|
||||
If e.Button = MouseButtons.Right Then
|
||||
MyYouTubeSettings.DownloadLocations.Add(f, MyDownloaderSettings.OutputPathAskForName)
|
||||
MyYouTubeSettings.DownloadLocations.PopulateComboBox(TXT_FILE, f)
|
||||
End If
|
||||
TXT_FILE.Text = f
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
#End Region
|
||||
|
||||
204
SCrawler.YouTube/Downloader/DownloadLocationsCollection.vb
Normal file
@@ -0,0 +1,204 @@
|
||||
' 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
|
||||
Imports PersonalUtilities.Functions.XML
|
||||
Imports PersonalUtilities.Functions.XML.Base
|
||||
Imports PersonalUtilities.Functions.XML.Attributes
|
||||
Imports PersonalUtilities.Forms.Controls
|
||||
Imports PersonalUtilities.Forms.Controls.Base
|
||||
Imports PersonalUtilities.Tools
|
||||
Namespace DownloadObjects.STDownloader
|
||||
Public Structure DownloadLocation : Implements IComparable(Of DownloadLocation), IEquatable(Of DownloadLocation), IEContainerProvider
|
||||
<XMLECA(NameOf(Path))> Public Name As String
|
||||
<XMLEC> Public Path As String
|
||||
<XMLECA(NameOf(Path), NullValue:=-1, NullValueExists:=True)>
|
||||
Public Model As Integer
|
||||
''' <param name="Path">with separator</param>
|
||||
Public Sub New(ByVal Path As String)
|
||||
Me.New(Path, -1)
|
||||
End Sub
|
||||
''' <inheritdoc cref="DownloadLocation.New(String)"/>
|
||||
Public Sub New(ByVal Path As String, ByVal Model As Integer)
|
||||
Me.Path = Path
|
||||
Me.Model = Model
|
||||
End Sub
|
||||
Public Shared Widening Operator CType(ByVal Path As String) As DownloadLocation
|
||||
Return New DownloadLocation(Path)
|
||||
End Operator
|
||||
Public Shared Narrowing Operator CType(ByVal Path As SFile) As DownloadLocation
|
||||
Return New DownloadLocation(Path.PathWithSeparator)
|
||||
End Operator
|
||||
Public Shared Widening Operator CType(ByVal Location As DownloadLocation) As String
|
||||
Return Location.Path
|
||||
End Operator
|
||||
Public Overrides Function ToString() As String
|
||||
Return Path
|
||||
End Function
|
||||
Public Overloads Overrides Function Equals(ByVal Obj As Object) As Boolean
|
||||
If Not IsNothing(Obj) Then
|
||||
If TypeOf Obj Is DownloadLocation Then
|
||||
Return Equals(DirectCast(Obj, DownloadLocation))
|
||||
Else
|
||||
Return Obj.ToString = Path
|
||||
End If
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
Public Overloads Function Equals(ByVal Other As DownloadLocation) As Boolean Implements IEquatable(Of DownloadLocation).Equals
|
||||
Return Path = Other.Path And Model = Other.Model
|
||||
End Function
|
||||
Private Function ToEContainer(Optional ByVal e As ErrorsDescriber = Nothing) As EContainer Implements IEContainerProvider.ToEContainer
|
||||
Return XMLGenerateContainers(Me).FirstOrDefault
|
||||
End Function
|
||||
Private Function CompareTo(ByVal Other As DownloadLocation) As Integer Implements IComparable(Of DownloadLocation).CompareTo
|
||||
Return Name.CompareTo(Other.Name)
|
||||
End Function
|
||||
End Structure
|
||||
Public Class DownloadLocationsCollection : Implements ICollection(Of DownloadLocation), IMyEnumerator(Of DownloadLocation)
|
||||
Private ReadOnly Property Locations As List(Of DownloadLocation)
|
||||
Private WorkingFile As SFile
|
||||
Public Sub New()
|
||||
Locations = New List(Of DownloadLocation)
|
||||
End Sub
|
||||
Public Sub Load(ByVal IsGlobal As Boolean, Optional ByVal IsYT As Boolean = False, Optional ByVal File As SFile = Nothing)
|
||||
If Not IsGlobal Then
|
||||
WorkingFile = $"Settings\DownloadLocations{IIf(IsYT, "YouTube", String.Empty)}.xml"
|
||||
ElseIf Not File.IsEmptyString Then
|
||||
WorkingFile = File
|
||||
Else
|
||||
Throw New ArgumentNullException("File", "File cannot be null in global locations instance")
|
||||
End If
|
||||
If WorkingFile.Exists Then
|
||||
Using x As New XmlFile(WorkingFile, Protector.Modes.All, False) With {.AllowSameNames = True}
|
||||
x.LoadData()
|
||||
Locations.ListAddList(x.XMLGenerateInstances(Of DownloadLocation), LAP.NotContainsOnly)
|
||||
End Using
|
||||
End If
|
||||
End Sub
|
||||
Private ReadOnly Property IsReadOnly As Boolean = False Implements ICollection(Of DownloadLocation).IsReadOnly
|
||||
Public ReadOnly Property Count As Integer Implements ICollection(Of DownloadLocation).Count, IMyEnumerator(Of DownloadLocation).MyEnumeratorCount
|
||||
Get
|
||||
Return Locations.Count
|
||||
End Get
|
||||
End Property
|
||||
Default Public ReadOnly Property Item(ByVal Index As Integer) As DownloadLocation Implements IMyEnumerator(Of DownloadLocation).MyEnumeratorObject
|
||||
Get
|
||||
Return Locations(Index)
|
||||
End Get
|
||||
End Property
|
||||
Public Shared Sub AddCmbColumns(ByRef CMB As ComboBoxExtended, Optional ByVal UseUpdate As Boolean = True)
|
||||
With CMB
|
||||
If UseUpdate Then .BeginUpdate()
|
||||
With .Columns
|
||||
.Clear()
|
||||
.Add(New ListColumn("COL_NAME", "Name") With {.DisplayMember = False, .ValueMember = False, .AutoWidth = True, .Width = -1})
|
||||
.Add(New ListColumn("COL_VALUE", "Value") With {.DisplayMember = True, .ValueMember = True, .Visible = False})
|
||||
End With
|
||||
If UseUpdate Then .EndUpdate(True)
|
||||
End With
|
||||
End Sub
|
||||
Public Sub PopulateComboBox(ByRef CMB As ComboBoxExtended, Optional ByVal Current As SFile = Nothing)
|
||||
Locations.Sort()
|
||||
With CMB
|
||||
.BeginUpdate()
|
||||
|
||||
If .Columns.Count = 0 Then AddCmbColumns(CMB, False)
|
||||
|
||||
.Items.Clear()
|
||||
|
||||
If Count > 0 Then
|
||||
.Items.AddRange(Locations.Select(Function(l) New ListItem({l.Name, l.Path})))
|
||||
.LeaveDefaultButtons = True
|
||||
Else
|
||||
.LeaveDefaultButtons = False
|
||||
End If
|
||||
|
||||
.ListAutoCompleteMode = ComboBoxExtended.AutoCompleteModes.Disabled
|
||||
|
||||
.EndUpdate()
|
||||
|
||||
If Not Current.IsEmptyString And Locations.Count > 0 Then
|
||||
Dim i% = IndexOf(Current.PathWithSeparator)
|
||||
If i.ValueBetween(0, .Items.Count - 1) Then .SelectedIndex = i
|
||||
If Current.File.IsEmptyString Then CMB.Text = Current.PathWithSeparator Else CMB.Text = Current
|
||||
End If
|
||||
End With
|
||||
End Sub
|
||||
Public Function ChooseNewLocation(ByRef CMB As ComboBoxExtended, ByVal AddToList As Boolean, ByVal AskForName As Boolean) As SFile
|
||||
Dim f As SFile = SFile.SelectPath(CMB.Text.CSFileP, "Select output directory", EDP.ReturnValue)
|
||||
If Not f.IsEmptyString Then
|
||||
CMB.Text = f.PathWithSeparator
|
||||
If AddToList Then
|
||||
Add(New DownloadLocation(f.PathWithSeparator), AskForName)
|
||||
PopulateComboBox(CMB, f)
|
||||
End If
|
||||
End If
|
||||
Return f
|
||||
End Function
|
||||
Private Sub Update()
|
||||
If Locations.Count > 0 Then
|
||||
Using x As New XmlFile With {.AllowSameNames = True}
|
||||
x.AddRange(Locations)
|
||||
x.Name = "Locations"
|
||||
x.Save(WorkingFile, EDP.SendToLog)
|
||||
End Using
|
||||
Else
|
||||
WorkingFile.Delete(,, EDP.None)
|
||||
End If
|
||||
End Sub
|
||||
Public Sub Clear() Implements ICollection(Of DownloadLocation).Clear
|
||||
If Locations.Count > 0 Then Locations.Clear() : Update()
|
||||
End Sub
|
||||
Public Overloads Sub Add(ByVal Item As DownloadLocation) Implements ICollection(Of DownloadLocation).Add
|
||||
Add(Item, True)
|
||||
End Sub
|
||||
Public Overloads Sub Add(ByVal Item As DownloadLocation, ByVal AskForName As Boolean)
|
||||
If Not Item.Path.IsEmptyString Then
|
||||
Dim i% = IndexOf(Item)
|
||||
Dim processUpdate As Boolean = True
|
||||
If i >= 0 Then
|
||||
If Locations(i).Model = Item.Model Then
|
||||
processUpdate = False
|
||||
Else
|
||||
Locations(i) = Item
|
||||
End If
|
||||
Else
|
||||
If Item.Name.IsEmptyString And AskForName Then Item.Name = InputBoxE("Enter a new name for the new location", "Location name", Item.Path)
|
||||
If Item.Name.IsEmptyString Then Item.Name = Item.Path
|
||||
Locations.Add(Item)
|
||||
Locations.Sort()
|
||||
End If
|
||||
If processUpdate Then Update()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CopyTo(ByVal Array() As DownloadLocation, ByVal ArrayIndex As Integer) Implements ICollection(Of DownloadLocation).CopyTo
|
||||
Locations.CopyTo(Array, ArrayIndex)
|
||||
End Sub
|
||||
Public Function Contains(ByVal Item As DownloadLocation) As Boolean Implements ICollection(Of DownloadLocation).Contains
|
||||
Return Not Item.Path.IsEmptyString AndAlso Locations.Contains(Item)
|
||||
End Function
|
||||
Public Function IndexOf(ByVal Item As DownloadLocation, Optional ByVal IgnoreModel As Boolean = False) As Integer
|
||||
Return Locations.FindIndex(Function(d) d.Path = Item.Path And (d.Model = Item.Model Or IgnoreModel))
|
||||
End Function
|
||||
Public Function Remove(ByVal Item As DownloadLocation) As Boolean Implements ICollection(Of DownloadLocation).Remove
|
||||
If Locations.Remove(Item) Then
|
||||
Update()
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
Private Function GetEnumerator() As IEnumerator(Of DownloadLocation) Implements IEnumerable(Of DownloadLocation).GetEnumerator
|
||||
Return New MyEnumerator(Of DownloadLocation)(Me)
|
||||
End Function
|
||||
Private Function IEnumerable_GetEnumerator() As IEnumerator Implements IEnumerable.GetEnumerator
|
||||
Return GetEnumerator()
|
||||
End Function
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -16,5 +16,11 @@ Namespace DownloadObjects.STDownloader
|
||||
ReadOnly Property OnItemDoubleClick As DoubleClickBehavior
|
||||
ReadOnly Property OpenFolderInOtherProgram As Boolean
|
||||
ReadOnly Property OpenFolderInOtherProgram_Command As String
|
||||
ReadOnly Property OutputPathAskForName As Boolean
|
||||
ReadOnly Property OutputPathAutoAddPaths As Boolean
|
||||
ReadOnly Property ENVIR_FFMPEG As SFile
|
||||
ReadOnly Property ENVIR_YTDLP As SFile
|
||||
ReadOnly Property ENVIR_GDL As SFile
|
||||
ReadOnly Property ENVIR_CURL As SFile
|
||||
End Interface
|
||||
End Namespace
|
||||
@@ -47,6 +47,7 @@ Namespace DownloadObjects.STDownloader
|
||||
Me.BTT_LOG = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BTT_INFO = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BTT_DONATE = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BTT_BUG_REPORT = New System.Windows.Forms.ToolStripButton()
|
||||
SEP_2 = New System.Windows.Forms.ToolStripSeparator()
|
||||
SEP_3 = New System.Windows.Forms.ToolStripSeparator()
|
||||
MENU_ADD_SEP_1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
@@ -104,7 +105,7 @@ Namespace DownloadObjects.STDownloader
|
||||
'TOOLBAR_TOP
|
||||
'
|
||||
Me.TOOLBAR_TOP.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden
|
||||
Me.TOOLBAR_TOP.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BTT_SETTINGS, Me.SEP_1, Me.MENU_ADD, SEP_2, Me.BTT_DOWN, Me.BTT_STOP, SEP_3, Me.BTT_DELETE, Me.BTT_CLEAR_DONE, Me.BTT_CLEAR_ALL, Me.SEP_LOG, Me.BTT_LOG, Me.BTT_INFO, Me.BTT_DONATE})
|
||||
Me.TOOLBAR_TOP.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BTT_SETTINGS, Me.SEP_1, Me.MENU_ADD, SEP_2, Me.BTT_DOWN, Me.BTT_STOP, SEP_3, Me.BTT_DELETE, Me.BTT_CLEAR_DONE, Me.BTT_CLEAR_ALL, Me.SEP_LOG, Me.BTT_LOG, Me.BTT_INFO, Me.BTT_DONATE, Me.BTT_BUG_REPORT})
|
||||
Me.TOOLBAR_TOP.Location = New System.Drawing.Point(0, 0)
|
||||
Me.TOOLBAR_TOP.Name = "TOOLBAR_TOP"
|
||||
Me.TOOLBAR_TOP.Size = New System.Drawing.Size(584, 25)
|
||||
@@ -262,6 +263,16 @@ Namespace DownloadObjects.STDownloader
|
||||
Me.BTT_DONATE.Size = New System.Drawing.Size(23, 22)
|
||||
Me.BTT_DONATE.ToolTipText = "Support"
|
||||
'
|
||||
'BTT_BUG_REPORT
|
||||
'
|
||||
Me.BTT_BUG_REPORT.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right
|
||||
Me.BTT_BUG_REPORT.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.BTT_BUG_REPORT.Image = Global.SCrawler.My.Resources.Resources.MailPic_16
|
||||
Me.BTT_BUG_REPORT.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.BTT_BUG_REPORT.Name = "BTT_BUG_REPORT"
|
||||
Me.BTT_BUG_REPORT.Size = New System.Drawing.Size(23, 22)
|
||||
Me.BTT_BUG_REPORT.Text = "Bug report"
|
||||
'
|
||||
'VideoListForm
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -305,5 +316,6 @@ Namespace DownloadObjects.STDownloader
|
||||
Protected WithEvents BTT_ADD_SHORTS_ONLY As PersonalUtilities.Forms.Controls.KeyClick.ToolStripMenuItemKeyClick
|
||||
Protected WithEvents MENU_ADD As ToolStripDropDownButton
|
||||
Protected WithEvents BTT_DOWN As ToolStripButton
|
||||
Private WithEvents BTT_BUG_REPORT As ToolStripButton
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -136,88 +136,46 @@
|
||||
<data name="BTT_ADD.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAN1SURBVEhLrZVJTFNRFIafQhgD1OBUpiiKYg22AopFKggK
|
||||
FdRYQUEZgsqgGBAChaiYRlG2RuPOuCDGGDcG48phgcQog0KFV4QKKZ2wSIJxf83vuc8SWRAw8E7yp23u
|
||||
yf/de95/X4Wlyu+eT4f/fR8sJL7mbVt+cSOVWcUyB3U4/EUHvUiy6HDKliVBvG3LL26SMKRiQd0CQj8K
|
||||
CO8XEPnZF5WuXPkAGlHFwnoErOtfhU2D/vQ7FM2efPkASQTgO481+yNxJAwZoxtwe6ZEPoCWALHmAOwZ
|
||||
USDHGkHz34p7s1XyAc6LGpZsUSDXGomzk9tRZdfg0a86+QCN4j6m/xaFUvsO1DgS0ehMxZNfxv8DLJbz
|
||||
OZX2p/8uscej1pGMlikdbnqy0fGzCWufBi4q5fPgDmmHWXMZp3znjepw0pqJMlsOap3HcdV9Cnc8ZfQ9
|
||||
GdfcB3DLk4O2aT06ZpvweNYogR7O1uHuTAVuTRej2V1AI8xDjb0Qys5gSABuHvqBMt4rIGrQD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/LB/
|
||||
TIlcSxjNfyvuztXKBzgraliiWYk8SzjKprej1haPh78a5AM0i0lM9zUClbY41NsT0OxIxeNfhv8DLJXz
|
||||
eVX0ZfyusO3AJXsi2ma0uOHOQdfPFqx/4r+kVM8Cu6QOs+czTvnOH9eiwJKFKmsuLjmO44qrGJ3uKvqf
|
||||
iKuudNx056JjVoeuuRY8mjNIoAdzDbjzoxo3Z8vR6iqiEeaj3nYSqu5ASABurvhAGe8VEDHkQ7FUSEnR
|
||||
T8XgjG0nLjuScG3mIBnocHs2TwLc+JZDZlrU2uNRMhWL7IlN0JgViBz0gZJ8Tpr1/wC8c27OFzXmINqs
|
||||
QqHHvNGZhHZXFjrcOgLk4Pq3LBhcafQs9uH0tBonJjcjYzwUu8UghA15Q9knwJ8uZeHwAkD+mBZRZB5P
|
||||
HWRbVFIMa+waNDkP4OpMJtrJ9IorAwZnGhod+1FHa5U2NY5NRiOdTiqZD3qDX0ZuvuaVAH3fAsApyyGk
|
||||
jIVQDCNQbt2BBnqYLZSUNjLkps3OVElNNKo6GglP09HJKKR9CUXcaCBUn70QRCP26xEgvCR1E+D9AsAF
|
||||
cS8ziCnM+KWSGcfPMeNEHTNaaun3PDOKF9n97xfI/ABqbBqUTm9D3mQk2hxVKPiY8btaTGUVYjIrJaWQ
|
||||
kkdIA6TeZCYBeEwXi9i8+KZOsY3V2Peg1BqLI3TKJDptvb1UWltSPKbLFd9oFJtYCT2X3Ilw7KMbvcXk
|
||||
j9PWAsnEs23l9RdQz3ImwqQXHX+bhlBSyiyeGa+2/gKq2V5zMCIoKesozvzbUDSf89UWN2kQy1nkoC+U
|
||||
FMOAtwK8XlNKTDICzlLCuLkfdb6Wx/AFAT7JCCin+PlT5wJdIOE56SkB3skIKBrVSyPR95LoAul7SG/k
|
||||
AlCWudGiWjbngvAHbcWtizmLGJwAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="BTT_ADD_PLS_ARR.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAN5SURBVEhLrZVJTFNRFIafljBIgBqcymAU54oWGSRCK1oU
|
||||
KqixAoIyiMqgGBAChYCaOsed0bgzLogxxo3RuHJYqDEqKFD1tUItKZ2gaIJxf8nvuc8SWRAw8E7yp03u
|
||||
zf+de95/3xNmquCbis6QWwpMJb4W2Db74kaJFjXT9+mw+7MOBpFk1aHImS1BAttmX9xE80XNFrwREPle
|
||||
QPRHAbE9Qaj25skHSBbVLOqDgMUf52FFXwiSxEi0+gvkA6QRgHeeYAlBsi0KO/qX4srPMvkAmWIiS7CE
|
||||
Is2mRK49hua/GjfHauQDHBeTWapViTx7LI4MrUONKwl3fzfIB2gWM5jhexzKXRtQ505GsycD93+b/g8w
|
||||
Xc4ndLQna7zMtR717lS0Detw0Z+Dzl8tWPQgbFqpHoV3Sh1mT2Sc8p3fr8NBux4VzlzUe/aj3VeEq/4K
|
||||
+p+KDt92XPLn4vKoAZ1jLbg3ZpJAd8YacONnFS6NlqLVV0gjzEedqxiqx+GQANw88h1lvEtAXF8wNBRD
|
||||
nhTjYAKOuTbijCcdZ4d3koEB10bzJMDFkRwy06HGnYRDg2uQPbAMGmsk4nuDoSSfYqvxH4B3zs35osYa
|
||||
QZtVKAiYN3rTcc6nx2W/gQA5OD+ih8mnpWeRgsohNQ44ViKrfwk2iRGI6QuCsltAGF3Kgs+TAPk2HZaT
|
||||
eRJ1kG1XSTGsdmvQ5N2KjuEdOEem7b4smLxaNHrSUEtr5S419jlWYDudVDLvDQK/jNx83nMBxu5JgMP2
|
||||
Xdhmi6YYxqHUuR4N9DBbKCltZMhNm70ZkppoVLU0Ep6mvY7l0H5bgg1fw6H6pEAEjTj0lQDhGekxAd5O
|
||||
ApwSU5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V5gja
|
||||
rESpz/ycKxuX3fm47tERoBBXvufD4M6hZ5GJY5MqHLKuR97YamwVIxAzGAjFZwGhdClLh+YASka1SCDz
|
||||
NOqgwKKUYtjoUKPNtR0Xp3bhMplecOfB4MrBOec2NNNarV2FA9Z1yKWTSuYDgeCXkZsveyVA/3kO4Khl
|
||||
D3aMRlMM41Bt24JWepgdlJROMuSm7S6NpDYaVTONhKdpvzUBOV9XI3kkHMr+AETQiEN6BAgvSd0EeD8H
|
||||
cErMZAZxJzOO1zKj5QQzfmtmRmsT/Z5kRvE0u//jFJlvR6NdjcrJTSi2xqPTWYey3t2/GsQcViNqWCVp
|
||||
J0kzTPpC6tUwCcBjOl/E/OKbboudrNGRikpbEvbRKbPptC2OSmltQfGYLlZ8o1FsYxX0XIrGY5FJN3qD
|
||||
KRTHbIclE9+2pdcfQAsrHI+RXnT8bRpNSamy+Gb8v/UH0MDSzVGIo6SsoDjzb0OZP+f/W9ykVaxm8QPB
|
||||
UFAMw94KCHhNKTHJCKinhHHzEOp8OY/hCwJ8khFQTfELpc4FukDCc9JTAryTEVA2opdGou8l0QXS95De
|
||||
yAWgLHOjebVozgXhN40Crc2i/A+XAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="BTT_ADD_NO_SHORTS.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAN9SURBVEhLrZVZSFRRGMdvKa6oE5Y1bpTtRY1N5pB407Tu
|
||||
TFrRpJXlgpVLTWiJTlIZli0QPUTLW/QgEdFLFD21PFREZYtONTON08jsOiYYvp/4953LSD6Iht0P/jBw
|
||||
Dv/fd77zP3eE6SrqekR39I0ITCa+Ft428+JGOouWFfWJ2PpFhMFKsonY4y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ZHxJeqEUgLLMjSbVtDkXhD9St6/+w21JdAAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="BTT_ADD_SHORTS_ONLY.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAN9SURBVEhLrZVZSFRRGMdvKa6oE5Y1bpTtRY1N5pB407Tu
|
||||
TFrRpJXlgpVLTWiJTlIZli0QPUTLW/QgEdFLFD21PFREZYtONTON08jsOiYYvp/4953LSD6Iht0P/jBw
|
||||
Dv/fd77zP3eE6SrqekR39I0ITCa+Ft428+JGOouWFfWJ2PpFhMFKsonY4y6WIeFtMy9ukvdVy+JeC0h8
|
||||
JyD5o4C0z5GoD5QoBxCtWpb0XsC8j7OwsC8a2dZEnAyVKQcoJADvPMsSDa09CYWO+bg4UqUcQLLqWJYl
|
||||
BhvsKuidqTT/Jbg+2qAc4JBVZDk2FUqcaTjgWY4GbzbujDUrB2h1bGWGH+mo9q6EyadFqz8P98bM/waY
|
||||
KufjMjn0v6u8K9Dky0H7oIjzIQndv9ow937slFI/jO+WOywezzjlu9QhYrezCDVuPZr8O3EquAeXQjX0
|
||||
Oweng5vQFdLjwrAB3aNtuDtqlkG3R5txbaQOXcOVOBkspxGWwuTdB/WjeMgAbp74ljLeIyC9LwoaiiFP
|
||||
inEgCwe9q3Hcr8OZwc1kYMDl4RIZcH5IIjMRDb5s7B1YiuL+BdDYEpHRGwUV+eyzGf8CeOfcnC9qbAm0
|
||||
WY2ysPmJgA4dwSJcCBkIIOHsUBHMwXy6i/Wo9azCLtciFDhSsMaagNS+SKg+CIilR1n2ZQKg1C4ik8yz
|
||||
qYNip1qOYb1Pg5ZALk4PFqKDTE8FC2AO5OOEfwMaaa3auwo7XAuxiU4qm/dGgj9Gbj7rmQDjhwmA/c4t
|
||||
2GhPphimo9K9As10mW2UlHYy5KatgTxZLTSqRhoJT9N2Vybyv6dg5bd4qD9FIIFGHPNSgPCU9IgAbyYA
|
||||
jg4UMLNHzzqD1axz8DDrGmpkXaEGdnHoCLviPsZu/TxK5rmo92pQ4VmGElcG2v01qLXt+F3nMLAqm8Qq
|
||||
rBLTk6SvpM+kHonJAB7TySI2Lr7ppqed1fvWosK9FNvolDo6rclXIa9NKR7T6YpvvOpuYXvpXvT9aVhP
|
||||
L3qxJRa17t2ySXjbzIubnHOZmNSfKn/o+Nc0mZJywBme8f8WN+nsr2PrbElIp6TMoTjz/4by8Zz/b3GT
|
||||
Znsly+iNhopiGPdKQMRzSolFQcAhq55x8xjqfDaP4RMCvFcQUEnxi6XOBXpAwmPSAwK8VhBQ/s0oj8TY
|
||||
Q6IHZHxJeqEUgLLMjSbVtDkXhD9St6/+w21JdAAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="MENU_ADD.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAN8SURBVEhLrZVZSJRRGIZ/U1wSdcK2caMsW6nR3Chm1LRZ
|
||||
@@ -236,122 +194,164 @@
|
||||
L3qNOQxH7PslE/+2hRc3af/cwHRjMdKHjn9Noykph6z+Gf9vSYDRapZiiUIcJWUJxZn/NxRP5/x/i5s0
|
||||
WcpZfH8IFBTDxS8FBD6nlJhlBBwTdYybh1Lni3gMnxDgrYyAcopfGHUu0AMSHpMeEqBXRkDxkFEaibGP
|
||||
RA/I2EN6IReAssyNZtW8OReE31w2r8aW2OYjAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="BTT_ADD_SHORTS_ONLY.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAN8SURBVEhLrZVZSJRRGIZ/U1wSdcK2caMsW6nR3Chm1LRZ
|
||||
UosmTS2XNpc0tEQnaUPMiugmiu6iC4mIbsLoquXCJCpbdMx/XKapcVbHAqP7E2/f+RvJC9Gw/4MXBs7h
|
||||
fb7znff8I8xXwTcDu0JuBWI28TX/toUXN8owp7DcAQ20gxoYRJJFgwP2PAni37bw4ibbP6Wwxb0CIt8I
|
||||
iH4vIPZjEGrc+fIB1GIKi3orYNn7AKwaCEGyGIkzviL5ANkE4J0nmkOwbTgKOaMrcPl7hXwArZjBEs2h
|
||||
SB9WQG+Nofmvxc2pWvkAx0Q1S7MokG+NxaHx9ah1JOPuzyb5AC0ju5jhcxwqHRvR4NyGFtcO3P9p+jfA
|
||||
XDmfVv2I7leFYwManWlo82rQ4dOh60crlj4Im1PKR+FdUod50xmnfBeMarDfmosqux6Nrr046zmAK74q
|
||||
+p2Gc54sXPLp0TlpQNdUK+5NmSTQnakm3PhejUuT5TjjKaYRFqDBUQpldzj+XCKZR76mjPcJiBsIhopi
|
||||
yJNi/JKIo47NOOXKxHnvTjIw4OpkvgTomNCRmQa1zmSUfElC3thKqCyRiO8PhoJ8Si3GvwDeOTfniypL
|
||||
BG1WoshvftqdiQueXHT6DATQ4eJELkweNd1FKo6Mb8I+22pkjy7HFjECMQNBULwTEEaPsmhwBqBgWIME
|
||||
Mk+mDvKsSimGNU4Vmt0ZOOfNwQUyPevJhsmtxmlXOupordKxCXtsq5BFJ5XM+4PAHyM3D3gmwPhuBuCg
|
||||
dRe2D0dTDONQbt+AJrrMVkpKGxly0xb3DknNNKo6GglPU6EtAeqR5dg4FA7lh0BE0IhDewQIT0ndBHg1
|
||||
A1Bvy2Imu461uytZu+c46/DWsY6JWtbpPcGufT3Jbn+rJ/MM1DhUKBtfh3xbPNpcVTgsFv6qHtGzClHL
|
||||
ykg6kvYT6SOpT8skAI/pbBGbFt90y97GapxbUWZPwm46ZSadtsFZJq3NKR7T+YpvvP61mZXQvejHYpFK
|
||||
L3qNOQxH7PslE/+2hRc3af/cwHRjMdKHjn9Noykph6z+Gf9vSYDRapZiiUIcJWUJxZn/NxRP5/x/i5s0
|
||||
WcpZfH8IFBTDxS8FBD6nlJhlBBwTdYybh1Lni3gMnxDgrYyAcopfGHUu0AMSHpMeEqBXRkDxkFEaibGP
|
||||
RA/I2EN6IReAssyNZtW8OReE31w2r8aW2OYjAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="MENU_ADD.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAN9SURBVEhLrZVZSJRRGIZ/U1wSdcK2cYmyzYyayTQrHStn
|
||||
cdKKJi3NjRaXMrJEJ9EMyza6CqO76EIiopsoumq5qIjSSp3yn1FHbZzNxgSj+yNv3/kZyQvRsP+DFwbO
|
||||
4X2+8533/CPMVcFtge0hdwIxk/iaf9v8ixulWtQsq0cD/VcNjCLJqsFhh1aC+LfNv7jJ9m9qtvCdgMiP
|
||||
AqI/C4jtCkKFJ0c+QLqoZlEdApZ8DsDKnhCoxUhc8OXJB8gkAO88wRKCZFsUdvcvw7XxEvkAOjGVJVhC
|
||||
kWpTINseQ/Nfg7aJSvkAJ8R0lmJVIMcei6KR9ah0qnH/d418gDqblhkH41Dq3IBqVzLq3Dvx8Lf53wCz
|
||||
5XxKp2z6yRJnIs66UtAwqsEVnwHtv+qx+FHYrFI+CW+XOtROZZzynduvwSF7Fsoc2TjrPoBG72Fc95XR
|
||||
7xQ0eTPR6svG1TEj2ifq8WDCLIHuTdTg9ng5WseKccGbTyPMRbWzAMqn4ZAA3DzyA2W8U0BcTzBUFEOe
|
||||
FNNwAo47N+KcOw0XR/eQgRE3xnIkwJUfBjLToNKlxpHhtdAOLIfKGon47mAoyKfAavoL4J1zc76oskbQ
|
||||
ZiXy/ObnPWlo9mbhqs9IAAMu/ciC2ZtBd7EVx0aScHBoFXb1L8UmMQIxPUFQfBIQRo8y7+s0QK5NgxVk
|
||||
rqYOtHalFMMKlwq1nm1oGt2NZjJt9O6C2ZOB8+5UVNFaqTMJ+4dWIpNOKpl3B4E/Rm4e8FKA6dM0wFG7
|
||||
Djts0RTDOBQ7ElFDl1lPSWkgQ25a59kpqZZGVUUj4WnaN7QCGX1LsaE3HMovgYigEYe+ESC8ID0lwPtp
|
||||
gNODGmb+rmct7lLW4jnJLnur2OXRStbqPcVuDp9hd3+eJvNtqHCqUDiyDjlD8Whwl6GsN3ey3GZgJaKO
|
||||
FZL0JN03UhepU8ckAI/pTBGbEt/U9r2BVbg2o9CxFnvplGl02mpXobQ2q3hM5yq+8dZwLTtC95I9EIut
|
||||
9KJXW8JwzHFIMvFvm39xkxZ7NTMMxEgfOv41jaakFNn9M/7fkgB95WyLNQpxlJRFFGf+35A/lfP/LW5S
|
||||
Ixaz+O4QKCiGC98KCHxFKbHICDgh6hk3D6XOF/AYPidAh4yAYopfGHUu0AMSnpEeE+CdjID8XpM0ElMn
|
||||
iR6Q6Q3ptVwAyjI3mlFz5lwQ/gBru6+QfGvWdQAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="BTT_STOP.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR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
||||
sDBxv9F42F1Q4HbA/Xzi4+ARsGZmkj6dbvCtNWtysPQ/XyvB8BiNLa5NmzyOuLjnxF3oPW0XFR8DI9HR
|
||||
ZAB05+QE+isqfjWoVLRN8xfx7dlz3FlS4o3k3CUSkcclJX8PpqUFqPhwSLwXdIIfGWa2n/6T+YrgKLY4
|
||||
Cgp8Dj4/KPxMW5YsIZbS0t/PrF/f3btly4Q1I4Pch2gPuE3FgZmyevXszwbD3QKZjL4gn77qvbW1zVTc
|
||||
GUk8KYlYNmz4o55h2pHaUJKV9fZgWdkDC3ofFu8AbaCVFlEqZ7srKno/1WrpxnNBFMe7davNmZAQ2TnE
|
||||
6+TyNiSaAN1I4YH8/Df69PrRu1LpE/HvwDfgOuiXSmd69Poh5C4HXI5Dp7N4JZKIzk0M8wOS6kPi4S8V
|
||||
92BhoaqvomK0XSoN/Fv8q6go0pOVNWPWaMaRVwQSOd3V1TsmNBqPB6Jh5wPFxX/uiyweDm5jfn4eNnbk
|
||||
TnY2uRYSN+flzX6h0TwuXbnyE+TMFUAsbqusPGErK/MNqVQB6rxRoejA+Hzi4eAa162T03a0YZ1ZrZ69
|
||||
Cucv8XgXMacDcy1CRDEpKfG9ev3nD8vKXFcKC3H6ohsxzgA+nadJ8wT3elXVO/d0uvHbWq27JC2Nfgv0
|
||||
QAzocX2ylv5IAAqwOXRd6OP/AqBHk56cLeA1EPGBWwSoY/qxpld6v5CgJuj7/+UQtGDIGIfzD+o72WmD
|
||||
vfrkAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="BTT_DELETE.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAVDSURBVEhLjZVtTFNXGMcLQmdHO6AdarLS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
V06O31xR8ateqaRtmr+Id9euo46SEk84506RiDwqKfm7PyXFT8VHguL9oBuYGGbWTP/JfEVwFFvsBQVe
|
||||
O58fEH6mLUuWkOHS0t9PrV3b279p06QlLY38AtE74Bb4kRagrFo1e1uvHyyQSukL8umr3lNb20zFHeHE
|
||||
ExLI8Lp1f9QzTAdSG0oyM9+5W1Z2fxi9D4l3gnbQRosoFLO9FRX9n2o0dOO5IILj2bzZ6oiLC+8c4nUy
|
||||
WTsSjYBupHBffv4bAzrd2GBW1hPx78A1cBWY09Mf39Hp7iF3OeBy7FrtsEciCevcyDA/IKk+KB76UnH3
|
||||
FxYqByoqxq5lZfn/Lf5VRAS5gwImtXoCeUUgntNbXb1tUq12uyEacj5UXPznnvDioeA25ufnYWNH+7Kz
|
||||
yZWguCkvb/YLtfpR6cqVnyBnrgBicXtl5TFrWZl3UKn0U+eNcnknxucTDwXXsGaNjLbjG6wzqVSzl+H8
|
||||
JR6vFXNaMNciRASTlBTbr9N9/qCszHmpsBCnL7IR4wzg03maNE9wr1ZVvfuzVjtxS6NxlaSk0G+BDogB
|
||||
Pa5P1tIfcUAONgavC338XwD0aNKTswm8BsI+cIsAdUw/1vRK7xcS1AR9/78chBYMGuNw/gGBHdjskDgc
|
||||
+QAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="BTT_CLEAR_DONE.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAVDSURBVEhLjZVtTFNXGMcLQmdHO6AdarLSOcTxXqC3lFs3
|
||||
FceLFC3YgqBjRM2ouILiC0oUozGauPiSLNmH7cP2YctMZtwSXdzGhFE3J5ABAg4XBHRYS+l74bKXZJGe
|
||||
/U9pdcay8SS/3N5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74Bb4kRagrFo1e1uvHyyQSukL8umr3lNb20zFHeHE
|
||||
ExLI8Lp1f9QzTAdSG0oyM9+5W1Z2fxi9D4l3gnbQRosoFLO9FRX9n2o0dOO5IILj2bzZ6oiLC+8c4nUy
|
||||
WTsSjYBupHBffv4bAzrd2GBW1hPx78A1cBWY09Mf39Hp7iF3OeBy7FrtsEciCevcyDA/IKk+KB76UnH3
|
||||
FxYqByoqxq5lZfn/Lf5VRAS5gwImtXoCeUUgntNbXb1tUq12uyEacj5UXPznnvDioeA25ufnYWNH+7Kz
|
||||
yZWguCkvb/YLtfpR6cqVnyBnrgBicXtl5TFrWZl3UKn0U+eNcnknxucTDwXXsGaNjLbjG6wzqVSzl+H8
|
||||
JR6vFXNaMNciRASTlBTbr9N9/qCszHmpsBCnL7IR4wzg03maNE9wr1ZVvfuzVjtxS6NxlaSk0G+BDogB
|
||||
Pa5P1tIfcUAONgavC338XwD0aNKTswm8BsI+cIsAdUw/1vRK7xcS1AR9/78chBYMGuNw/gGBHdjskDgc
|
||||
+QAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="BTT_CLEAR_ALL.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAVDSURBVEhLjZVtTFNXGMcLQmdHO6AdarLSOcTxXqC3lFs3
|
||||
FceLFC3YgqBjRM2ouILiC0oUozGauPiSLNmH7cP2YctMZtwSXdzGhFE3J5ABAg4XBHRYS+l74bKXZJGe
|
||||
/U9pdcay8SS/3N5znvN//n3OuffyaAwUFkaZEhI+ur5s2eg1mezDDVLpSxiO8E/+T4yoVOxvMtmNsaVL
|
||||
+y8nJlZgKAqE+SdpDBmNwp7Cwi9GmpvJ+PnzpLOpyXe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6oiLC+8c4nUy
|
||||
WTsSjYBupHBffv4bAzrd2GBW1hPx78A1cBWY09Mf39Hp7iF3OeBy7FrtsEciCevcyDA/IKk+KB76UnH3
|
||||
FxYqByoqxq5lZfn/Lf5VRAS5gwImtXoCeUUgntNbXb1tUq12uyEacj5UXPznnvDioeA25ufnYWNH+7Kz
|
||||
yZWguCkvb/YLtfpR6cqVnyBnrgBicXtl5TFrWZl3UKn0U+eNcnknxucTDwXXsGaNjLbjG6wzqVSzl+H8
|
||||
JR6vFXNaMNciRASTlBTbr9N9/qCszHmpsBCnL7IR4wzg03maNE9wr1ZVvfuzVjtxS6NxlaSk0G+BDogB
|
||||
Pa5P1tIfcUAONgavC338XwD0aNKTswm8BsI+cIsAdUw/1vRK7xcS1AR9/78chBYMGuNw/gGBHdjskDgc
|
||||
+QAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="BTT_LOG.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
|
||||
@@ -50,7 +50,11 @@ Namespace DownloadObjects.STDownloader
|
||||
End If
|
||||
|
||||
If AppMode Then
|
||||
If Now.Month.ValueBetween(6, 8) Then Text = "SCrawler: Happy LGBT Pride Month! :-)"
|
||||
If Now.Month.ValueBetween(6, 8) Then
|
||||
Text = "SCrawler: Happy LGBT Pride Month! :-)"
|
||||
ElseIf Not MyYouTubeSettings Is Nothing AndAlso Not MyYouTubeSettings.ProgramText.IsEmptyString Then
|
||||
Text = MyYouTubeSettings.ProgramText
|
||||
End If
|
||||
MyNotificator = New YTNotificator(Me)
|
||||
MyDownloaderSettings = MyYouTubeSettings
|
||||
End If
|
||||
@@ -64,6 +68,7 @@ Namespace DownloadObjects.STDownloader
|
||||
BTT_LOG.Visible = False
|
||||
BTT_INFO.Visible = False
|
||||
BTT_DONATE.Visible = False
|
||||
BTT_BUG_REPORT.Visible = False
|
||||
End If
|
||||
MyProgress.Visible = False
|
||||
LoadData()
|
||||
@@ -96,7 +101,7 @@ Namespace DownloadObjects.STDownloader
|
||||
If c.ListExists Then
|
||||
c.Sort(New ContainerDateComparer)
|
||||
SuspendLayout()
|
||||
For i% = c.Count - 1 To 0 Step -1 : ControlCreateAndAdd(c(i), True, i = 0) : Next
|
||||
For i% = c.Count - 1 To 0 Step -1 : ControlCreateAndAdd(c(i), True, i = 0, True) : Next
|
||||
ResumeLayout(False)
|
||||
PerformLayout()
|
||||
End If
|
||||
@@ -121,11 +126,11 @@ Namespace DownloadObjects.STDownloader
|
||||
#End Region
|
||||
#Region "Controls"
|
||||
Protected Sub ControlCreateAndAdd(ByVal Container As IYouTubeMediaContainer, Optional ByVal DisableDownload As Boolean = False,
|
||||
Optional ByVal PerformClick As Boolean = True)
|
||||
Optional ByVal PerformClick As Boolean = True, Optional ByVal IsLoading As Boolean = False)
|
||||
ControlInvokeFast(TP_CONTROLS, Sub()
|
||||
With TP_CONTROLS
|
||||
.SuspendLayout()
|
||||
If DisableDownload Or Not MyDownloaderSettings.DownloadAutomatically Then Container.Save()
|
||||
If Not IsLoading And (DisableDownload Or Not MyDownloaderSettings.DownloadAutomatically) Then Container.Save()
|
||||
'.AutoScroll = True
|
||||
'.HorizontalScroll.Visible = False
|
||||
.RowStyles.Insert(0, New RowStyle(SizeType.Absolute, 60))
|
||||
@@ -237,6 +242,7 @@ Namespace DownloadObjects.STDownloader
|
||||
Dim pForm As ParsingProgressForm = Nothing
|
||||
Try
|
||||
Dim useCookies As Boolean = MyYouTubeSettings.DefaultUseCookies
|
||||
Dim sTag$ = If(Sender?.Tag, String.Empty)
|
||||
Dim disableDown As Boolean = e.Shift
|
||||
If e.Control Then useCookies = True
|
||||
Dim useCookiesParse As Boolean? = Nothing
|
||||
@@ -247,21 +253,28 @@ Namespace DownloadObjects.STDownloader
|
||||
Dim GetDefault As Boolean = True
|
||||
Dim GetShorts As Boolean = True
|
||||
|
||||
If Sender.Tag = "pls" Then
|
||||
If sTag = "pls" Then
|
||||
Using pf As New PlaylistArrayForm With {.DesignXML = DesignXML}
|
||||
pf.ShowDialog()
|
||||
If pf.DialogResult = DialogResult.OK Then
|
||||
With pf.URLs
|
||||
If .Count > 0 Then
|
||||
pForm = New ParsingProgressForm
|
||||
pForm.Show()
|
||||
pForm = New ParsingProgressForm(.Count)
|
||||
pForm.Show(Me)
|
||||
pForm.SetInitialValues(.Count, "Parsing playlists...")
|
||||
Dim containers As New List(Of IYouTubeMediaContainer)
|
||||
For Each u$ In .Self : containers.Add(YouTubeFunctions.Parse(u, useCookiesParse, pForm.Token, pForm.MyProgress, True, False)) : pForm.MyProgress.Perform() : Next
|
||||
For Each u$ In .Self
|
||||
containers.Add(YouTubeFunctions.Parse(u, useCookiesParse, pForm.Token, pForm.MyProgress, True, False))
|
||||
pForm.NextPlaylist()
|
||||
pForm.MyProgress.Perform()
|
||||
Next
|
||||
pForm.Dispose()
|
||||
If containers.Count > 0 Then containers.ListDisposeRemoveAll(Function(cc) cc.HasError Or Not cc.Exists)
|
||||
If containers.Count > 0 Then
|
||||
c = New Channel With {.UserTitle = IIf(pf.IsOneArtist, containers(0).UserTitle, "Playlists")}
|
||||
c = New Channel With {
|
||||
.UserTitle = IIf(pf.IsOneArtist, containers(0).UserTitle, "Playlists"),
|
||||
.IsMusic = containers.Any(Function(cc) cc.IsMusic)
|
||||
}
|
||||
c.Elements.AddRange(containers)
|
||||
End If
|
||||
End If
|
||||
@@ -269,7 +282,7 @@ Namespace DownloadObjects.STDownloader
|
||||
End If
|
||||
End Using
|
||||
Else
|
||||
Select Case CStr(Sender.Tag)
|
||||
Select Case sTag
|
||||
Case "ans" : GetShorts = False
|
||||
Case "as" : GetDefault = False : GetShorts = True
|
||||
End Select
|
||||
@@ -280,7 +293,7 @@ Namespace DownloadObjects.STDownloader
|
||||
If Not c Is Nothing OrElse YouTubeFunctions.IsMyUrl(url) Then
|
||||
If c Is Nothing Then
|
||||
pForm = New ParsingProgressForm
|
||||
pForm.Show()
|
||||
pForm.Show(Me)
|
||||
pForm.SetInitialValues(1, "Parsing data...")
|
||||
c = YouTubeFunctions.Parse(url, useCookiesParse, pForm.Token, pForm.MyProgress, GetDefault, GetShorts)
|
||||
pForm.Dispose()
|
||||
@@ -329,13 +342,13 @@ Namespace DownloadObjects.STDownloader
|
||||
MyJob.Cancel()
|
||||
End Sub
|
||||
Private Sub BTT_DELETE_Click(sender As Object, e As EventArgs) Handles BTT_DELETE.Click
|
||||
RemoveControls(ControlsChecked)
|
||||
RemoveControls(ControlsChecked, True)
|
||||
End Sub
|
||||
Protected Overridable Sub BTT_CLEAR_DONE_Click(sender As Object, e As EventArgs) Handles BTT_CLEAR_DONE.Click
|
||||
RemoveControls(ControlsDownloaded)
|
||||
RemoveControls(ControlsDownloaded, False)
|
||||
End Sub
|
||||
Protected Overridable Sub BTT_CLEAR_ALL_Click(sender As Object, e As EventArgs) Handles BTT_CLEAR_ALL.Click
|
||||
RemoveControls()
|
||||
RemoveControls(, False)
|
||||
End Sub
|
||||
Private Sub BTT_LOG_Click(sender As Object, e As EventArgs) Handles BTT_LOG.Click
|
||||
MyMainLOG_ShowForm(DesignXML,,,, AddressOf UpdateLogButton)
|
||||
@@ -343,20 +356,23 @@ Namespace DownloadObjects.STDownloader
|
||||
Friend Sub UpdateLogButton()
|
||||
If AppMode Then MyMainLOG_UpdateLogButton(BTT_LOG, TOOLBAR_TOP)
|
||||
End Sub
|
||||
Private Sub BTT_BUG_REPORT_Click(sender As Object, e As EventArgs) Handles BTT_BUG_REPORT.Click
|
||||
Try
|
||||
With MyYouTubeSettings
|
||||
Using f As New Editors.BugReporterForm(MyCache, .DesignXml, .ProgramText, My.Application.Info.Version,
|
||||
True, .Self, .ProgramDescription) : f.ShowDialog() : End Using
|
||||
End With
|
||||
Catch
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub BTT_DONATE_Click(sender As Object, e As EventArgs) Handles BTT_DONATE.Click
|
||||
Try : Process.Start("https://github.com/AAndyProgram/SCrawler/blob/main/HowToSupport.md") : Catch : End Try
|
||||
End Sub
|
||||
Private Sub BTT_INFO_Click(sender As Object, e As EventArgs) Handles BTT_INFO.Click
|
||||
Try
|
||||
MsgBoxE({$"YouTube Downloader v{My.Application.Info.Version}" & vbCr &
|
||||
$"Address: https://github.com/AAndyProgram/SCrawler" & vbCr &
|
||||
"Created by Greek LGBT person Andy (Gay)",
|
||||
"Program information"},,,,
|
||||
{"OK", New MsgBoxButton("Go to site") With {.CallBack = Sub(r, n, b) Process.Start("https://github.com/AAndyProgram/SCrawler/releases")}})
|
||||
Catch
|
||||
End Try
|
||||
ShowProgramInfo(MyYouTubeSettings.ProgramText.Value.IfNullOrEmpty("YouTube Downloader"),
|
||||
My.Application.Info.Version, False, True, MyYouTubeSettings, True,, False, MyYouTubeSettings.ProgramDescription)
|
||||
End Sub
|
||||
Protected Overloads Sub RemoveControls(Optional ByVal Predicate As Predicate(Of MediaItem) = Nothing)
|
||||
Protected Overloads Sub RemoveControls(Optional ByVal Predicate As Predicate(Of MediaItem) = Nothing, Optional ByVal RemoveFiles As Boolean = False)
|
||||
ControlInvokeFast(TP_CONTROLS, Sub()
|
||||
With TP_CONTROLS
|
||||
If .Controls.Count > 0 Then
|
||||
@@ -371,7 +387,7 @@ Namespace DownloadObjects.STDownloader
|
||||
For i = rCnt.Count - 1 To 0 Step -1
|
||||
cnt = .Controls(rCnt(i))
|
||||
.Controls.RemoveAt(rCnt(i))
|
||||
If Not cnt.MyContainer Is Nothing Then cnt.MyContainer.Delete(False)
|
||||
If Not cnt.MyContainer Is Nothing Then cnt.MyContainer.Delete(RemoveFiles) : cnt.MyContainer.Dispose()
|
||||
cnt.Dispose()
|
||||
Next
|
||||
End If
|
||||
@@ -387,19 +403,24 @@ Namespace DownloadObjects.STDownloader
|
||||
UpdateScrolls(Nothing, Nothing)
|
||||
End Sub, EDP.None)
|
||||
End Sub
|
||||
Private Overloads Sub RemoveControls(ByVal CNT As MediaItem)
|
||||
Private Overloads Sub RemoveControls(ByVal CNT As MediaItem, Optional ByVal RemoveFiles As Boolean = False)
|
||||
ControlInvokeFast(TP_CONTROLS, Sub()
|
||||
If Not CNT Is Nothing Then TP_CONTROLS.Controls.Remove(CNT) : OffsetControls()
|
||||
If Not CNT Is Nothing Then
|
||||
If Not CNT.MyContainer Is Nothing Then CNT.MyContainer.Delete(RemoveFiles) : CNT.MyContainer.Dispose()
|
||||
TP_CONTROLS.Controls.Remove(CNT)
|
||||
OffsetControls()
|
||||
CNT.Dispose()
|
||||
End If
|
||||
End Sub, EDP.None)
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Media controls' handlers"
|
||||
Private Sub MediaControl_FileDownloaded(ByVal Sender As MediaItem, ByVal Container As IYouTubeMediaContainer)
|
||||
If MyDownloaderSettings.ShowNotifications Then MyNotificator.ShowNotification(Container.ToString(), Container.ThumbnailFile)
|
||||
If MyDownloaderSettings.RemoveDownloadedAutomatically Then RemoveControls(Sender)
|
||||
If MyDownloaderSettings.RemoveDownloadedAutomatically Then RemoveControls(Sender, False)
|
||||
End Sub
|
||||
Private Sub MediaControl_Removal(ByVal Sender As MediaItem, ByVal Container As IYouTubeMediaContainer)
|
||||
RemoveControls(Sender)
|
||||
RemoveControls(Sender, False)
|
||||
End Sub
|
||||
Private Sub MediaControl_DownloadAgain(ByVal Sender As MediaItem, ByVal Container As IYouTubeMediaContainer)
|
||||
If Not Container.URL.IsEmptyString Then BufferText = Container.URL : BTT_ADD.PerformClick()
|
||||
@@ -424,8 +445,6 @@ Namespace DownloadObjects.STDownloader
|
||||
Protected Sub AddToDownload(ByRef Item As MediaItem, ByVal RunThread As Boolean)
|
||||
Dim hc% = Item.MyContainer.GetHashCode
|
||||
If MyJob.Count = 0 OrElse Not MyJob.Items.Exists(Function(i) i.MyContainer.GetHashCode = hc) Then
|
||||
'TODELETE: YT video downloader 'Item.Pending'
|
||||
'Item.Pending = True
|
||||
MyJob.Add(Item)
|
||||
Item.AddToQueue()
|
||||
If RunThread Then StartDownloading()
|
||||
@@ -449,25 +468,39 @@ Namespace DownloadObjects.STDownloader
|
||||
MyJob.Start()
|
||||
Const nf As ANumbers.Formats = ANumbers.Formats.Number
|
||||
Dim t As New List(Of Task)
|
||||
Dim i%
|
||||
Dim i%, iAbs%
|
||||
Dim __item As MediaItem
|
||||
Dim Indexes As New List(Of Integer)
|
||||
Dim IndexesToRemove As New List(Of Integer)
|
||||
Dim maxJobCount% = MyDownloaderSettings.MaxJobsCount
|
||||
If maxJobCount <= 0 Then maxJobCount = 1
|
||||
MyProgress.Visible = True
|
||||
MyProgress.Maximum = MyJob.Count
|
||||
Do While MyJob.Count > 0 And Not MyJob.IsCancellationRequested
|
||||
i = -1
|
||||
iAbs = -1
|
||||
Indexes.Clear()
|
||||
IndexesToRemove.Clear()
|
||||
For Each __item In MyJob.Items
|
||||
iAbs += 1
|
||||
If Not __item.IsDisposed And Not If(__item.MyContainer?.DownloadState, Plugin.UserMediaStates.Unknown) = Plugin.UserMediaStates.Downloaded Then
|
||||
i += 1
|
||||
If i <= maxJobCount - 1 Then
|
||||
Indexes.Add(i)
|
||||
Indexes.Add(iAbs)
|
||||
t.Add(Task.Run(Sub() __item.Download(MyJob.Token)))
|
||||
Else
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
IndexesToRemove.Add(iAbs)
|
||||
End If
|
||||
Next
|
||||
If IndexesToRemove.Count > 0 Then
|
||||
For i = IndexesToRemove.Count - 1 To 0 Step -1
|
||||
If Not MyJob.Items(IndexesToRemove(i)).IsDisposed Then MyJob.Items(IndexesToRemove(i)).Pending = False
|
||||
MyJob.Items.RemoveAt(IndexesToRemove(i))
|
||||
Next
|
||||
End If
|
||||
If t.Count > 0 Then
|
||||
MyProgress.Information = $"Downloading {t.Count.NumToString(nf, PNumProv)}/{MyJob.Count.NumToString(nf, PNumProv)}"
|
||||
MyProgress.InformationTemporary = MyProgress.Information
|
||||
@@ -483,6 +516,7 @@ Namespace DownloadObjects.STDownloader
|
||||
End If
|
||||
Loop
|
||||
Indexes.Clear()
|
||||
IndexesToRemove.Clear()
|
||||
MyProgress.Done()
|
||||
MyProgress.InformationTemporary = "Download completed"
|
||||
Catch aoex As ArgumentOutOfRangeException
|
||||
@@ -492,6 +526,7 @@ Namespace DownloadObjects.STDownloader
|
||||
MyProgress.InformationTemporary = "Download error"
|
||||
ErrorsDescriber.Execute(EDP.SendToLog, ex, "[VideoListForm.DownloadData]")
|
||||
Finally
|
||||
MyProgress.Visible(, False) = False
|
||||
MyJob.Finish()
|
||||
EnableDownloadButtons(False)
|
||||
End Try
|
||||
|
||||
361
SCrawler.YouTube/Editors/BugReporterForm.Designer.vb
generated
Normal file
@@ -0,0 +1,361 @@
|
||||
' 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 Editors
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Public Class BugReporterForm : Inherits System.Windows.Forms.Form
|
||||
<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 TP_BUTTONS As System.Windows.Forms.TableLayoutPanel
|
||||
Dim ActionButton1 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(BugReporterForm))
|
||||
Dim ActionButton2 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim ActionButton3 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim ActionButton4 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim ActionButton5 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim ActionButton6 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim ActionButton7 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim ActionButton8 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim ActionButton9 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Me.BTT_EMAIL = New System.Windows.Forms.Button()
|
||||
Me.BTT_GITHUB = New System.Windows.Forms.Button()
|
||||
Me.BTT_COPY = New System.Windows.Forms.Button()
|
||||
Me.BTT_CANCEL = New System.Windows.Forms.Button()
|
||||
Me.BTT_ANON = New System.Windows.Forms.Button()
|
||||
Me.TT_MAIN = New System.Windows.Forms.ToolTip(Me.components)
|
||||
Me.TXT_DESCR = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.TXT_URL_PROFILE = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.TXT_URL_POST = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.TXT_REPRODUCE = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.TXT_EXPECT = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.TXT_LOG = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.TXT_FILES = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
TP_MAIN = New System.Windows.Forms.TableLayoutPanel()
|
||||
TP_BUTTONS = New System.Windows.Forms.TableLayoutPanel()
|
||||
TP_MAIN.SuspendLayout()
|
||||
TP_BUTTONS.SuspendLayout()
|
||||
CType(Me.TXT_DESCR, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.TXT_URL_PROFILE, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.TXT_URL_POST, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.TXT_REPRODUCE, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.TXT_EXPECT, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.TXT_LOG, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.TXT_FILES, 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.TXT_DESCR, 0, 0)
|
||||
TP_MAIN.Controls.Add(Me.TXT_URL_PROFILE, 0, 1)
|
||||
TP_MAIN.Controls.Add(Me.TXT_URL_POST, 0, 2)
|
||||
TP_MAIN.Controls.Add(Me.TXT_REPRODUCE, 0, 3)
|
||||
TP_MAIN.Controls.Add(Me.TXT_EXPECT, 0, 4)
|
||||
TP_MAIN.Controls.Add(Me.TXT_LOG, 0, 5)
|
||||
TP_MAIN.Controls.Add(TP_BUTTONS, 0, 7)
|
||||
TP_MAIN.Controls.Add(Me.TXT_FILES, 0, 6)
|
||||
TP_MAIN.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
TP_MAIN.Location = New System.Drawing.Point(0, 0)
|
||||
TP_MAIN.Name = "TP_MAIN"
|
||||
TP_MAIN.RowCount = 8
|
||||
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20.0!))
|
||||
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
||||
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
||||
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20.0!))
|
||||
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20.0!))
|
||||
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20.0!))
|
||||
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20.0!))
|
||||
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30.0!))
|
||||
TP_MAIN.Size = New System.Drawing.Size(584, 461)
|
||||
TP_MAIN.TabIndex = 0
|
||||
'
|
||||
'TP_BUTTONS
|
||||
'
|
||||
TP_BUTTONS.ColumnCount = 6
|
||||
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.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100.0!))
|
||||
TP_BUTTONS.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100.0!))
|
||||
TP_BUTTONS.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100.0!))
|
||||
TP_BUTTONS.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100.0!))
|
||||
TP_BUTTONS.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
|
||||
TP_BUTTONS.Controls.Add(Me.BTT_EMAIL, 2, 0)
|
||||
TP_BUTTONS.Controls.Add(Me.BTT_GITHUB, 3, 0)
|
||||
TP_BUTTONS.Controls.Add(Me.BTT_COPY, 4, 0)
|
||||
TP_BUTTONS.Controls.Add(Me.BTT_CANCEL, 5, 0)
|
||||
TP_BUTTONS.Controls.Add(Me.BTT_ANON, 1, 0)
|
||||
TP_BUTTONS.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
TP_BUTTONS.Location = New System.Drawing.Point(0, 431)
|
||||
TP_BUTTONS.Margin = New System.Windows.Forms.Padding(0)
|
||||
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(584, 30)
|
||||
TP_BUTTONS.TabIndex = 7
|
||||
'
|
||||
'BTT_EMAIL
|
||||
'
|
||||
Me.BTT_EMAIL.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.BTT_EMAIL.Location = New System.Drawing.Point(187, 3)
|
||||
Me.BTT_EMAIL.Name = "BTT_EMAIL"
|
||||
Me.BTT_EMAIL.Size = New System.Drawing.Size(94, 24)
|
||||
Me.BTT_EMAIL.TabIndex = 1
|
||||
Me.BTT_EMAIL.Text = "email"
|
||||
Me.TT_MAIN.SetToolTip(Me.BTT_EMAIL, "Create a message to send via email.")
|
||||
Me.BTT_EMAIL.UseVisualStyleBackColor = True
|
||||
'
|
||||
'BTT_GITHUB
|
||||
'
|
||||
Me.BTT_GITHUB.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.BTT_GITHUB.Location = New System.Drawing.Point(287, 3)
|
||||
Me.BTT_GITHUB.Name = "BTT_GITHUB"
|
||||
Me.BTT_GITHUB.Size = New System.Drawing.Size(94, 24)
|
||||
Me.BTT_GITHUB.TabIndex = 2
|
||||
Me.BTT_GITHUB.Text = "GitHub"
|
||||
Me.TT_MAIN.SetToolTip(Me.BTT_GITHUB, "Create a MarkDown message to post to GitHub.")
|
||||
Me.BTT_GITHUB.UseVisualStyleBackColor = True
|
||||
'
|
||||
'BTT_COPY
|
||||
'
|
||||
Me.BTT_COPY.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.BTT_COPY.Location = New System.Drawing.Point(387, 3)
|
||||
Me.BTT_COPY.Name = "BTT_COPY"
|
||||
Me.BTT_COPY.Size = New System.Drawing.Size(94, 24)
|
||||
Me.BTT_COPY.TabIndex = 3
|
||||
Me.BTT_COPY.Text = "Copy"
|
||||
Me.TT_MAIN.SetToolTip(Me.BTT_COPY, "Create a message and copy to your clipboard.")
|
||||
Me.BTT_COPY.UseVisualStyleBackColor = True
|
||||
'
|
||||
'BTT_CANCEL
|
||||
'
|
||||
Me.BTT_CANCEL.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
||||
Me.BTT_CANCEL.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.BTT_CANCEL.Location = New System.Drawing.Point(487, 3)
|
||||
Me.BTT_CANCEL.Name = "BTT_CANCEL"
|
||||
Me.BTT_CANCEL.Size = New System.Drawing.Size(94, 24)
|
||||
Me.BTT_CANCEL.TabIndex = 4
|
||||
Me.BTT_CANCEL.Text = "Cancel"
|
||||
Me.BTT_CANCEL.UseVisualStyleBackColor = True
|
||||
'
|
||||
'BTT_ANON
|
||||
'
|
||||
Me.BTT_ANON.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.BTT_ANON.Location = New System.Drawing.Point(87, 3)
|
||||
Me.BTT_ANON.Name = "BTT_ANON"
|
||||
Me.BTT_ANON.Size = New System.Drawing.Size(94, 24)
|
||||
Me.BTT_ANON.TabIndex = 0
|
||||
Me.BTT_ANON.Text = "Anon message"
|
||||
Me.TT_MAIN.SetToolTip(Me.BTT_ANON, resources.GetString("BTT_ANON.ToolTip"))
|
||||
Me.BTT_ANON.UseVisualStyleBackColor = True
|
||||
'
|
||||
'TXT_DESCR
|
||||
'
|
||||
ActionButton1.BackgroundImage = CType(resources.GetObject("ActionButton1.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton1.Dock = System.Windows.Forms.DockStyle.Top
|
||||
ActionButton1.Name = "Clear"
|
||||
ActionButton1.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Clear
|
||||
Me.TXT_DESCR.Buttons.Add(ActionButton1)
|
||||
Me.TXT_DESCR.CaptionDock = System.Windows.Forms.DockStyle.Top
|
||||
Me.TXT_DESCR.CaptionMode = PersonalUtilities.Forms.Controls.Base.ICaptionControl.Modes.None
|
||||
Me.TXT_DESCR.CaptionVisible = False
|
||||
Me.TXT_DESCR.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TXT_DESCR.GroupBoxed = True
|
||||
Me.TXT_DESCR.GroupBoxText = "Describe the bug or write your message"
|
||||
Me.TXT_DESCR.Lines = New String(-1) {}
|
||||
Me.TXT_DESCR.Location = New System.Drawing.Point(3, 3)
|
||||
Me.TXT_DESCR.Multiline = True
|
||||
Me.TXT_DESCR.Name = "TXT_DESCR"
|
||||
Me.TXT_DESCR.Size = New System.Drawing.Size(578, 69)
|
||||
Me.TXT_DESCR.TabIndex = 0
|
||||
Me.TXT_DESCR.TextToolTip = "A clear and concise description of what the bug is"
|
||||
Me.TXT_DESCR.TextToolTipEnabled = True
|
||||
'
|
||||
'TXT_URL_PROFILE
|
||||
'
|
||||
ActionButton2.BackgroundImage = CType(resources.GetObject("ActionButton2.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton2.Name = "Clear"
|
||||
ActionButton2.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Clear
|
||||
Me.TXT_URL_PROFILE.Buttons.Add(ActionButton2)
|
||||
Me.TXT_URL_PROFILE.CaptionText = "Profile URL"
|
||||
Me.TXT_URL_PROFILE.CaptionWidth = 75.0R
|
||||
Me.TXT_URL_PROFILE.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TXT_URL_PROFILE.Lines = New String(-1) {}
|
||||
Me.TXT_URL_PROFILE.Location = New System.Drawing.Point(3, 78)
|
||||
Me.TXT_URL_PROFILE.Name = "TXT_URL_PROFILE"
|
||||
Me.TXT_URL_PROFILE.Size = New System.Drawing.Size(578, 22)
|
||||
Me.TXT_URL_PROFILE.TabIndex = 1
|
||||
'
|
||||
'TXT_URL_POST
|
||||
'
|
||||
ActionButton3.BackgroundImage = CType(resources.GetObject("ActionButton3.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton3.Name = "Clear"
|
||||
ActionButton3.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Clear
|
||||
Me.TXT_URL_POST.Buttons.Add(ActionButton3)
|
||||
Me.TXT_URL_POST.CaptionText = "Post URL"
|
||||
Me.TXT_URL_POST.CaptionWidth = 75.0R
|
||||
Me.TXT_URL_POST.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TXT_URL_POST.Lines = New String(-1) {}
|
||||
Me.TXT_URL_POST.Location = New System.Drawing.Point(3, 106)
|
||||
Me.TXT_URL_POST.Name = "TXT_URL_POST"
|
||||
Me.TXT_URL_POST.Size = New System.Drawing.Size(578, 22)
|
||||
Me.TXT_URL_POST.TabIndex = 2
|
||||
'
|
||||
'TXT_REPRODUCE
|
||||
'
|
||||
ActionButton4.BackgroundImage = CType(resources.GetObject("ActionButton4.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton4.Dock = System.Windows.Forms.DockStyle.Top
|
||||
ActionButton4.Name = "Clear"
|
||||
ActionButton4.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Clear
|
||||
Me.TXT_REPRODUCE.Buttons.Add(ActionButton4)
|
||||
Me.TXT_REPRODUCE.CaptionDock = System.Windows.Forms.DockStyle.Top
|
||||
Me.TXT_REPRODUCE.CaptionMode = PersonalUtilities.Forms.Controls.Base.ICaptionControl.Modes.None
|
||||
Me.TXT_REPRODUCE.CaptionVisible = False
|
||||
Me.TXT_REPRODUCE.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TXT_REPRODUCE.GroupBoxed = True
|
||||
Me.TXT_REPRODUCE.GroupBoxText = "To Reproduce"
|
||||
Me.TXT_REPRODUCE.Lines = New String(-1) {}
|
||||
Me.TXT_REPRODUCE.Location = New System.Drawing.Point(3, 134)
|
||||
Me.TXT_REPRODUCE.Multiline = True
|
||||
Me.TXT_REPRODUCE.Name = "TXT_REPRODUCE"
|
||||
Me.TXT_REPRODUCE.Size = New System.Drawing.Size(578, 69)
|
||||
Me.TXT_REPRODUCE.TabIndex = 3
|
||||
Me.TXT_REPRODUCE.TextToolTip = "Steps to reproduce the behavior:" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "1. Do something" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "2. See error"
|
||||
Me.TXT_REPRODUCE.TextToolTipEnabled = True
|
||||
'
|
||||
'TXT_EXPECT
|
||||
'
|
||||
ActionButton5.BackgroundImage = CType(resources.GetObject("ActionButton5.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton5.Dock = System.Windows.Forms.DockStyle.Top
|
||||
ActionButton5.Name = "Clear"
|
||||
ActionButton5.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Clear
|
||||
Me.TXT_EXPECT.Buttons.Add(ActionButton5)
|
||||
Me.TXT_EXPECT.CaptionDock = System.Windows.Forms.DockStyle.Top
|
||||
Me.TXT_EXPECT.CaptionMode = PersonalUtilities.Forms.Controls.Base.ICaptionControl.Modes.None
|
||||
Me.TXT_EXPECT.CaptionVisible = False
|
||||
Me.TXT_EXPECT.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TXT_EXPECT.GroupBoxed = True
|
||||
Me.TXT_EXPECT.GroupBoxText = "Expected behavior"
|
||||
Me.TXT_EXPECT.Lines = New String(-1) {}
|
||||
Me.TXT_EXPECT.Location = New System.Drawing.Point(3, 209)
|
||||
Me.TXT_EXPECT.Multiline = True
|
||||
Me.TXT_EXPECT.Name = "TXT_EXPECT"
|
||||
Me.TXT_EXPECT.Size = New System.Drawing.Size(578, 69)
|
||||
Me.TXT_EXPECT.TabIndex = 4
|
||||
Me.TXT_EXPECT.TextToolTip = "A clear and concise description of what you expected to happen."
|
||||
Me.TXT_EXPECT.TextToolTipEnabled = True
|
||||
'
|
||||
'TXT_LOG
|
||||
'
|
||||
ActionButton6.BackgroundImage = CType(resources.GetObject("ActionButton6.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton6.Dock = System.Windows.Forms.DockStyle.Top
|
||||
ActionButton6.Name = "Open"
|
||||
ActionButton6.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Open
|
||||
ActionButton6.ToolTipText = "Select log files to add their text to the message"
|
||||
ActionButton7.BackgroundImage = CType(resources.GetObject("ActionButton7.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton7.Dock = System.Windows.Forms.DockStyle.Top
|
||||
ActionButton7.Name = "Clear"
|
||||
ActionButton7.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Clear
|
||||
ActionButton7.ToolTipText = "Empty"
|
||||
Me.TXT_LOG.Buttons.Add(ActionButton6)
|
||||
Me.TXT_LOG.Buttons.Add(ActionButton7)
|
||||
Me.TXT_LOG.CaptionDock = System.Windows.Forms.DockStyle.Top
|
||||
Me.TXT_LOG.CaptionMode = PersonalUtilities.Forms.Controls.Base.ICaptionControl.Modes.None
|
||||
Me.TXT_LOG.CaptionVisible = False
|
||||
Me.TXT_LOG.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TXT_LOG.GroupBoxed = True
|
||||
Me.TXT_LOG.GroupBoxText = "Log data"
|
||||
Me.TXT_LOG.Lines = New String(-1) {}
|
||||
Me.TXT_LOG.Location = New System.Drawing.Point(3, 284)
|
||||
Me.TXT_LOG.Multiline = True
|
||||
Me.TXT_LOG.Name = "TXT_LOG"
|
||||
Me.TXT_LOG.Size = New System.Drawing.Size(578, 69)
|
||||
Me.TXT_LOG.TabIndex = 5
|
||||
'
|
||||
'TXT_FILES
|
||||
'
|
||||
ActionButton8.BackgroundImage = CType(resources.GetObject("ActionButton8.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton8.Dock = System.Windows.Forms.DockStyle.Top
|
||||
ActionButton8.Name = "Add"
|
||||
ActionButton8.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Add
|
||||
ActionButton8.ToolTipText = "Add files"
|
||||
ActionButton9.BackgroundImage = CType(resources.GetObject("ActionButton9.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton9.Dock = System.Windows.Forms.DockStyle.Top
|
||||
ActionButton9.Name = "Clear"
|
||||
ActionButton9.Tag = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons.Clear
|
||||
ActionButton9.ToolTipText = "Clear files"
|
||||
Me.TXT_FILES.Buttons.Add(ActionButton8)
|
||||
Me.TXT_FILES.Buttons.Add(ActionButton9)
|
||||
Me.TXT_FILES.CaptionDock = System.Windows.Forms.DockStyle.Top
|
||||
Me.TXT_FILES.CaptionMode = PersonalUtilities.Forms.Controls.Base.ICaptionControl.Modes.None
|
||||
Me.TXT_FILES.CaptionVisible = False
|
||||
Me.TXT_FILES.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TXT_FILES.GroupBoxed = True
|
||||
Me.TXT_FILES.GroupBoxText = "Files"
|
||||
Me.TXT_FILES.Lines = New String(-1) {}
|
||||
Me.TXT_FILES.Location = New System.Drawing.Point(3, 359)
|
||||
Me.TXT_FILES.Multiline = True
|
||||
Me.TXT_FILES.Name = "TXT_FILES"
|
||||
Me.TXT_FILES.Size = New System.Drawing.Size(578, 69)
|
||||
Me.TXT_FILES.TabIndex = 6
|
||||
Me.TXT_FILES.TextBoxReadOnly = True
|
||||
Me.TXT_FILES.TextToolTip = "Attach files to your message (only works with anonymous message)"
|
||||
Me.TXT_FILES.TextToolTipEnabled = True
|
||||
'
|
||||
'BugReporterForm
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.CancelButton = Me.BTT_CANCEL
|
||||
Me.ClientSize = New System.Drawing.Size(584, 461)
|
||||
Me.Controls.Add(TP_MAIN)
|
||||
Me.KeyPreview = True
|
||||
Me.MinimumSize = New System.Drawing.Size(600, 500)
|
||||
Me.Name = "BugReporterForm"
|
||||
Me.Text = "New message"
|
||||
TP_MAIN.ResumeLayout(False)
|
||||
TP_BUTTONS.ResumeLayout(False)
|
||||
CType(Me.TXT_DESCR, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.TXT_URL_PROFILE, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.TXT_URL_POST, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.TXT_REPRODUCE, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.TXT_EXPECT, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.TXT_LOG, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.TXT_FILES, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
Private WithEvents TXT_DESCR As PersonalUtilities.Forms.Controls.TextBoxExtended
|
||||
Private WithEvents TXT_URL_PROFILE As PersonalUtilities.Forms.Controls.TextBoxExtended
|
||||
Private WithEvents TXT_URL_POST As PersonalUtilities.Forms.Controls.TextBoxExtended
|
||||
Private WithEvents TXT_REPRODUCE As PersonalUtilities.Forms.Controls.TextBoxExtended
|
||||
Private WithEvents TXT_EXPECT As PersonalUtilities.Forms.Controls.TextBoxExtended
|
||||
Private WithEvents TXT_LOG As PersonalUtilities.Forms.Controls.TextBoxExtended
|
||||
Private WithEvents TT_MAIN As ToolTip
|
||||
Private WithEvents BTT_EMAIL As Button
|
||||
Private WithEvents BTT_GITHUB As Button
|
||||
Private WithEvents BTT_COPY As Button
|
||||
Private WithEvents BTT_CANCEL As Button
|
||||
Private WithEvents BTT_ANON As Button
|
||||
Private WithEvents TXT_FILES As PersonalUtilities.Forms.Controls.TextBoxExtended
|
||||
End Class
|
||||
End Namespace
|
||||
225
SCrawler.YouTube/Editors/BugReporterForm.resx
Normal file
@@ -0,0 +1,225 @@
|
||||
<?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>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="ActionButton1.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
xAAADsQBlSsOGwAAAIZJREFUOE+1j10KwCAMgz2b755xl/IsvnaL2K20UfbDAmEako+ZROSTafjE12Go
|
||||
tbbB43rK5xSAQq1VYFtmeQBoqZTSreVZvgTknM8yyyjA/qodsDF9gspD2Bj6B+DH+NqzhQQAG+POMnSX
|
||||
AFuc5QFgn6ClHh5iOQVAKNixyucB8NY0vG9JOzzyhrdq5IRgAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="ActionButton2.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
xAAADsQBlSsOGwAAAIZJREFUOE+1j10KwCAMgz2b755xl/IsvnaL2K20UfbDAmEako+ZROSTafjE12Go
|
||||
tbbB43rK5xSAQq1VYFtmeQBoqZTSreVZvgTknM8yyyjA/qodsDF9gspD2Bj6B+DH+NqzhQQAG+POMnSX
|
||||
AFuc5QFgn6ClHh5iOQVAKNixyucB8NY0vG9JOzzyhrdq5IRgAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="ActionButton3.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
xAAADsQBlSsOGwAAAIZJREFUOE+1j10KwCAMgz2b755xl/IsvnaL2K20UfbDAmEako+ZROSTafjE12Go
|
||||
tbbB43rK5xSAQq1VYFtmeQBoqZTSreVZvgTknM8yyyjA/qodsDF9gspD2Bj6B+DH+NqzhQQAG+POMnSX
|
||||
AFuc5QFgn6ClHh5iOQVAKNixyucB8NY0vG9JOzzyhrdq5IRgAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="ActionButton4.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
xAAADsQBlSsOGwAAAIZJREFUOE+1j10KwCAMgz2b755xl/IsvnaL2K20UfbDAmEako+ZROSTafjE12Go
|
||||
tbbB43rK5xSAQq1VYFtmeQBoqZTSreVZvgTknM8yyyjA/qodsDF9gspD2Bj6B+DH+NqzhQQAG+POMnSX
|
||||
AFuc5QFgn6ClHh5iOQVAKNixyucB8NY0vG9JOzzyhrdq5IRgAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="ActionButton5.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
xAAADsQBlSsOGwAAAIZJREFUOE+1j10KwCAMgz2b755xl/IsvnaL2K20UfbDAmEako+ZROSTafjE12Go
|
||||
tbbB43rK5xSAQq1VYFtmeQBoqZTSreVZvgTknM8yyyjA/qodsDF9gspD2Bj6B+DH+NqzhQQAG+POMnSX
|
||||
AFuc5QFgn6ClHh5iOQVAKNixyucB8NY0vG9JOzzyhrdq5IRgAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="ActionButton6.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAAR5JREFUOE+VkjFqwzAUhn2D9iShRyi+QhYbGujg3ZATZPKYdC6FQhPwlAMkg3dP
|
||||
WQwhyWIyJIUW5NqyPb7oCVtIlhVTwYf8nv7/t2zJagel9KmqKsIACYL9RjI8UHz5zshougZr/AEvbxEP
|
||||
aZCDBY3VslixaJvX3wzkkDiOwbZtDRGA5vdNAg+TL27qgmt5XkBG/gTdAG7Gt+3PP9oOaEGFCVEC6rp+
|
||||
5g9MfM/c5e4OsEZMZkQEtGL5H2DdZ5JRArDwPA+iKII0TfkC9vroC9j5vq8JTWw3WzWgLMtZGIaa0MR8
|
||||
vlAD8PYlSaIJTTiOowY0p0Bc19XEJo6HE59FAPuMzyAINKGJ1XLFZxHALtMrnkBXOIQIIIQ8YvF/KrgB
|
||||
cMaRN0UdBBkAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="ActionButton7.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
xAAADsQBlSsOGwAAAIZJREFUOE+1j10KwCAMgz2b755xl/IsvnaL2K20UfbDAmEako+ZROSTafjE12Go
|
||||
tbbB43rK5xSAQq1VYFtmeQBoqZTSreVZvgTknM8yyyjA/qodsDF9gspD2Bj6B+DH+NqzhQQAG+POMnSX
|
||||
AFuc5QFgn6ClHh5iOQVAKNixyucB8NY0vG9JOzzyhrdq5IRgAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="TP_BUTTONS.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="TT_MAIN.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="BTT_ANON.ToolTip" xml:space="preserve">
|
||||
<value>Send an anonymous message.
|
||||
The developer will not be able you contact you back.
|
||||
You can attach files (images, photos) to your message.
|
||||
If you would like a response from the developer, response, please add your contact details (email, Discord, etc.).</value>
|
||||
</data>
|
||||
<data name="ActionButton8.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
|
||||
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsTAAALEwEAmpwYAAADmUlE
|
||||
QVRIS62WWWxMURjHL220JW1HausmlFrDFKUhnUGH6bRFzJ2idImlC0Vp2mlji1A8iNhCPIjIRES8EU+W
|
||||
h2oEtbSDTk3HNNM7S01VKsXjkb/vXBo3k1Ee7sMvmZzzzf//ne/+z50RAAxL1MUIG4G/YAv3HSVhF5Vw
|
||||
IYNdz3LadVj9RgdTB+HQYYPHIJuE1ocSdlEJFzG+1bPRLQ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P1DOwcaG/8I+/LRB+At7psBnyDBG0AAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="ActionButton9.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
xAAADsQBlSsOGwAAAIZJREFUOE+1j10KwCAMgz2b755xl/IsvnaL2K20UfbDAmEako+ZROSTafjE12Go
|
||||
tbbB43rK5xSAQq1VYFtmeQBoqZTSreVZvgTknM8yyyjA/qodsDF9gspD2Bj6B+DH+NqzhQQAG+POMnSX
|
||||
AFuc5QFgn6ClHh5iOQVAKNixyucB8NY0vG9JOzzyhrdq5IRgAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
238
SCrawler.YouTube/Editors/BugReporterForm.vb
Normal file
@@ -0,0 +1,238 @@
|
||||
' 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
|
||||
Imports System.ComponentModel
|
||||
Imports PersonalUtilities.Bots
|
||||
Imports PersonalUtilities.Tools
|
||||
Imports PersonalUtilities.Forms
|
||||
Imports PersonalUtilities.Forms.Controls.Base
|
||||
Imports PersonalUtilities.Functions.XML
|
||||
Imports PersonalUtilities.Functions.Messaging
|
||||
Imports BStyle = PersonalUtilities.Bots.IBot.Styles
|
||||
Imports ADB = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons
|
||||
Namespace Editors
|
||||
Public Class BugReporterForm
|
||||
#Region "Declarations"
|
||||
Private Const MsgTitle As String = "Bug report"
|
||||
Private ReadOnly MyView As FormView
|
||||
Private ReadOnly MyFieldsChecker As FieldsChecker
|
||||
Private MyProgramInfo As String
|
||||
Private MyProgramInfoPopulated As Boolean = False
|
||||
Private ReadOnly MyProgramText As String
|
||||
Private ReadOnly MyCurrentVersion As Version
|
||||
Private ReadOnly MyIsYouTube As Boolean
|
||||
Private ReadOnly MyEnvirData As DownloadObjects.STDownloader.IDownloaderSettings
|
||||
Private ReadOnly MyAdditText As String
|
||||
Private ReadOnly MyCache As CacheKeeper
|
||||
#End Region
|
||||
#Region "Initializer"
|
||||
Public Sub New(ByVal Cache As CacheKeeper, ByVal DesignXML As EContainer, ByVal ProgramText As String, ByVal CurrentVersion As Version, ByVal IsYouTube As Boolean,
|
||||
ByVal EnvirData As DownloadObjects.STDownloader.IDownloaderSettings, Optional ByVal AdditText As String = Nothing)
|
||||
InitializeComponent()
|
||||
MyView = New FormView(Me, DesignXML)
|
||||
MyFieldsChecker = New FieldsChecker
|
||||
MyCache = Cache
|
||||
MyProgramText = ProgramText
|
||||
MyCurrentVersion = CurrentVersion
|
||||
MyIsYouTube = IsYouTube
|
||||
MyEnvirData = EnvirData
|
||||
MyAdditText = AdditText
|
||||
Icon = ImageRenderer.GetIcon(My.Resources.MailPic_16, EDP.ReturnValue)
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Form handlers"
|
||||
Private Async Sub BugReporterForm_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
MyView.Import()
|
||||
MyView.SetFormSize()
|
||||
With MyFieldsChecker
|
||||
.AddControl(Of String)(TXT_DESCR, TXT_DESCR.GroupBoxText)
|
||||
.EndLoaderOperations()
|
||||
End With
|
||||
TXT_LOG.Text = MyMainLOG
|
||||
Await Task.Run(Sub()
|
||||
MyProgramInfo = ProgramInfo.GetProgramText(MyProgramText.IfNullOrEmpty(IIf(MyIsYouTube, "YouTube downloader", "SCrawler")),
|
||||
MyCurrentVersion, MyIsYouTube, MyEnvirData, MyAdditText)
|
||||
MyProgramInfoPopulated = True
|
||||
End Sub)
|
||||
End Sub
|
||||
Private Sub BugReporterForm_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
|
||||
MyView.Dispose()
|
||||
MyFieldsChecker.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Message"
|
||||
Private Sub WaitLoadingDone()
|
||||
While Not MyProgramInfoPopulated : Threading.Thread.Sleep(100) : End While
|
||||
End Sub
|
||||
Private Function CreateMessage(ByVal ForGitHub As Boolean, Optional ByVal ForDiscord As Boolean = False) As Object
|
||||
Try
|
||||
Dim nl$ = vbNewLine.StringDup(2)
|
||||
Dim data As New List(Of BotMessage)
|
||||
Dim t$ = String.Empty
|
||||
Dim discordAppendNl As Action = Sub() data.Add(New BotMessage(vbNewLine))
|
||||
Dim appendNewLine As Action = Sub() If ForDiscord Then data.Add(New BotMessage(nl)) Else t &= nl
|
||||
Dim ghBold As Func(Of String, Object) = Function(ByVal input As String) As Object
|
||||
If ForDiscord Then
|
||||
Return New BotMessage(input, BStyle.Bold)
|
||||
Else
|
||||
Return String.Format("{1}{0}{1}", input, IIf(ForGitHub, "**", ""))
|
||||
End If
|
||||
End Function
|
||||
Dim appendData As Action(Of Object) = Sub(ByVal input As Object)
|
||||
If ForDiscord Then
|
||||
discordAppendNl.Invoke
|
||||
data.Add(If(TypeOf input Is BotMessage, input, New BotMessage(input.ToString)))
|
||||
Else
|
||||
t.StringAppendLine(input)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
appendData(ghBold("Describe the bug"))
|
||||
appendData(TXT_DESCR.Text)
|
||||
If Not TXT_URL_PROFILE.IsEmptyString Then appendData($"Profile URL: {TXT_URL_PROFILE.Text}")
|
||||
If Not TXT_URL_POST.IsEmptyString Then appendData($"Post URL: {TXT_URL_POST.Text}")
|
||||
If Not TXT_REPRODUCE.IsEmptyString Then
|
||||
appendNewLine.Invoke
|
||||
appendData(ghBold("To Reproduce"))
|
||||
appendData(TXT_REPRODUCE.Text)
|
||||
End If
|
||||
If Not TXT_EXPECT.IsEmptyString Then
|
||||
appendNewLine.Invoke
|
||||
appendData(ghBold("Expected behavior"))
|
||||
appendData(TXT_EXPECT.Text)
|
||||
End If
|
||||
If Not TXT_LOG.IsEmptyString Then
|
||||
appendNewLine.Invoke
|
||||
If ForDiscord Then
|
||||
data.Add(New BotMessage(TXT_LOG.Text, BStyle.Code))
|
||||
ElseIf ForGitHub Then
|
||||
appendData($"<details><summary>Log data</summary><pre>{TXT_LOG.Text}</pre></details>")
|
||||
Else
|
||||
appendData(ghBold("LOG"))
|
||||
appendData(TXT_LOG.Text)
|
||||
End If
|
||||
End If
|
||||
|
||||
WaitLoadingDone()
|
||||
appendNewLine.Invoke
|
||||
appendData(ghBold("Release information:"))
|
||||
appendData(MyProgramInfo)
|
||||
|
||||
Return If(ForDiscord, data, t)
|
||||
Catch ex As Exception
|
||||
Return ErrorsDescriber.Execute(EDP.SendToLog + EDP.ReturnValue, ex, "[BugReporterForm.CreateMessage]")
|
||||
End Try
|
||||
End Function
|
||||
Private Function ValidateFields(Optional ByVal SimpleMode As Boolean = False) As Boolean
|
||||
If MyFieldsChecker.AllParamsOK Then
|
||||
Dim opts$ = String.Empty
|
||||
If TXT_URL_PROFILE.IsEmptyString Then opts.StringAppend("profile URL")
|
||||
If TXT_URL_POST.IsEmptyString Then opts.StringAppend("post URL")
|
||||
If TXT_LOG.Text.IsEmptyString Then opts.StringAppend("LOG")
|
||||
Return opts.IsEmptyString OrElse SimpleMode OrElse
|
||||
MsgBoxE({$"You haven't completed the following fields: {opts}.{vbCr}Are you sure you want to skip them?",
|
||||
MsgTitle}, vbExclamation,,, {"Process", "Cancel"}) = 0
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
#End Region
|
||||
#Region "Buttons"
|
||||
Private Sub BTT_ANON_Click(sender As Object, e As EventArgs) Handles BTT_ANON.Click
|
||||
Try
|
||||
If ValidateFields(True) Then
|
||||
Dim files As List(Of SFile) = Nothing
|
||||
If TXT_FILES.Lines.ListExists Then files.ListAddList(TXT_FILES.Lines, LAP.NotContainsOnly)
|
||||
Dim msgs As New List(Of BotMessage)
|
||||
Dim isSimple As Boolean = False
|
||||
Dim aMsg$ = String.Empty
|
||||
Select Case MsgBoxE(New MMessage("Do you want to send a simple message or report a bug?", MsgTitle,
|
||||
{New MsgBoxButton("Nice", "Say something nice to the developer." & vbCr &
|
||||
"You can also attach cat picture :-)" & vbCr &
|
||||
$"The message will be sent from the '{TXT_DESCR.GroupBoxText}' field."),
|
||||
New MsgBoxButton("Simple", $"The developer will only receive the message from the '{TXT_DESCR.GroupBoxText}' field."),
|
||||
New MsgBoxButton("Bug report", "The developer will receive a full bug report."),
|
||||
"Cancel"}, vbQuestion) With {.ButtonsPerRow = 4, .DefaultButton = 2, .CancelButton = 3}).Index
|
||||
Case 0 : msgs.Add(TXT_DESCR.Text) : aMsg = $"{vbCr}Thank you very much. I'm very grateful for your messages. You are awesome!"
|
||||
Case 1 : isSimple = True : msgs.Add(TXT_DESCR.Text)
|
||||
Case 2 : msgs = CreateMessage(False, True)
|
||||
Case Else : Exit Sub
|
||||
End Select
|
||||
If msgs.ListExists Then
|
||||
Dim nErr As New ErrorsDescriber(EDP.None)
|
||||
Using d As New DiscordBot With {.Credential = DiscordWebHook, .User = "Anonymous user"}
|
||||
d.SendMessage(New BotMessage(msgs.ToArray), EDP.ThrowException)
|
||||
If isSimple Then WaitLoadingDone() : d.SendMessage(MyProgramInfo, nErr)
|
||||
If files.ListExists Then files.ForEach(Sub(ff) d.SendFile(BotMessage.FromFile(ff),, nErr))
|
||||
End Using
|
||||
msgs.Clear()
|
||||
MsgBoxE({$"Your message has been sent to the developer.{aMsg}", MsgTitle})
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBoxE({"Something is wrong. Your message has not been sent to the developer.", MsgTitle}, vbCritical)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub BTT_EMAIL_Click(sender As Object, e As EventArgs) Handles BTT_EMAIL.Click
|
||||
If ValidateFields() Then
|
||||
Dim msg$ = CreateMessage(False)
|
||||
Dim cmd$ = "START mailto:""andyprogram@proton.me?to=andyprogram@proton.me&subject=Application%%20bug%%20report"""
|
||||
BufferText = msg
|
||||
MsgBoxE({"The message has been copied to your clipboard. Click OK and paste this message into the window that opens.", MsgTitle})
|
||||
Using b As New BatchExecutor
|
||||
b.FileExchanger = MyCache.NewInstance(Of BatchFileExchanger)
|
||||
b.Execute(cmd)
|
||||
End Using
|
||||
End If
|
||||
End Sub
|
||||
Private Sub BTT_GITHUB_Click(sender As Object, e As EventArgs) Handles BTT_GITHUB.Click
|
||||
If ValidateFields() Then
|
||||
Dim msg$ = CreateMessage(True)
|
||||
BufferText = msg
|
||||
MsgBoxE({"The message has been copied to your clipboard. Create a new issue on GitHub and paste this message.", MsgTitle})
|
||||
Try : Process.Start("https://github.com/AAndyProgram/SCrawler/issues/new?assignees=&labels=&projects=&template=custom.md&title=") : Catch : End Try
|
||||
End If
|
||||
End Sub
|
||||
Private Sub BTT_COPY_Click(sender As Object, e As EventArgs) Handles BTT_COPY.Click
|
||||
If ValidateFields() Then
|
||||
Dim msg$ = CreateMessage(MsgBoxE({"Will you post this message on GitHub?", MsgTitle}, vbQuestion + vbYesNo) = vbYes)
|
||||
BufferText = msg
|
||||
MsgBoxE({"The message has been copied to your clipboard.", MsgTitle})
|
||||
End If
|
||||
End Sub
|
||||
Private Sub BTT_CANCEL_Click(sender As Object, e As EventArgs) Handles BTT_CANCEL.Click
|
||||
DialogResult = DialogResult.Cancel
|
||||
Close()
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Logs"
|
||||
Private Sub TXT_LOG_ActionOnButtonClick(ByVal Sender As Object, ByVal e As ActionButtonEventArgs) Handles TXT_LOG.ActionOnButtonClick
|
||||
If e.DefaultButton = ADB.Open Then
|
||||
Dim files As List(Of SFile) = SFile.SelectFiles("LOGs\",, "Select log files", "Log files|*.txt|All files|*.*", EDP.ReturnValue)
|
||||
If files.ListExists Then
|
||||
Dim t$
|
||||
For Each file As SFile In files
|
||||
t = file.GetText
|
||||
If Not t.IsEmptyString Then _
|
||||
TXT_LOG.Text = $"{TXT_LOG.Text}{If(TXT_LOG.Text.IsEmptyString, String.Empty, vbNewLine.StringDup(2))}{file.Name}{vbNewLine}{t}"
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub TXT_FILES_ActionOnButtonClick(ByVal Sender As Object, ByVal e As ActionButtonEventArgs) Handles TXT_FILES.ActionOnButtonClick
|
||||
Try
|
||||
If e.DefaultButton = ADB.Add Then
|
||||
Dim f As List(Of SFile) = SFile.SelectFiles(,, "Select files to be sent", "Images|*.jpg;*.jpeg;*.png;*.webp;*.webm;*.gif|All files|*.*", EDP.ReturnValue)
|
||||
If f.ListExists Then TXT_FILES.Lines = ListAddList(Nothing, TXT_FILES.Lines.Concat(f.Select(Function(ff) ff.ToString)),
|
||||
LAP.NotContainsOnly, EDP.ReturnValue).ToArray
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -7,6 +7,8 @@
|
||||
' This program is distributed in the hope that it will be useful,
|
||||
' but WITHOUT ANY WARRANTY
|
||||
Imports PersonalUtilities.Tools
|
||||
Imports PersonalUtilities.Tools.Web
|
||||
Imports PersonalUtilities.Functions.Messaging
|
||||
Imports SCrawler.DownloadObjects.STDownloader
|
||||
Public Module MainModShared
|
||||
Public Property BATCH As BatchExecutor
|
||||
@@ -36,4 +38,98 @@ Public Module MainModShared
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
Public Sub ShowProgramInfo(ByVal ProgramText As String, ByVal CurrentVersion As Version, ByVal CheckForUpdate As Boolean, ByVal Force As Boolean,
|
||||
ByVal EnvirData As IDownloaderSettings, ByVal IsYouTube As Boolean,
|
||||
Optional ByRef NewVersionDestination As String = Nothing, Optional ByVal ShowNewVersionNotification As Boolean = True,
|
||||
Optional ByVal AdditText As String = Nothing)
|
||||
Try
|
||||
Dim GoToSite As New MsgBoxButton("Go to site") With {.CallBack = Sub(r, n, b) Process.Start("https://github.com/AAndyProgram/SCrawler/releases/latest")}
|
||||
If CheckForUpdate AndAlso GitHub.NewVersionExists(CurrentVersion, "AAndyProgram", "SCrawler", NewVersionDestination) Then
|
||||
If ShowNewVersionNotification Or Force Then
|
||||
If MsgBoxE(New MMessage($"{ProgramText}: new version detected" & vbCr &
|
||||
$"Current version: {CurrentVersion}" & vbCr &
|
||||
$"New version: {NewVersionDestination}",
|
||||
"New version",
|
||||
{"OK", GoToSite, "Disable notifications"})) = 2 Then ShowNewVersionNotification = False
|
||||
End If
|
||||
Else
|
||||
If Force Then
|
||||
Dim pVer$ = $"{ProgramText} v{CurrentVersion} ({IIf(Environment.Is64BitProcess, "x64", "x86")})"
|
||||
Dim eText$ = Editors.ProgramInfo.GetProgramBaseText(ProgramText, CurrentVersion, AdditText)
|
||||
Dim m As New MMessage($"{pVer}" & vbCr &
|
||||
"Address: https://github.com/AAndyProgram/SCrawler" & vbCr &
|
||||
"Created by Greek LGBT person Andy (Gay)",
|
||||
"Program information",
|
||||
{"OK",
|
||||
GoToSite,
|
||||
New MsgBoxButton("Environment", "Show program environment") With {
|
||||
.IsDialogResultButton = False,
|
||||
.CallBack = Sub(r, n, b) ShowProgramEnvir(EnvirData, IsYouTube, eText)}
|
||||
}) With {.DefaultButton = 0, .CancelButton = 0}
|
||||
If Not AdditText.IsEmptyString Then m.Text &= $"{vbCr}{AdditText}"
|
||||
m.Show()
|
||||
End If
|
||||
ShowNewVersionNotification = True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub ShowProgramEnvir(ByVal EnvirData As IDownloaderSettings, ByVal IsYouTube As Boolean, ByVal AdditCopyText As String)
|
||||
Dim m As New MMessage(Editors.ProgramInfo.GetProgramEnvirText(EnvirData, IsYouTube), "Program environment", {"OK", "Copy"}) With {.Editable = True, .DefaultButton = 0, .CancelButton = 0}
|
||||
If m.Text = Editors.ProgramInfo.EnvironmentNotFound Then m.Style = vbCritical
|
||||
m.Text = $"{AdditCopyText}{vbCr}{m.Text}"
|
||||
If m.Show() = 1 Then BufferText = m.Text
|
||||
End Sub
|
||||
End Module
|
||||
Namespace Editors
|
||||
Public NotInheritable Class ProgramInfo
|
||||
Public Const EnvironmentNotFound As String = "Environment not found"
|
||||
Private Sub New()
|
||||
End Sub
|
||||
Public Shared Function GetProgramText(ByVal ProgramText As String, ByVal CurrentVersion As Version, ByVal IsYouTube As Boolean,
|
||||
ByVal EnvirData As IDownloaderSettings, Optional ByVal AdditText As String = Nothing) As String
|
||||
Return GetProgramBaseText(ProgramText, CurrentVersion, AdditText) & vbNewLine & GetProgramEnvirText(EnvirData, IsYouTube)
|
||||
End Function
|
||||
Public Shared Function GetProgramBaseText(ByVal ProgramText As String, ByVal CurrentVersion As Version, Optional ByVal AdditText As String = Nothing) As String
|
||||
Dim pVer$ = $"{ProgramText} v{CurrentVersion} ({IIf(Environment.Is64BitProcess, "x64", "x86")})"
|
||||
Dim WinVer$ = String.Empty
|
||||
Try : WinVer = $"OS: {My.Computer.Info.OSFullName} ({IIf(Environment.Is64BitOperatingSystem, "x64", "x86")})" : Catch : End Try
|
||||
Return pVer.StringDup(1).StringAppendLine(WinVer).StringAppendLine(AdditText)
|
||||
End Function
|
||||
Public Shared Function GetProgramEnvirText(ByVal EnvirData As IDownloaderSettings, ByVal IsYouTube As Boolean) As String
|
||||
Try
|
||||
Dim output$ = String.Empty
|
||||
Using b As New BatchExecutor(True)
|
||||
Dim f As SFile
|
||||
Dim cmd$, ff$, vText$
|
||||
|
||||
For i% = 0 To IIf(IsYouTube, 1, 3)
|
||||
cmd = "--version"
|
||||
Select Case i
|
||||
Case 0 : f = EnvirData.ENVIR_FFMPEG : ff = "ffmpeg" : cmd = "-version"
|
||||
Case 1 : f = EnvirData.ENVIR_YTDLP : ff = "yt-dlp"
|
||||
Case 2 : f = EnvirData.ENVIR_GDL : ff = "gallery-dl"
|
||||
Case 3 : f = EnvirData.ENVIR_CURL : ff = "cURL"
|
||||
Case Else : f = Nothing : ff = Nothing : cmd = Nothing
|
||||
End Select
|
||||
If Not ff.IsEmptyString Then
|
||||
If f.IsEmptyString Then
|
||||
output.StringAppendLine($"[{ff}] NOT FOUND")
|
||||
Else
|
||||
b.Reset()
|
||||
b.Execute($"""{f}"" {cmd}", EDP.None)
|
||||
If b.OutputData.Count > 3 Then vText = b.OutputData(3) Else vText = "undefined"
|
||||
output.StringAppendLine($"{ff} version: {vText}")
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If output.IsEmptyString Then output = EnvironmentNotFound
|
||||
End Using
|
||||
Return output
|
||||
Catch ex As Exception
|
||||
Return ErrorsDescriber.Execute(EDP.SendToLog + EDP.ReturnValue, ex, "[ProgramInfo.GetProgramEnvirText]", String.Empty)
|
||||
End Try
|
||||
End Function
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2023.6.9.0")>
|
||||
<Assembly: AssemblyFileVersion("2023.6.9.0")>
|
||||
<Assembly: AssemblyVersion("2023.9.20.0")>
|
||||
<Assembly: AssemblyFileVersion("2023.9.20.0")>
|
||||
<Assembly: NeutralResourcesLanguage("en")>
|
||||
|
||||
10
SCrawler.YouTube/My Project/Resources.Designer.vb
generated
@@ -130,6 +130,16 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Public ReadOnly Property MailPic_16() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("MailPic_16", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
|
||||
@@ -139,6 +139,9 @@
|
||||
<data name="LinkPic_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Content\Pictures\LinkPic_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="MailPic_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Content\Pictures\MailPic_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="RulerPic_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Content\Pictures\RulerPic_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
||||
@@ -25,6 +25,7 @@ Namespace API.YouTube.Objects
|
||||
ReadOnly Property MediaType As UMTypes
|
||||
ReadOnly Property MediaState As UMStates
|
||||
Property IsMusic As Boolean
|
||||
Property IsShorts As Boolean
|
||||
Property ID As String
|
||||
Property Description As String
|
||||
Property PlaylistID As String
|
||||
|
||||
@@ -22,17 +22,8 @@ Imports UMStates = SCrawler.Plugin.UserMediaStates
|
||||
Imports CollectionModes = PersonalUtilities.Functions.XML.Objects.IXMLValuesCollection.Modes
|
||||
Namespace API.YouTube.Objects
|
||||
Public Class ContainerDateComparer : Implements IComparer(Of IYouTubeMediaContainer)
|
||||
Private ReadOnly NullDateValue As New Date
|
||||
Public Function Compare(ByVal x As IYouTubeMediaContainer, ByVal y As IYouTubeMediaContainer) As Integer Implements IComparer(Of IYouTubeMediaContainer).Compare
|
||||
If x.DateDownloaded = NullDateValue And y.DateDownloaded = NullDateValue Then
|
||||
Return x.DateCreated.CompareTo(y.DateCreated) * -1
|
||||
ElseIf x.DateDownloaded = NullDateValue Then
|
||||
Return -1
|
||||
ElseIf y.DateDownloaded = NullDateValue Then
|
||||
Return 1
|
||||
Else
|
||||
Return x.DateDownloaded.CompareTo(y.DateDownloaded) * -1
|
||||
End If
|
||||
End Function
|
||||
End Class
|
||||
Public MustInherit Class YouTubeMediaContainerBase : Implements IYouTubeMediaContainer
|
||||
@@ -74,6 +65,7 @@ Namespace API.YouTube.Objects
|
||||
End Set
|
||||
End Property
|
||||
Protected _MediaState As UMStates = UMStates.Unknown
|
||||
Protected _MediaStateOnLoad As UMStates = UMStates.Unknown
|
||||
<XMLEC> Public Property MediaState As UMStates Implements IYouTubeMediaContainer.MediaState, IUserMedia.DownloadState
|
||||
Get
|
||||
If _MediaState = UMStates.Unknown And HasElements Then
|
||||
@@ -120,7 +112,7 @@ Namespace API.YouTube.Objects
|
||||
End Set
|
||||
End Property
|
||||
<XMLEC(Name_IsMusic)> Public Property IsMusic As Boolean = False Implements IYouTubeMediaContainer.IsMusic
|
||||
<XMLEC> Public Property IsShorts As Boolean = False
|
||||
<XMLEC> Public Property IsShorts As Boolean = False Implements IYouTubeMediaContainer.IsShorts
|
||||
<XMLEC> Public Property ID As String Implements IYouTubeMediaContainer.ID, IUserMedia.PostID
|
||||
<XMLEC> Public Property Title As String Implements IDownloadableMedia.Title
|
||||
<XMLEC> Public Property Description As String Implements IYouTubeMediaContainer.Description
|
||||
@@ -600,7 +592,9 @@ Namespace API.YouTube.Objects
|
||||
Bitrate = 0
|
||||
_MediaType = UMTypes.Undefined
|
||||
If SelectedVideoIndex >= 0 Then
|
||||
cmd.StringAppend($"bv*[format_id={SelectedVideo.ID}]")
|
||||
'URGENT: 2023.3.4 -> 2023.7.6
|
||||
'cmd.StringAppend($"bv*[format_id={SelectedVideo.ID}]")
|
||||
cmd.StringAppend(SelectedVideo.ID)
|
||||
_Size = SelectedVideo.Size
|
||||
_MediaType = UMTypes.Video
|
||||
Height = SelectedVideo.Height
|
||||
@@ -611,7 +605,9 @@ Namespace API.YouTube.Objects
|
||||
End If
|
||||
If SelectedAudioIndex >= 0 Then
|
||||
Dim atCodec$
|
||||
cmd.StringAppend($"ba*[format_id={SelectedAudio.ID}]", "+")
|
||||
'URGENT: 2023.3.4 -> 2023.7.6
|
||||
'cmd.StringAppend($"ba*[format_id={SelectedAudio.ID}]", "+")
|
||||
cmd.StringAppend(SelectedAudio.ID, "+")
|
||||
If OutputAudioCodec.StringToLower = ac3 Then
|
||||
PostProcessing_AudioAC3 = True
|
||||
formats.StringAppend($"--audio-format {aac}", " ")
|
||||
@@ -642,7 +638,9 @@ Namespace API.YouTube.Objects
|
||||
subs = $"--write-subs --write-auto-subs --sub-format {OutputSubtitlesFormat.StringToLower} --sub-langs ""{subs}"" --convert-subs {OutputSubtitlesFormat.StringToLower}"
|
||||
End If
|
||||
If Not cmd.IsEmptyString Then
|
||||
cmd = $"yt-dlp -f ""{cmd}"""
|
||||
'URGENT: 2023.3.4 -> 2023.7.6
|
||||
'cmd = $"yt-dlp -f ""{cmd}"""
|
||||
cmd = $"yt-dlp -f {cmd}"
|
||||
If Not MyYouTubeSettings.ReplaceModificationDate Then cmd &= " --no-mtime"
|
||||
cmd.StringAppend(formats, " ")
|
||||
cmd.StringAppend(subs, " ")
|
||||
@@ -1026,6 +1024,7 @@ Namespace API.YouTube.Objects
|
||||
Dim fc As SFile = x.Value(Name_CachePath).CSFileP
|
||||
If fc.Exists(SFO.Path, False) AndAlso SFile.GetFiles(fc, "*.json",, EDP.ReturnValue).Count > 0 Then Parse(Nothing, fc, IsMusic)
|
||||
XMLPopulateData(Me, x)
|
||||
_MediaStateOnLoad = _MediaState
|
||||
_Exists = True
|
||||
If If(x(Name_CheckedElements)?.Count, 0) > 0 Then ApplyElementCheckedValue(x(Name_CheckedElements))
|
||||
If ArrayMaxResolution <> -10 Then SetMaxResolution(ArrayMaxResolution)
|
||||
@@ -1040,6 +1039,9 @@ Namespace API.YouTube.Objects
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Save"
|
||||
Protected Function NeedToSave() As Boolean
|
||||
Return Not _MediaStateOnLoad = _MediaState And Not FileSettings.Exists
|
||||
End Function
|
||||
Private Function GetThumbnails() As IEnumerable(Of SFile)
|
||||
If HasElements Then
|
||||
Return ListAddList(Of SFile)(New List(Of SFile)({ThumbnailFile}),
|
||||
@@ -1050,6 +1052,7 @@ Namespace API.YouTube.Objects
|
||||
End Function
|
||||
Public Overridable Sub Save() Implements IDownloadableMedia.Save
|
||||
Try
|
||||
If NeedToSave() Then
|
||||
Dim fSettings As SFile = FileSettings
|
||||
If fSettings.IsEmptyString Then fSettings = MyCacheSettings.NewFile
|
||||
Dim f As SFile = fSettings
|
||||
@@ -1086,10 +1089,13 @@ Namespace API.YouTube.Objects
|
||||
Using x As New XmlFile With {.AllowSameNames = True}
|
||||
fSettings.Extension = "xml"
|
||||
FileSettings = fSettings
|
||||
If NeedToSave() Then
|
||||
x.AddRange(ToEContainer.Elements)
|
||||
x.Name = "MediaContainer"
|
||||
x.Save(fSettings)
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ErrorsDescriber.Execute(EDP.SendToLog, ex, $"YouTubeMediaContainerBase.Save({FileSettings})")
|
||||
End Try
|
||||
@@ -1253,25 +1259,27 @@ Namespace API.YouTube.Objects
|
||||
obj.Height = AConvert(Of Integer)(ee.Value("height"), NumberProvider, -1)
|
||||
obj.FPS = AConvert(Of Double)(ee.Value("fps"), NumberProvider, -1)
|
||||
obj.Bitrate = AConvert(Of Double)(ee.Value("tbr"), NumberProvider, -1)
|
||||
obj.Protocol = ee.Value("protocol")
|
||||
If Not obj.Protocol.IsEmptyString Then obj.Protocol = obj.Protocol.Split("_").FirstOrDefault
|
||||
nValue = AConvert(Of Double)(ee.Value("filesize"), NumberProvider, -1)
|
||||
If nValue > 0 Then obj.Size = (nValue / 1024).RoundVal(2)
|
||||
sValue = ee.Value("vcodec")
|
||||
If validCodecValue(sValue) Then
|
||||
obj.Type = UMTypes.Video
|
||||
obj.Codec = sValue.Split(".").First
|
||||
If validCodecValue(ee.Value("acodec")) Then
|
||||
obj.Type = av
|
||||
If obj.Size <= 0 Then
|
||||
nValue = AConvert(Of Double)(ee.Value("filesize_approx"), NumberProvider, -1)
|
||||
If nValue > 0 Then obj.Size = (nValue / 1024).RoundVal(2)
|
||||
End If
|
||||
End If
|
||||
If obj.Size <= 0 And obj.Bitrate > 0 And Duration.TotalSeconds > 0 Then _
|
||||
obj.Size = (obj.Bitrate / 8 * Duration.TotalSeconds).RoundVal(2)
|
||||
|
||||
sValue = ee.Value("vcodec")
|
||||
If validCodecValue(sValue) Then
|
||||
obj.Type = UMTypes.Video
|
||||
obj.Codec = sValue.Split(".").First
|
||||
If validCodecValue(ee.Value("acodec")) Then obj.Type = av
|
||||
Else
|
||||
sValue = ee.Value("acodec")
|
||||
If validCodecValue(sValue) Then
|
||||
obj.Type = UMTypes.Audio
|
||||
obj.Codec = sValue.Split(".").First
|
||||
obj.Bitrate = AConvert(Of Double)(ee.Value("tbr"), NumberProvider, -1)
|
||||
Else
|
||||
Continue For
|
||||
End If
|
||||
@@ -1301,8 +1309,29 @@ Namespace API.YouTube.Objects
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
Dim protocolCleaner As Action =
|
||||
Sub()
|
||||
If Not MyYouTubeSettings.DefaultProtocol.Value = Protocols.Undefined And
|
||||
Not MyYouTubeSettings.DefaultProtocol.Value = Protocols.Any Then
|
||||
Dim data As New List(Of MediaObject)(MediaObjects.Where(Function(mo) mo.ProtocolType = MyYouTubeSettings.DefaultProtocol.Value))
|
||||
If data.ListExists Then
|
||||
Dim dRem As Protocols = IIf(MyYouTubeSettings.DefaultProtocol.Value = Protocols.https, Protocols.m3u8, Protocols.https)
|
||||
Dim d As MediaObject
|
||||
Dim dr As New FPredicate(Of MediaObject)(Function(mo) mo.Height = d.Height And mo.ProtocolType = dRem)
|
||||
For Each d In data
|
||||
If MediaObjects.Count = 0 Then
|
||||
Exit For
|
||||
ElseIf MediaObjects.LongCount(dr) > 0 Then
|
||||
MediaObjects.RemoveAll(dr)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
If MediaObjects.Count > 0 And Not MyYouTubeSettings.DefaultVideoIncludeNullSize Then MediaObjects.RemoveAll(Function(mo) mo.Size <= 0)
|
||||
If MediaObjects.Count > 0 Then DupRemover.Invoke(UMTypes.Audio)
|
||||
If MediaObjects.Count > 0 Then DupRemover.Invoke(UMTypes.Video)
|
||||
If MediaObjects.Count > 0 Then protocolCleaner.Invoke
|
||||
If MediaObjects.Count > 0 Then
|
||||
MediaObjects.Sort()
|
||||
SelectedAudioIndex = MediaObjects.FindIndex(Function(mo) mo.Type = UMTypes.Audio)
|
||||
|
||||
@@ -121,6 +121,7 @@
|
||||
<Compile Include="Controls\PlayListParserForm.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Downloader\DownloadLocationsCollection.vb" />
|
||||
<Compile Include="Downloader\IDownloaderSettings.vb" />
|
||||
<Compile Include="Downloader\Notificator.vb" />
|
||||
<Compile Include="Downloader\MediaItem.Designer.vb">
|
||||
@@ -155,6 +156,13 @@
|
||||
</Compile>
|
||||
<Compile Include="Declarations.vb" />
|
||||
<Compile Include="Downloader\STDownloaderDeclarations.vb" />
|
||||
<Compile Include="Editors\BugReporterForm.Designer.vb">
|
||||
<DependentUpon>BugReporterForm.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Editors\BugReporterForm.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Editors\BugReporterFormDiscordWebHook.vb" />
|
||||
<Compile Include="MainModShared.vb" />
|
||||
<Compile Include="Objects\Channel.vb" />
|
||||
<Compile Include="Objects\IYouTubeMediaContainer.vb" />
|
||||
@@ -218,6 +226,9 @@
|
||||
<EmbeddedResource Include="Controls\VideoOption.resx">
|
||||
<DependentUpon>VideoOption.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Editors\BugReporterForm.resx">
|
||||
<DependentUpon>BugReporterForm.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>PublicVbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
@@ -317,5 +328,8 @@
|
||||
<ItemGroup>
|
||||
<None Include="Content\Pictures\StartPic_Green_16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Content\Pictures\MailPic_16.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
</Project>
|
||||
22
SCrawler.YouTubeDownloader/MainFrame.Designer.vb
generated
@@ -20,9 +20,12 @@ Partial Public Class MainFrame : Inherits SCrawler.DownloadObjects.STDownloader.
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(MainFrame))
|
||||
Dim CONTEXT_SEP_1 As System.Windows.Forms.ToolStripSeparator
|
||||
Me.TRAY_ICON = New System.Windows.Forms.NotifyIcon(Me.components)
|
||||
Me.TRAY_CONTEXT = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.BTT_TRAY_CLOSE = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.CONTEXT_BTT_ADD = New PersonalUtilities.Forms.Controls.KeyClick.ToolStripMenuItemKeyClick()
|
||||
CONTEXT_SEP_1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.TRAY_CONTEXT.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
@@ -32,13 +35,13 @@ Partial Public Class MainFrame : Inherits SCrawler.DownloadObjects.STDownloader.
|
||||
Me.TRAY_ICON.BalloonTipTitle = "YouTube Downloader"
|
||||
Me.TRAY_ICON.ContextMenuStrip = Me.TRAY_CONTEXT
|
||||
Me.TRAY_ICON.Icon = CType(resources.GetObject("TRAY_ICON.Icon"), System.Drawing.Icon)
|
||||
Me.TRAY_ICON.Text = "YouTube Downloader"
|
||||
Me.TRAY_ICON.Text = "YouTube Downloader" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "Ctrl+Click to add download"
|
||||
'
|
||||
'TRAY_CONTEXT
|
||||
'
|
||||
Me.TRAY_CONTEXT.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BTT_TRAY_CLOSE})
|
||||
Me.TRAY_CONTEXT.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.CONTEXT_BTT_ADD, CONTEXT_SEP_1, Me.BTT_TRAY_CLOSE})
|
||||
Me.TRAY_CONTEXT.Name = "ContextMenuStrip1"
|
||||
Me.TRAY_CONTEXT.Size = New System.Drawing.Size(181, 48)
|
||||
Me.TRAY_CONTEXT.Size = New System.Drawing.Size(181, 76)
|
||||
'
|
||||
'BTT_TRAY_CLOSE
|
||||
'
|
||||
@@ -47,6 +50,18 @@ Partial Public Class MainFrame : Inherits SCrawler.DownloadObjects.STDownloader.
|
||||
Me.BTT_TRAY_CLOSE.Size = New System.Drawing.Size(180, 22)
|
||||
Me.BTT_TRAY_CLOSE.Text = "Close"
|
||||
'
|
||||
'CONTEXT_BTT_ADD
|
||||
'
|
||||
Me.CONTEXT_BTT_ADD.Name = "CONTEXT_BTT_ADD"
|
||||
Me.CONTEXT_BTT_ADD.Size = New System.Drawing.Size(180, 22)
|
||||
Me.CONTEXT_BTT_ADD.Text = "Add"
|
||||
Me.CONTEXT_BTT_ADD.Image = Global.PersonalUtilities.My.Resources.PlusPic_Green_24
|
||||
'
|
||||
'CONTEXT_SEP_1
|
||||
'
|
||||
CONTEXT_SEP_1.Name = "CONTEXT_SEP_1"
|
||||
CONTEXT_SEP_1.Size = New System.Drawing.Size(177, 6)
|
||||
'
|
||||
'MainFrame
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -61,4 +76,5 @@ Partial Public Class MainFrame : Inherits SCrawler.DownloadObjects.STDownloader.
|
||||
Private WithEvents TRAY_ICON As NotifyIcon
|
||||
Private WithEvents TRAY_CONTEXT As ContextMenuStrip
|
||||
Private WithEvents BTT_TRAY_CLOSE As ToolStripMenuItem
|
||||
Private WithEvents CONTEXT_BTT_ADD As PersonalUtilities.Forms.Controls.KeyClick.ToolStripMenuItemKeyClick
|
||||
End Class
|
||||
@@ -123,6 +123,9 @@
|
||||
<metadata name="TRAY_CONTEXT.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>425, 17</value>
|
||||
</metadata>
|
||||
<metadata name="CONTEXT_SEP_1.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_TRAY_CLOSE.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
Imports System.ComponentModel
|
||||
Imports SCrawler.API.YouTube
|
||||
Imports PersonalUtilities.Forms
|
||||
Imports PersonalUtilities.Forms.Controls.KeyClick
|
||||
Public Class MainFrame
|
||||
Private WithEvents MyActivator As FormActivator
|
||||
Public Sub New()
|
||||
@@ -66,6 +67,12 @@ CloseResume:
|
||||
Private Sub BTT_TRAY_CLOSE_Click(sender As Object, e As EventArgs) Handles BTT_TRAY_CLOSE.Click
|
||||
If CheckForClose(False) Then _IgnoreCloseConfirm = True : _IgnoreTrayOptions = True : Close()
|
||||
End Sub
|
||||
Private Sub MyActivator_TrayIconClick(ByVal Sender As Object, ByVal e As KeyClickEventArgs) Handles MyActivator.TrayIconClick
|
||||
If e.MouseButton = MouseButtons.Left And e.Control Then
|
||||
BTT_ADD_KeyClick(Nothing, New KeyClickEventArgs)
|
||||
e.Handled = Not MyYouTubeSettings.ShowFormDownTrayClick
|
||||
End If
|
||||
End Sub
|
||||
Private Function CheckForClose(ByVal _Ignore As Boolean) As Boolean
|
||||
If MyYouTubeSettings.ExitConfirm And Not _Ignore Then
|
||||
Return MsgBoxE({"Do you want to close the program?", "Closing the program"}, MsgBoxStyle.YesNo) = MsgBoxResult.Yes
|
||||
@@ -77,6 +84,9 @@ CloseResume:
|
||||
MyBase.BTT_SETTINGS_Click(sender, e)
|
||||
TRAY_ICON.Visible = MyYouTubeSettings.CloseToTray
|
||||
End Sub
|
||||
Protected Overrides Sub BTT_ADD_KeyClick(ByVal Sender As ToolStripMenuItemKeyClick, ByVal e As KeyClickEventArgs) Handles CONTEXT_BTT_ADD.KeyClick
|
||||
MyBase.BTT_ADD_KeyClick(Sender, e)
|
||||
End Sub
|
||||
Protected Overrides Sub MyJob_Started(ByVal Sender As Object, ByVal e As EventArgs)
|
||||
TRAY_ICON.Icon = My.Resources.ArrowDownIcon_Orange_24
|
||||
End Sub
|
||||
|
||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2023.6.9.0")>
|
||||
<Assembly: AssemblyFileVersion("2023.6.9.0")>
|
||||
<Assembly: AssemblyVersion("2023.9.20.0")>
|
||||
<Assembly: AssemblyFileVersion("2023.9.20.0")>
|
||||
<Assembly: NeutralResourcesLanguage("en")>
|
||||
|
||||
@@ -6,9 +6,12 @@
|
||||
'
|
||||
' This program is distributed in the hope that it will be useful,
|
||||
' but WITHOUT ANY WARRANTY
|
||||
Imports PersonalUtilities.Forms
|
||||
Imports PersonalUtilities.Functions.RegularExpressions
|
||||
Namespace API.Base
|
||||
Friend Module Declarations
|
||||
Friend Const UserLabelName As String = "User"
|
||||
Friend Const SearchRequestLabelName As String = "Search request"
|
||||
Friend ReadOnly LNC As New ListAddParams(LAP.NotContainsOnly)
|
||||
Friend ReadOnly UnixDate32Provider As New ADateTime(ADateTime.Formats.Unix32)
|
||||
Friend ReadOnly UnixDate64Provider As New ADateTime(ADateTime.Formats.Unix64)
|
||||
@@ -16,5 +19,58 @@ Namespace API.Base
|
||||
Friend ReadOnly TitleHtmlConverter As Func(Of String, String) =
|
||||
Function(Input) SymbolsConverter.HTML.Decode(SymbolsConverter.Convert(Input, EDP.ReturnValue), EDP.ReturnValue).
|
||||
StringRemoveWinForbiddenSymbols().StringTrim()
|
||||
Friend ReadOnly Regex_VideosThumb_OG_IMAGE As RParams = RParams.DMS("meta.property=.og.image..content=""([^""]+)""", 1, EDP.ReturnValue)
|
||||
Friend Class ConcurrentDownloadsProvider : Inherits FieldsCheckerProviderBase
|
||||
Public Overrides Sub Reset()
|
||||
ErrorMessage = String.Empty
|
||||
MyBase.Reset()
|
||||
End Sub
|
||||
Public Overrides Function Convert(ByVal Value As Object, ByVal DestinationType As Type, ByVal Provider As IFormatProvider,
|
||||
Optional ByVal NothingArg As Object = Nothing, Optional ByVal e As ErrorsDescriber = Nothing) As Object
|
||||
Dim v% = AConvert(Of Integer)(Value, -1)
|
||||
Dim defV% = Settings.MaxUsersJobsCount
|
||||
If v.ValueBetween(1, defV) Then
|
||||
Return Value
|
||||
Else
|
||||
HasError = True
|
||||
If ACheck(Of Integer)(Value) Then
|
||||
ErrorMessage = $"The number of concurrent downloads must be greater than 0 and equal to or less than {defV} (global limit)."
|
||||
Else
|
||||
TypeError = True
|
||||
End If
|
||||
Return Nothing
|
||||
End If
|
||||
End Function
|
||||
End Class
|
||||
Friend Class TokenRefreshIntervalProvider : Inherits FieldsCheckerProviderBase
|
||||
Public Overrides Sub Reset()
|
||||
ErrorMessage = String.Empty
|
||||
MyBase.Reset()
|
||||
End Sub
|
||||
Public Overrides Function Convert(ByVal Value As Object, ByVal DestinationType As Type, ByVal Provider As IFormatProvider,
|
||||
Optional ByVal NothingArg As Object = Nothing, Optional ByVal e As ErrorsDescriber = Nothing) As Object
|
||||
Dim v% = AConvert(Of Integer)(Value, -1)
|
||||
If v > 0 Then
|
||||
Return Value
|
||||
ElseIf Not ACheck(Of Integer)(Value) Then
|
||||
TypeError = True
|
||||
Else
|
||||
ErrorMessage = $"The value of [{Name}] field must be greater than or equal to 1"
|
||||
End If
|
||||
HasError = True
|
||||
Return Nothing
|
||||
End Function
|
||||
End Class
|
||||
Friend ReadOnly Property CacheDeletionError(ByVal RootPath As SFile) As ErrorsDescriber
|
||||
Get
|
||||
Return New ErrorsDescriber(EDP.None) With {.Action = Sub(ee, eex, msg, obj) Settings.Cache.AddPath(RootPath)}
|
||||
End Get
|
||||
End Property
|
||||
Friend Function ValidateChangeSearchOptions(ByVal User As String, ByVal NewQuery As String, ByVal CurrentQuery As String) As Boolean
|
||||
Return MsgBoxE({$"Are you sure you want to change the query for user '{User}'?{vbCr}" &
|
||||
"It is highly recommended to add a new user with this query instead of changing current one." & vbCr &
|
||||
$"Current query: [{CurrentQuery}]{vbCr}New query: [{NewQuery}]",
|
||||
"Changing a query"}, vbExclamation,,, {"Process", "Cancel"}) = 0
|
||||
End Function
|
||||
End Module
|
||||
End Namespace
|
||||
31
SCrawler/API/Base/DeclaredNames.vb
Normal file
@@ -0,0 +1,31 @@
|
||||
' 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 API.Base
|
||||
Friend NotInheritable Class DeclaredNames
|
||||
Friend Const Header_Authorization As String = "authorization"
|
||||
Friend Const Header_CSRFToken As String = "x-csrf-token"
|
||||
|
||||
Friend Const ConcurrentDownloadsCaption As String = "Concurrent downloads"
|
||||
Friend Const ConcurrentDownloadsToolTip As String = "The number of concurrent downloads."
|
||||
Friend Const SavedPostsUserNameCaption As String = "Saved posts user"
|
||||
Friend Const SavedPostsUserNameToolTip As String = "Personal profile username"
|
||||
Friend Const GifsSpecialFolderCaption As String = "GIFs special folder"
|
||||
Friend Const GifsSpecialFolderToolTip As String = "Put the GIFs in a special folder" & vbCr &
|
||||
"This is a folder name, not an absolute path." & vbCr &
|
||||
"This folder(s) will be created relative to the user's root folder." & vbCr &
|
||||
"Examples:" & vbCr & "SomeFolderName" & vbCr & "SomeFolderName\SomeFolderName2"
|
||||
Friend Const GifsPrefixCaption As String = "GIF prefix"
|
||||
Friend Const GifsPrefixToolTip As String = "This prefix will be added to the beginning of the filename"
|
||||
Friend Const GifsDownloadCaption As String = "Download GIFs"
|
||||
Friend Const UseMD5ComparisonCaption As String = "Use MD5 comparison"
|
||||
Friend Const UseMD5ComparisonToolTip As String = "Each image will be checked for existence using MD5"
|
||||
Private Sub New()
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -66,28 +66,19 @@ Namespace API.Base.GDL
|
||||
Return urls
|
||||
End Function
|
||||
End Module
|
||||
Friend Class GDLBatch : Inherits BatchExecutor
|
||||
Friend Property TempPostsList As List(Of String)
|
||||
Friend Class GDLBatch : Inherits TokenBatch
|
||||
Friend Const UrlLibStart As String = "[urllib3.connectionpool][debug]"
|
||||
Friend Const UrlTextStart As String = UrlLibStart & " https"
|
||||
Friend Sub New()
|
||||
MyBase.New(True)
|
||||
Friend Sub New(ByVal _Token As Threading.CancellationToken)
|
||||
MyBase.New(_Token)
|
||||
MainProcessName = "gallery-dl"
|
||||
ChangeDirectory(Settings.GalleryDLFile.File)
|
||||
End Sub
|
||||
Public Overrides Sub Create()
|
||||
If TempPostsList Is Nothing Then TempPostsList = New List(Of String)
|
||||
MyBase.Create()
|
||||
End Sub
|
||||
Protected Overrides Async Sub OutputDataReceiver(ByVal Sender As Object, ByVal e As DataReceivedEventArgs)
|
||||
If Not ProcessKilled Then
|
||||
MyBase.OutputDataReceiver(Sender, e)
|
||||
Await Validate(e.Data)
|
||||
End If
|
||||
End Sub
|
||||
Protected Overridable Async Function Validate(ByVal Value As String) As Task
|
||||
If Not ProcessKilled AndAlso Await Task.Run(Of Boolean)(Function() Not Value.IsEmptyString AndAlso
|
||||
TempPostsList.Exists(Function(v) Value.Contains(v))) Then Kill()
|
||||
End Function
|
||||
End Class
|
||||
End Namespace
|
||||
89
SCrawler/API/Base/IUserData.vb
Normal file
@@ -0,0 +1,89 @@
|
||||
' 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
|
||||
Imports System.Threading
|
||||
Imports SCrawler.Plugin.Hosts
|
||||
Namespace API.Base
|
||||
Friend Interface IUserData : Inherits IComparable(Of UserDataBase), IComparable, IEquatable(Of UserDataBase), IIndexable, IDisposable
|
||||
Event UserUpdated(ByVal User As IUserData)
|
||||
Enum EraseMode As Integer
|
||||
None = 0
|
||||
Data = 1
|
||||
History = 2
|
||||
End Enum
|
||||
ReadOnly Property Site As String
|
||||
ReadOnly Property Name As String
|
||||
Property ID As String
|
||||
Property Options As String
|
||||
Property FriendlyName As String
|
||||
Property Description As String
|
||||
Property Favorite As Boolean
|
||||
Property Temporary As Boolean
|
||||
Property BackColor As Color?
|
||||
Property ForeColor As Color?
|
||||
Sub OpenSite(Optional ByVal e As ErrorsDescriber = Nothing)
|
||||
Sub DownloadData(ByVal Token As CancellationToken)
|
||||
Sub DownloadSingleObject(ByVal Data As YouTube.Objects.IYouTubeMediaContainer, ByVal Token As CancellationToken)
|
||||
Property ParseUserMediaOnly As Boolean
|
||||
ReadOnly Property IsSubscription As Boolean
|
||||
ReadOnly Property IsUser As Boolean
|
||||
#Region "Images"
|
||||
Function GetPicture() As Image
|
||||
Sub SetPicture(ByVal f As SFile)
|
||||
#End Region
|
||||
#Region "Collection support"
|
||||
ReadOnly Property IsCollection As Boolean
|
||||
ReadOnly Property CollectionName As String
|
||||
ReadOnly Property CollectionPath As SFile
|
||||
ReadOnly Property IncludedInCollection As Boolean
|
||||
ReadOnly Property UserModel As UsageModel
|
||||
ReadOnly Property CollectionModel As UsageModel
|
||||
ReadOnly Property IsVirtual As Boolean
|
||||
ReadOnly Property Labels As List(Of String)
|
||||
#End Region
|
||||
Property Exists As Boolean
|
||||
Property Suspended As Boolean
|
||||
Property ReadyForDownload As Boolean
|
||||
Property HOST As SettingsHost
|
||||
Property [File] As SFile
|
||||
Property FileExists As Boolean
|
||||
Property DownloadedPictures(ByVal Total As Boolean) As Integer
|
||||
Property DownloadedVideos(ByVal Total As Boolean) As Integer
|
||||
ReadOnly Property DownloadedTotal(Optional ByVal Total As Boolean = True) As Integer
|
||||
ReadOnly Property DownloadedInformation As String
|
||||
Property HasError As Boolean
|
||||
ReadOnly Property FitToAddParams As Boolean
|
||||
ReadOnly Property Key As String
|
||||
Property DownloadImages As Boolean
|
||||
Property DownloadVideos As Boolean
|
||||
Property DownloadMissingOnly As Boolean
|
||||
Property ScriptUse As Boolean
|
||||
Property ScriptData As String
|
||||
Function GetLVI(ByVal Destination As ListView) As ListViewItem
|
||||
Function GetLVIGroup(ByVal Destination As ListView) As ListViewGroup
|
||||
Sub LoadUserInformation()
|
||||
Sub UpdateUserInformation()
|
||||
''' <summary>
|
||||
''' 0 - Nothing removed<br/>
|
||||
''' 1 - User removed<br/>
|
||||
''' 2 - Collection removed<br/>
|
||||
''' 3 - Collection split
|
||||
''' </summary>
|
||||
Function Delete(Optional ByVal Multiple As Boolean = False, Optional ByVal CollectionValue As Integer = -1) As Integer
|
||||
Function EraseData(ByVal Mode As EraseMode) As Boolean
|
||||
Function MoveFiles(ByVal CollectionName As String, ByVal SpecialCollectionPath As SFile) As Boolean
|
||||
Function CopyFiles(ByVal DestinationPath As SFile, Optional ByVal e As ErrorsDescriber = Nothing) As Boolean
|
||||
Sub OpenFolder()
|
||||
Property DownloadTopCount As Integer?
|
||||
Property DownloadDateFrom As Date?
|
||||
Property DownloadDateTo As Date?
|
||||
Sub SetEnvironment(ByRef h As SettingsHost, ByVal u As UserInfo, ByVal _LoadUserInformation As Boolean,
|
||||
Optional ByVal AttachUserInfo As Boolean = True)
|
||||
ReadOnly Property Disposed As Boolean
|
||||
End Interface
|
||||
End Namespace
|
||||
@@ -34,7 +34,7 @@ Namespace API.Base
|
||||
End Function
|
||||
Friend Shared Function Download(ByVal URLs As List(Of String), ByVal DestinationFile As SFile, Optional ByVal Responser As Responser = Nothing,
|
||||
Optional ByVal Token As CancellationToken = Nothing, Optional ByVal Progress As MyProgress = Nothing,
|
||||
Optional ByVal UsePreProgress As Boolean = True) As SFile
|
||||
Optional ByVal UsePreProgress As Boolean = True, Optional ByVal ExistingCache As CacheKeeper = Nothing) As SFile
|
||||
Dim Cache As CacheKeeper = Nothing
|
||||
Using tmpPr As New PreProgress(Progress)
|
||||
Try
|
||||
@@ -42,7 +42,12 @@ Namespace API.Base
|
||||
Dim ConcatFile As SFile = DestinationFile
|
||||
If ConcatFile.Name.IsEmptyString Then ConcatFile.Name = "PlayListFile"
|
||||
ConcatFile.Extension = "mp4"
|
||||
If ExistingCache Is Nothing Then
|
||||
Cache = New CacheKeeper($"{DestinationFile.PathWithSeparator}_{TempCacheFolderName}\")
|
||||
Cache.CacheDeleteError = CacheDeletionError(Cache)
|
||||
Else
|
||||
Cache = ExistingCache
|
||||
End If
|
||||
Dim cache2 As CacheKeeper = Cache.NewInstance
|
||||
If cache2.RootDirectory.Exists(SFO.Path) Then
|
||||
Dim progressExists As Boolean = Not Progress Is Nothing
|
||||
|
||||
@@ -15,6 +15,13 @@ Namespace API.Base
|
||||
Friend ReadOnly Property Site As String Implements ISiteSettings.Site
|
||||
Friend Overridable ReadOnly Property Icon As Icon Implements ISiteSettings.Icon
|
||||
Friend Overridable ReadOnly Property Image As Image Implements ISiteSettings.Image
|
||||
Protected _AllowUserAgentUpdate As Boolean = True
|
||||
Protected _SubscriptionsAllowed As Boolean = False
|
||||
Friend ReadOnly Property SubscriptionsAllowed As Boolean Implements ISiteSettings.SubscriptionsAllowed
|
||||
Get
|
||||
Return _SubscriptionsAllowed
|
||||
End Get
|
||||
End Property
|
||||
Private Property Logger As ILogProvider = LogConnector Implements ISiteSettings.Logger
|
||||
Friend Overridable ReadOnly Property Responser As Responser
|
||||
Friend ReadOnly Property CookiesNetscapeFile As SFile
|
||||
@@ -62,7 +69,7 @@ Namespace API.Base
|
||||
Friend Overridable Sub BeginInit() Implements ISiteSettings.BeginInit
|
||||
End Sub
|
||||
Friend Overridable Sub EndInit() Implements ISiteSettings.EndInit
|
||||
If Not DefaultUserAgent.IsEmptyString And Not Responser Is Nothing Then Responser.UserAgent = DefaultUserAgent
|
||||
If _AllowUserAgentUpdate And Not DefaultUserAgent.IsEmptyString And Not Responser Is Nothing Then Responser.UserAgent = DefaultUserAgent
|
||||
If CheckNetscapeCookiesOnEndInit Then Update_SaveCookiesNetscape(, True)
|
||||
End Sub
|
||||
#End Region
|
||||
@@ -82,6 +89,11 @@ Namespace API.Base
|
||||
Friend Overridable Sub Update() Implements ISiteSettings.Update
|
||||
If _SiteEditorFormOpened Then
|
||||
If UseNetscapeCookies Then Update_SaveCookiesNetscape()
|
||||
If Not Responser Is Nothing Then
|
||||
With Responser.Headers
|
||||
If .Count > 0 Then .ListDisposeRemove(Function(h) h.Value.IsEmptyString)
|
||||
End With
|
||||
End If
|
||||
DomainsApply()
|
||||
End If
|
||||
If Not Responser Is Nothing Then Responser.SaveSettings()
|
||||
@@ -105,12 +117,30 @@ Namespace API.Base
|
||||
#End Region
|
||||
#End Region
|
||||
#Region "Before and After Download"
|
||||
''' <summary>
|
||||
''' PRE<br/>
|
||||
''' DownloadStarted<br/>
|
||||
''' <br/>
|
||||
''' BEFORE<br/>
|
||||
''' Available<br/>
|
||||
''' <br/>
|
||||
''' IN<br/>
|
||||
''' ReadyToDownload<br/>
|
||||
''' BeforeStartDownload<br/>
|
||||
''' AfterDownload<br/>
|
||||
''' <br/>
|
||||
''' AFTER<br/>
|
||||
''' DownloadDone
|
||||
''' </summary>
|
||||
Friend Overridable Sub DownloadStarted(ByVal What As Download) Implements ISiteSettings.DownloadStarted
|
||||
End Sub
|
||||
''' <inheritdoc cref="DownloadStarted(Download)"/>
|
||||
Friend Overridable Sub BeforeStartDownload(ByVal User As Object, ByVal What As Download) Implements ISiteSettings.BeforeStartDownload
|
||||
End Sub
|
||||
''' <inheritdoc cref="DownloadStarted(Download)"/>
|
||||
Friend Overridable Sub AfterDownload(ByVal User As Object, ByVal What As Download) Implements ISiteSettings.AfterDownload
|
||||
End Sub
|
||||
''' <inheritdoc cref="DownloadStarted(Download)"/>
|
||||
Friend Overridable Sub DownloadDone(ByVal What As Download) Implements ISiteSettings.DownloadDone
|
||||
End Sub
|
||||
#End Region
|
||||
@@ -158,13 +188,13 @@ Namespace API.Base
|
||||
Friend Overridable Function BaseAuthExists() As Boolean
|
||||
Return True
|
||||
End Function
|
||||
''' <summary>JOB: leave or remove</summary>
|
||||
''' <returns>Return BaseAuthExists()</returns>
|
||||
''' <inheritdoc cref="DownloadStarted(Download)"/>
|
||||
Friend Overridable Function Available(ByVal What As Download, ByVal Silent As Boolean) As Boolean Implements ISiteSettings.Available
|
||||
Return BaseAuthExists()
|
||||
End Function
|
||||
''' <summary>'DownloadData': before processing</summary>
|
||||
''' <returns>True</returns>
|
||||
''' <inheritdoc cref="DownloadStarted(Download)"/>
|
||||
Friend Overridable Function ReadyToDownload(ByVal What As Download) As Boolean Implements ISiteSettings.ReadyToDownload
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -12,6 +12,13 @@ Imports PersonalUtilities.Functions.XML.Base
|
||||
Imports PersonalUtilities.Functions.RegularExpressions
|
||||
Namespace API.Base
|
||||
Friend Module Structures
|
||||
Friend Enum SiteModes As Integer
|
||||
User = 0
|
||||
Search = 1
|
||||
Tags = 2
|
||||
Categories = 3
|
||||
Pornstars = 4
|
||||
End Enum
|
||||
Friend Structure UserMedia : Implements IUserMedia, IEquatable(Of UserMedia), IEContainerProvider
|
||||
#Region "XML Names"
|
||||
Friend Const Name_MediaNode As String = "MediaData"
|
||||
@@ -182,6 +189,7 @@ Namespace API.Base
|
||||
End With
|
||||
End If
|
||||
|
||||
'TODO: UserMedia.SpecialFolder
|
||||
SpecialFolder = e.Attribute(Name_SpecialFolder).Value
|
||||
If Not SpecialFolder.IsEmptyString Then upath &= $"{SpecialFolder}\"
|
||||
If vp.HasValue AndAlso vp.Value Then upath &= $"Video\"
|
||||
|
||||
37
SCrawler/API/Base/TokenBatch.vb
Normal file
@@ -0,0 +1,37 @@
|
||||
' 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
|
||||
Imports System.Threading
|
||||
Imports PersonalUtilities.Tools
|
||||
Namespace API.Base
|
||||
Friend Class TokenBatch : Inherits BatchExecutor
|
||||
Friend Property TempPostsList As List(Of String)
|
||||
Protected ReadOnly Token As CancellationToken
|
||||
Friend Sub New(ByVal _Token As CancellationToken)
|
||||
MyBase.New(True)
|
||||
Token = _Token
|
||||
End Sub
|
||||
Public Overrides Sub Create()
|
||||
If TempPostsList Is Nothing Then TempPostsList = New List(Of String)
|
||||
MyBase.Create()
|
||||
End Sub
|
||||
Protected Overrides Async Sub OutputDataReceiver(ByVal Sender As Object, ByVal e As DataReceivedEventArgs)
|
||||
MyBase.OutputDataReceiver(Sender, e)
|
||||
Await Task.Run(Sub() If Token.IsCancellationRequested Then Kill())
|
||||
End Sub
|
||||
Protected Overrides Async Sub ErrorDataReceiver(ByVal Sender As Object, ByVal e As DataReceivedEventArgs)
|
||||
MyBase.ErrorDataReceiver(Sender, e)
|
||||
Await Task.Run(Sub() If Token.IsCancellationRequested Then Kill())
|
||||
End Sub
|
||||
Protected Overridable Async Function Validate(ByVal Value As String) As Task
|
||||
If Not ProcessKilled AndAlso Await Task.Run(Of Boolean)(Function() Token.IsCancellationRequested OrElse
|
||||
(Not Value.IsEmptyString AndAlso
|
||||
TempPostsList.Exists(Function(v) Value.Contains(v)))) Then Kill()
|
||||
End Function
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -13,6 +13,7 @@ Imports System.ComponentModel
|
||||
Imports System.Runtime.CompilerServices
|
||||
Imports SCrawler.Plugin
|
||||
Imports SCrawler.Plugin.Hosts
|
||||
Imports PersonalUtilities.Functions.Messaging
|
||||
Imports PersonalUtilities.Functions.XML
|
||||
Imports PersonalUtilities.Functions.XML.Objects
|
||||
Imports PersonalUtilities.Functions.RegularExpressions
|
||||
@@ -51,6 +52,28 @@ Namespace API.Base
|
||||
Friend Sub RemoveUpdateHandlers()
|
||||
UserUpdatedEventHandlers.Clear()
|
||||
End Sub
|
||||
Private ReadOnly UserDownloadStateChangedEventHandlers As List(Of UserDownloadStateChangedEventHandler)
|
||||
Friend Custom Event UserDownloadStateChanged As UserDownloadStateChangedEventHandler
|
||||
AddHandler(ByVal h As UserDownloadStateChangedEventHandler)
|
||||
If Not UserDownloadStateChangedEventHandlers.Contains(h) Then UserDownloadStateChangedEventHandlers.Add(h)
|
||||
End AddHandler
|
||||
RemoveHandler(ByVal h As UserDownloadStateChangedEventHandler)
|
||||
UserDownloadStateChangedEventHandlers.Remove(h)
|
||||
End RemoveHandler
|
||||
RaiseEvent(ByVal User As IUserData, ByVal IsDownloading As Boolean)
|
||||
Try
|
||||
If UserDownloadStateChangedEventHandlers.Count > 0 Then
|
||||
For i% = 0 To UserDownloadStateChangedEventHandlers.Count - 1
|
||||
Try : UserDownloadStateChangedEventHandlers(i).Invoke(User, IsDownloading) : Catch : End Try
|
||||
Next
|
||||
End If
|
||||
Catch
|
||||
End Try
|
||||
End RaiseEvent
|
||||
End Event
|
||||
Private Sub OnUserDownloadStateChanged(ByVal IsDownloading As Boolean)
|
||||
RaiseEvent UserDownloadStateChanged(Me, IsDownloading)
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Collection buttons"
|
||||
Private _CollectionButtonsExists As Boolean = False
|
||||
@@ -58,6 +81,7 @@ Namespace API.Base
|
||||
Friend WithEvents BTT_CONTEXT_DOWN As ToolStripKeyMenuItem
|
||||
Friend WithEvents BTT_CONTEXT_EDIT As ToolStripMenuItem
|
||||
Friend WithEvents BTT_CONTEXT_DELETE As ToolStripMenuItem
|
||||
Friend WithEvents BTT_CONTEXT_ERASE As ToolStripMenuItem
|
||||
Friend WithEvents BTT_CONTEXT_OPEN_PATH As ToolStripMenuItem
|
||||
Friend WithEvents BTT_CONTEXT_OPEN_SITE As ToolStripMenuItem
|
||||
Friend Sub CreateButtons()
|
||||
@@ -75,6 +99,7 @@ Namespace API.Base
|
||||
BTT_CONTEXT_DOWN = New ToolStripKeyMenuItem(tn, i) With {.Name = tnn("DOWN"), .Tag = Me}
|
||||
BTT_CONTEXT_EDIT = New ToolStripMenuItem(tn, i) With {.Name = tnn("EDIT"), .Tag = Me}
|
||||
BTT_CONTEXT_DELETE = New ToolStripMenuItem(tn, i) With {.Name = tnn("DELETE"), .Tag = Me}
|
||||
BTT_CONTEXT_ERASE = New ToolStripMenuItem(tn, i) With {.Name = tnn("ERASE"), .Tag = Me}
|
||||
BTT_CONTEXT_OPEN_PATH = New ToolStripMenuItem(tn, i) With {.Name = tnn("PATH"), .Tag = Me}
|
||||
BTT_CONTEXT_OPEN_SITE = New ToolStripMenuItem(tn, i) With {.Name = tnn("SITE"), .Tag = Me}
|
||||
UpdateButtonsColor()
|
||||
@@ -91,7 +116,8 @@ Namespace API.Base
|
||||
cb = MyColor.EditBack
|
||||
cf = MyColor.EditFore
|
||||
End If
|
||||
For Each b As ToolStripMenuItem In {BTT_CONTEXT_DOWN, BTT_CONTEXT_EDIT, BTT_CONTEXT_DELETE, BTT_CONTEXT_OPEN_PATH, BTT_CONTEXT_OPEN_SITE}
|
||||
For Each b As ToolStripMenuItem In {BTT_CONTEXT_DOWN, BTT_CONTEXT_EDIT, BTT_CONTEXT_DELETE, BTT_CONTEXT_ERASE,
|
||||
BTT_CONTEXT_OPEN_PATH, BTT_CONTEXT_OPEN_SITE}
|
||||
If Not b Is Nothing Then b.BackColor = cb : b.ForeColor = cf
|
||||
Next
|
||||
If _UserInformationLoaded Then _CollectionButtonsColorsSet = True
|
||||
@@ -111,12 +137,16 @@ Namespace API.Base
|
||||
Private Const Name_UserExists As String = "UserExists"
|
||||
Private Const Name_UserSuspended As String = "UserSuspended"
|
||||
Protected Const Name_FriendlyName As String = "FriendlyName"
|
||||
Private Const Name_UserSiteName As String = "UserSiteName"
|
||||
Protected Const Name_UserSiteName As String = "UserSiteName"
|
||||
Protected Const Name_UserID As String = "UserID"
|
||||
Private Const Name_Description As String = "Description"
|
||||
Protected Const Name_Options As String = "Options"
|
||||
Protected Const Name_Description As String = "Description"
|
||||
Private Const Name_ParseUserMediaOnly As String = "ParseUserMediaOnly"
|
||||
Private Const Name_IsSubscription As String = UserInfo.Name_IsSubscription
|
||||
Private Const Name_Temporary As String = "Temporary"
|
||||
Private Const Name_Favorite As String = "Favorite"
|
||||
Private Const Name_BackColor As String = "BackColor"
|
||||
Private Const Name_ForeColor As String = "ForeColor"
|
||||
Private Const Name_CreatedByChannel As String = "CreatedByChannel"
|
||||
|
||||
Private Const Name_SeparateVideoFolder As String = "SeparateVideoFolder"
|
||||
@@ -142,7 +172,7 @@ Namespace API.Base
|
||||
#Region "Declarations"
|
||||
#Region "Host, Site, Progress"
|
||||
Friend Property HOST As SettingsHost Implements IUserData.HOST
|
||||
Friend ReadOnly Property Site As String Implements IContentProvider.Site
|
||||
Friend ReadOnly Property Site As String Implements IUserData.Site
|
||||
Get
|
||||
Return HOST.Name
|
||||
End Get
|
||||
@@ -160,7 +190,7 @@ Namespace API.Base
|
||||
End Property
|
||||
Protected Property ProgressPre As PreProgress = Nothing
|
||||
#End Region
|
||||
#Region "User name, ID, exist, suspend"
|
||||
#Region "User name, ID, exist, suspend, options"
|
||||
Friend User As UserInfo
|
||||
Friend Property IsSavedPosts As Boolean Implements IPluginContentProvider.IsSavedPosts
|
||||
Private _UserExists As Boolean = True
|
||||
@@ -190,14 +220,14 @@ Namespace API.Base
|
||||
Set(ByVal NewName As String)
|
||||
End Set
|
||||
End Property
|
||||
Friend Overridable ReadOnly Property Name As String Implements IContentProvider.Name
|
||||
Friend Overridable ReadOnly Property Name As String Implements IUserData.Name
|
||||
Get
|
||||
Return User.Name
|
||||
End Get
|
||||
End Property
|
||||
Friend Overridable Property ID As String = String.Empty Implements IContentProvider.ID, IPluginContentProvider.ID
|
||||
Friend Overridable Property ID As String = String.Empty Implements IUserData.ID, IPluginContentProvider.ID
|
||||
Protected _FriendlyName As String = String.Empty
|
||||
Friend Overridable Property FriendlyName As String Implements IContentProvider.FriendlyName
|
||||
Friend Overridable Property FriendlyName As String Implements IUserData.FriendlyName
|
||||
Get
|
||||
If Settings.UserSiteNameAsFriendly Then
|
||||
Return _FriendlyName.IfNullOrEmpty(UserSiteName)
|
||||
@@ -251,9 +281,15 @@ Namespace API.Base
|
||||
Return UserModel = UsageModel.Virtual
|
||||
End Get
|
||||
End Property
|
||||
Friend Property Options As String = String.Empty Implements IUserData.Options, IPluginContentProvider.Options
|
||||
Friend Overridable ReadOnly Property FeedIsUser As Boolean
|
||||
Get
|
||||
Return True
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
#Region "Description"
|
||||
Friend Property UserDescription As String = String.Empty Implements IContentProvider.Description, IPluginContentProvider.UserDescription
|
||||
Friend Property UserDescription As String = String.Empty Implements IUserData.Description, IPluginContentProvider.UserDescription
|
||||
Protected _DescriptionEveryTime As Boolean = False
|
||||
Protected _DescriptionChecked As Boolean = False
|
||||
Protected Function UserDescriptionNeedToUpdate() As Boolean
|
||||
@@ -270,9 +306,9 @@ Namespace API.Base
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Favorite, Temporary"
|
||||
#Region "Favorite, Temporary, Colors"
|
||||
Protected _Favorite As Boolean = False
|
||||
Friend Overridable Property Favorite As Boolean Implements IContentProvider.Favorite
|
||||
Friend Overridable Property Favorite As Boolean Implements IUserData.Favorite
|
||||
Get
|
||||
Return _Favorite
|
||||
End Get
|
||||
@@ -282,7 +318,7 @@ Namespace API.Base
|
||||
End Set
|
||||
End Property
|
||||
Protected _Temporary As Boolean = False
|
||||
Friend Overridable Property Temporary As Boolean Implements IContentProvider.Temporary
|
||||
Friend Overridable Property Temporary As Boolean Implements IUserData.Temporary
|
||||
Get
|
||||
Return _Temporary
|
||||
End Get
|
||||
@@ -291,6 +327,24 @@ Namespace API.Base
|
||||
If _Temporary Then _Favorite = False
|
||||
End Set
|
||||
End Property
|
||||
Private _BackColor As Color? = Nothing
|
||||
Friend Overridable Property BackColor As Color? Implements IUserData.BackColor
|
||||
Get
|
||||
Return _BackColor
|
||||
End Get
|
||||
Set(ByVal b As Color?)
|
||||
_BackColor = b
|
||||
End Set
|
||||
End Property
|
||||
Private _ForeColor As Color? = Nothing
|
||||
Friend Overridable Property ForeColor As Color? Implements IUserData.ForeColor
|
||||
Get
|
||||
Return _ForeColor
|
||||
End Get
|
||||
Set(ByVal f As Color?)
|
||||
_ForeColor = f
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
#Region "Channel"
|
||||
Friend Property CreatedByChannel As Boolean = False
|
||||
@@ -405,32 +459,111 @@ BlockNullPicture:
|
||||
Return _IsCollection
|
||||
End Get
|
||||
End Property
|
||||
Friend Overridable Property CollectionName As String Implements IUserData.CollectionName
|
||||
Friend Overridable ReadOnly Property CollectionName As String Implements IUserData.CollectionName
|
||||
Get
|
||||
Return User.CollectionName
|
||||
End Get
|
||||
Set(ByVal NewCollection As String)
|
||||
ChangeCollectionName(NewCollection, True)
|
||||
End Set
|
||||
End Property
|
||||
Friend Overridable ReadOnly Property CollectionPath As SFile Implements IUserData.CollectionPath
|
||||
Get
|
||||
Return User.GetCollectionRootPath
|
||||
End Get
|
||||
End Property
|
||||
Friend ReadOnly Property IncludedInCollection As Boolean Implements IUserData.IncludedInCollection
|
||||
Get
|
||||
Return User.IncludedInCollection
|
||||
End Get
|
||||
End Property
|
||||
Friend Overridable Sub ChangeCollectionName(ByVal NewName As String, ByVal UpdateSettings As Boolean)
|
||||
Dim u As UserInfo = User
|
||||
u.CollectionName = NewName
|
||||
u.UpdateUserFile()
|
||||
User = u
|
||||
If UpdateSettings Then Settings.UpdateUsersList(User)
|
||||
End Sub
|
||||
Friend Overridable ReadOnly Property Labels As List(Of String) Implements IUserData.Labels
|
||||
Protected ReadOnly Property LabelsString As String
|
||||
Get
|
||||
Return Labels.ListToString("|", EDP.ReturnValue)
|
||||
End Get
|
||||
End Property
|
||||
Friend Overridable ReadOnly Property SpecialLabels As IEnumerable(Of String)
|
||||
Get
|
||||
Return New String() {}
|
||||
End Get
|
||||
End Property
|
||||
''' <summary>
|
||||
''' 0 add<br/>
|
||||
''' 1 replace<br/>
|
||||
''' 2 remove
|
||||
''' </summary>
|
||||
''' <returns>true = w/special</returns>
|
||||
Friend Shared Function UpdateLabelsKeepSpecial(ByVal Mode As Byte) As Boolean
|
||||
Dim m As New MMessage("", "Update labels",, vbQuestion + vbYesNo) With {.DefaultButton = 0, .CancelButton = 0}
|
||||
Select Case Mode
|
||||
Case 0 : m.Text = "Do you want to exclude site-specific labels from adding?"
|
||||
Case 1, 2 : m.Text = "Do you want to keep site-specific labels?"
|
||||
Case Else : Return False
|
||||
End Select
|
||||
Return m.Show = vbYes
|
||||
End Function
|
||||
''' <inheritdoc cref="UpdateLabelsKeepSpecial(Byte)"/>
|
||||
Friend Shared Sub UpdateLabels(ByVal User As UserDataBase, ByVal NewLabels As IEnumerable(Of String), ByVal Mode As Byte, ByVal KeepSpecial As Boolean)
|
||||
Try
|
||||
If User.IsCollection Then
|
||||
With DirectCast(User, UserDataBind)
|
||||
If .Count > 0 Then .Collections.ForEach(Sub(u) UpdateLabels(u, NewLabels, Mode, KeepSpecial))
|
||||
End With
|
||||
Else
|
||||
Dim nl As List(Of String)
|
||||
If NewLabels.ListExists Then nl = NewLabels.ToList Else nl = New List(Of String)
|
||||
|
||||
Dim lex As List(Of String) = User.SpecialLabels.ToList
|
||||
If lex.ListExists Then
|
||||
If User.Labels.Count = 0 Or Not KeepSpecial Then
|
||||
lex.Clear()
|
||||
Else
|
||||
lex.ListDisposeRemove(Function(l) Not User.Labels.Contains(l))
|
||||
End If
|
||||
End If
|
||||
|
||||
Select Case Mode
|
||||
Case 0 'add
|
||||
If KeepSpecial Then nl.ListAddList(lex, LNC)
|
||||
User.Labels.ListAddList(nl, LNC)
|
||||
Case 1 'replace
|
||||
If KeepSpecial Then
|
||||
nl.ListAddList(lex, LNC)
|
||||
Else
|
||||
nl.ListWithRemove(lex)
|
||||
End If
|
||||
User.Labels.Clear()
|
||||
User.Labels.ListAddList(nl, LNC)
|
||||
Case 2 'remove
|
||||
If KeepSpecial Then nl.ListWithRemove(lex)
|
||||
User.Labels.ListWithRemove(nl)
|
||||
End Select
|
||||
|
||||
If User.Labels.Count > 0 Then User.Labels.Sort()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ErrorsDescriber.Execute(EDP.SendToLog, ex, "[UserDataBase.UpdateLabels]")
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Downloading"
|
||||
Protected _DataLoaded As Boolean = False
|
||||
Protected _DataParsed As Boolean = False
|
||||
Friend Property ParseUserMediaOnly As Boolean = False Implements IUserData.ParseUserMediaOnly, IPluginContentProvider.ParseUserMediaOnly
|
||||
Friend Overridable ReadOnly Property IsSubscription As Boolean Implements IUserData.IsSubscription
|
||||
Get
|
||||
Return User.IsSubscription
|
||||
End Get
|
||||
End Property
|
||||
Friend Overridable ReadOnly Property IsUser As Boolean Implements IUserData.IsUser
|
||||
Get
|
||||
Return True
|
||||
End Get
|
||||
End Property
|
||||
Private Property IPluginContentProvider_IsSubscription As Boolean Implements IPluginContentProvider.IsSubscription
|
||||
Get
|
||||
Return IsSubscription
|
||||
End Get
|
||||
Set : End Set
|
||||
End Property
|
||||
Friend Overridable Property ReadyForDownload As Boolean = True Implements IUserData.ReadyForDownload
|
||||
Friend Property DownloadImages As Boolean = True Implements IUserData.DownloadImages
|
||||
Friend Property DownloadVideos As Boolean = True Implements IUserData.DownloadVideos
|
||||
@@ -623,7 +756,6 @@ BlockNullPicture:
|
||||
End Function
|
||||
Friend Overridable Sub ExchangeOptionsSet(ByVal Obj As Object) Implements IPluginContentProvider.ExchangeOptionsSet
|
||||
End Sub
|
||||
Private _ExternalCompatibilityToken As CancellationToken
|
||||
#End Region
|
||||
#Region "IIndexable Support"
|
||||
Friend Property Index As Integer = 0 Implements IIndexable.Index
|
||||
@@ -636,7 +768,7 @@ BlockNullPicture:
|
||||
Friend ReadOnly Property LVIKey As String Implements IUserData.Key
|
||||
Get
|
||||
If Not _IsCollection Then
|
||||
Return $"{Site.ToString.ToUpper}_{Name}"
|
||||
Return $"{IIf(IsSubscription, "SSSS", String.Empty)}{Site.ToString.ToUpper}_{Name}"
|
||||
Else
|
||||
Return $"CCCC_{CollectionName}"
|
||||
End If
|
||||
@@ -652,6 +784,8 @@ BlockNullPicture:
|
||||
Friend Overridable ReadOnly Property FitToAddParams As Boolean Implements IUserData.FitToAddParams
|
||||
Get
|
||||
With Settings
|
||||
If IsSubscription And Not .MainFrameUsersShowSubscriptions Then Return False
|
||||
If Not IsSubscription And Not .MainFrameUsersShowDefaults Then Return False
|
||||
If LastUpdated.HasValue And Not .ViewDateMode.Value = ShowingDates.Off Then
|
||||
Dim f As Date = If(.ViewDateFrom.HasValue, .ViewDateFrom.Value.Date, Date.MinValue.Date)
|
||||
Dim t As Date = If(.ViewDateTo.HasValue, .ViewDateTo.Value.Date, Date.MaxValue.Date)
|
||||
@@ -705,6 +839,7 @@ BlockNullPicture:
|
||||
_TempPostsList = New List(Of String)
|
||||
Labels = New List(Of String)
|
||||
UserUpdatedEventHandlers = New List(Of IUserData.UserUpdatedEventHandler)
|
||||
UserDownloadStateChangedEventHandlers = New List(Of UserDownloadStateChangedEventHandler)
|
||||
If InvokeImageHandler Then MainFrameObj.ImageHandler(Me)
|
||||
End Sub
|
||||
Friend Sub SetEnvironment(ByRef h As SettingsHost, ByVal u As UserInfo, ByVal _LoadUserInformation As Boolean,
|
||||
@@ -753,12 +888,25 @@ BlockNullPicture:
|
||||
UserExists = x.Value(Name_UserExists).FromXML(Of Boolean)(True)
|
||||
UserSuspended = x.Value(Name_UserSuspended).FromXML(Of Boolean)(False)
|
||||
ID = x.Value(Name_UserID)
|
||||
Options = x.Value(Name_Options)
|
||||
_FriendlyName = x.Value(Name_FriendlyName)
|
||||
UserSiteName = x.Value(Name_UserSiteName)
|
||||
UserDescription = x.Value(Name_Description)
|
||||
ParseUserMediaOnly = x.Value(Name_ParseUserMediaOnly).FromXML(Of Boolean)(False)
|
||||
Temporary = x.Value(Name_Temporary).FromXML(Of Boolean)(False)
|
||||
Favorite = x.Value(Name_Favorite).FromXML(Of Boolean)(False)
|
||||
|
||||
If Not x.Value(Name_BackColor).IsEmptyString Then
|
||||
BackColor = AConvert(Of Color)(x.Value(Name_BackColor), Nothing, EDP.ReturnValue)
|
||||
Else
|
||||
BackColor = Nothing
|
||||
End If
|
||||
If Not x.Value(Name_ForeColor).IsEmptyString Then
|
||||
ForeColor = AConvert(Of Color)(x.Value(Name_ForeColor), Nothing, EDP.ReturnValue)
|
||||
Else
|
||||
ForeColor = Nothing
|
||||
End If
|
||||
|
||||
CreatedByChannel = x.Value(Name_CreatedByChannel).FromXML(Of Boolean)(False)
|
||||
SeparateVideoFolder = AConvert(Of Boolean)(x.Value(Name_SeparateVideoFolder), AModes.Var, Nothing)
|
||||
ReadyForDownload = x.Value(Name_ReadyForDownload).FromXML(Of Boolean)(True)
|
||||
@@ -771,7 +919,6 @@ BlockNullPicture:
|
||||
ScriptUse = x.Value(Name_ScriptUse).FromXML(Of Boolean)(False)
|
||||
ScriptData = x.Value(Name_ScriptData)
|
||||
DataMerging = x.Value(Name_Merged).FromXML(Of Boolean)(False)
|
||||
ChangeCollectionName(x.Value(Name_CollectionName), False)
|
||||
Labels.ListAddList(x.Value(Name_LabelsName).StringToList(Of String, List(Of String))("|", EDP.ReturnValue), LAP.NotContainsOnly, LAP.ClearBeforeAdd)
|
||||
LoadUserInformation_OptionalFields(x, True)
|
||||
End Using
|
||||
@@ -798,12 +945,18 @@ BlockNullPicture:
|
||||
x.Add(Name_UserExists, UserExists.BoolToInteger)
|
||||
x.Add(Name_UserSuspended, UserSuspended.BoolToInteger)
|
||||
x.Add(Name_UserID, ID)
|
||||
x.Add(Name_Options, Options)
|
||||
x.Add(Name_FriendlyName, _FriendlyName)
|
||||
x.Add(Name_UserSiteName, UserSiteName)
|
||||
x.Add(Name_Description, UserDescription)
|
||||
x.Add(Name_ParseUserMediaOnly, ParseUserMediaOnly.BoolToInteger)
|
||||
x.Add(Name_IsSubscription, IsSubscription.BoolToInteger)
|
||||
x.Add(Name_Temporary, Temporary.BoolToInteger)
|
||||
x.Add(Name_Favorite, Favorite.BoolToInteger)
|
||||
|
||||
x.Add(Name_BackColor, CStr(AConvert(Of String)(BackColor, String.Empty, EDP.ReturnValue)))
|
||||
x.Add(Name_ForeColor, CStr(AConvert(Of String)(ForeColor, String.Empty, EDP.ReturnValue)))
|
||||
|
||||
x.Add(Name_CreatedByChannel, CreatedByChannel.BoolToInteger)
|
||||
If SeparateVideoFolder.HasValue Then
|
||||
x.Add(Name_SeparateVideoFolder, SeparateVideoFolder.Value.BoolToInteger)
|
||||
@@ -820,7 +973,7 @@ BlockNullPicture:
|
||||
x.Add(Name_ScriptUse, ScriptUse.BoolToInteger)
|
||||
x.Add(Name_ScriptData, ScriptData)
|
||||
x.Add(Name_CollectionName, CollectionName)
|
||||
x.Add(Name_LabelsName, Labels.ListToString("|", EDP.ReturnValue))
|
||||
x.Add(Name_LabelsName, LabelsString)
|
||||
x.Add(Name_Merged, DataMerging.BoolToInteger)
|
||||
|
||||
LoadUserInformation_OptionalFields(x, False)
|
||||
@@ -867,7 +1020,7 @@ BlockNullPicture:
|
||||
#End Region
|
||||
#End Region
|
||||
#Region "Open site, folder"
|
||||
Friend Overridable Sub OpenSite(Optional ByVal e As ErrorsDescriber = Nothing) Implements IContentProvider.OpenSite
|
||||
Friend Overridable Sub OpenSite(Optional ByVal e As ErrorsDescriber = Nothing) Implements IUserData.OpenSite
|
||||
Try
|
||||
Dim URL$ = HOST.Source.GetUserUrl(Me)
|
||||
If Not URL.IsEmptyString Then Process.Start(URL)
|
||||
@@ -927,6 +1080,14 @@ BlockNullPicture:
|
||||
End Function
|
||||
#End Region
|
||||
#Region "Download functions and options"
|
||||
Private __DOWNLOAD_IN_PROGRESS As Boolean = False
|
||||
Friend ReadOnly Property DownloadInProgress As Boolean
|
||||
Get
|
||||
Return __DOWNLOAD_IN_PROGRESS
|
||||
End Get
|
||||
End Property
|
||||
Private TokenQueue As CancellationToken
|
||||
Friend TokenPersonal As CancellationToken
|
||||
Protected Responser As Responser
|
||||
Protected UseResponserClient As Boolean = False
|
||||
Protected UseClientTokens As Boolean = False
|
||||
@@ -935,10 +1096,12 @@ BlockNullPicture:
|
||||
Private _DownloadInProgress As Boolean = False
|
||||
Private _EnvirUserExists As Boolean
|
||||
Private _EnvirUserSuspended As Boolean
|
||||
Private _EnvirCreatedByChannel As Boolean
|
||||
Private _EnvirChanged As Boolean = False
|
||||
Private _PictureExists As Boolean
|
||||
Private _EnvirInvokeUserUpdated As Boolean = False
|
||||
Protected Sub EnvirDownloadSet()
|
||||
TokenPersonal = Nothing
|
||||
ProgressPre.Reset()
|
||||
UpdateDataFiles()
|
||||
_DownloadInProgress = True
|
||||
@@ -948,6 +1111,7 @@ BlockNullPicture:
|
||||
_ForceSaveUserInfo = False
|
||||
_EnvirUserExists = UserExists
|
||||
_EnvirUserSuspended = UserSuspended
|
||||
_EnvirCreatedByChannel = CreatedByChannel
|
||||
_EnvirChanged = False
|
||||
_EnvirInvokeUserUpdated = False
|
||||
UserExists = True
|
||||
@@ -965,9 +1129,11 @@ BlockNullPicture:
|
||||
End Select
|
||||
End If
|
||||
End Sub
|
||||
Friend Overridable Sub DownloadData(ByVal Token As CancellationToken) Implements IContentProvider.DownloadData
|
||||
Friend Overridable Sub DownloadData(ByVal Token As CancellationToken) Implements IUserData.DownloadData
|
||||
__DOWNLOAD_IN_PROGRESS = True
|
||||
OnUserDownloadStateChanged(True)
|
||||
Dim Canceled As Boolean = False
|
||||
_ExternalCompatibilityToken = Token
|
||||
TokenQueue = Token
|
||||
Try
|
||||
EnvirDownloadSet()
|
||||
If Not Responser Is Nothing Then Responser.Dispose()
|
||||
@@ -981,14 +1147,14 @@ BlockNullPicture:
|
||||
_TempMediaList.Clear()
|
||||
_TempPostsList.Clear()
|
||||
LatestData.Clear()
|
||||
Dim __SaveData As Boolean = Not CreatedByChannel Or Not Settings.FromChannelDownloadTopUse
|
||||
Dim __isChannelsSupport As Boolean = CreatedByChannel And Settings.FromChannelDownloadTopUse
|
||||
|
||||
LoadContentInformation()
|
||||
|
||||
If MyFilePosts.Exists Then _TempPostsList.ListAddList(File.ReadAllLines(MyFilePosts))
|
||||
If _ContentList.Count > 0 Then _TempPostsList.ListAddList(_ContentList.Select(Function(u) u.Post.ID), LNC)
|
||||
|
||||
If Not DownloadMissingOnly Then
|
||||
If Not DownloadMissingOnly Or IsSubscription Then
|
||||
ThrowAny(Token)
|
||||
DownloadDataF(Token)
|
||||
ProgressPre.Done()
|
||||
@@ -1010,22 +1176,37 @@ BlockNullPicture:
|
||||
ProgressPre.Done()
|
||||
ThrowAny(Token)
|
||||
|
||||
If UseMD5Comparison Then ValidateMD5(Token) : ProgressPre.Done() : ThrowAny(Token)
|
||||
If UseMD5Comparison And Not IsSubscription Then ValidateMD5(Token) : ProgressPre.Done() : ThrowAny(Token)
|
||||
|
||||
If _TempPostsList.Count > 0 And Not DownloadMissingOnly And __SaveData Then
|
||||
If _TempPostsList.Count > 0 And Not DownloadMissingOnly And Not __isChannelsSupport Then
|
||||
If _TempPostsList.Count > 1000 Then _TempPostsList.ListAddList(_TempPostsList.ListTake(-2, 1000, EDP.ReturnValue).ListReverse, LAP.ClearBeforeAdd)
|
||||
TextSaver.SaveTextToFile(_TempPostsList.ListToString(Environment.NewLine), MyFilePosts, True,, EDP.None)
|
||||
End If
|
||||
|
||||
_ContentNew.ListAddList(_TempMediaList, LAP.ClearBeforeAdd)
|
||||
If IsSubscription Then
|
||||
_ContentNew.ListAddList(_ContentNew.ListForEachCopy(Function(ByVal tmpC As UserMedia, ByVal ii As Integer) As UserMedia
|
||||
tmpC.State = UStates.Downloaded
|
||||
If tmpC.Type = UTypes.Picture Or tmpC.Type = UTypes.GIF Then
|
||||
DownloadedPictures(False) += 1
|
||||
Else
|
||||
DownloadedVideos(False) += 1
|
||||
End If
|
||||
Return tmpC
|
||||
End Function))
|
||||
Else
|
||||
DownloadContent(Token)
|
||||
ThrowIfDisposed()
|
||||
End If
|
||||
|
||||
If IncludeInTheFeed Then LatestData.ListAddList(_ContentNew.Where(_downContent), LNC)
|
||||
CreatedByChannel = False
|
||||
|
||||
If IncludeInTheFeed Or IsSubscription Then LatestData.ListAddList(_ContentNew.Where(_downContent), LNC)
|
||||
Dim mcb& = If(ContentMissingExists, _ContentList.LongCount(Function(c) MissingFinder(c)), 0)
|
||||
_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 Or Not mcb = mca Or _ForceSaveUserData Then
|
||||
If __SaveData Then
|
||||
If Not __isChannelsSupport Then
|
||||
LastUpdated = Now
|
||||
RunScript()
|
||||
DownloadedPictures(True) = SFile.GetFiles(MyFile.CutPath, "*.jpg|*.jpeg|*.png|*.gif|*.webm",, EDP.ReturnValue).Count
|
||||
@@ -1040,22 +1221,33 @@ BlockNullPicture:
|
||||
End If
|
||||
UpdateUserInformation()
|
||||
If _CollectionButtonsExists AndAlso _EnvirChanged Then UpdateButtonsColor()
|
||||
ElseIf _ForceSaveUserInfo Then
|
||||
ElseIf _ForceSaveUserInfo Or __isChannelsSupport Or Not _EnvirCreatedByChannel = CreatedByChannel Then
|
||||
UpdateUserInformation()
|
||||
End If
|
||||
ThrowIfDisposed()
|
||||
If Not _PictureExists Or _EnvirInvokeUserUpdated Then OnUserUpdated()
|
||||
Catch oex As OperationCanceledException When Token.IsCancellationRequested
|
||||
Catch oex As OperationCanceledException When Token.IsCancellationRequested Or TokenPersonal.IsCancellationRequested
|
||||
MyMainLOG = $"{ToStringForLog()}: downloading canceled"
|
||||
Canceled = True
|
||||
Catch exit_ex As ExitException
|
||||
If Not exit_ex.Silent Then
|
||||
If exit_ex.SimpleLogLine Then
|
||||
MyMainLOG = $"{ToStringForLog()}: downloading canceled (exit) ({exit_ex.Message})"
|
||||
Else
|
||||
ErrorsDescriber.Execute(EDP.SendToLog, exit_ex, $"{ToStringForLog()}: downloading canceled (exit)")
|
||||
End If
|
||||
End If
|
||||
Canceled = True
|
||||
Catch dex As ObjectDisposedException When Disposed
|
||||
Canceled = True
|
||||
Catch ex As Exception
|
||||
LogError(ex, "downloading data error")
|
||||
HasError = True
|
||||
Finally
|
||||
If Not UserExists Then AddNonExistingUserToLog($"User '{ToStringForLog()}' not found on the site")
|
||||
If Not Responser Is Nothing Then Responser.Dispose() : Responser = Nothing
|
||||
If Not Canceled Then _DataParsed = True
|
||||
TokenPersonal = Nothing
|
||||
_ContentNew.Clear()
|
||||
_DownloadInProgress = False
|
||||
DownloadTopCount = Nothing
|
||||
@@ -1065,6 +1257,8 @@ BlockNullPicture:
|
||||
_ForceSaveUserData = False
|
||||
_ForceSaveUserInfo = False
|
||||
ProgressPre.Done()
|
||||
__DOWNLOAD_IN_PROGRESS = False
|
||||
OnUserDownloadStateChanged(False)
|
||||
End Try
|
||||
End Sub
|
||||
Protected Sub UpdateDataFiles()
|
||||
@@ -1087,12 +1281,20 @@ BlockNullPicture:
|
||||
End If
|
||||
End Sub
|
||||
Protected MustOverride Sub DownloadDataF(ByVal Token As CancellationToken)
|
||||
Protected Function CreateCache() As CacheKeeper
|
||||
Dim Cache As New CacheKeeper($"{DownloadContentDefault_GetRootDir()}\_tCache\")
|
||||
Cache.CacheDeleteError = CacheDeletionError(Cache)
|
||||
If Cache.RootDirectory.Exists(SFO.Path, False) Then Cache.RootDirectory.Delete(SFO.Path, SFODelete.DeletePermanently, EDP.ReturnValue)
|
||||
Cache.Validate()
|
||||
Return Cache
|
||||
End Function
|
||||
#Region "DownloadSingleObject"
|
||||
Protected IsSingleObjectDownload As Boolean = False
|
||||
Friend Overridable Sub DownloadSingleObject(ByVal Data As YouTube.Objects.IYouTubeMediaContainer, ByVal Token As CancellationToken) Implements IUserData.DownloadSingleObject
|
||||
Try
|
||||
Data.DownloadState = UserMediaStates.Tried
|
||||
Progress = Data.Progress
|
||||
If Not Progress Is Nothing Then Progress.ResetProgressOnMaximumChanges = False
|
||||
If Not Responser Is Nothing Then Responser.Dispose()
|
||||
Responser = New Responser
|
||||
If Not HOST Is Nothing AndAlso HOST.Available(ISiteSettings.Download.SingleObject, True) AndAlso
|
||||
@@ -1124,7 +1326,12 @@ BlockNullPicture:
|
||||
DirectCast(Data, IDownloadableMedia).ThumbnailFile = _ContentNew(0).File
|
||||
ElseIf Settings.STDownloader_TakeSnapshot And Settings.FfmpegFile.Exists And Not Settings.STDownloader_RemoveDownloadedAutomatically Then
|
||||
Dim f As SFile = _ContentNew(0).File
|
||||
Dim ff As SFile = f
|
||||
Dim ff As SFile
|
||||
If Settings.STDownloader_SnapshotsKeepWithFiles Then
|
||||
ff = f
|
||||
Else
|
||||
ff = Settings.CacheSnapshots(Settings.STDownloader_SnapShotsCachePermamnent).NewFile
|
||||
End If
|
||||
ff.Name &= "_thumb"
|
||||
ff.Extension = "jpg"
|
||||
f = Web.FFMPEG.TakeSnapshot(f, ff, Settings.FfmpegFile, TimeSpan.FromSeconds(1),,, EDP.LogMessageValue)
|
||||
@@ -1164,7 +1371,7 @@ BlockNullPicture:
|
||||
#Region "MD5 support"
|
||||
Protected Const VALIDATE_MD5_ERROR As String = "VALIDATE_MD5_ERROR"
|
||||
Friend Property UseMD5Comparison As Boolean = False
|
||||
Protected Property StartMD5Checked As Boolean = True
|
||||
Protected Property StartMD5Checked As Boolean = False
|
||||
Friend Property RemoveExistingDuplicates As Boolean = False
|
||||
Protected Overridable Sub ValidateMD5(ByVal Token As CancellationToken)
|
||||
Try
|
||||
@@ -1241,7 +1448,7 @@ BlockNullPicture:
|
||||
For i = 0 To _ContentList.Count - 1
|
||||
data = _ContentList(i)
|
||||
ProgressPre.Perform()
|
||||
If (data.Type = UTypes.GIF Or data.Type = UTypes.Picture) Then
|
||||
If data.Type = UTypes.GIF Or data.Type = UTypes.Picture Then
|
||||
If data.MD5.IsEmptyString Then
|
||||
ThrowAny(Token)
|
||||
eIndx = existingFiles.FindIndex(eFinder)
|
||||
@@ -1423,6 +1630,7 @@ BlockNullPicture:
|
||||
If __isVideo Then fileNumProvider.FileName = f.Name : f = SFile.IndexReindex(f,,, fileNumProvider)
|
||||
|
||||
__interrupt = False
|
||||
If IsSingleObjectDownload Then f.Exists(SFO.Path, True)
|
||||
If v.Type = UTypes.m3u8 And UseInternalM3U8Function Then
|
||||
f = DownloadM3U8(v.URL, v, f, Token)
|
||||
If f.IsEmptyString Then Throw New Exception("M3U8 download failed")
|
||||
@@ -1519,7 +1727,9 @@ BlockNullPicture:
|
||||
Protected Function ProcessException(ByVal ex As Exception, ByVal Token As CancellationToken, ByVal Message As String,
|
||||
Optional ByVal RDE As Boolean = True, Optional ByVal EObj As Object = Nothing,
|
||||
Optional ByVal ThrowEx As Boolean = True) As Integer
|
||||
If Not ((TypeOf ex Is OperationCanceledException And Token.IsCancellationRequested) Or
|
||||
If TypeOf ex Is ExitException Then
|
||||
Throw ex
|
||||
ElseIf Not ((TypeOf ex Is OperationCanceledException And (Token.IsCancellationRequested Or TokenPersonal.IsCancellationRequested Or TokenQueue.IsCancellationRequested)) Or
|
||||
(TypeOf ex Is ObjectDisposedException And Disposed)) Then
|
||||
If RDE Then
|
||||
Dim v% = DownloadingException(ex, Message, True, EObj)
|
||||
@@ -1579,7 +1789,67 @@ BlockNullPicture:
|
||||
End Sub
|
||||
#End Region
|
||||
#End Region
|
||||
#Region "Delete, Move, Merge, Copy"
|
||||
#Region "Erase, Delete, Move, Merge, Copy"
|
||||
Friend Shared Function GetEraseMode(ByVal Users As IEnumerable(Of IUserData)) As IUserData.EraseMode
|
||||
Dim mode As IUserData.EraseMode = IUserData.EraseMode.None
|
||||
If Users.ListExists Then
|
||||
Dim m As New MMessage("The data of the following users will be erased:" & vbCr & vbCr, "Erase data",
|
||||
{New MsgBoxButton("History and Data", "All files (images and videos) will be deleted; download history will be deleted."),
|
||||
New MsgBoxButton("Data", "All files (images and videos) will be deleted; download history will not be affected."),
|
||||
New MsgBoxButton("History", "All files (images and videos) will not be affected; download history will be deleted."),
|
||||
New MsgBoxButton("Cancel")
|
||||
}, MsgBoxStyle.Exclamation) With {.ButtonsPerRow = 4}
|
||||
Dim collectionsCount% = Users.Count(Function(u) u.IsCollection)
|
||||
m.Text &= Users.ListToStringE(vbNewLine, MainFrameObj.GetUserListProvider(collectionsCount > 0))
|
||||
m.Text &= vbCr.StringDup(2)
|
||||
If collectionsCount > 0 Then
|
||||
If collectionsCount = 1 And Users.Count = 1 Then
|
||||
m.Text &= $"THIS USER IS A COLLECTION OF {DirectCast(Users(0), UserDataBind).Count} USERS. THE DATA WILL BE ERASED FOR ALL OF THEM."
|
||||
Else
|
||||
m.Text &= "ONE OR MORE USERS IN THE LIST IS A COLLECTION. THE DATA WILL BE ERASED FOR EACH USER OF EACH COLLECTION."
|
||||
End If
|
||||
m.Text &= vbCr.StringDup(2)
|
||||
End If
|
||||
m.Text &= "Are you sure you want to erase the data?"
|
||||
Select Case m.Show
|
||||
Case 0 : mode = IUserData.EraseMode.Data + IUserData.EraseMode.History
|
||||
Case 1 : mode = IUserData.EraseMode.Data
|
||||
Case 2 : mode = IUserData.EraseMode.History
|
||||
End Select
|
||||
End If
|
||||
Return mode
|
||||
End Function
|
||||
Friend Overridable Function EraseData(ByVal Mode As IUserData.EraseMode) As Boolean Implements IUserData.EraseData
|
||||
Try
|
||||
Dim result As Boolean = False
|
||||
If Not Mode = IUserData.EraseMode.None And Not DataMerging Then
|
||||
Dim m() As IUserData.EraseMode = Mode.EnumExtract(Of IUserData.EraseMode)
|
||||
If m.ListExists Then
|
||||
Dim e As New ErrorsDescriber(EDP.ReturnValue)
|
||||
If m.Contains(IUserData.EraseMode.History) Then
|
||||
If MyFilePosts.Delete(SFO.File, SFODelete.DeleteToRecycleBin, e) Then result = True
|
||||
If MyFileData.Delete(SFO.File, SFODelete.DeleteToRecycleBin, e) Then result = True
|
||||
End If
|
||||
If m.Contains(IUserData.EraseMode.Data) Then
|
||||
Dim files As List(Of SFile) = SFile.GetFiles(DownloadContentDefault_GetRootDir.CSFileP,, SearchOption.AllDirectories, e)
|
||||
If files.ListExists Then files.RemoveAll(Function(f) Not f.Extension.IsEmptyString AndAlso (f.Extension = "txt" Or f.Extension = "xml"))
|
||||
If files.ListExists Then files.ForEach(Sub(f) f.Delete(SFO.File, Settings.DeleteMode, e))
|
||||
LatestData.Clear()
|
||||
result = True
|
||||
End If
|
||||
If result Then
|
||||
_TempPostsList.Clear()
|
||||
_TempMediaList.Clear()
|
||||
_ContentNew.Clear()
|
||||
_ContentList.Clear()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Return result
|
||||
Catch ex As Exception
|
||||
Return ErrorsDescriber.Execute(EDP.SendToLog + EDP.ReturnValue, ex, $"EraseData({CInt(Mode)}): {ToStringForLog()}", False)
|
||||
End Try
|
||||
End Function
|
||||
Friend Overridable Function Delete(Optional ByVal Multiple As Boolean = False, Optional ByVal CollectionValue As Integer = -1) As Integer Implements IUserData.Delete
|
||||
Dim f As SFile = SFile.GetPath(MyFile.CutPath.Path)
|
||||
If f.Exists(SFO.Path, False) AndAlso (User.Merged OrElse f.Delete(SFO.Path, Settings.DeleteMode)) Then
|
||||
@@ -1601,7 +1871,8 @@ BlockNullPicture:
|
||||
Try
|
||||
Dim f As SFile
|
||||
Dim v As Boolean = IsVirtual
|
||||
If IncludedInCollection Then
|
||||
|
||||
If IncludedInCollection And __CollectionName.IsEmptyString And __SpecialCollectionPath.IsEmptyString Then
|
||||
Settings.Users.Add(Me)
|
||||
Removed = False
|
||||
User.CollectionName = String.Empty
|
||||
@@ -1634,7 +1905,8 @@ BlockNullPicture:
|
||||
f.Delete(SFO.Path, Settings.DeleteMode, EDP.ThrowException)
|
||||
End If
|
||||
f.CutPath.Exists(SFO.Path)
|
||||
Directory.Move(UserBefore.File.CutPath(, EDP.ThrowException).Path, f.Path)
|
||||
SFile.Move(UserBefore.File.CutPath(, EDP.ThrowException), f, SFO.Path,,
|
||||
SFODelete.EmptyOnly + SFODelete.DeleteToRecycleBin + SFODelete.OnCancelThrowException, EDP.ThrowException)
|
||||
If Not ScriptData.IsEmptyString AndAlso ScriptData.Contains(UserBefore.File.PathNoSeparator) Then _
|
||||
ScriptData = ScriptData.Replace(UserBefore.File.PathNoSeparator, MyFile.PathNoSeparator)
|
||||
End If
|
||||
@@ -1766,16 +2038,18 @@ BlockNullPicture:
|
||||
End Sub
|
||||
''' <inheritdoc cref="ThrowAny(CancellationToken)"/>
|
||||
Private Overloads Sub ThrowAny() Implements IThrower.ThrowAny
|
||||
ThrowAny(_ExternalCompatibilityToken)
|
||||
ThrowAny(TokenQueue)
|
||||
End Sub
|
||||
''' <exception cref="OperationCanceledException"></exception>
|
||||
''' <exception cref="ObjectDisposedException"></exception>
|
||||
Friend Overridable Overloads Sub ThrowAny(ByVal Token As CancellationToken)
|
||||
Token.ThrowIfCancellationRequested()
|
||||
TokenQueue.ThrowIfCancellationRequested()
|
||||
TokenPersonal.ThrowIfCancellationRequested()
|
||||
ThrowIfDisposed()
|
||||
End Sub
|
||||
#End Region
|
||||
Protected Function ToStringForLog() As String
|
||||
Friend Function ToStringForLog() As String
|
||||
Return $"{IIf(IncludedInCollection, $"[{CollectionName}] - ", String.Empty)}[{Site}] - {Name}"
|
||||
End Function
|
||||
Public Overrides Function ToString() As String
|
||||
@@ -1807,6 +2081,21 @@ BlockNullPicture:
|
||||
End Sub
|
||||
Private Sub BTT_CONTEXT_DELETE_Click(sender As Object, e As EventArgs) Handles BTT_CONTEXT_DELETE.Click
|
||||
End Sub
|
||||
Private Sub BTT_CONTEXT_ERASE_Click(sender As Object, e As EventArgs) Handles BTT_CONTEXT_ERASE.Click
|
||||
Const msgTitle$ = "Erase data"
|
||||
Try
|
||||
Dim m As IUserData.EraseMode = GetEraseMode({Me})
|
||||
If Not m = IUserData.EraseMode.None Then
|
||||
If EraseData(m) Then
|
||||
MsgBoxE({"User data has been erased.", msgTitle})
|
||||
Else
|
||||
MsgBoxE({"User data has not been erased.", msgTitle}, vbExclamation)
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ErrorsDescriber.Execute(EDP.LogMessageValue, ex, msgTitle)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub BTT_CONTEXT_OPEN_PATH_Click(sender As Object, e As EventArgs) Handles BTT_CONTEXT_OPEN_PATH.Click
|
||||
OpenFolder()
|
||||
End Sub
|
||||
@@ -1853,11 +2142,13 @@ BlockNullPicture:
|
||||
LatestData.Clear()
|
||||
_TempMediaList.Clear()
|
||||
_TempPostsList.Clear()
|
||||
TokenPersonal = Nothing
|
||||
If Not ProgressPre Is Nothing Then ProgressPre.Reset() : ProgressPre.Dispose()
|
||||
If Not Responser Is Nothing Then Responser.Dispose()
|
||||
If Not BTT_CONTEXT_DOWN Is Nothing Then BTT_CONTEXT_DOWN.Dispose()
|
||||
If Not BTT_CONTEXT_EDIT Is Nothing Then BTT_CONTEXT_EDIT.Dispose()
|
||||
If Not BTT_CONTEXT_DELETE Is Nothing Then BTT_CONTEXT_DELETE.Dispose()
|
||||
If Not BTT_CONTEXT_ERASE Is Nothing Then BTT_CONTEXT_ERASE.Dispose()
|
||||
If Not BTT_CONTEXT_OPEN_PATH Is Nothing Then BTT_CONTEXT_OPEN_PATH.Dispose()
|
||||
If Not BTT_CONTEXT_OPEN_SITE Is Nothing Then BTT_CONTEXT_OPEN_SITE.Dispose()
|
||||
UserUpdatedEventHandlers.Clear()
|
||||
@@ -1875,85 +2166,4 @@ BlockNullPicture:
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
#Region "Base interfaces"
|
||||
Friend Interface IContentProvider
|
||||
ReadOnly Property Site As String
|
||||
ReadOnly Property Name As String
|
||||
Property ID As String
|
||||
Property FriendlyName As String
|
||||
Property Description As String
|
||||
Property Favorite As Boolean
|
||||
Property Temporary As Boolean
|
||||
Sub OpenSite(Optional ByVal e As ErrorsDescriber = Nothing)
|
||||
Sub DownloadData(ByVal Token As CancellationToken)
|
||||
Sub DownloadSingleObject(ByVal Data As YouTube.Objects.IYouTubeMediaContainer, ByVal Token As CancellationToken)
|
||||
End Interface
|
||||
Friend Interface IUserData : Inherits IContentProvider, IComparable(Of UserDataBase), IComparable, IEquatable(Of UserDataBase), IIndexable, IDisposable
|
||||
Event UserUpdated(ByVal User As IUserData)
|
||||
Property ParseUserMediaOnly As Boolean
|
||||
#Region "Images"
|
||||
Function GetPicture() As Image
|
||||
Sub SetPicture(ByVal f As SFile)
|
||||
#End Region
|
||||
#Region "Collection support"
|
||||
ReadOnly Property IsCollection As Boolean
|
||||
Property CollectionName As String
|
||||
ReadOnly Property IncludedInCollection As Boolean
|
||||
ReadOnly Property UserModel As UsageModel
|
||||
ReadOnly Property CollectionModel As UsageModel
|
||||
ReadOnly Property IsVirtual As Boolean
|
||||
ReadOnly Property Labels As List(Of String)
|
||||
#End Region
|
||||
Property Exists As Boolean
|
||||
Property Suspended As Boolean
|
||||
Property ReadyForDownload As Boolean
|
||||
Property HOST As SettingsHost
|
||||
Property [File] As SFile
|
||||
Property FileExists As Boolean
|
||||
Property DownloadedPictures(ByVal Total As Boolean) As Integer
|
||||
Property DownloadedVideos(ByVal Total As Boolean) As Integer
|
||||
ReadOnly Property DownloadedTotal(Optional ByVal Total As Boolean = True) As Integer
|
||||
ReadOnly Property DownloadedInformation As String
|
||||
Property HasError As Boolean
|
||||
ReadOnly Property FitToAddParams As Boolean
|
||||
ReadOnly Property Key As String
|
||||
Property DownloadImages As Boolean
|
||||
Property DownloadVideos As Boolean
|
||||
Property DownloadMissingOnly As Boolean
|
||||
Property ScriptUse As Boolean
|
||||
Property ScriptData As String
|
||||
Function GetLVI(ByVal Destination As ListView) As ListViewItem
|
||||
Function GetLVIGroup(ByVal Destination As ListView) As ListViewGroup
|
||||
Sub LoadUserInformation()
|
||||
Sub UpdateUserInformation()
|
||||
''' <summary>
|
||||
''' 0 - Nothing removed<br/>
|
||||
''' 1 - User removed<br/>
|
||||
''' 2 - Collection removed<br/>
|
||||
''' 3 - Collection split
|
||||
''' </summary>
|
||||
Function Delete(Optional ByVal Multiple As Boolean = False, Optional ByVal CollectionValue As Integer = -1) As Integer
|
||||
Function MoveFiles(ByVal CollectionName As String, ByVal SpecialCollectionPath As SFile) As Boolean
|
||||
Function CopyFiles(ByVal DestinationPath As SFile, Optional ByVal e As ErrorsDescriber = Nothing) As Boolean
|
||||
Sub OpenFolder()
|
||||
Property DownloadTopCount As Integer?
|
||||
Property DownloadDateFrom As Date?
|
||||
Property DownloadDateTo As Date?
|
||||
Sub SetEnvironment(ByRef h As SettingsHost, ByVal u As UserInfo, ByVal _LoadUserInformation As Boolean,
|
||||
Optional ByVal AttachUserInfo As Boolean = True)
|
||||
ReadOnly Property Disposed As Boolean
|
||||
End Interface
|
||||
Friend Interface IChannelLimits
|
||||
Property AutoGetLimits As Boolean
|
||||
Property DownloadLimitCount As Integer?
|
||||
Property DownloadLimitPost As String
|
||||
Property DownloadLimitDate As Date?
|
||||
Overloads Sub SetLimit(Optional ByVal Post As String = "", Optional ByVal Count As Integer? = Nothing, Optional ByVal [Date] As Date? = Nothing)
|
||||
Overloads Sub SetLimit(ByVal Source As IChannelLimits)
|
||||
End Interface
|
||||
Friend Interface IChannelData : Inherits IContentProvider, IChannelLimits
|
||||
Property SkipExistsUsers As Boolean
|
||||
Property SaveToCache As Boolean
|
||||
End Interface
|
||||
#End Region
|
||||
End Namespace
|
||||
18
SCrawler/API/Base/YTDLP.vb
Normal file
@@ -0,0 +1,18 @@
|
||||
' 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 API.Base.YTDLP
|
||||
Friend Class YTDLPBatch : Inherits GDL.GDLBatch
|
||||
Friend Sub New(ByVal _Token As Threading.CancellationToken)
|
||||
MyBase.New(_Token)
|
||||
Commands.Clear()
|
||||
MainProcessName = "yt-dlp"
|
||||
ChangeDirectory(Settings.YtdlpFile.File)
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -11,14 +11,17 @@ Namespace API.Instagram
|
||||
Friend Class EditorExchangeOptions
|
||||
<PSetting(Caption:="Get timeline", ToolTip:="Download user timeline")>
|
||||
Friend Property GetTimeline As Boolean
|
||||
<PSetting(Caption:="Get stories", ToolTip:="Download user stories")>
|
||||
<PSetting(Caption:="Get stories", ToolTip:="Download user stories (pinned)")>
|
||||
Friend Property GetStories As Boolean
|
||||
<PSetting(Caption:="Get stories: user", ToolTip:="Download user stories")>
|
||||
Friend Property GetStoriesUser As Boolean
|
||||
<PSetting(Caption:="Get tagged posts", ToolTip:="Download user tagged posts")>
|
||||
Friend Property GetTagged As Boolean
|
||||
Friend Sub New(ByVal u As UserData)
|
||||
With u
|
||||
GetTimeline = .GetTimeline
|
||||
GetStories = .GetStories
|
||||
GetStoriesUser = .GetStoriesUser
|
||||
GetTagged = .GetTaggedData
|
||||
End With
|
||||
End Sub
|
||||
@@ -26,6 +29,7 @@ Namespace API.Instagram
|
||||
With s
|
||||
GetTimeline = CBool(.GetTimeline.Value)
|
||||
GetStories = CBool(.GetStories.Value)
|
||||
GetStoriesUser = CBool(.GetStoriesUser.Value)
|
||||
GetTagged = CBool(.GetTagged.Value)
|
||||
End With
|
||||
End Sub
|
||||
|
||||
@@ -74,9 +74,9 @@ Namespace API.Instagram
|
||||
Friend Const Header_IG_WWW_CLAIM As String = "x-ig-www-claim"
|
||||
Friend Const Header_CSRF_TOKEN As String = "x-csrftoken"
|
||||
Private Const Header_ASBD_ID As String = "X-Asbd-Id"
|
||||
Private ReadOnly Header_Browser As New HttpHeader("Sec-Ch-Ua", """Google Chrome"";v=""113"", ""Chromium"";v=""113"", ""Not-A.Brand"";v=""24""")
|
||||
Private ReadOnly Header_BrowserExt As New HttpHeader("Sec-Ch-Ua-Full-Version-List", """Google Chrome"";v=""113.0.5672.127"", ""Chromium"";v=""113.0.5672.127"", ""Not-A.Brand"";v=""24.0.0.0""")
|
||||
Private ReadOnly Header_Platform As New HttpHeader("Sec-Ch-Ua-Platform-Version", """10.0.0""")
|
||||
Private Const Header_Browser As String = "Sec-Ch-Ua"
|
||||
Private Const Header_BrowserExt As String = "Sec-Ch-Ua-Full-Version-List"
|
||||
Private Const Header_Platform As String = "Sec-Ch-Ua-Platform-Version"
|
||||
<PropertyOption(ControlText:="Hash", ControlToolTip:="Instagram session hash for tagged posts", IsAuth:=True), PXML("InstaHash"), ControlNumber(0)>
|
||||
Friend ReadOnly Property HashTagged As PropertyValue
|
||||
<PropertyOption(ControlText:="x-csrftoken", IsAuth:=True, AllowNull:=False), ControlNumber(2)>
|
||||
@@ -108,9 +108,9 @@ Namespace API.Instagram
|
||||
Case NameOf(HH_ASBD_ID) : f = Header_ASBD_ID
|
||||
Case NameOf(HH_IG_WWW_CLAIM) : f = Header_IG_WWW_CLAIM
|
||||
Case NameOf(HH_CSRF_TOKEN) : f = Header_CSRF_TOKEN
|
||||
Case NameOf(HH_BROWSER) : f = Header_Browser.Name
|
||||
Case NameOf(HH_BROWSER_EXT) : f = Header_BrowserExt.Name
|
||||
Case NameOf(HH_PLATFORM) : f = Header_Platform.Name
|
||||
Case NameOf(HH_BROWSER) : f = Header_Browser
|
||||
Case NameOf(HH_BROWSER_EXT) : f = Header_BrowserExt
|
||||
Case NameOf(HH_PLATFORM) : f = Header_Platform
|
||||
Case NameOf(HH_USER_AGENT) : isUserAgent = True
|
||||
End Select
|
||||
If Not f.IsEmptyString Then
|
||||
@@ -139,11 +139,13 @@ Namespace API.Instagram
|
||||
Friend ReadOnly Property GetTimeline As PropertyValue
|
||||
<PropertyOption(ControlText:="Get stories", ControlToolTip:="Default value for new users"), PXML, ControlNumber(24)>
|
||||
Friend ReadOnly Property GetStories As PropertyValue
|
||||
<PropertyOption(ControlText:="Get tagged photos", ControlToolTip:="Default value for new users"), PXML, ControlNumber(25)>
|
||||
<PropertyOption(ControlText:="Get stories: user", ControlToolTip:="Default value for new users"), PXML, ControlNumber(25)>
|
||||
Friend ReadOnly Property GetStoriesUser As PropertyValue
|
||||
<PropertyOption(ControlText:="Get tagged photos", ControlToolTip:="Default value for new users"), PXML, ControlNumber(26)>
|
||||
Friend ReadOnly Property GetTagged As PropertyValue
|
||||
<PropertyOption(ControlText:="Tagged notify limit",
|
||||
ControlToolTip:="If the number of tagged posts exceeds this number you will be notified." & vbCr &
|
||||
"-1 to disable"), PXML, ControlNumber(26)>
|
||||
"-1 to disable"), PXML, ControlNumber(27)>
|
||||
Friend ReadOnly Property TaggedNotifyLimit As PropertyValue
|
||||
<Provider(NameOf(TaggedNotifyLimit), FieldsChecker:=True)>
|
||||
Private ReadOnly Property TaggedNotifyLimitProvider As IFormatProvider
|
||||
@@ -153,7 +155,9 @@ Namespace API.Instagram
|
||||
Friend ReadOnly Property DownloadTimeline As PropertyValue
|
||||
<PropertyOption(ControlText:="Download stories", ControlToolTip:="Download stories"), PXML, ControlNumber(11)>
|
||||
Friend ReadOnly Property DownloadStories As PropertyValue
|
||||
<PropertyOption(ControlText:="Download tagged", ControlToolTip:="Download tagged posts"), PXML, ControlNumber(12)>
|
||||
<PropertyOption(ControlText:="Download stories: user", ControlToolTip:="Download stories (user)"), PXML, ControlNumber(12)>
|
||||
Friend ReadOnly Property DownloadStoriesUser As PropertyValue
|
||||
<PropertyOption(ControlText:="Download tagged", ControlToolTip:="Download tagged posts"), PXML, ControlNumber(13)>
|
||||
Friend ReadOnly Property DownloadTagged As PropertyValue
|
||||
#End Region
|
||||
#Region "429 bypass"
|
||||
@@ -219,20 +223,6 @@ Namespace API.Instagram
|
||||
Dim platform$ = String.Empty
|
||||
Dim useragent$ = String.Empty
|
||||
|
||||
Dim __UpdateHeader As Action(Of HttpHeader, Boolean) = Sub(ByVal h As HttpHeader, ByVal UpdateValueIfEmpty As Boolean)
|
||||
With Responser.Headers
|
||||
Dim i% = .IndexOf(h)
|
||||
Dim hh As HttpHeader
|
||||
If i >= 0 Then
|
||||
hh = .Item(i)
|
||||
If hh.Value.IsEmptyString And UpdateValueIfEmpty Then hh.Value = h.Value
|
||||
Else
|
||||
hh = h
|
||||
End If
|
||||
.Add(hh)
|
||||
End With
|
||||
End Sub
|
||||
|
||||
With Responser
|
||||
.Accept = "*/*"
|
||||
useragent = .UserAgent
|
||||
@@ -242,19 +232,13 @@ Namespace API.Instagram
|
||||
app_id = .Value(Header_IG_APP_ID)
|
||||
www_claim = .Value(Header_IG_WWW_CLAIM)
|
||||
asbd = .Value(Header_ASBD_ID)
|
||||
browser = .Value(Header_Browser.Name)
|
||||
browserExt = .Value(Header_BrowserExt.Name)
|
||||
platform = .Value(Header_Platform.Name)
|
||||
browser = .Value(Header_Browser)
|
||||
browserExt = .Value(Header_BrowserExt)
|
||||
platform = .Value(Header_Platform)
|
||||
End If
|
||||
.Add("Dnt", 1)
|
||||
__UpdateHeader(Header_Browser, browser.IsEmptyString)
|
||||
browser = .Value(Header_Browser.Name)
|
||||
__UpdateHeader(Header_BrowserExt, browserExt.IsEmptyString)
|
||||
browserExt = .Value(Header_BrowserExt.Name)
|
||||
.Add("Sec-Ch-Ua-Mobile", "?0")
|
||||
.Add("Sec-Ch-Ua-Platform", """Windows""")
|
||||
__UpdateHeader(Header_Platform, platform.IsEmptyString)
|
||||
platform = .Value(Header_Platform.Name)
|
||||
.Add("Sec-Fetch-Dest", "empty")
|
||||
.Add("Sec-Fetch-Mode", "cors")
|
||||
.Add("Sec-Fetch-Site", "same-origin")
|
||||
@@ -279,6 +263,7 @@ Namespace API.Instagram
|
||||
|
||||
DownloadTimeline = New PropertyValue(True)
|
||||
DownloadStories = New PropertyValue(True)
|
||||
DownloadStoriesUser = New PropertyValue(True)
|
||||
DownloadTagged = New PropertyValue(False)
|
||||
|
||||
RequestsWaitTimer = New PropertyValue(1000)
|
||||
@@ -290,6 +275,7 @@ Namespace API.Instagram
|
||||
|
||||
GetTimeline = New PropertyValue(True)
|
||||
GetStories = New PropertyValue(False)
|
||||
GetStoriesUser = New PropertyValue(False)
|
||||
GetTagged = New PropertyValue(False)
|
||||
TaggedNotifyLimit = New PropertyValue(200)
|
||||
TaggedNotifyLimitProvider = New TaggedNotifyLimitChecker
|
||||
@@ -301,6 +287,7 @@ Namespace API.Instagram
|
||||
LastRequestsCountLabel = New PropertyValue(LastRequestsCountLabelStr.Invoke(LastRequestsCount.Value))
|
||||
AddHandler LastRequestsCount.ValueChanged, Sub(sender, e) LastRequestsCountLabel.Value = LastRequestsCountLabelStr.Invoke(DirectCast(sender, XMLValue(Of Integer)).ValueF.Value)
|
||||
|
||||
_AllowUserAgentUpdate = False
|
||||
UrlPatternUser = "https://www.instagram.com/{0}/"
|
||||
UserRegex = RParams.DMS("[htps:/]{7,8}.*?instagram.com/([^/]+)", 1)
|
||||
ImageVideoContains = "instagram.com"
|
||||
|
||||
@@ -24,8 +24,10 @@ Namespace API.Instagram
|
||||
Private Const Name_FirstLoadingDone As String = "FirstLoadingDone"
|
||||
Private Const Name_GetTimeline As String = "GetTimeline"
|
||||
Private Const Name_GetStories As String = "GetStories"
|
||||
Private Const Name_GetStoriesUser As String = "GetStoriesUser"
|
||||
Private Const Name_GetTagged As String = "GetTaggedData"
|
||||
Private Const Name_TaggedChecked As String = "TaggedChecked"
|
||||
Private Const Name_NameTrue As String = "NameTrue"
|
||||
#End Region
|
||||
#Region "Declarations"
|
||||
Private Structure PostKV : Implements IEContainerProvider
|
||||
@@ -74,7 +76,40 @@ Namespace API.Instagram
|
||||
Private FirstLoadingDone As Boolean = False
|
||||
Friend Property GetTimeline As Boolean = True
|
||||
Friend Property GetStories As Boolean
|
||||
Friend Property GetStoriesUser As Boolean
|
||||
Friend Property GetTaggedData As Boolean
|
||||
Private _NameTrue As String = String.Empty
|
||||
Private ReadOnly Property NameTrue As String
|
||||
Get
|
||||
Return _NameTrue.IfNullOrEmpty(Name)
|
||||
End Get
|
||||
End Property
|
||||
Private UserNameRequested As Boolean = False
|
||||
#End Region
|
||||
#Region "Loader"
|
||||
Protected Overrides Sub LoadUserInformation_OptionalFields(ByRef Container As XmlFile, ByVal Loading As Boolean)
|
||||
With Container
|
||||
If Loading Then
|
||||
LastCursor = .Value(Name_LastCursor)
|
||||
FirstLoadingDone = .Value(Name_FirstLoadingDone).FromXML(Of Boolean)(False)
|
||||
GetTimeline = .Value(Name_GetTimeline).FromXML(Of Boolean)(CBool(MySiteSettings.GetTimeline.Value))
|
||||
GetStories = .Value(Name_GetStories).FromXML(Of Boolean)(CBool(MySiteSettings.GetStories.Value))
|
||||
GetStoriesUser = .Value(Name_GetStoriesUser).FromXML(Of Boolean)(MySiteSettings.GetStoriesUser.Value)
|
||||
GetTaggedData = .Value(Name_GetTagged).FromXML(Of Boolean)(CBool(MySiteSettings.GetTagged.Value))
|
||||
TaggedChecked = .Value(Name_TaggedChecked).FromXML(Of Boolean)(False)
|
||||
_NameTrue = .Value(Name_NameTrue)
|
||||
Else
|
||||
.Add(Name_LastCursor, LastCursor)
|
||||
.Add(Name_FirstLoadingDone, FirstLoadingDone.BoolToInteger)
|
||||
.Add(Name_GetTimeline, GetTimeline.BoolToInteger)
|
||||
.Add(Name_GetStories, GetStories.BoolToInteger)
|
||||
.Add(Name_GetStoriesUser, GetStoriesUser.BoolToInteger)
|
||||
.Add(Name_GetTagged, GetTaggedData.BoolToInteger)
|
||||
.Add(Name_TaggedChecked, TaggedChecked.BoolToInteger)
|
||||
.Add(Name_NameTrue, _NameTrue)
|
||||
End If
|
||||
End With
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Exchange options"
|
||||
Friend Overrides Function ExchangeOptionsGet() As Object
|
||||
@@ -85,33 +120,17 @@ Namespace API.Instagram
|
||||
With DirectCast(Obj, EditorExchangeOptions)
|
||||
GetTimeline = .GetTimeline
|
||||
GetStories = .GetStories
|
||||
GetStoriesUser = .GetStoriesUser
|
||||
GetTaggedData = .GetTagged
|
||||
End With
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Initializer, loader"
|
||||
#Region "Initializer"
|
||||
Friend Sub New()
|
||||
PostsKVIDs = New List(Of PostKV)
|
||||
PostsToReparse = New List(Of PostKV)
|
||||
End Sub
|
||||
Protected Overrides Sub LoadUserInformation_OptionalFields(ByRef Container As XmlFile, ByVal Loading As Boolean)
|
||||
If Loading Then
|
||||
LastCursor = Container.Value(Name_LastCursor)
|
||||
FirstLoadingDone = Container.Value(Name_FirstLoadingDone).FromXML(Of Boolean)(False)
|
||||
GetTimeline = Container.Value(Name_GetTimeline).FromXML(Of Boolean)(CBool(MySiteSettings.GetTimeline.Value))
|
||||
GetStories = Container.Value(Name_GetStories).FromXML(Of Boolean)(CBool(MySiteSettings.GetStories.Value))
|
||||
GetTaggedData = Container.Value(Name_GetTagged).FromXML(Of Boolean)(CBool(MySiteSettings.GetTagged.Value))
|
||||
TaggedChecked = Container.Value(Name_TaggedChecked).FromXML(Of Boolean)(False)
|
||||
Else
|
||||
Container.Add(Name_LastCursor, LastCursor)
|
||||
Container.Add(Name_FirstLoadingDone, FirstLoadingDone.BoolToInteger)
|
||||
Container.Add(Name_GetTimeline, GetTimeline.BoolToInteger)
|
||||
Container.Add(Name_GetStories, GetStories.BoolToInteger)
|
||||
Container.Add(Name_GetTagged, GetTaggedData.BoolToInteger)
|
||||
Container.Add(Name_TaggedChecked, TaggedChecked.BoolToInteger)
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Download data"
|
||||
Private E560Thrown As Boolean = False
|
||||
@@ -195,6 +214,7 @@ Namespace API.Instagram
|
||||
End Function
|
||||
Private _DownloadingInProgress As Boolean = False
|
||||
Protected Overrides Sub DownloadDataF(ByVal Token As CancellationToken)
|
||||
UserNameRequested = False
|
||||
Dim s As Sections = Sections.Timeline
|
||||
Dim errorFound As Boolean = False
|
||||
Try
|
||||
@@ -221,6 +241,7 @@ Namespace API.Instagram
|
||||
If FirstLoadingDone Then LastCursor = String.Empty
|
||||
If Not IsSavedPosts AndAlso MySiteSettings.BaseAuthExists() Then
|
||||
If CBool(MySiteSettings.DownloadStories.Value) And GetStories Then s = Sections.Stories : DownloadData(String.Empty, s, Token) : ProgressPre.Done()
|
||||
If CBool(MySiteSettings.DownloadStoriesUser.Value) And GetStoriesUser Then s = Sections.UserStories : DownloadData(String.Empty, s, Token) : ProgressPre.Done()
|
||||
If CBool(MySiteSettings.DownloadTagged.Value) And ACheck(MySiteSettings.HashTagged.Value) And GetTaggedData Then s = Sections.Tagged : DownloadData(String.Empty, s, Token) : ProgressPre.Done()
|
||||
End If
|
||||
If WaitNotificationMode = WNM.SkipTemp Or WaitNotificationMode = WNM.SkipCurrent Then WaitNotificationMode = WNM.Notify
|
||||
@@ -262,7 +283,7 @@ Namespace API.Instagram
|
||||
Private Sub Responser_ResponseReceived(ByVal Sender As Object, ByVal e As EventArguments.WebDataResponse)
|
||||
Declarations.UpdateResponser(e, Responser)
|
||||
End Sub
|
||||
Private Enum Sections : Timeline : Tagged : Stories : SavedPosts : End Enum
|
||||
Private Enum Sections : Timeline : Tagged : Stories : UserStories : SavedPosts : End Enum
|
||||
Private Const StoriesFolder As String = "Stories"
|
||||
Private Const TaggedFolder As String = "Tagged"
|
||||
#Region "429 bypass"
|
||||
@@ -413,13 +434,13 @@ Namespace API.Instagram
|
||||
'Check environment
|
||||
If Not IsSavedPosts Then
|
||||
If ID.IsEmptyString Then GetUserId()
|
||||
If ID.IsEmptyString Then Throw New ArgumentException("User ID is not detected", "ID")
|
||||
If ID.IsEmptyString Then Throw New Plugin.ExitException("can't get user ID")
|
||||
End If
|
||||
|
||||
'Create query
|
||||
Select Case Section
|
||||
Case Sections.Timeline
|
||||
URL = $"https://www.instagram.com/api/v1/feed/user/{Name}/username/?count=50" &
|
||||
URL = $"https://www.instagram.com/api/v1/feed/user/{NameTrue}/username/?count=50" &
|
||||
If(Cursor.IsEmptyString, String.Empty, $"&max_id={Cursor}")
|
||||
ENode = Nothing
|
||||
Case Sections.SavedPosts
|
||||
@@ -442,7 +463,7 @@ Namespace API.Instagram
|
||||
ThrowAny(Token)
|
||||
End If
|
||||
If StoriesList.ListExists Then
|
||||
GetStoriesData(StoriesList, Token)
|
||||
GetStoriesData(StoriesList, False, Token)
|
||||
MySiteSettings.TooManyRequests(False)
|
||||
RequestsCount += 1
|
||||
End If
|
||||
@@ -451,6 +472,11 @@ Namespace API.Instagram
|
||||
Else
|
||||
Throw New ExitException
|
||||
End If
|
||||
Case Sections.UserStories
|
||||
GetStoriesData(Nothing, True, Token)
|
||||
MySiteSettings.TooManyRequests(False)
|
||||
RequestsCount += 1
|
||||
Throw New ExitException
|
||||
End Select
|
||||
|
||||
'Get response
|
||||
@@ -611,10 +637,8 @@ Namespace API.Instagram
|
||||
NextCursor = .Value("next_max_id")
|
||||
If .Contains("items") Then nodes = (From ee As EContainer In .Item("items") Where ee.Count > 0 Select ee(0))
|
||||
End With
|
||||
If nodes.ListExists Then
|
||||
DefaultParser(nodes, Sections.SavedPosts, Token)
|
||||
If HasNextPage And Not NextCursor.IsEmptyString Then SavedPostsDownload(NextCursor, Token)
|
||||
End If
|
||||
If nodes.ListExists AndAlso DefaultParser(nodes, Sections.SavedPosts, Token) AndAlso
|
||||
HasNextPage AndAlso Not NextCursor.IsEmptyString Then SavedPostsDownload(NextCursor, Token)
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
@@ -766,16 +790,18 @@ Namespace API.Instagram
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "GetUserId"
|
||||
#Region "GetUserId, GetUserName"
|
||||
Private Sub GetUserId()
|
||||
Dim __idFound As Boolean = False
|
||||
Try
|
||||
Dim r$ = Responser.GetResponse($"https://i.instagram.com/api/v1/users/web_profile_info/?username={Name}",, EDP.ThrowException)
|
||||
RequestsCount += 1
|
||||
Dim r$ = Responser.GetResponse($"https://i.instagram.com/api/v1/users/web_profile_info/?username={NameTrue}",, EDP.ThrowException)
|
||||
If Not r.IsEmptyString Then
|
||||
Using j As EContainer = JsonDocument.Parse(r)
|
||||
If Not j Is Nothing AndAlso j.Contains({"data", "user"}) Then
|
||||
With j({"data", "user"})
|
||||
ID = .Value("id")
|
||||
_ForceSaveUserData = True
|
||||
__idFound = True
|
||||
UserSiteNameUpdate(.Value("full_name"))
|
||||
Dim descr$ = .Value("biography")
|
||||
@@ -800,24 +826,60 @@ Namespace API.Instagram
|
||||
If Responser.StatusCode = HttpStatusCode.NotFound Or Responser.StatusCode = HttpStatusCode.BadRequest Then
|
||||
Throw ex
|
||||
Else
|
||||
LogError(ex, "get Instagram user id")
|
||||
LogError(ex, "get Instagram user ID")
|
||||
End If
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
Private Function GetUserNameById() As Boolean
|
||||
UserNameRequested = True
|
||||
Try
|
||||
If Not ID.IsEmptyString Then
|
||||
RequestsCount += 1
|
||||
Dim r$ = Responser.GetResponse($"https://i.instagram.com/api/v1/users/{ID}/info/",, EDP.ReturnValue)
|
||||
If Not r.IsEmptyString Then
|
||||
Using j As EContainer = JsonDocument.Parse(r, EDP.ReturnValue)
|
||||
If j.ListExists Then
|
||||
Dim newName$ = j.Value({"user"}, "username")
|
||||
If Not newName.IsEmptyString Then
|
||||
Dim oldName$ = NameTrue
|
||||
If Not newName = oldName Then
|
||||
MyMainLOG = $"{ToStringForLog()}: username changed from '{oldName}' to '{newName}'"
|
||||
_NameTrue = newName
|
||||
Dim descr$ = $"Username changed from '{oldName}' to '{newName}' ({Now.ToStringDate(ADateTime.Formats.BaseDateTime)})!"
|
||||
descr.StringAppendLine(UserDescription)
|
||||
UserDescription = descr
|
||||
_ForceSaveUserData = True
|
||||
End If
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
Catch ex As Exception
|
||||
LogError(ex, "get Instagram user name by ID")
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
#End Region
|
||||
#Region "Pinned stories"
|
||||
Private Sub GetStoriesData(ByRef StoriesList As List(Of String), ByVal Token As CancellationToken)
|
||||
Private Sub GetStoriesData(ByRef StoriesList As List(Of String), ByVal GetUserStory As Boolean, ByVal Token As CancellationToken)
|
||||
Const ReqUrl$ = "https://i.instagram.com/api/v1/feed/reels_media/?{0}"
|
||||
Dim tmpList As IEnumerable(Of String)
|
||||
Dim tmpList As IEnumerable(Of String) = Nothing
|
||||
Dim qStr$, r$, sFolder$, storyID$, pid$
|
||||
Dim i% = -1
|
||||
Dim jj As EContainer, s As EContainer
|
||||
ThrowAny(Token)
|
||||
If StoriesList.ListExists Then
|
||||
tmpList = StoriesList.Take(5)
|
||||
If tmpList.ListExists Then
|
||||
If StoriesList.ListExists Or GetUserStory Then
|
||||
If Not GetUserStory Then tmpList = StoriesList.Take(5)
|
||||
If tmpList.ListExists Or GetUserStory Then
|
||||
If GetUserStory Then
|
||||
qStr = $"https://www.instagram.com/api/v1/feed/reels_media/?reel_ids={ID}"
|
||||
Else
|
||||
qStr = String.Format(ReqUrl, tmpList.Select(Function(q) $"reel_ids=highlight:{q}").ListToString("&"))
|
||||
End If
|
||||
r = Responser.GetResponse(qStr,, EDP.ThrowException)
|
||||
ThrowAny(Token)
|
||||
If Not r.IsEmptyString Then
|
||||
@@ -829,9 +891,13 @@ Namespace API.Instagram
|
||||
i += 1
|
||||
sFolder = jj.Value("title").StringRemoveWinForbiddenSymbols
|
||||
storyID = jj.Value("id").Replace("highlight:", String.Empty)
|
||||
If GetUserStory Then
|
||||
sFolder = $"{StoriesFolder} (user)"
|
||||
Else
|
||||
If sFolder.IsEmptyString Then sFolder = $"Story_{storyID}"
|
||||
If sFolder.IsEmptyString Then sFolder = $"Story_{i}"
|
||||
sFolder = $"{StoriesFolder}\{sFolder}"
|
||||
End If
|
||||
If Not storyID.IsEmptyString Then storyID &= ":"
|
||||
With jj("items").XmlIfNothing
|
||||
If .Count > 0 Then
|
||||
@@ -849,7 +915,7 @@ Namespace API.Instagram
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
StoriesList.RemoveRange(0, tmpList.Count)
|
||||
If Not GetUserStory Then StoriesList.RemoveRange(0, tmpList.Count)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
@@ -886,15 +952,15 @@ Namespace API.Instagram
|
||||
''' </summary>
|
||||
Protected Overrides Function DownloadingException(ByVal ex As Exception, ByVal Message As String, Optional ByVal FromPE As Boolean = False,
|
||||
Optional ByVal s As Object = Nothing) As Integer
|
||||
If Responser.StatusCode = HttpStatusCode.NotFound Then
|
||||
UserExists = False
|
||||
ElseIf Responser.StatusCode = HttpStatusCode.BadRequest Then
|
||||
If Responser.StatusCode = HttpStatusCode.NotFound Then '404
|
||||
If Not UserNameRequested AndAlso GetUserNameById() Then Return 1 Else UserExists = False
|
||||
ElseIf Responser.StatusCode = HttpStatusCode.BadRequest Then '400
|
||||
HasError = True
|
||||
MyMainLOG = $"Instagram credentials have expired [{CInt(Responser.StatusCode)}]: {ToStringForLog()} [{s}]"
|
||||
DisableSection(s)
|
||||
ElseIf Responser.StatusCode = HttpStatusCode.Forbidden And s = Sections.Tagged Then
|
||||
ElseIf Responser.StatusCode = HttpStatusCode.Forbidden And s = Sections.Tagged Then '403
|
||||
Return 3
|
||||
ElseIf Responser.StatusCode = 429 Then
|
||||
ElseIf Responser.StatusCode = 429 Then '429
|
||||
With MySiteSettings
|
||||
Dim WaiterExists As Boolean = .LastApplyingValue.HasValue
|
||||
.TooManyRequests(True)
|
||||
@@ -903,10 +969,10 @@ Namespace API.Instagram
|
||||
Caught429 = True
|
||||
MyMainLOG = $"Number of requests before error 429: {RequestsCount}"
|
||||
Return 1
|
||||
ElseIf Responser.StatusCode = 560 Then
|
||||
ElseIf Responser.StatusCode = 560 Or Responser.StatusCode = HttpStatusCode.InternalServerError Then '560, 500
|
||||
MySiteSettings.SkipUntilNextSession = True
|
||||
Else
|
||||
MyMainLOG = $"Instagram hash requested [{CInt(Responser.StatusCode)}]: {ToString()} [{s}]"
|
||||
MyMainLOG = $"Something is wrong. Your credentials may have expired [{CInt(Responser.StatusCode)}/{CInt(Responser.Status)}]: {ToString()} [{s}]"
|
||||
DisableSection(s)
|
||||
If Not FromPE Then LogError(ex, Message) : HasError = True
|
||||
Return 0
|
||||
@@ -918,6 +984,10 @@ Namespace API.Instagram
|
||||
Dim s As Sections = DirectCast(Section, Sections)
|
||||
Select Case s
|
||||
Case Sections.Timeline : MySiteSettings.DownloadTimeline.Value = False
|
||||
Case Sections.Stories, Sections.UserStories
|
||||
MySiteSettings.DownloadTimeline.Value = False
|
||||
MySiteSettings.DownloadStories.Value = False
|
||||
MySiteSettings.DownloadStoriesUser.Value = False
|
||||
Case Else : MySiteSettings.DownloadTagged.Value = False
|
||||
End Select
|
||||
MyMainLOG = $"[{s}] downloading is disabled until you update your credentials".ToUpper
|
||||
|
||||
33
SCrawler/API/JustForFans/Declarations.vb
Normal file
@@ -0,0 +1,33 @@
|
||||
' 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
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports PersonalUtilities.Functions.RegularExpressions
|
||||
Namespace API.JustForFans
|
||||
Friend Module Declarations
|
||||
Friend Const NamePhotoLarge As String = "expandable"
|
||||
Friend Const NamePhotoSmall As String = "galThumb"
|
||||
Private Const PostDateUrlPattern As String = "\<div.class=.mbsc-card-subtitle[^\>]*?location.href='([^']+)[^\>]*?\>([^\<]+?)\<"
|
||||
Friend ReadOnly RegexUser As RParams = RParams.DMS("GetStats2\(UserID\)\{\s*var Hash = '([^']+)'[;\s/]*(var Hash = '([^']+)'|)", 1)
|
||||
Friend ReadOnly RegexVideoBlock As RParams =
|
||||
RParams.DM("((\<div mbsc-card class=""mbsc-card[^\>]*?id=""([^""]+)[^\>]*?\>)\s*\<div class=""mbsc-card-header.+?\<a class=""gridAction[^\>]*?\>[^\<\>]*?\</a\>\s*\</div>)",
|
||||
0, RegexReturn.List, RegexOptions.Singleline, RegexOptions.IgnoreCase, EDP.ReturnValue)
|
||||
Friend ReadOnly Regex_Video As RParams = RParams.DMS("<script>.\s*/\*\s*\$\(document\).ready\(function\(\) \{\s*MakeMovieVideoJS\(.*?(\{.+?\})", 1,
|
||||
RegexOptions.IgnoreCase, RegexOptions.Singleline, EDP.ReturnValue)
|
||||
Friend ReadOnly Regex_Photo As RParams = RParams.DM("\<img.+?class=""(expandable|galThumb)"".*?(data-lazy|src)=""([^""]+)""", 0,
|
||||
RegexReturn.List, RegexOptions.IgnoreCase, RegexOptions.Singleline, EDP.ReturnValue)
|
||||
Friend ReadOnly Regex_Gallery As RParams = RParams.DM("\<div[^\>]+?class=.imageGallery", 0, EDP.ReturnValue)
|
||||
Friend ReadOnly Regex_PostDate As RParams = RParams.DMS(PostDateUrlPattern, 2, RegexOptions.IgnoreCase, RegexOptions.Singleline, EDP.ReturnValue,
|
||||
CType(Function(Input$) Input.StringTrim, Func(Of String, String)))
|
||||
Friend ReadOnly Regex_PostURL As RParams = RParams.DMS(PostDateUrlPattern, 1, RegexOptions.IgnoreCase, RegexOptions.Singleline, EDP.ReturnValue,
|
||||
CType(Function(Input$) Input.StringTrim, Func(Of String, String)))
|
||||
Friend ReadOnly Regex_PostID As RParams = RParams.DMS("[&\?]{1}post=([^&\?]+)", 1, RegexOptions.IgnoreCase, EDP.ReturnValue)
|
||||
Friend ReadOnly DateProvider As New ADateTime("MMMM d, yyyy, h:mm tt")
|
||||
Friend ReadOnly DateProviderVideoFileName As New ADateTime("yyyyMMdd_HHmmss")
|
||||
End Module
|
||||
End Namespace
|
||||
227
SCrawler/API/JustForFans/M3U8.vb
Normal file
@@ -0,0 +1,227 @@
|
||||
' 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
|
||||
Imports System.Threading
|
||||
Imports SCrawler.API.Base
|
||||
Imports PersonalUtilities.Tools
|
||||
Imports PersonalUtilities.Tools.Web
|
||||
Imports PersonalUtilities.Tools.Web.Clients
|
||||
Imports PersonalUtilities.Forms.Toolbars
|
||||
Imports PersonalUtilities.Functions.RegularExpressions
|
||||
Imports UTypes = SCrawler.API.Base.UserMedia.Types
|
||||
Namespace API.JustForFans
|
||||
Friend NotInheritable Class M3U8 : Implements IDisposable
|
||||
#Region "Declarations"
|
||||
Friend Const AllVid As UTypes = UTypes.m3u8 + UTypes.VideoPre
|
||||
Private ReadOnly DataVideo As List(Of String)
|
||||
Private ReadOnly DataAudio As List(Of String)
|
||||
Private Media As UserMedia
|
||||
Private DestinationFile As SFile
|
||||
Private ReadOnly Thrower As Plugin.IThrower
|
||||
Private ReadOnly Responser As Responser
|
||||
Private Const R_VIDEO_REGEX_PATTERN As String = "(#EXT-X-STREAM-INF)(.+)(RESOLUTION=\d+x)(\d+)(.+""\s*)(\S+)(\s*)"
|
||||
Private ReadOnly REGEX_AUDIO_URL As RParams = RParams.DMS("EXT-X-MEDIA.*?URI=.([^""]+)"".*?TYPE=""AUDIO""", 1, EDP.ReturnValue)
|
||||
Private ReadOnly REGEX_PLS_FILES As RParams = RParams.DM("EXT-X-MAP:URI=""([^""]+)""|EXTINF.+?[\r\n]{1,2}(.+)", 0, RegexReturn.List, EDP.ReturnValue)
|
||||
Private UrlVideo As String
|
||||
Private UrlAudio As String
|
||||
Private FileVideo As SFile
|
||||
Private FileAudio As SFile
|
||||
Private RootPlaylistUrl As String
|
||||
Private ReadOnly Cache As CacheKeeper
|
||||
Private ReadOnly Progress As MyProgress
|
||||
Private ReadOnly ProgressPre As PreProgress
|
||||
Private ReadOnly ProgressExists As Boolean
|
||||
Private ReadOnly UsePreProgress As Boolean
|
||||
#End Region
|
||||
#Region "Initializer"
|
||||
Private Sub New(ByVal m As UserMedia, ByVal Destination As SFile, ByVal Resp As Responser, ByVal _Thrower As Plugin.IThrower,
|
||||
ByVal _Progress As MyProgress, ByVal _UsePreProgress As Boolean)
|
||||
Media = m
|
||||
DataVideo = New List(Of String)
|
||||
DataAudio = New List(Of String)
|
||||
DestinationFile = Destination
|
||||
Thrower = _Thrower
|
||||
Responser = Resp
|
||||
Progress = _Progress
|
||||
ProgressExists = Not Progress Is Nothing
|
||||
If ProgressExists Then ProgressPre = New PreProgress(Progress)
|
||||
UsePreProgress = _UsePreProgress
|
||||
Cache = New CacheKeeper($"{DestinationFile.PathWithSeparator}_{M3U8Base.TempCacheFolderName}\")
|
||||
With Cache
|
||||
.CacheDeleteError = CacheDeletionError(Cache)
|
||||
.DisposeSuspended = True
|
||||
.Validate()
|
||||
End With
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Download functions"
|
||||
Private Sub DownloadPre()
|
||||
If Media.Type = AllVid Then
|
||||
Dim r$ = Responser.GetResponse(Media.URL)
|
||||
If Not r.IsEmptyString Then
|
||||
Dim s As List(Of Sizes) = RegexFields(Of Sizes)(r, {RParams.DM(R_VIDEO_REGEX_PATTERN, 0, RegexReturn.List, EDP.ReturnValue)}, {4, 6}, EDP.ReturnValue)
|
||||
If s.ListExists Then
|
||||
s.Sort()
|
||||
RootPlaylistUrl = s(0).Data
|
||||
s.Clear()
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
RootPlaylistUrl = Media.URL
|
||||
End If
|
||||
End Sub
|
||||
Private Sub Download()
|
||||
DownloadPre()
|
||||
If RootPlaylistUrl.IsEmptyString Then
|
||||
DestinationFile = Nothing
|
||||
Else
|
||||
Thrower.ThrowAny()
|
||||
Dim r$ = Responser.GetResponse(RootPlaylistUrl)
|
||||
If Not r.IsEmptyString Then
|
||||
UrlVideo = RegexReplace(r, RParams.DMS(R_VIDEO_REGEX_PATTERN, 6, EDP.ReturnValue))
|
||||
UrlAudio = RegexReplace(r, REGEX_AUDIO_URL)
|
||||
If UrlVideo.IsEmptyString Then Throw New ArgumentException("Unable to identify m3u8 video track", "M3U8 video track")
|
||||
Thrower.ThrowAny()
|
||||
GetFiles(UrlVideo, FileVideo, False)
|
||||
Thrower.ThrowAny()
|
||||
If Not UrlAudio.IsEmptyString Then GetFiles(UrlAudio, FileAudio, True)
|
||||
Thrower.ThrowAny()
|
||||
MergeFiles()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub GetFiles(ByVal URL As String, ByRef File As SFile, ByVal IsAudio As Boolean)
|
||||
Try
|
||||
Dim r$ = Responser.GetResponse(URL)
|
||||
If Not r.IsEmptyString Then
|
||||
Dim data As List(Of RegexMatchStruct) = RegexFields(Of RegexMatchStruct)(r, {REGEX_PLS_FILES}, {1, 2}, EDP.ReturnValue)
|
||||
If data.ListExists Then
|
||||
Dim appender$ = URL.Replace(URL.Split("/").LastOrDefault, String.Empty)
|
||||
With (From d As RegexMatchStruct In data
|
||||
Where Not d.Arr(0).IfNullOrEmpty(d.Arr(1)).IsEmptyString
|
||||
Select M3U8Base.CreateUrl(appender, d.Arr(0).IfNullOrEmpty(d.Arr(1)))).ToList
|
||||
If .ListExists Then
|
||||
File = $"{Cache.RootDirectory.PathWithSeparator}{IIf(IsAudio, "AUDIO.aac", "VIDEO.mp4")}"
|
||||
Dim tmpCache As CacheKeeper = Cache.NewInstance
|
||||
Dim tmpFile As SFile = .Item(0)
|
||||
If tmpFile.Extension.IsEmptyString Then tmpFile.Extension = "ts"
|
||||
tmpFile.Path = tmpCache.RootDirectory.Path
|
||||
tmpFile.Separator = "\"
|
||||
|
||||
Dim cFile As SFile = tmpFile
|
||||
cFile.Name = "all"
|
||||
|
||||
tmpCache.Validate()
|
||||
|
||||
Using bat As New TextSaver
|
||||
Using b As New BatchExecutor(True) With {.Encoding = Settings.CMDEncoding}
|
||||
AddHandler b.OutputDataReceived, AddressOf Batch_OutputDataReceived
|
||||
bat.AppendLine($"chcp {BatchExecutor.UnicodeEncoding}")
|
||||
bat.AppendLine(BatchExecutor.GetDirectoryCommand(tmpCache))
|
||||
ProgressChangeMax(.Count * 2 + 1)
|
||||
For i = 0 To .Count - 1
|
||||
tmpFile.Name = $"ConPart_{i}"
|
||||
Thrower.ThrowAny()
|
||||
Responser.DownloadFile(.Item(i), tmpFile)
|
||||
ProgressPerform()
|
||||
tmpCache.AddFile(tmpFile, True)
|
||||
bat.AppendLine($"type {tmpFile.File} >> {cFile.File}")
|
||||
Next
|
||||
|
||||
bat.AppendLine($"""{Settings.FfmpegFile}"" -i {cFile.File} -c copy ""{File}""")
|
||||
|
||||
Dim batFile As SFile = bat.SaveAs($"{tmpCache.RootDirectory.PathWithSeparator}command.bat")
|
||||
|
||||
b.Execute($"""{batFile}""")
|
||||
|
||||
If Not File.Exists Then File = Nothing
|
||||
End Using
|
||||
End Using
|
||||
End If
|
||||
End With
|
||||
End If
|
||||
End If
|
||||
Catch oex As OperationCanceledException
|
||||
Throw oex
|
||||
Catch dex As ObjectDisposedException
|
||||
Throw dex
|
||||
Catch ex As Exception
|
||||
ErrorsDescriber.Execute(EDP.SendToLog + EDP.ThrowException, ex,
|
||||
$"API.JustForFans.M3U8.GetFiles({IIf(IsAudio, "audio", "video")}):{vbCr}URL: {URL}{vbCr}File: {File}")
|
||||
End Try
|
||||
End Sub
|
||||
Private Async Sub Batch_OutputDataReceived(ByVal Sender As Object, ByVal e As DataReceivedEventArgs)
|
||||
Await Task.Run(Sub() ProgressPerform())
|
||||
End Sub
|
||||
Private Sub MergeFiles()
|
||||
Try
|
||||
Dim p As SFileNumbers = SFileNumbers.Default(DestinationFile.Name)
|
||||
Dim f As SFile = SFile.IndexReindex(DestinationFile,,, p, EDP.ReturnValue).IfNullOrEmpty(DestinationFile)
|
||||
If Not FileVideo.IsEmptyString And Not FileAudio.IsEmptyString Then
|
||||
DestinationFile = FFMPEG.MergeFiles({FileVideo, FileAudio}, Settings.FfmpegFile, f, Settings.CMDEncoding, p, EDP.ThrowException)
|
||||
Else
|
||||
If Not SFile.Move(FileVideo, f) Then DestinationFile = FileVideo
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ErrorsDescriber.Execute(EDP.SendToLog + EDP.ThrowException, ex, $"[M3U8.MergeFiles]")
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Progress support"
|
||||
Private Sub ProgressChangeMax(ByVal Count As Integer)
|
||||
If ProgressExists Then
|
||||
If UsePreProgress Then
|
||||
ProgressPre.ChangeMax(Count)
|
||||
Else
|
||||
Progress.Maximum += Count
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ProgressPerform()
|
||||
If ProgressExists Then
|
||||
If UsePreProgress Then
|
||||
ProgressPre.Perform()
|
||||
Else
|
||||
Progress.Perform()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Static Download"
|
||||
Friend Shared Function Download(ByVal Media As UserMedia, ByVal DestinationFile As SFile, ByVal Resp As Responser, ByVal Thrower As Plugin.IThrower,
|
||||
ByVal Progress As MyProgress, ByVal UsePreProgress As Boolean) As SFile
|
||||
Using m As New M3U8(Media, DestinationFile, Resp, Thrower, Progress, UsePreProgress)
|
||||
m.Download()
|
||||
If m.DestinationFile.Exists Then Return m.DestinationFile Else Return Nothing
|
||||
End Using
|
||||
End Function
|
||||
#End Region
|
||||
#Region "IDisposable Support"
|
||||
Private disposedValue As Boolean = False
|
||||
Private Overloads Sub Dispose(ByVal disposing As Boolean)
|
||||
If Not disposedValue Then
|
||||
If disposing Then
|
||||
DataVideo.Clear()
|
||||
DataAudio.Clear()
|
||||
ProgressPre.DisposeIfReady
|
||||
Cache.Dispose()
|
||||
End If
|
||||
disposedValue = True
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub Finalize()
|
||||
Dispose(False)
|
||||
MyBase.Finalize()
|
||||
End Sub
|
||||
Friend Overloads Sub Dispose() Implements IDisposable.Dispose
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
End Namespace
|
||||
88
SCrawler/API/JustForFans/SiteSettings.vb
Normal file
@@ -0,0 +1,88 @@
|
||||
' 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
|
||||
Imports SCrawler.API.Base
|
||||
Imports SCrawler.Plugin
|
||||
Imports SCrawler.Plugin.Attributes
|
||||
Imports PersonalUtilities.Tools.Web.Clients
|
||||
Imports PersonalUtilities.Tools.Web.Cookies
|
||||
Imports PersonalUtilities.Functions.RegularExpressions
|
||||
Namespace API.JustForFans
|
||||
<Manifest("AndyProgram_JustForFans"), SavedPosts, SeparatedTasks(1)>
|
||||
Friend Class SiteSettings : Inherits SiteSettingsBase
|
||||
Friend Overrides ReadOnly Property Icon As Icon
|
||||
Get
|
||||
Return My.Resources.SiteResources.JFFIcon_64
|
||||
End Get
|
||||
End Property
|
||||
Friend Overrides ReadOnly Property Image As Image
|
||||
Get
|
||||
Return My.Resources.SiteResources.JFFPic_76
|
||||
End Get
|
||||
End Property
|
||||
Friend Const UserHash4_CookieName As String = "userhash4"
|
||||
<PropertyOption(ControlText:="User ID", AllowNull:=False), PXML>
|
||||
Friend ReadOnly Property UserID As PropertyValue
|
||||
<PropertyOption, PXML>
|
||||
Friend ReadOnly Property UserHash4 As PropertyValue
|
||||
<PropertyOption(ControlText:="Accept", ControlToolTip:="Header 'Accept'")>
|
||||
Friend ReadOnly Property HeaderAccept As PropertyValue
|
||||
<PropertyOption> Friend ReadOnly Property UserAgent As PropertyValue
|
||||
Private Sub UpdateHeader(ByVal HeaderName As String, ByVal HeaderValue As String)
|
||||
Select Case HeaderName
|
||||
Case NameOf(HeaderAccept) : If HeaderValue.IsEmptyString Then Responser.Accept = Nothing Else Responser.Accept = HeaderValue
|
||||
Case NameOf(UserAgent) : If Not HeaderValue.IsEmptyString Then Responser.UserAgent = HeaderValue
|
||||
End Select
|
||||
End Sub
|
||||
Friend Sub New()
|
||||
MyBase.New("JustForFans", "justfor.fans")
|
||||
|
||||
With Responser
|
||||
.CookiesExtractMode = Responser.CookiesExtractModes.Any
|
||||
.CookiesUpdateMode = CookieKeeper.UpdateModes.ReplaceByNameAll
|
||||
.CookiesExtractedAutoSave = False
|
||||
.Cookies.ChangedAllowInternalDrop = False
|
||||
.Cookies.Changed = False
|
||||
End With
|
||||
|
||||
UserID = New PropertyValue(String.Empty, GetType(String))
|
||||
UserHash4 = New PropertyValue(String.Empty, GetType(String))
|
||||
HeaderAccept = New PropertyValue(Responser.Accept.Value, GetType(String), Sub(v) UpdateHeader(NameOf(HeaderAccept), v))
|
||||
UserAgent = New PropertyValue(Responser.UserAgent, GetType(String), Sub(v) UpdateHeader(NameOf(UserAgent), v))
|
||||
|
||||
_AllowUserAgentUpdate = False
|
||||
UserRegex = RParams.DMS("https://justfor.fans/([^/\?]+)", 1, EDP.ReturnValue)
|
||||
UrlPatternUser = "https://justfor.fans/{0}"
|
||||
ImageVideoContains = "justfor.fans"
|
||||
End Sub
|
||||
Friend Overrides Function GetInstance(ByVal What As ISiteSettings.Download) As IPluginContentProvider
|
||||
Return New UserData
|
||||
End Function
|
||||
Friend Overrides Sub Update()
|
||||
If _SiteEditorFormOpened Then UpdateUserHash4()
|
||||
MyBase.Update()
|
||||
End Sub
|
||||
Private Sub UpdateUserHash4()
|
||||
If Responser.CookiesExists Then
|
||||
Dim hv_current$ = UserHash4.Value
|
||||
Dim hv_cookie$ = If(Responser.Cookies.FirstOrDefault(Function(cc) cc.Name.ToLower = UserHash4_CookieName)?.Value, String.Empty)
|
||||
If Not hv_cookie.IsEmptyString And Not hv_cookie = hv_current And Responser.Cookies.Changed Then UserHash4.Value = hv_cookie
|
||||
End If
|
||||
End Sub
|
||||
Friend Sub UpdateResponser(ByVal Source As Responser)
|
||||
If Source.Cookies.Changed Then
|
||||
Responser.Cookies.Update(Source.Cookies)
|
||||
UpdateUserHash4()
|
||||
If Responser.Cookies.Changed Then Responser.SaveCookies() : Responser.Cookies.Changed = False
|
||||
End If
|
||||
End Sub
|
||||
Friend Overrides Function Available(ByVal What As ISiteSettings.Download, ByVal Silent As Boolean) As Boolean
|
||||
Return Responser.CookiesExists And ACheck(UserID.Value) And ACheck(UserHash4.Value)
|
||||
End Function
|
||||
End Class
|
||||
End Namespace
|
||||
344
SCrawler/API/JustForFans/UserData.vb
Normal file
@@ -0,0 +1,344 @@
|
||||
' 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
|
||||
Imports System.Threading
|
||||
Imports SCrawler.API.Base
|
||||
Imports SCrawler.API.YouTube.Objects
|
||||
Imports PersonalUtilities.Functions.XML
|
||||
Imports PersonalUtilities.Functions.RegularExpressions
|
||||
Imports PersonalUtilities.Tools.Web.Clients
|
||||
Imports PersonalUtilities.Tools.Web.Documents.JSON
|
||||
Imports UTypes = SCrawler.API.Base.UserMedia.Types
|
||||
Namespace API.JustForFans
|
||||
Friend Class UserData : Inherits UserDataBase
|
||||
#Region "Declarations"
|
||||
Private ReadOnly Property MySettings As SiteSettings
|
||||
Get
|
||||
Return HOST.Source
|
||||
End Get
|
||||
End Property
|
||||
Private ResponserNoHandlers As Responser = Nothing
|
||||
#End Region
|
||||
#Region "Structures"
|
||||
Private Class FileSerial
|
||||
Private InitNumber As Integer
|
||||
Private ReadOnly Provider As New ANumbers With {.FormatOptions = ANumbers.Options.FormatNumberGroup, .GroupSize = 9}
|
||||
Friend Sub New(ByVal Root As String)
|
||||
Try
|
||||
Dim r$ = Root.CSFilePS
|
||||
InitNumber = SFile.GetFiles(r,,, EDP.ReturnValue).Count +
|
||||
SFile.GetFiles($"{r}Video\",,, EDP.ReturnValue).Count +
|
||||
SFile.GetFiles($"{r}Videos\",,, EDP.ReturnValue).Count
|
||||
Catch
|
||||
InitNumber = 0
|
||||
End Try
|
||||
End Sub
|
||||
Friend Function ApplyHash(ByVal f As SFile) As SFile
|
||||
InitNumber += 1
|
||||
f.Name &= $"_{InitNumber.NumToString(Provider)}_{$"{Now:O}_{Rnd()}".GetHashCode()}"
|
||||
Return f
|
||||
End Function
|
||||
End Class
|
||||
Private Structure PhotoData : Implements IRegExCreator
|
||||
Friend IsLarge As Boolean
|
||||
Friend URL As String
|
||||
Private Function CreateFromArray(ByVal ParamsArray() As String) As Object Implements IRegExCreator.CreateFromArray
|
||||
If ParamsArray.ListExists Then
|
||||
IsLarge = Not ParamsArray(0).IsEmptyString AndAlso ParamsArray(0).StringToLower = NamePhotoLarge
|
||||
URL = ParamsArray(1)
|
||||
End If
|
||||
Return Me
|
||||
End Function
|
||||
End Structure
|
||||
Private Structure PostBlock : Implements IRegExCreator
|
||||
Friend PostID As String
|
||||
Friend PostDate As Date?
|
||||
Friend PostUrl As String
|
||||
Friend Pinned As Boolean
|
||||
Private Data As String
|
||||
Private File As SFile
|
||||
Private FileNameDefault As String
|
||||
Friend Type As UTypes
|
||||
Friend Values As IEnumerable(Of String)
|
||||
Friend ReadOnly Property Valid As Boolean
|
||||
Get
|
||||
Return Values.ListExists And Not Type = UTypes.Undefined And Not PostID.IsEmptyString And Not PostUrl.IsEmptyString
|
||||
End Get
|
||||
End Property
|
||||
Private Function CreateFromArray(ByVal ParamsArray() As String) As Object Implements IRegExCreator.CreateFromArray
|
||||
If ParamsArray.ListExists(3) Then
|
||||
Data = ParamsArray(0)
|
||||
Pinned = Not ParamsArray(1).IsEmptyString AndAlso ParamsArray(1).ToLower.Contains("pinned")
|
||||
PostDate = AConvert(Of Date)(RegexReplace(Data, Regex_PostDate), DateProvider, Nothing)
|
||||
PostUrl = RegexReplace(Data, Regex_PostURL)
|
||||
If Not PostUrl.IsEmptyString Then PostUrl = $"https://justfor.fans/{PostUrl.Trim.StringTrimStart("/")}"
|
||||
PostID = RegexReplace(PostUrl, Regex_PostID)
|
||||
If Not Data.IsEmptyString Then
|
||||
FileNameDefault = AConvert(Of String)(If(PostDate, Now), DateProviderVideoFileName, String.Empty)
|
||||
|
||||
Dim found As Boolean = False
|
||||
Dim tmpData$ = RegexReplace(Data, Regex_Video)
|
||||
|
||||
If Not tmpData.IsEmptyString Then
|
||||
found = True
|
||||
File.Name = FileNameDefault
|
||||
File.Extension = "mp4"
|
||||
Using j As EContainer = JsonDocument.Parse(tmpData, EDP.ReturnValue)
|
||||
If j.ListExists Then
|
||||
Dim vr As RParams = RParams.DM("(\d+)", 0, EDP.ReturnValue)
|
||||
Dim l As New List(Of Sizes)
|
||||
Dim s As Sizes
|
||||
Dim all$ = String.Empty
|
||||
Dim t As UTypes = UTypes.m3u8
|
||||
For Each jj As EContainer In j
|
||||
If jj.Name.StringToLower = "all" Then
|
||||
all = jj.Value
|
||||
Else
|
||||
s = New Sizes(RegexReplace(jj.Name, vr), jj.Value)
|
||||
If Not s.HasError Then l.Add(s)
|
||||
End If
|
||||
Next
|
||||
If l.Count = 0 Then l.Add(New Sizes(0, all)) : t = M3U8.AllVid
|
||||
If l.Count > 0 Then
|
||||
l.Sort()
|
||||
Values = {l(0).Data}
|
||||
Type = t
|
||||
If Not Values(0).Contains("m3u8") Then Type = UTypes.Video
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
|
||||
If Not found AndAlso Not CStr(RegexReplace(Data, Regex_Gallery)).IsEmptyString Then
|
||||
found = True
|
||||
File = Nothing
|
||||
Dim pData As List(Of PhotoData) = RegexFields(Of PhotoData)(Data, {Regex_Photo}, {1, 3}, EDP.ReturnValue)
|
||||
If pData.ListExists Then
|
||||
Type = UTypes.Picture
|
||||
If pData.Exists(Function(d) d.IsLarge) Then
|
||||
Values = (From d As PhotoData In pData Where d.IsLarge Select d.URL).ToArray
|
||||
Else
|
||||
Values = pData.Select(Function(d) d.URL).Distinct
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not found Then
|
||||
File = Nothing
|
||||
Dim pp As RParams = Regex_Photo.Copy
|
||||
pp.Match = Nothing
|
||||
pp.MatchSub = 3
|
||||
pp.WhatGet = RegexReturn.Value
|
||||
Dim v$ = RegexReplace(Data, pp)
|
||||
If Not v.IsEmptyString Then found = True : Type = UTypes.Picture : Values = {v}
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Return Me
|
||||
End Function
|
||||
Friend Function GetUserMedia(ByVal FS As FileSerial) As IEnumerable(Of UserMedia)
|
||||
If Values.ListExists Then
|
||||
Dim m As UserMedia
|
||||
Dim f As SFile
|
||||
Dim outList As New List(Of UserMedia)
|
||||
For Each url$ In Values
|
||||
m = New UserMedia(url, Type) With {.URL_BASE = PostUrl.IfNullOrEmpty(.URL_BASE), .Post = New UserPost(PostID, PostDate)}
|
||||
f = New SFile With {.Name = FileNameDefault, .Extension = m.File.Extension}
|
||||
If Not Type = UTypes.Picture And Not Type = UTypes.GIF Then f.Extension = "mp4"
|
||||
f = FS.ApplyHash(f)
|
||||
m.File = f
|
||||
outList.Add(m)
|
||||
Next
|
||||
Return outList
|
||||
Else
|
||||
Return New UserMedia() {}
|
||||
End If
|
||||
End Function
|
||||
End Structure
|
||||
#End Region
|
||||
#Region "Loader"
|
||||
Protected Overrides Sub LoadUserInformation_OptionalFields(ByRef Container As XmlFile, ByVal Loading As Boolean)
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Initializer"
|
||||
Friend Sub New()
|
||||
UseInternalM3U8Function = True
|
||||
UseResponserClient = True
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Download functions"
|
||||
Private _DownloadedPostsCount As Integer = 0
|
||||
Private _Limit As Integer = -1
|
||||
Private FileSerialInstance As FileSerial
|
||||
Private _UserHash4 As String = String.Empty
|
||||
Protected Overrides Sub DownloadDataF(ByVal Token As CancellationToken)
|
||||
Try
|
||||
_UserHash4 = MySettings.UserHash4.Value
|
||||
FileSerialInstance = New FileSerial(DownloadContentDefault_GetRootDir())
|
||||
Responser.Cookies.Changed = False
|
||||
If Not ResponserNoHandlers Is Nothing Then ResponserNoHandlers.Dispose() : ResponserNoHandlers = Nothing
|
||||
ResponserNoHandlers = Responser.Copy
|
||||
AddHandler Responser.ResponseReceived, AddressOf Responser_ResponseReceived
|
||||
_DownloadedPostsCount = 0
|
||||
_Limit = If(DownloadTopCount, -1)
|
||||
DownloadData(0, Token)
|
||||
Finally
|
||||
If DownloadTopCount.HasValue Then DownloadTopCount = Nothing
|
||||
Try : RemoveHandler Responser.ResponseReceived, AddressOf Responser_ResponseReceived : Catch : End Try
|
||||
MySettings.UpdateResponser(Responser)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub Responser_ResponseReceived(ByVal Source As Object, ByVal e As EventArguments.WebDataResponse)
|
||||
If e.CookiesExists Then
|
||||
Dim hv$ = If(e.Cookies.FirstOrDefault(Function(cc) cc.Name.StringToLower = SiteSettings.UserHash4_CookieName)?.Value, String.Empty)
|
||||
If Not hv.IsEmptyString And Not _UserHash4 = hv Then _UserHash4 = hv
|
||||
End If
|
||||
End Sub
|
||||
Private Overloads Sub DownloadData(ByVal Cursor As Integer, ByVal Token As CancellationToken)
|
||||
Dim URL$ = String.Empty
|
||||
Try
|
||||
Dim processed As Boolean = False
|
||||
|
||||
ThrowAny(Token)
|
||||
|
||||
If IsSavedPosts Then
|
||||
URL = $"https://justfor.fans/home?Tab=Saved&Page={Cursor + 1}"
|
||||
Else
|
||||
If ID.IsEmptyString Then GetUserID() : ThrowAny(Token)
|
||||
If ID.IsEmptyString Then Throw New ArgumentNullException("ID", "The user ID cannot be null")
|
||||
If _UserHash4.IsEmptyString Then Throw New ArgumentNullException("UserHash4", "[UserHash4] cannot be null")
|
||||
URL = $"https://justfor.fans/ajax/getPosts.php?Type=One&UserID={MySettings.UserID.Value}&PosterID={ID}&StartAt={Cursor}&Page=Profile&UserHash4={_UserHash4}&SplitTest=0"
|
||||
End If
|
||||
|
||||
Dim r$ = Responser.GetResponse(URL)
|
||||
|
||||
If Not r.IsEmptyString Then
|
||||
Dim data As List(Of PostBlock) = RegexFields(Of PostBlock)(r, {RegexVideoBlock}, {0, 2, 3}, EDP.ReturnValue)
|
||||
If data.ListExists Then
|
||||
For Each post As PostBlock In data
|
||||
If post.Valid Then
|
||||
processed = True
|
||||
If Not post.PostID.IsEmptyString Then
|
||||
If _TempPostsList.Contains(post.PostID) Then
|
||||
If post.Pinned Then Continue For Else Exit Sub
|
||||
Else
|
||||
_TempPostsList.Add(post.PostID)
|
||||
End If
|
||||
End If
|
||||
|
||||
Select Case CheckDatesLimit(post.PostDate, Nothing)
|
||||
Case DateResult.Skip : Continue For
|
||||
Case DateResult.Exit : Exit Sub
|
||||
End Select
|
||||
|
||||
_DownloadedPostsCount += 1
|
||||
_TempMediaList.ListAddList(post.GetUserMedia(FileSerialInstance), LNC)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
If processed And (_Limit = -1 Or _DownloadedPostsCount < _Limit) Then DownloadData(Cursor + IIf(IsSavedPosts, 1, 10), Token)
|
||||
Catch ex As Exception
|
||||
ProcessException(ex, Token, $"data downloading error [{URL}]")
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub GetUserID()
|
||||
Try
|
||||
Dim r$, hash$, new_id$
|
||||
If ID.IsEmptyString Then
|
||||
r = Responser.GetResponse($"https://justfor.fans/{Name}")
|
||||
If Not r.IsEmptyString Then
|
||||
hash = RegexReplace(r, RegexUser)
|
||||
If Not hash.IsEmptyString Then
|
||||
r = Responser.GetResponse($"https://justfor.fans/ajax/getAssetCount.php?User={Name}&Ver={hash}")
|
||||
If Not r.IsEmptyString Then
|
||||
Using j As EContainer = JsonDocument.Parse(r)
|
||||
If j.ListExists Then
|
||||
new_id = j.Value("UserID")
|
||||
If Not new_id.IsEmptyString Then
|
||||
new_id = RegexReplace(new_id, RParams.DM("\D", 0, RegexReturn.Replace, CType(Function(input$) String.Empty, Func(Of String, String))))
|
||||
If Not new_id.IsEmptyString Then ID = new_id : _ForceSaveUserInfo = True
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LogError(ex, "can't get user ID")
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "ReparseMissing"
|
||||
Protected Overrides Sub ReparseMissing(ByVal Token As CancellationToken)
|
||||
Dim rList As New List(Of Integer)
|
||||
Try
|
||||
If ContentMissingExists Then
|
||||
Dim r$
|
||||
Dim m As UserMedia
|
||||
Dim p As PostBlock
|
||||
Dim rErr As New ErrorsDescriber(EDP.ReturnValue)
|
||||
For i% = 0 To _ContentList.Count - 1
|
||||
m = _ContentList(i)
|
||||
If m.State = UserMedia.States.Missing And Not m.URL_BASE.IsEmptyString Then
|
||||
ThrowAny(Token)
|
||||
r = Responser.GetResponse(m.URL_BASE,, rErr)
|
||||
If Not r.IsEmptyString Then
|
||||
With RegexFields(Of PostBlock)(r, {RegexVideoBlock}, {0, 2, 3}, rErr)
|
||||
If .ListExists Then
|
||||
rList.Add(i)
|
||||
For Each p In .Self
|
||||
If p.Valid Then _TempMediaList.ListAddList(p.GetUserMedia(FileSerialInstance), LNC)
|
||||
Next
|
||||
End If
|
||||
End With
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ProcessException(ex, Token, "missing data downloading error")
|
||||
Finally
|
||||
If rList.Count > 0 Then
|
||||
For i% = rList.Count - 1 To 0 Step -1 : _ContentList.RemoveAt(rList(i)) : Next
|
||||
rList.Clear()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "DownloadContent"
|
||||
Protected Overrides Sub DownloadContent(ByVal Token As CancellationToken)
|
||||
DownloadContentDefault(Token)
|
||||
End Sub
|
||||
Protected Overrides Function DownloadM3U8(ByVal URL As String, ByVal Media As UserMedia, ByVal DestinationFile As SFile, ByVal Token As CancellationToken) As SFile
|
||||
Return M3U8.Download(Media, DestinationFile, ResponserNoHandlers, Me, Progress, Not IsSingleObjectDownload)
|
||||
End Function
|
||||
#End Region
|
||||
#Region "DownloadSingleObject"
|
||||
Protected Overrides Sub DownloadSingleObject_GetPosts(ByVal Data As IYouTubeMediaContainer, ByVal Token As CancellationToken)
|
||||
ResponserNoHandlers = Responser.Copy
|
||||
_ContentList.Add(New UserMedia(Data.URL) With {.State = UserMedia.States.Missing})
|
||||
ReparseMissing(Token)
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "DownloadingException"
|
||||
Protected Overrides Function DownloadingException(ByVal ex As Exception, ByVal Message As String, Optional ByVal FromPE As Boolean = False,
|
||||
Optional ByVal EObj As Object = Nothing) As Integer
|
||||
Return 0
|
||||
End Function
|
||||
#End Region
|
||||
#Region "IDisposable Support"
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If Not disposedValue And disposing Then FileSerialInstance = Nothing
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -19,7 +19,10 @@ Namespace API.LPSG
|
||||
Friend ReadOnly Property NextPageRegex As RParams = RParams.DMS("<link rel=""next"" href=""(.+?/page-(\d+))""", 2)
|
||||
Private Const FileUrlRegexDefault As String = "([^/]+?)(jpg|jpeg|gif|png|webm)"
|
||||
Private ReadOnly InputFReplacer As New ErrorsDescriber(EDP.ReturnValue)
|
||||
Private ReadOnly InputForbidRemover As Func(Of String, String) = Function(Input) If(Input.IsEmptyString, Input, Input.StringRemoveWinForbiddenSymbols(, InputFReplacer))
|
||||
Private ReadOnly InputForbidRemover As Func(Of String, String) = Function(Input) If(Input.IsEmptyString,
|
||||
Input,
|
||||
Input.StringRemoveWinForbiddenSymbols(, InputFReplacer)).
|
||||
IfNullOrEmpty($"{Settings.Cache.NewFile.Name}.file")
|
||||
Private ReadOnly FileRegEx As RParams = RParams.DMS(FileUrlRegexDefault, 0, RegexReturn.ListByMatch, InputFReplacer)
|
||||
#Disable Warning IDE0060
|
||||
Friend Function FileRegExF(ByVal Input As String, ByVal Index As Integer) As String
|
||||
@@ -28,7 +31,8 @@ Namespace API.LPSG
|
||||
Dim l As List(Of String) = RegexReplace(Input, FileRegEx)
|
||||
If l.ListExists(3) Then
|
||||
Dim ext$ = l(2)
|
||||
Dim f$ = l(1).StringTrim("-", ".")
|
||||
Dim f$ = l(1).StringTrim("-", ".").StringRemoveWinForbiddenSymbols
|
||||
If f.IsEmptyString Then f = Settings.Cache.NewFile.Name
|
||||
Input = $"{f}.{ext}"
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -9,9 +9,11 @@
|
||||
Imports SCrawler.Plugin.Attributes
|
||||
Namespace API.Mastodon
|
||||
Friend Class EditorExchangeOptions : Inherits Twitter.EditorExchangeOptions
|
||||
<PSetting(Address:=SettingAddress.None)> Friend Overrides Property MediaModelAllowNonUserTweets As Boolean
|
||||
<PSetting(Address:=SettingAddress.None)> Friend Overrides Property DownloadModelMedia As Boolean
|
||||
<PSetting(Address:=SettingAddress.None)> Friend Overrides Property DownloadModelProfile As Boolean
|
||||
<PSetting(Address:=SettingAddress.None)> Friend Overrides Property DownloadModelSearch As Boolean
|
||||
<PSetting(Address:=SettingAddress.None)> Friend Overrides Property DownloadModelForceApply As Boolean
|
||||
Friend Sub New(ByVal s As SiteSettings)
|
||||
MyBase.New(s)
|
||||
End Sub
|
||||
|
||||
@@ -13,7 +13,7 @@ Imports PersonalUtilities.Functions.XML
|
||||
Imports PersonalUtilities.Functions.RegularExpressions
|
||||
Imports PersonalUtilities.Tools.Web.Clients
|
||||
Imports PersonalUtilities.Tools.Web.Documents.JSON
|
||||
Imports TS = SCrawler.API.Twitter.SiteSettings
|
||||
Imports DN = SCrawler.API.Base.DeclaredNames
|
||||
Namespace API.Mastodon
|
||||
<Manifest(MastodonSiteKey), SavedPosts, SpecialForm(True), SpecialForm(False)>
|
||||
Friend Class SiteSettings : Inherits SiteSettingsBase
|
||||
@@ -46,8 +46,8 @@ Namespace API.Mastodon
|
||||
If Not PropName.IsEmptyString Then
|
||||
Dim f$ = String.Empty
|
||||
Select Case PropName
|
||||
Case NameOf(Auth) : f = TS.Header_Authorization
|
||||
Case NameOf(Token) : f = TS.Header_Token
|
||||
Case NameOf(Auth) : f = DN.Header_Authorization
|
||||
Case NameOf(Token) : f = DN.Header_CSRFToken
|
||||
End Select
|
||||
If Not f.IsEmptyString Then
|
||||
Responser.Headers.Remove(f)
|
||||
@@ -58,15 +58,15 @@ Namespace API.Mastodon
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Other properties"
|
||||
<PropertyOption(IsAuth:=False, ControlText:=TS.GifsDownload_Text), PXML>
|
||||
<PropertyOption(IsAuth:=False, ControlText:=DN.GifsDownloadCaption), PXML>
|
||||
Friend ReadOnly Property GifsDownload As PropertyValue
|
||||
<PropertyOption(IsAuth:=False, ControlText:=TS.GifsSpecialFolder_Text, ControlToolTip:=TS.GifsSpecialFolder_ToolTip), PXML>
|
||||
<PropertyOption(IsAuth:=False, ControlText:=DN.GifsSpecialFolderCaption, ControlToolTip:=DN.GifsSpecialFolderToolTip), PXML>
|
||||
Friend ReadOnly Property GifsSpecialFolder As PropertyValue
|
||||
<PropertyOption(IsAuth:=False, ControlText:=TS.GifsPrefix_Text, ControlToolTip:=TS.GifsPrefix_ToolTip), PXML>
|
||||
<PropertyOption(IsAuth:=False, ControlText:=DN.GifsPrefixCaption, ControlToolTip:=DN.GifsPrefixToolTip), PXML>
|
||||
Friend ReadOnly Property GifsPrefix As PropertyValue
|
||||
<Provider(NameOf(GifsSpecialFolder), Interaction:=True), Provider(NameOf(GifsPrefix), Interaction:=True)>
|
||||
Private ReadOnly Property GifStringChecker As IFormatProvider
|
||||
<PropertyOption(IsAuth:=False, ControlText:=TS.UseMD5Comparison_Text, ControlToolTip:=TS.UseMD5Comparison_ToolTip), PXML>
|
||||
<PropertyOption(IsAuth:=False, ControlText:=DN.UseMD5ComparisonCaption, ControlToolTip:=DN.UseMD5ComparisonToolTip), PXML>
|
||||
Friend ReadOnly Property UseMD5Comparison As PropertyValue
|
||||
<PropertyOption(IsAuth:=False, ControlText:="User related to my domain",
|
||||
ControlToolTip:="Open user profiles and user posts through my domain."), PXML>
|
||||
@@ -82,13 +82,13 @@ Namespace API.Mastodon
|
||||
Domains.DestinationProp = SiteDomains
|
||||
DomainsLastUpdateDate = New PropertyValue(Now.AddYears(-1))
|
||||
|
||||
Auth = New PropertyValue(Responser.Headers.Value(TS.Header_Authorization), GetType(String), Sub(v) ChangeResponserFields(NameOf(Auth), v))
|
||||
Token = New PropertyValue(Responser.Headers.Value(TS.Header_Token), GetType(String), Sub(v) ChangeResponserFields(NameOf(Token), v))
|
||||
Auth = New PropertyValue(Responser.Headers.Value(DN.Header_Authorization), GetType(String), Sub(v) ChangeResponserFields(NameOf(Auth), v))
|
||||
Token = New PropertyValue(Responser.Headers.Value(DN.Header_CSRFToken), GetType(String), Sub(v) ChangeResponserFields(NameOf(Token), v))
|
||||
|
||||
GifsDownload = New PropertyValue(True)
|
||||
GifsSpecialFolder = New PropertyValue(String.Empty, GetType(String))
|
||||
GifsPrefix = New PropertyValue("GIF_")
|
||||
GifStringChecker = New TS.GifStringProvider
|
||||
GifStringChecker = New API.Twitter.SiteSettings.GifStringProvider
|
||||
UseMD5Comparison = New PropertyValue(False)
|
||||
MyDomain = New PropertyValue(String.Empty, GetType(String))
|
||||
UserRelatedToMyDomain = New PropertyValue(False)
|
||||
|
||||
@@ -55,8 +55,8 @@ Namespace API.Mastodon
|
||||
If setDef Then MyCredentials = New Credentials With {.Domain = UserDomain, .Bearer = MySettings.Auth.Value, .Csrf = MySettings.Token.Value}
|
||||
End With
|
||||
With MyCredentials
|
||||
Responser.Headers.Add(Twitter.SiteSettings.Header_Authorization, .Bearer)
|
||||
Responser.Headers.Add(Twitter.SiteSettings.Header_Token, .Csrf)
|
||||
Responser.Headers.Add(DeclaredNames.Header_Authorization, .Bearer)
|
||||
Responser.Headers.Add(DeclaredNames.Header_CSRFToken, .Csrf)
|
||||
End With
|
||||
End Sub
|
||||
#End Region
|
||||
@@ -261,8 +261,9 @@ Namespace API.Mastodon
|
||||
If Not j Is Nothing Then
|
||||
PostDate = String.Empty
|
||||
If j.Contains("created_at") Then PostDate = j("created_at").Value Else PostDate = String.Empty
|
||||
ObtainMedia(j, m.Post.ID, PostDate, UStates.Missing)
|
||||
ObtainMedia(j, m.Post.ID, PostDate, m.URL_BASE)
|
||||
rList.Add(i)
|
||||
j.Dispose()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -273,7 +274,7 @@ Namespace API.Mastodon
|
||||
ProcessException(ex, Token, $"ReparseMissing error [{URL}]")
|
||||
Finally
|
||||
If rList.Count > 0 Then
|
||||
For i% = rList.Count - 1 To 0 Step -1 : _ContentList.RemoveAt(i) : Next
|
||||
For i% = rList.Count - 1 To 0 Step -1 : _ContentList.RemoveAt(rList(i)) : Next
|
||||
rList.Clear()
|
||||
End If
|
||||
End Try
|
||||
|
||||
15
SCrawler/API/OnlyFans/Declarations.vb
Normal file
@@ -0,0 +1,15 @@
|
||||
' 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
|
||||
Imports PersonalUtilities.Functions.RegularExpressions
|
||||
Namespace API.OnlyFans
|
||||
Friend Module Declarations
|
||||
Friend ReadOnly DateProvider As New ADateTime("O")
|
||||
Friend ReadOnly RegExPostID As RParams = RParams.DM("(?<=onlyfans\.com/)(\d+)", 0, EDP.ReturnValue)
|
||||
End Module
|
||||
End Namespace
|
||||
197
SCrawler/API/OnlyFans/SiteSettings.vb
Normal file
@@ -0,0 +1,197 @@
|
||||
' 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
|
||||
Imports SCrawler.API.Base
|
||||
Imports SCrawler.Plugin
|
||||
Imports SCrawler.Plugin.Attributes
|
||||
Imports PersonalUtilities.Forms
|
||||
Imports PersonalUtilities.Tools.Web.Clients
|
||||
Imports PersonalUtilities.Tools.Web.Cookies
|
||||
Imports PersonalUtilities.Functions.RegularExpressions
|
||||
Namespace API.OnlyFans
|
||||
<Manifest("AndyProgram_OnlyFans"), SavedPosts, SpecialForm(False), SeparatedTasks(1)>
|
||||
Friend Class SiteSettings : Inherits SiteSettingsBase
|
||||
#Region "Icon"
|
||||
Friend Overrides ReadOnly Property Icon As Icon
|
||||
Get
|
||||
Return My.Resources.SiteResources.OnlyFansIcon_32
|
||||
End Get
|
||||
End Property
|
||||
Friend Overrides ReadOnly Property Image As Image
|
||||
Get
|
||||
Return My.Resources.SiteResources.OnlyFansPic_32
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
#Region "Declarations"
|
||||
#Region "Options"
|
||||
<PropertyOption(ControlText:="Download highlights", ControlToolTip:="Download profile highlights if they exists"), PXML>
|
||||
Friend Property DownloadHighlights As PropertyValue
|
||||
<PropertyOption(ControlText:="Download chat", ControlToolTip:="Download unlocked chat media"), PXML>
|
||||
Friend Property DownloadChatMedia As PropertyValue
|
||||
#End Region
|
||||
#Region "Headers"
|
||||
Private Const HeaderBrowser As String = "sec-ch-ua"
|
||||
Private Const HeaderUserID As String = "User-Id"
|
||||
Private Const HeaderXBC As String = "X-Bc"
|
||||
Private Const HeaderAppToken As String = "App-Token"
|
||||
<PropertyOption(ControlText:=HeaderUserID, AllowNull:=False)>
|
||||
Friend ReadOnly Property HH_USER_ID As PropertyValue
|
||||
<PropertyOption(ControlText:=HeaderXBC, AllowNull:=False)>
|
||||
Private ReadOnly Property HH_X_BC As PropertyValue
|
||||
<PropertyOption(ControlText:=HeaderAppToken, AllowNull:=False)>
|
||||
Private ReadOnly Property HH_APP_TOKEN As PropertyValue
|
||||
<PropertyOption(ControlText:=HeaderBrowser, ControlToolTip:="Can be null", AllowNull:=True)>
|
||||
Private ReadOnly Property HH_BROWSER As PropertyValue
|
||||
<PropertyOption(AllowNull:=False)>
|
||||
Private ReadOnly Property UserAgent As PropertyValue
|
||||
Private Sub UpdateHeader(ByVal PropertyName As String, ByVal Value As String)
|
||||
Dim hName$ = String.Empty
|
||||
Dim isUserAgent As Boolean = False
|
||||
Select Case PropertyName
|
||||
Case NameOf(HH_USER_ID) : hName = HeaderUserID
|
||||
Case NameOf(HH_X_BC) : hName = HeaderXBC
|
||||
Case NameOf(HH_APP_TOKEN) : hName = HeaderAppToken
|
||||
Case NameOf(HH_BROWSER) : hName = HeaderBrowser
|
||||
Case NameOf(UserAgent) : isUserAgent = True
|
||||
End Select
|
||||
If Not hName.IsEmptyString Then
|
||||
Responser.Headers.Add(hName, Value)
|
||||
ElseIf isUserAgent Then
|
||||
Responser.UserAgent = Value
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Rules"
|
||||
<PXML("LastDateUpdated")> Private ReadOnly Property LastDateUpdated_XML As PropertyValue
|
||||
Friend Property LastDateUpdated As Date
|
||||
Get
|
||||
Return LastDateUpdated_XML.Value
|
||||
End Get
|
||||
Set(ByVal d As Date)
|
||||
LastDateUpdated_XML.Value = d
|
||||
End Set
|
||||
End Property
|
||||
<PropertyOption(ControlText:="Use old authorization rules",
|
||||
ControlToolTip:="Use old dynamic rules (from 'DATAHOARDERS') or new ones (from 'DIGITALCRIMINALS')." & vbCr &
|
||||
"Change this value only if you know what you are doing."), PXML>
|
||||
Friend ReadOnly Property UseOldAuthRules As PropertyValue
|
||||
<PropertyOption(ControlText:="Dynamic rules update", ControlToolTip:="'Dynamic rules' update interval (minutes). Default: 1440", LeftOffset:=110), PXML>
|
||||
Friend ReadOnly Property DynamicRulesUpdateInterval As PropertyValue
|
||||
<Provider(NameOf(DynamicRulesUpdateInterval), FieldsChecker:=True)>
|
||||
Private ReadOnly Property DynamicRulesUpdateIntervalProvider As IFormatProvider
|
||||
<PropertyOption(ControlText:="Dynamic rules",
|
||||
ControlToolTip:="Overwrite 'Dynamic rules' with this URL" & vbCr &
|
||||
"Change this value only if you know what you are doing."), PXML>
|
||||
Friend ReadOnly Property DynamicRules As PropertyValue
|
||||
#End Region
|
||||
#End Region
|
||||
#Region "Initializer"
|
||||
Friend Sub New()
|
||||
MyBase.New("OnlyFans", ".onlyfans.com")
|
||||
|
||||
With Responser
|
||||
.Accept = "application/json, text/plain, */*"
|
||||
.AutomaticDecompression = Net.DecompressionMethods.GZip
|
||||
.CookiesExtractMode = Responser.CookiesExtractModes.Any
|
||||
.CookiesExtractedAutoSave = False
|
||||
.CookiesUpdateMode = CookieKeeper.UpdateModes.Disabled
|
||||
.Cookies.ChangedAllowInternalDrop = False
|
||||
.Cookies.Changed = False
|
||||
With .Headers
|
||||
.Add(HttpHeaderCollection.GetSpecialHeader(MyHeaderTypes.SecChUaPlatform))
|
||||
.Add(HttpHeaderCollection.GetSpecialHeader(MyHeaderTypes.SecChUaMobile))
|
||||
.Add(HttpHeaderCollection.GetSpecialHeader(MyHeaderTypes.SecFetchDest))
|
||||
.Add(HttpHeaderCollection.GetSpecialHeader(MyHeaderTypes.SecFetchMode))
|
||||
.Add(HttpHeaderCollection.GetSpecialHeader(MyHeaderTypes.SecFetchSite))
|
||||
.Add(HttpHeaderCollection.GetSpecialHeader(MyHeaderTypes.DHT))
|
||||
.Add(HttpHeaderCollection.GetSpecialHeader(MyHeaderTypes.Authority, "onlyfans.com"))
|
||||
.Add(HttpHeaderCollection.GetSpecialHeader(MyHeaderTypes.AcceptEncoding))
|
||||
HH_USER_ID = New PropertyValue(.Value(HeaderUserID), GetType(String), Sub(v) UpdateHeader(NameOf(HH_USER_ID), v))
|
||||
HH_X_BC = New PropertyValue(.Value(HeaderXBC), GetType(String), Sub(v) UpdateHeader(NameOf(HH_X_BC), v))
|
||||
HH_APP_TOKEN = New PropertyValue(.Value(HeaderAppToken), GetType(String), Sub(v) UpdateHeader(NameOf(HH_APP_TOKEN), v))
|
||||
HH_BROWSER = New PropertyValue(.Value(HeaderBrowser), GetType(String), Sub(v) UpdateHeader(NameOf(HH_BROWSER), v))
|
||||
End With
|
||||
UserAgent = New PropertyValue(IIf(.UserAgentExists, .UserAgent, String.Empty), GetType(String), Sub(v) UpdateHeader(NameOf(UserAgent), v))
|
||||
End With
|
||||
|
||||
DownloadHighlights = New PropertyValue(True)
|
||||
DownloadChatMedia = New PropertyValue(True)
|
||||
|
||||
LastDateUpdated_XML = New PropertyValue(Now.AddYears(-1), GetType(Date))
|
||||
UseOldAuthRules = New PropertyValue(False)
|
||||
DynamicRulesUpdateInterval = New PropertyValue(60 * 24)
|
||||
DynamicRulesUpdateIntervalProvider = New FieldsCheckerProviderSimple(Function(v) IIf(AConvert(Of Integer)(v, 0) > 0, v, Nothing),
|
||||
"The value of [{0}] field must be greater than 0")
|
||||
DynamicRules = New PropertyValue(String.Empty, GetType(String))
|
||||
UserRegex = RParams.DMS("onlyfans.com/([\w\._]+)", 1, EDP.ReturnValue)
|
||||
UrlPatternUser = "https://onlyfans.com/{0}"
|
||||
ImageVideoContains = "onlyfans.com"
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "GetInstance"
|
||||
Friend Overrides Function GetInstance(ByVal What As ISiteSettings.Download) As IPluginContentProvider
|
||||
Return New UserData
|
||||
End Function
|
||||
#End Region
|
||||
#Region "Update"
|
||||
Friend Overrides Sub Update()
|
||||
If _SiteEditorFormOpened Then Responser.Cookies.Changed = False
|
||||
MyBase.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Download"
|
||||
Friend Overrides Function BaseAuthExists() As Boolean
|
||||
Return Responser.CookiesExists And {HH_USER_ID, HH_X_BC, HH_APP_TOKEN, UserAgent}.All(Function(v) ACheck(v.Value))
|
||||
End Function
|
||||
Friend Overrides Function ReadyToDownload(ByVal What As ISiteSettings.Download) As Boolean
|
||||
Return BaseAuthExists() And Not SessionAborted
|
||||
End Function
|
||||
Friend Property SessionAborted As Boolean = False
|
||||
Friend Overrides Sub AfterDownload(ByVal User As Object, ByVal What As ISiteSettings.Download)
|
||||
Responser.Cookies.Update(DirectCast(User, UserData).CCookie)
|
||||
End Sub
|
||||
Friend Overrides Sub DownloadDone(ByVal What As ISiteSettings.Download)
|
||||
MyBase.DownloadDone(What)
|
||||
SessionAborted = False
|
||||
If Responser.Cookies.Changed Then Responser.SaveCookies() : Responser.Cookies.Changed = False
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "GetUserUrl, GetUserPostUrl, UserOptions"
|
||||
Friend Overrides Function GetUserUrl(ByVal User As IPluginContentProvider) As String
|
||||
Return String.Format(UrlPatternUser, If(User.ID.IsEmptyString, User.Name, $"u{User.ID}"))
|
||||
End Function
|
||||
Friend Overrides Function GetUserPostUrl(ByVal User As UserDataBase, ByVal Media As UserMedia) As String
|
||||
If Not Media.Post.ID.IsEmptyString Then
|
||||
Dim post$() = Media.Post.ID.Split("_")
|
||||
Dim p$ = String.Empty
|
||||
If post.ListExists Then
|
||||
If post(0) = UserData.A_MESSAGE Then
|
||||
If Not User.ID.IsEmptyString Then Return $"https://onlyfans.com/my/chats/chat/{User.ID}/"
|
||||
ElseIf Not post(0) = UserData.A_HIGHLIGHT Then
|
||||
p = post(0)
|
||||
End If
|
||||
End If
|
||||
If p.IsEmptyString Then
|
||||
Return GetUserUrl(User)
|
||||
Else
|
||||
Return String.Format("https://onlyfans.com/{0}/{1}", p, If(User.ID.IsEmptyString, User.Name, $"u{User.ID}"))
|
||||
End If
|
||||
Else
|
||||
Return String.Empty
|
||||
End If
|
||||
End Function
|
||||
Friend Overrides Sub UserOptions(ByRef Options As Object, ByVal OpenForm As Boolean)
|
||||
If Options Is Nothing OrElse Not TypeOf Options Is UserExchangeOptions Then Options = New UserExchangeOptions(Me)
|
||||
If OpenForm Then
|
||||
Using f As New InternalSettingsForm(Options, Me, False) : f.ShowDialog() : End Using
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
End Namespace
|
||||
552
SCrawler/API/OnlyFans/UserData.vb
Normal file
@@ -0,0 +1,552 @@
|
||||
' 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
|
||||
Imports System.Threading
|
||||
Imports SCrawler.API.Base
|
||||
Imports SCrawler.API.YouTube.Objects
|
||||
Imports PersonalUtilities.Functions.XML
|
||||
Imports PersonalUtilities.Functions.RegularExpressions
|
||||
Imports PersonalUtilities.Tools.Web.Clients
|
||||
Imports PersonalUtilities.Tools.Web.Clients.EventArguments
|
||||
Imports PersonalUtilities.Tools.Web.Cookies
|
||||
Imports PersonalUtilities.Tools.Web.Documents.JSON
|
||||
Imports UTypes = SCrawler.API.Base.UserMedia.Types
|
||||
Imports UStates = SCrawler.API.Base.UserMedia.States
|
||||
Namespace API.OnlyFans
|
||||
Friend Class UserData : Inherits UserDataBase
|
||||
#Region "XML names"
|
||||
Private Const Name_MediaDownloadHighlights As String = "DownloadHighlights"
|
||||
Private Const Name_MediaDownloadChatMedia As String = "DownloadChatMedia"
|
||||
#End Region
|
||||
#Region "Declarations"
|
||||
Friend Property CCookie As CookieKeeper = Nothing
|
||||
Private Const HeaderSign As String = "Sign"
|
||||
Private Const HeaderTime As String = "Time"
|
||||
Private ReadOnly HighlightsList As List(Of String)
|
||||
Friend Property MediaDownloadHighlights As Boolean = True
|
||||
Friend Property MediaDownloadChatMedia As Boolean = True
|
||||
Private ReadOnly Property MySettings As SiteSettings
|
||||
Get
|
||||
Return HOST.Source
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
#Region "Load"
|
||||
Protected Overrides Sub LoadUserInformation_OptionalFields(ByRef Container As XmlFile, ByVal Loading As Boolean)
|
||||
With Container
|
||||
If Loading Then
|
||||
MediaDownloadHighlights = .Value(Name_MediaDownloadHighlights).FromXML(Of Boolean)(True)
|
||||
MediaDownloadChatMedia = .Value(Name_MediaDownloadChatMedia).FromXML(Of Boolean)(True)
|
||||
Else
|
||||
.Add(Name_MediaDownloadHighlights, MediaDownloadHighlights.BoolToInteger)
|
||||
.Add(Name_MediaDownloadChatMedia, MediaDownloadChatMedia.BoolToInteger)
|
||||
End If
|
||||
End With
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Exchange"
|
||||
Friend Overrides Function ExchangeOptionsGet() As Object
|
||||
Return New UserExchangeOptions(Me)
|
||||
End Function
|
||||
Friend Overrides Sub ExchangeOptionsSet(ByVal Obj As Object)
|
||||
If Not Obj Is Nothing AndAlso TypeOf Obj Is UserExchangeOptions Then
|
||||
With DirectCast(Obj, UserExchangeOptions)
|
||||
MediaDownloadHighlights = .DownloadHighlights
|
||||
MediaDownloadChatMedia = .DownloadChatMedia
|
||||
End With
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Initializer"
|
||||
Friend Sub New()
|
||||
HighlightsList = New List(Of String)
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Download functions"
|
||||
Protected Overrides Sub DownloadDataF(ByVal Token As CancellationToken)
|
||||
If Not MySettings.SessionAborted Then
|
||||
If Not CCookie Is Nothing Then CCookie.Dispose()
|
||||
CCookie = Responser.Cookies.Copy
|
||||
Responser.Cookies.Clear()
|
||||
AddHandler Responser.ResponseReceived, AddressOf OnResponseReceived
|
||||
UpdateCookieHeader()
|
||||
DownloadTimeline(IIf(IsSavedPosts, 0, String.Empty), Token)
|
||||
If Not IsSavedPosts Then
|
||||
If MediaDownloadHighlights Then DownloadHighlights(Token)
|
||||
If MediaDownloadChatMedia Then DownloadChatMedia(0, Token)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub OnResponseReceived(ByVal Sender As Object, ByVal e As WebDataResponse)
|
||||
If e.CookiesExists Then
|
||||
CCookie.Update(e.Cookies, CookieKeeper.UpdateModes.ReplaceByNameAll,, EDP.ReturnValue)
|
||||
UpdateCookieHeader()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub UpdateCookieHeader()
|
||||
Responser.Headers.Add("Cookie", CCookie.ToString(False))
|
||||
End Sub
|
||||
Friend Const A_HIGHLIGHT As String = "HL"
|
||||
Friend Const A_MESSAGE As String = "MSG"
|
||||
Private Const BaseUrlPattern As String = "https://onlyfans.com{0}"
|
||||
#Region "Download timeline"
|
||||
Private Overloads Sub DownloadTimeline(ByVal Cursor As String, ByVal Token As CancellationToken)
|
||||
Dim url$ = String.Empty
|
||||
Dim _complete As Boolean = True
|
||||
Do
|
||||
Try
|
||||
Dim tmpCursor$ = String.Empty
|
||||
Dim hasMore As Boolean = False
|
||||
Dim path$ = String.Empty
|
||||
Dim postDate$, postID$
|
||||
Dim n As EContainer
|
||||
Dim mediaList As List(Of UserMedia)
|
||||
Dim mediaResult As Boolean
|
||||
|
||||
If IsSavedPosts Then
|
||||
path = $"/api2/v2/posts/bookmarks/all/?format=infinite&limit=10&offset={Cursor}"
|
||||
Else
|
||||
If ID.IsEmptyString Then GetUserID()
|
||||
If ID.IsEmptyString Then Throw New ArgumentNullException("ID", "Unable to get user ID")
|
||||
|
||||
path = $"/api2/v2/users/{ID}/posts/medias?limit=50&order=publish_date_desc&skip_users=all&format=infinite&counters=1"
|
||||
If Not Cursor.IsEmptyString Then path &= $"&counters=0&beforePublishTime={Cursor}" Else path &= "&counters=1"
|
||||
End If
|
||||
|
||||
If UpdateSignature(path) Then
|
||||
url = String.Format(BaseUrlPattern, path)
|
||||
ThrowAny(Token)
|
||||
|
||||
Dim r$ = Responser.GetResponse(url)
|
||||
If Not r.IsEmptyString Then
|
||||
Using j As EContainer = JsonDocument.Parse(r)
|
||||
If j.ListExists Then
|
||||
If IsSavedPosts Then
|
||||
hasMore = j.Value("hasMore").FromXML(Of Boolean)(False)
|
||||
Else
|
||||
tmpCursor = j.Value("tailMarker")
|
||||
hasMore = Not tmpCursor.IsEmptyString
|
||||
End If
|
||||
With j("list")
|
||||
If .ListExists Then
|
||||
ProgressPre.ChangeMax(.Count)
|
||||
For Each n In .Self
|
||||
ProgressPre.Perform()
|
||||
postID = n.Value("id")
|
||||
postDate = n.Value("postedAt")
|
||||
|
||||
If Not _TempPostsList.Contains(postID) Then
|
||||
_TempPostsList.Add(postID)
|
||||
Else
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Select Case MyBase.CheckDatesLimit(postDate, DateProvider)
|
||||
Case DateResult.Skip : Continue For
|
||||
Case DateResult.Exit : Exit Sub
|
||||
End Select
|
||||
|
||||
mediaResult = False
|
||||
mediaList = TryCreateMedia(n, postID, postDate, mediaResult)
|
||||
If mediaResult Then _TempMediaList.ListAddList(mediaList, LNC)
|
||||
Next
|
||||
Else
|
||||
hasMore = False
|
||||
End If
|
||||
End With
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
End If
|
||||
|
||||
If hasMore Then
|
||||
If IsSavedPosts Then tmpCursor = CInt(Cursor.IfNullOrEmpty(0)) + 10
|
||||
DownloadTimeline(tmpCursor, Token)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_complete = Not ProcessException(ex, Token, $"data downloading error [{url}]") = 2
|
||||
End Try
|
||||
Loop While Not _complete
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Download highlights"
|
||||
Private Overloads Sub DownloadHighlights(ByVal Token As CancellationToken)
|
||||
HighlightsList.Clear()
|
||||
DownloadHighlights(0, Token)
|
||||
If HighlightsList.Count > 0 Then HighlightsList.ForEach(Sub(hl) DownloadHighlightMedia(hl, Token))
|
||||
End Sub
|
||||
Private Overloads Sub DownloadHighlights(ByVal Cursor As Integer, ByVal Token As CancellationToken)
|
||||
Dim url$ = String.Empty
|
||||
Dim _complete As Boolean = True
|
||||
Do
|
||||
Try
|
||||
Dim hasMore As Boolean = False
|
||||
Dim path$ = $"/api2/v2/users/{ID}/stories/highlights?limit=5&offset={Cursor}"
|
||||
If UpdateSignature(path) Then
|
||||
url = String.Format(BaseUrlPattern, path)
|
||||
ThrowAny(Token)
|
||||
Dim r$ = Responser.GetResponse(url)
|
||||
If Not r.IsEmptyString Then
|
||||
Using j As EContainer = JsonDocument.Parse(r)
|
||||
If j.ListExists Then
|
||||
hasMore = j.Value("hasMore").FromXML(Of Boolean)(False)
|
||||
With j("list")
|
||||
If .ListExists Then
|
||||
HighlightsList.AddRange(.Select(Function(e) e.Value("id")))
|
||||
Else
|
||||
hasMore = False
|
||||
End If
|
||||
End With
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
End If
|
||||
If hasMore Then DownloadHighlights(Cursor + 5, Token)
|
||||
Catch ex As Exception
|
||||
_complete = Not ProcessException(ex, Token, $"highlights downloading error [{url}]") = 2
|
||||
End Try
|
||||
Loop While Not _complete
|
||||
End Sub
|
||||
Private Sub DownloadHighlightMedia(ByVal HLID As String, ByVal Token As CancellationToken)
|
||||
Dim url$ = String.Empty
|
||||
Dim _complete As Boolean = True
|
||||
Do
|
||||
Try
|
||||
Dim specFolder$, postID$, postDate$
|
||||
Dim media As List(Of UserMedia)
|
||||
Dim result As Boolean
|
||||
Dim path$ = $"/api2/v2/stories/highlights/{HLID}"
|
||||
If UpdateSignature(path) Then
|
||||
url = String.Format(BaseUrlPattern, path)
|
||||
ThrowAny(Token)
|
||||
Dim r$ = Responser.GetResponse(url)
|
||||
If Not r.IsEmptyString Then
|
||||
Using j As EContainer = JsonDocument.Parse(r)
|
||||
If j.ListExists Then
|
||||
specFolder = j.Value("title").StringRemoveWinForbiddenSymbols.IfNullOrEmpty(HLID)
|
||||
specFolder &= "*"
|
||||
With j("stories")
|
||||
If .ListExists Then
|
||||
ProgressPre.ChangeMax(.Count)
|
||||
For Each m As EContainer In .Self
|
||||
ProgressPre.Perform()
|
||||
postID = $"{A_HIGHLIGHT}_{HLID}_{m.Value("id")}"
|
||||
postDate = m.Value("createdAt")
|
||||
If Not _TempPostsList.Contains(postID) Then
|
||||
_TempPostsList.Add(postID)
|
||||
Else
|
||||
Exit Sub
|
||||
End If
|
||||
result = False
|
||||
media = TryCreateMedia(m, postID, postDate, result, True, specFolder)
|
||||
If result Then _TempMediaList.ListAddList(media, LNC)
|
||||
Next
|
||||
End If
|
||||
End With
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_complete = Not ProcessException(ex, Token, $"highlights downloading error [{url}]") = 2
|
||||
End Try
|
||||
Loop While Not _complete
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Download chat media"
|
||||
Private Sub DownloadChatMedia(ByVal Cursor As Integer, ByVal Token As CancellationToken)
|
||||
Dim url$ = String.Empty
|
||||
Dim _complete As Boolean = True
|
||||
Do
|
||||
Try
|
||||
Dim hasMore As Boolean = False
|
||||
Dim postID$, postDate$
|
||||
Dim media As List(Of UserMedia)
|
||||
Dim result As Boolean
|
||||
Dim path$ = $"/api2/v2/chats/{ID}/media/?opened=1&limit=20&skip_users=all"
|
||||
If Cursor > 0 Then path &= $"&offset={Cursor}"
|
||||
If UpdateSignature(path) Then
|
||||
url = String.Format(BaseUrlPattern, path)
|
||||
ThrowAny(Token)
|
||||
Dim r$ = Responser.GetResponse(url)
|
||||
If Not r.IsEmptyString Then
|
||||
Using j As EContainer = JsonDocument.Parse(r)
|
||||
If j.ListExists Then
|
||||
hasMore = j.Value("hasMore").FromXML(Of Boolean)(False)
|
||||
With j("list")
|
||||
If .ListExists Then
|
||||
For Each m As EContainer In .Self
|
||||
postID = $"{A_MESSAGE}_{m.Value("id")}"
|
||||
postDate = m.Value("createdAt")
|
||||
If Not _TempPostsList.Contains(postID) Then
|
||||
_TempPostsList.Add(postID)
|
||||
Else
|
||||
Exit Sub
|
||||
End If
|
||||
result = False
|
||||
media = TryCreateMedia(m, postID, postDate, result,, "Chats*")
|
||||
If result Then _TempMediaList.ListAddList(media, LNC)
|
||||
Next
|
||||
End If
|
||||
End With
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
End If
|
||||
If hasMore Then DownloadChatMedia(Cursor + 20, Token)
|
||||
Catch ex As Exception
|
||||
_complete = Not ProcessException(ex, Token, $"chats downloading error [{url}]") = 2
|
||||
End Try
|
||||
Loop While Not _complete
|
||||
End Sub
|
||||
#End Region
|
||||
Private Function TryCreateMedia(ByVal n As EContainer, ByVal PostID As String, Optional ByVal PostDate As String = Nothing,
|
||||
Optional ByRef Result As Boolean = False, Optional ByVal IsHL As Boolean = False,
|
||||
Optional ByVal SpecFolder As String = Nothing) As List(Of UserMedia)
|
||||
Dim postUrl$, ext$
|
||||
Dim t As UTypes
|
||||
Dim mList As New List(Of UserMedia)
|
||||
Result = False
|
||||
With n("media")
|
||||
If .ListExists Then
|
||||
For Each m In .Self
|
||||
If IsHL Then
|
||||
postUrl = m.Value({"files", "source"}, "url")
|
||||
Else
|
||||
postUrl = m.Value({"source"}, "source").IfNullOrEmpty(m.Value("full"))
|
||||
End If
|
||||
Select Case m.Value("type")
|
||||
Case "photo" : t = UTypes.Picture : ext = "jpg"
|
||||
Case "video" : t = UTypes.Video : ext = "mp4"
|
||||
Case Else : t = UTypes.Undefined : ext = String.Empty
|
||||
End Select
|
||||
If Not t = UTypes.Undefined And Not postUrl.IsEmptyString Then
|
||||
Dim media As New UserMedia(postUrl, t) With {
|
||||
.Post = New UserPost(PostID, AConvert(Of Date)(PostDate, DateProvider, Nothing)),
|
||||
.SpecialFolder = SpecFolder
|
||||
}
|
||||
media.File.Extension = ext
|
||||
Result = True
|
||||
mList.Add(media)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End With
|
||||
Return mList
|
||||
End Function
|
||||
Private Sub GetUserID()
|
||||
Const brTag$ = "<br />"
|
||||
Dim path$ = $"/api2/v2/users/{Name}"
|
||||
Dim url$ = String.Format(BaseUrlPattern, path)
|
||||
Try
|
||||
If ID.IsEmptyString AndAlso UpdateSignature(path) Then
|
||||
Dim r$ = Responser.GetResponse(url)
|
||||
If Not r.IsEmptyString Then
|
||||
Using j As EContainer = JsonDocument.Parse(r)
|
||||
If j.ListExists Then
|
||||
ID = j.Value("id")
|
||||
If Not ID.IsEmptyString Then _ForceSaveUserInfo = True
|
||||
UserSiteNameUpdate(j.Value("name"))
|
||||
Dim descr$ = j.Value("about")
|
||||
If Not descr.IsEmptyString Then descr = descr.Replace(brTag, String.Empty)
|
||||
UserDescriptionUpdate(descr)
|
||||
Dim a As Action(Of String) = Sub(ByVal address As String)
|
||||
If Not address.IsEmptyString Then
|
||||
Dim f As SFile = address
|
||||
f.Separator = "\"
|
||||
f.Path = DownloadContentDefault_GetRootDir()
|
||||
If Not f.Exists Then GetWebFile(address, f, EDP.None)
|
||||
End If
|
||||
End Sub
|
||||
a.Invoke(j.Value("avatar"))
|
||||
a.Invoke(j.Value("header"))
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ProcessException(ex, Nothing, $"user info parsing error [{url}]")
|
||||
End Try
|
||||
End Sub
|
||||
Protected Overrides Sub ReparseMissing(ByVal Token As CancellationToken)
|
||||
Const PathPattern$ = "/api2/v2/posts/{0}?skip_users=all"
|
||||
Dim rList As New List(Of Integer)
|
||||
Dim URL$ = String.Empty
|
||||
Try
|
||||
If ContentMissingExists Then
|
||||
Dim m As UserMedia
|
||||
Dim mList As List(Of UserMedia)
|
||||
Dim mediaResult As Boolean
|
||||
Dim r$, path$, postDate$
|
||||
Dim j As EContainer
|
||||
ProgressPre.ChangeMax(_ContentList.Count)
|
||||
For i% = 0 To _ContentList.Count - 1
|
||||
ProgressPre.Perform()
|
||||
If _ContentList(i).State = UStates.Missing Then
|
||||
m = _ContentList(i)
|
||||
If Not m.Post.ID.IsEmptyString Then
|
||||
ThrowAny(Token)
|
||||
path = String.Format(PathPattern, m.Post.ID)
|
||||
If UpdateSignature(path) Then
|
||||
URL = String.Format(BaseUrlPattern, path)
|
||||
r = Responser.GetResponse(URL,, EDP.ReturnValue)
|
||||
If Not r.IsEmptyString Then
|
||||
j = JsonDocument.Parse(r)
|
||||
If Not j Is Nothing Then
|
||||
postDate = j.Value("postedAt")
|
||||
mediaResult = False
|
||||
mList = TryCreateMedia(j, m.Post.ID, postDate, mediaResult)
|
||||
If mediaResult Then
|
||||
_TempMediaList.ListAddList(mList, LNC)
|
||||
rList.Add(i)
|
||||
mList.Clear()
|
||||
End If
|
||||
j.Dispose()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ProcessException(ex, Token, $"ReparseMissing error [{URL}]")
|
||||
Finally
|
||||
If rList.Count > 0 Then
|
||||
For i% = rList.Count - 1 To 0 Step -1 : _ContentList.RemoveAt(rList(i)) : Next
|
||||
rList.Clear()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "DownloadSingleObject"
|
||||
Protected Overrides Sub DownloadSingleObject_GetPosts(ByVal Data As IYouTubeMediaContainer, ByVal Token As CancellationToken)
|
||||
Dim postID$ = RegexReplace(Data.URL, RegExPostID)
|
||||
If Not postID.IsEmptyString Then _ContentList.Add(New UserMedia With {.Post = postID, .State = UStates.Missing}) : ReparseMissing(Token)
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Auth"
|
||||
Private ReadOnly Property AuthFile As SFile
|
||||
Get
|
||||
Dim f As SFile = MySettings.Responser.File
|
||||
f.Name &= "_Auth"
|
||||
f.Extension = "json"
|
||||
Return f
|
||||
End Get
|
||||
End Property
|
||||
Private Function UpdateSignature(ByVal Path As String, Optional ByVal ForceUpdateAuth As Boolean = False) As Boolean
|
||||
Try
|
||||
If UpdateAuthFile(ForceUpdateAuth) Then
|
||||
Const nullMsg$ = "The auth parameter is null"
|
||||
Dim j As EContainer = JsonDocument.Parse(AuthFile.GetText)
|
||||
Dim pattern$ = j.Value("format")
|
||||
If pattern.IsEmptyString Then Throw New ArgumentNullException("format", nullMsg)
|
||||
pattern = pattern.Replace("{}", "{0}").Replace("{:x}", "{1:x}")
|
||||
|
||||
Dim li%() = j("checksum_indexes").Select(Function(e) CInt(e(0).Value)).ToArray
|
||||
|
||||
If Not li.ListExists Then Throw New ArgumentNullException("checksum_indexes", nullMsg)
|
||||
If j.Value("static_param").IsEmptyString Then Throw New ArgumentNullException("static_param", nullMsg)
|
||||
If j.Value("checksum_constant").IsEmptyString Then Throw New ArgumentNullException("checksum_constant", nullMsg)
|
||||
|
||||
Dim t$ = ADateTime.ConvertToUnix64(Now.ToUniversalTime).ToString
|
||||
Dim h$ = String.Join(vbLf, j.Value("static_param"), t, Path, MySettings.HH_USER_ID.Value.ToString)
|
||||
|
||||
Dim hash$ = GetHashSha1(h)
|
||||
Dim hashBytes() As Byte = System.Text.Encoding.ASCII.GetBytes(hash)
|
||||
Dim hashSum% = li.Sum(Function(i) hashBytes(i)) + CInt(j.Value("checksum_constant"))
|
||||
Dim sign$ = String.Format(pattern, hash, Math.Abs(hashSum))
|
||||
|
||||
'#If DEBUG Then
|
||||
'Debug.WriteLine(sign)
|
||||
'Debug.WriteLine(t)
|
||||
'#End If
|
||||
|
||||
Responser.Headers.Add(HeaderSign, sign)
|
||||
Responser.Headers.Add(HeaderTime, t)
|
||||
|
||||
j.Dispose()
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Return ErrorsDescriber.Execute(EDP.SendToLog + EDP.ReturnValue, ex, $"{ToStringForLog()}: UpdateSignature", False)
|
||||
End Try
|
||||
End Function
|
||||
Private Function UpdateAuthFile(ByVal Force As Boolean) As Boolean
|
||||
Const urlOld$ = "https://raw.githubusercontent.com/DATAHOARDERS/dynamic-rules/main/onlyfans.json"
|
||||
Const urlNew$ = "https://raw.githubusercontent.com/DIGITALCRIMINALS/dynamic-rules/main/onlyfans.json"
|
||||
Try
|
||||
If MySettings.LastDateUpdated.AddMinutes(CInt(MySettings.DynamicRulesUpdateInterval.Value)) < Now Or Not AuthFile.Exists Or Force Then
|
||||
Dim r$ = GetWebString(If(ACheck(Of String)(MySettings.DynamicRules.Value),
|
||||
CStr(MySettings.DynamicRules.Value),
|
||||
IIf(MySettings.UseOldAuthRules.Value, urlOld, urlNew)),, EDP.ReturnValue)
|
||||
If Not r.IsEmptyString Then
|
||||
Using j As EContainer = JsonDocument.Parse(r, EDP.ReturnValue)
|
||||
If j.ListExists Then
|
||||
If Not j.Value("format").IsEmptyString And j("checksum_indexes").ListExists And
|
||||
Not j.Value("static_param").IsEmptyString And Not j.Value("checksum_constant").IsEmptyString Then _
|
||||
TextSaver.SaveTextToFile(r, AuthFile, True, False, EDP.ThrowException) : MySettings.LastDateUpdated = Now
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
End If
|
||||
Return AuthFile.Exists
|
||||
Catch ex As Exception
|
||||
Return ErrorsDescriber.Execute(EDP.SendToLog + EDP.ReturnValue, ex, $"{ToStringForLog()}: UpdateAuthFile", False)
|
||||
End Try
|
||||
End Function
|
||||
Private Function GetHashSha1(ByVal Input As String) As String
|
||||
Dim s As New Security.Cryptography.SHA1CryptoServiceProvider
|
||||
Dim inputBytes() As Byte = System.Text.Encoding.UTF8.GetBytes(Input)
|
||||
Dim hashBytes() As Byte = s.ComputeHash(inputBytes)
|
||||
s.Dispose()
|
||||
Dim result As String = String.Empty
|
||||
For Each b As Byte In hashBytes : result &= b.ToString("x2") : Next
|
||||
Return result
|
||||
End Function
|
||||
#End Region
|
||||
#Region "DownloadContent"
|
||||
Protected Overrides Sub DownloadContent(ByVal Token As CancellationToken)
|
||||
DownloadContentDefault(Token)
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "DownloadingException"
|
||||
Private _DownloadingException_AuthFileUpdate As Boolean = False
|
||||
Protected Overrides Function DownloadingException(ByVal ex As Exception, ByVal Message As String, Optional ByVal FromPE As Boolean = False,
|
||||
Optional ByVal EObj As Object = Nothing) As Integer
|
||||
If Responser.StatusCode = Net.HttpStatusCode.BadRequest Then
|
||||
If Not _DownloadingException_AuthFileUpdate AndAlso UpdateAuthFile(True) Then
|
||||
_DownloadingException_AuthFileUpdate = True
|
||||
Return 2
|
||||
Else
|
||||
MySettings.SessionAborted = True
|
||||
MyMainLOG = $"{ToStringForLog()}: OnlyFans credentials expired"
|
||||
Return 1
|
||||
End If
|
||||
ElseIf Responser.StatusCode = Net.HttpStatusCode.NotFound Then
|
||||
UserExists = False
|
||||
Return 1
|
||||
ElseIf Responser.StatusCode = Net.HttpStatusCode.GatewayTimeout Or Responser.StatusCode = 429 Then
|
||||
If Responser.StatusCode = 429 Then MyMainLOG = $"[429] OnlyFans too many requests ({ToStringForLog()})"
|
||||
MySettings.SessionAborted = True
|
||||
Return 1
|
||||
Else
|
||||
Return 0
|
||||
End If
|
||||
End Function
|
||||
#End Region
|
||||
#Region "IDisposable Support"
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If Not disposedValue And disposing Then CCookie.DisposeIfReady(False) : CCookie = Nothing : HighlightsList.Clear()
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
End Namespace
|
||||
28
SCrawler/API/OnlyFans/UserExchangeOptions.vb
Normal file
@@ -0,0 +1,28 @@
|
||||
' 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
|
||||
Imports SCrawler.Plugin.Attributes
|
||||
Namespace API.OnlyFans
|
||||
Friend Class UserExchangeOptions
|
||||
<PSetting(NameOf(SiteSettings.DownloadHighlights), NameOf(MySettings))>
|
||||
Friend Property DownloadHighlights As Boolean
|
||||
<PSetting(NameOf(SiteSettings.DownloadChatMedia), NameOf(MySettings))>
|
||||
Friend Property DownloadChatMedia As Boolean
|
||||
Private ReadOnly MySettings As SiteSettings
|
||||
Friend Sub New(ByVal u As UserData)
|
||||
DownloadHighlights = u.MediaDownloadHighlights
|
||||
DownloadChatMedia = u.MediaDownloadChatMedia
|
||||
MySettings = u.HOST.Source
|
||||
End Sub
|
||||
Friend Sub New(ByVal s As SiteSettings)
|
||||
DownloadHighlights = s.DownloadHighlights.Value
|
||||
DownloadChatMedia = s.DownloadChatMedia.Value
|
||||
MySettings = s
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -12,7 +12,7 @@ Namespace API.PathPlugin
|
||||
Private Const DOWNLOAD_ERROR As String = "The path plugin only provides user paths."
|
||||
Friend Overrides Property UserExists As Boolean
|
||||
Get
|
||||
Return FileExists
|
||||
Return DownloadContentDefault_GetRootDir.CSFileP.Exists(SFO.Path, False)
|
||||
End Get
|
||||
Set(ByVal e As Boolean)
|
||||
MyBase.UserExists = e
|
||||
|
||||
@@ -25,25 +25,12 @@ Namespace API.Pinterest
|
||||
Return My.Resources.SiteResources.PinterestPic_48
|
||||
End Get
|
||||
End Property
|
||||
Private Class ConcurrentDownloadsValidator : Inherits FieldsCheckerProviderBase
|
||||
Public Overrides Function Convert(ByVal Value As Object, ByVal DestinationType As Type, ByVal Provider As IFormatProvider,
|
||||
Optional ByVal NothingArg As Object = Nothing, Optional ByVal e As ErrorsDescriber = Nothing) As Object
|
||||
Dim v% = AConvert(Of Integer)(Value, -1)
|
||||
Dim defV% = Settings.MaxUsersJobsCount
|
||||
If v.ValueBetween(1, defV) Then
|
||||
Return Value
|
||||
Else
|
||||
ErrorMessage = $"The number of concurrent downloads must be greater than 0 and equal to or less than {defV} (global limit)."
|
||||
HasError = True
|
||||
Return Nothing
|
||||
End If
|
||||
End Function
|
||||
End Class
|
||||
<Provider(NameOf(ConcurrentDownloads), FieldsChecker:=True)>
|
||||
Private ReadOnly Property ConcurrentDownloadsProvider As IFormatProvider
|
||||
<PXML, PropertyOption(ControlText:="Concurrent downloads", ControlToolTip:="The number of concurrent downloads.", LeftOffset:=120), TaskCounter>
|
||||
<PropertyOption(ControlText:=DeclaredNames.ConcurrentDownloadsCaption,
|
||||
ControlToolTip:=DeclaredNames.ConcurrentDownloadsToolTip, AllowNull:=False, LeftOffset:=120), PXML, TaskCounter>
|
||||
Friend ReadOnly Property ConcurrentDownloads As PropertyValue
|
||||
<PXML, PropertyOption(ControlText:="Saved posts user", ControlToolTip:="Personal profile username")>
|
||||
<Provider(NameOf(ConcurrentDownloads), FieldsChecker:=True)>
|
||||
Private ReadOnly Property MyConcurrentDownloadsProvider As IFormatProvider
|
||||
<PropertyOption(ControlText:=DeclaredNames.SavedPostsUserNameCaption, ControlToolTip:=DeclaredNames.SavedPostsUserNameToolTip), PXML>
|
||||
Friend ReadOnly Property SavedPostsUserName As PropertyValue
|
||||
#End Region
|
||||
#Region "Initializer"
|
||||
@@ -51,7 +38,7 @@ Namespace API.Pinterest
|
||||
MyBase.New("Pinterest", "pinterest.com")
|
||||
SavedPostsUserName = New PropertyValue(String.Empty, GetType(String))
|
||||
ConcurrentDownloads = New PropertyValue(1)
|
||||
ConcurrentDownloadsProvider = New ConcurrentDownloadsValidator
|
||||
MyConcurrentDownloadsProvider = New ConcurrentDownloadsProvider
|
||||
CheckNetscapeCookiesOnEndInit = True
|
||||
UseNetscapeCookies = True
|
||||
UserRegex = RParams.DMS("https?://w{0,3}.?[^/]*?.?pinterest.com/([^/]+)/?(?(_)|([^/]*))", 0, RegexReturn.ListByMatch, EDP.ReturnValue)
|
||||
|
||||
@@ -37,7 +37,13 @@ Namespace API.Pinterest
|
||||
End Property
|
||||
Friend Property TrueUserName As String
|
||||
Friend Property TrueBoardName As String
|
||||
Friend Property IsUser As Boolean
|
||||
Friend Property IsUser_NB As Boolean
|
||||
Private Const BoardLabelName As String = "Board"
|
||||
Friend Overrides ReadOnly Property SpecialLabels As IEnumerable(Of String)
|
||||
Get
|
||||
Return {UserLabelName, BoardLabelName}
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
#Region "Load"
|
||||
Private Function ReconfUserName() As Boolean
|
||||
@@ -45,17 +51,17 @@ Namespace API.Pinterest
|
||||
Dim n$() = Name.Split("@")
|
||||
If n.ListExists Then
|
||||
TrueUserName = n(0)
|
||||
IsUser = True
|
||||
If n.Length > 1 Then TrueBoardName = n(1) : IsUser = False
|
||||
IsUser_NB = True
|
||||
If n.Length > 1 Then TrueBoardName = n(1) : IsUser_NB = False
|
||||
If Not IsSavedPosts And Not IsSingleObjectDownload Then
|
||||
Dim l$ = IIf(IsUser, UserLabelName, "Board")
|
||||
Dim l$ = IIf(IsUser_NB, UserLabelName, BoardLabelName)
|
||||
Settings.Labels.Add(l)
|
||||
Labels.ListAddValue(l, LNC)
|
||||
Labels.Sort()
|
||||
End If
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
Protected Overrides Sub LoadUserInformation_OptionalFields(ByRef Container As XmlFile, ByVal Loading As Boolean)
|
||||
@@ -63,13 +69,13 @@ Namespace API.Pinterest
|
||||
If Loading Then
|
||||
TrueUserName = .Value(Name_TrueUserName)
|
||||
TrueBoardName = .Value(Name_TrueBoardName)
|
||||
IsUser = .Value(Name_IsUser).FromXML(Of Boolean)(False)
|
||||
IsUser_NB = .Value(Name_IsUser).FromXML(Of Boolean)(False)
|
||||
ReconfUserName()
|
||||
Else
|
||||
If ReconfUserName() Then .Value(Name_LabelsName) = Labels.ListToString("|", EDP.ReturnValue)
|
||||
If ReconfUserName() Then .Value(Name_LabelsName) = LabelsString
|
||||
.Add(Name_TrueUserName, TrueUserName)
|
||||
.Add(Name_TrueBoardName, TrueBoardName)
|
||||
.Add(Name_IsUser, IsUser.BoolToInteger)
|
||||
.Add(Name_IsUser, IsUser_NB.BoolToInteger)
|
||||
End If
|
||||
End With
|
||||
End Sub
|
||||
@@ -79,7 +85,7 @@ Namespace API.Pinterest
|
||||
Dim URL$ = String.Empty
|
||||
Try
|
||||
If IsSavedPosts Then
|
||||
IsUser = True
|
||||
IsUser_NB = True
|
||||
TrueUserName = MySettings.SavedPostsUserName.Value
|
||||
If TrueUserName.IsEmptyString Then Throw New ArgumentNullException("SavedPostsUserName", "Saved posts user not set")
|
||||
End If
|
||||
@@ -88,7 +94,7 @@ Namespace API.Pinterest
|
||||
Dim b$ = TrueBoardName
|
||||
If Not b.IsEmptyString Then b &= "/"
|
||||
URL = $"https://www.pinterest.com/{TrueUserName}/{b}"
|
||||
If IsUser Then
|
||||
If IsUser_NB Then
|
||||
boards = GetBoards(Token)
|
||||
Else
|
||||
boards = New List(Of BoardInfo) From {New BoardInfo With {.URL = URL, .ID = ID, .Title = UserSiteName}}
|
||||
@@ -101,7 +107,7 @@ Namespace API.Pinterest
|
||||
boards(i) = board
|
||||
Next
|
||||
With boards.First
|
||||
If IsUser Then
|
||||
If IsUser_NB Then
|
||||
If ID.IsEmptyString Then ID = .UserID
|
||||
UserSiteNameUpdate(.UserTitle)
|
||||
Else
|
||||
@@ -128,7 +134,7 @@ Namespace API.Pinterest
|
||||
Dim j As EContainer, jj As EContainer
|
||||
Dim rootNode$() = {"resource_response", "data"}
|
||||
Dim jErr As New ErrorsDescriber(EDP.SendToLog + EDP.ReturnValue)
|
||||
Dim urls As List(Of String) = GetDataFromGalleryDL(URL, True)
|
||||
Dim urls As List(Of String) = GetDataFromGalleryDL(URL, True, Token)
|
||||
If urls.ListExists Then urls.RemoveAll(Function(__url) Not __url.Contains("BoardsResource/get/"))
|
||||
If urls.ListExists Then
|
||||
ProgressPre.ChangeMax(urls.Count)
|
||||
@@ -169,7 +175,7 @@ Namespace API.Pinterest
|
||||
Dim r$
|
||||
Dim j As EContainer, jj As EContainer
|
||||
Dim u As UserMedia
|
||||
Dim folder$ = If(IsUser, Board.Title.IfNullOrEmpty(Board.ID), String.Empty)
|
||||
Dim folder$ = If(IsUser_NB, Board.Title.IfNullOrEmpty(Board.ID), String.Empty)
|
||||
Dim titleExists As Boolean = Not Board.Title.IsEmptyString
|
||||
Dim i% = -1
|
||||
Dim jErr As New ErrorsDescriber(EDP.SendToLog + EDP.ReturnValue)
|
||||
@@ -177,7 +183,7 @@ Namespace API.Pinterest
|
||||
Dim images As List(Of Sizes)
|
||||
Dim imgSelector As Func(Of EContainer, Sizes) = Function(img) New Sizes(img.Value("width"), img.Value("url"))
|
||||
Dim fullData As Predicate(Of EContainer) = Function(e) e.Count > 5
|
||||
Dim l As List(Of String) = GetDataFromGalleryDL(Board.URL, False)
|
||||
Dim l As List(Of String) = GetDataFromGalleryDL(Board.URL, False, Token)
|
||||
If l.ListExists Then l.RemoveAll(Function(ll) Not ll.Contains("BoardFeedResource/get/"))
|
||||
If l.ListExists Then
|
||||
ProgressPre.ChangeMax(l.Count)
|
||||
@@ -210,7 +216,7 @@ Namespace API.Pinterest
|
||||
End If
|
||||
Board.UserID = .Value({"board", "owner"}, "id")
|
||||
Board.UserTitle = TitleHtmlConverter(.Value({"board", "owner"}, "full_name"))
|
||||
If Not titleExists And IsUser Then
|
||||
If Not titleExists And IsUser_NB Then
|
||||
If Not Board.Title.IsEmptyString Then
|
||||
folder = Board.Title
|
||||
ElseIf Not Board.ID.IsEmptyString Then
|
||||
@@ -253,8 +259,8 @@ Namespace API.Pinterest
|
||||
Private Class GDLBatch : Inherits GDL.GDLBatch
|
||||
Private ReadOnly Property Source As UserData
|
||||
Private ReadOnly IsBoardsRequested As Boolean
|
||||
Friend Sub New(ByRef s As UserData, ByVal IsBoardsRequested As Boolean)
|
||||
MyBase.New
|
||||
Friend Sub New(ByRef s As UserData, ByVal IsBoardsRequested As Boolean, ByVal _Token As CancellationToken)
|
||||
MyBase.New(_Token)
|
||||
Source = s
|
||||
Me.IsBoardsRequested = IsBoardsRequested
|
||||
End Sub
|
||||
@@ -269,22 +275,24 @@ Namespace API.Pinterest
|
||||
Protected Overrides Async Function Validate(ByVal Value As String) As Task
|
||||
If IsBoardsRequested Then
|
||||
If ErrorOutputData.Count > 0 Then
|
||||
If Await Task.Run(Of Boolean)(Function() ErrorOutputData.Exists(Function(ee) Not ee.IsEmptyString AndAlso
|
||||
If Await Task.Run(Of Boolean)(Function() Token.IsCancellationRequested OrElse
|
||||
ErrorOutputData.Exists(Function(ee) Not ee.IsEmptyString AndAlso
|
||||
ee.StartsWith(UrlTextStart))) Then Kill()
|
||||
End If
|
||||
Else
|
||||
If Await Task.Run(Of Boolean)(Function() Not Value.IsEmptyString AndAlso
|
||||
Source._TempPostsList.Exists(Function(v) Value.Contains(v))) Then Kill()
|
||||
If Await Task.Run(Of Boolean)(Function() Token.IsCancellationRequested OrElse
|
||||
(Not Value.IsEmptyString AndAlso
|
||||
Source._TempPostsList.Exists(Function(v) Value.Contains(v)))) Then Kill()
|
||||
End If
|
||||
End Function
|
||||
End Class
|
||||
Private Function GetDataFromGalleryDL(ByVal URL As String, ByVal IsBoardsRequested As Boolean) As List(Of String)
|
||||
Private Function GetDataFromGalleryDL(ByVal URL As String, ByVal IsBoardsRequested As Boolean, ByVal Token As CancellationToken) As List(Of String)
|
||||
Dim command$ = $"gallery-dl --verbose --simulate "
|
||||
Try
|
||||
If Not URL.IsEmptyString Then
|
||||
If MySettings.CookiesNetscapeFile.Exists Then command &= $"--cookies ""{MySettings.CookiesNetscapeFile}"" "
|
||||
command &= URL
|
||||
Using batch As New GDLBatch(Me, IsBoardsRequested)
|
||||
Using batch As New GDLBatch(Me, IsBoardsRequested, Token)
|
||||
Return GetUrlsFromGalleryDl(batch, command)
|
||||
End Using
|
||||
End If
|
||||
@@ -314,7 +322,7 @@ Namespace API.Pinterest
|
||||
If Not TrueBoardName.IsEmptyString Then Data.Title &= $"/{TrueBoardName}"
|
||||
End If
|
||||
Dim additPath$ = TitleHtmlConverter(UserSiteName)
|
||||
If additPath.IsEmptyString Then additPath = IIf(IsUser, TrueUserName, TrueBoardName)
|
||||
If additPath.IsEmptyString Then additPath = IIf(IsUser_NB, TrueUserName, TrueBoardName)
|
||||
If Not additPath.IsEmptyString Then
|
||||
Dim f As SFile = User.File
|
||||
f.Path = f.PathWithSeparator & additPath
|
||||
|
||||