Compare commits
11 Commits
2024.6.25.
...
2024.11.21
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b42832719f | ||
|
|
aedcebc781 | ||
|
|
00a06d3e9a | ||
|
|
2055461829 | ||
|
|
723155e20c | ||
|
|
effaa3b65b | ||
|
|
e285de10f6 | ||
|
|
26db0e3e24 | ||
|
|
0b0933b6f0 | ||
|
|
3ce9c55575 | ||
|
|
ef36a11566 |
@@ -1,17 +1,14 @@
|
||||
# Contributor's Guide
|
||||
|
||||
I welcome requests! Follow these steps to contribute:
|
||||
|
||||
Follow these steps to contribute:
|
||||
1. Find an [issue](https://github.com/AAndyProgram/SCrawler/issues) that needs assistance.
|
||||
1. Let me know you are working on it by posting a comment on the issue.
|
||||
1. If you find an error in the code, please provide a link to the file and the line number.
|
||||
1. Let me know you're working on this by posting a comment on this issue.
|
||||
1. If you find a bug in the code, please provide a link to the file and line number.
|
||||
1. If you have a code change suggestion, you can post a replacement code block.<!-- I also accept pull requests.-->
|
||||
|
||||
# How to report a problem
|
||||
1. Attach the **profile URLs or links** that you cannot download.
|
||||
1. Attach the **LOG** if it exists.
|
||||
1. **Attach the environment information 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 into the issue).**
|
||||
1. *Add screenshots to illustrate the problem (**optional**)*
|
||||
|
||||
**[Read here](https://github.com/AAndyProgram/SCrawler/blob/main/FAQ.md#how-to-report-a-problem)**
|
||||
|
||||
# How to build from source
|
||||
1. Delete the `PersonalUtilities` project from the solution.
|
||||
@@ -30,7 +27,7 @@ I welcome requests! Follow these steps to contribute:
|
||||
**I'm currently not accepting requests to develop new sites.**
|
||||
|
||||
1. Check [issues](https://github.com/AAndyProgram/SCrawler/issues) (open and [closed](https://github.com/AAndyProgram/SCrawler/issues?q=is%3Aissue+is%3Aclosed)) and [discussions](https://github.com/AAndyProgram/SCrawler/discussions) to find your issue. Perhaps I have already answered your request.
|
||||
1. If you don't find anything, create a new issue with your request. I usually reply as soon as possible (within the next few hours).
|
||||
1. If you don't find anything, create a new issue with your request.
|
||||
|
||||
# Requirements for new site requests
|
||||
|
||||
|
||||
108
Changelog.md
@@ -1,3 +1,111 @@
|
||||
# 2024.11.21.0
|
||||
|
||||
*2024-11-21*
|
||||
|
||||
- Added
|
||||
- Sites:
|
||||
- Instagram:
|
||||
- setting to skip errors without disabling download *(site settings)*
|
||||
- settings to force update of username and/or user information *(user settings)*
|
||||
- setting to continue downloading profile if error 560 occurs while downloading user stories *(site settings)*
|
||||
- improve username update algorithm
|
||||
- YouTube: 404 error handling (community)
|
||||
- Main window: add extra buttons for special download (limited and dated) in collection
|
||||
- Global settings: ability to change the feed opening shortcut (`Ctrl+F`/`Alt+F` *(Settings - Behavior)*)
|
||||
- Minor improvements
|
||||
- Updated
|
||||
- yt-dlp up to version **2024.11.18**
|
||||
- gallery-dl up to version **1.27.7**
|
||||
- Fixed
|
||||
- Users: network paths aren't working
|
||||
- Main window: in some cases users are not updated in the list
|
||||
- Minor bugs
|
||||
|
||||
# 2024.10.24.0
|
||||
|
||||
*2024-10-24*
|
||||
|
||||
- Added
|
||||
- YouTube (standalone app):
|
||||
- settings `Embed thumbnail (cover)` and `Allow webm formats`
|
||||
- changed cover selection for music downloads
|
||||
- allow `webm` formats if there are no `mp4` formats via http protocol (issue #211)
|
||||
- Sites:
|
||||
- Instagram:
|
||||
- **ability to manually change username**
|
||||
- **mark user as non-existent if user `ID` cannot be obtained**
|
||||
- Twitter: **ability to manually change username**
|
||||
- Main window: add users search button to 'Info' menu
|
||||
- Minor improvements
|
||||
- Updated
|
||||
- yt-dlp up to version **2024.10.22**
|
||||
- gallery-dl up to version **1.27.6**
|
||||
- Fixed
|
||||
- YouTube (standalone app): adding incorrect playlist lines
|
||||
- Reddit: incorrect UNIX date parsing
|
||||
- Can't change data path (issue #206)
|
||||
- Minor bugs
|
||||
|
||||
# 2024.9.2.0
|
||||
|
||||
*2024-09-02*
|
||||
|
||||
- Added
|
||||
- Instagram: options to enable/disable image extraction from video
|
||||
- Feed: **prompt before moving entire feed/session**
|
||||
- Main window: hotkeys `Alt+U` and `Ctrl+U` to open the user search form
|
||||
- Minor improvements
|
||||
- Updated
|
||||
- gallery-dl up to version **1.27.3**
|
||||
- Fixed
|
||||
- **OnlyFans**: data is not downloading
|
||||
- YouTube (SCrawler): incorrect parsing of video page
|
||||
- Minor bugs
|
||||
|
||||
# 2024.8.10.0
|
||||
|
||||
*2024-08-10*
|
||||
|
||||
- Added
|
||||
- Feed: button to open file folder
|
||||
- Updated
|
||||
- yt-dlp up to version **2024.08.06**
|
||||
- gallery-dl up to version **1.27.2**
|
||||
- Fixed
|
||||
- YouTube (standalone app): **video is being parsed using cookies but is not downloading** *(Issue #205)*
|
||||
|
||||
# 2024.8.1.0
|
||||
|
||||
*2024-08-01*
|
||||
|
||||
- Added
|
||||
- Minor improvements
|
||||
- Updated
|
||||
- yt-dlp up to version **2024.08.01**
|
||||
|
||||
# 2024.7.24.0
|
||||
|
||||
*2024-07-24*
|
||||
|
||||
- Added
|
||||
- YouTube (standalone app)
|
||||
- ability to convert non-`AVC` codecs (eg `VP9`) to `AVC` (`Settings` - `Defaults Video` - `Convert non-AVC codecs to AVC`)
|
||||
- add the ability to set the playlist creation mode: absolute links, relative links, or both (`Settings` - `Music` - `Create M3U8: creation mode`)
|
||||
- Threads: **saved posts downloading**
|
||||
- Feed
|
||||
- hotkeys `Esc` and `Ctrl+W` to close the form
|
||||
- the ability to search for missing files in *special feeds*
|
||||
- Scheduler: the ability to execute a script after the scheduler plan is executed *(`Settings` - `Behavior`)*
|
||||
- Main window:
|
||||
- added hotkey `Ctrl+F` to show the feed
|
||||
- changed the hotkey from `Ctrl+F` to `Alt+F` to show the search form
|
||||
- Updated
|
||||
- yt-dlp up to version **2024.07.16**
|
||||
- Fixed
|
||||
- YouTube (standalone app): video files with line breaks in the name do not download correctly
|
||||
- OnlyFans: rules parsing bug
|
||||
- Minor bugs
|
||||
|
||||
# 2024.6.25.0
|
||||
|
||||
*2024-06-25*
|
||||
|
||||
162
FAQ.md
@@ -1,120 +1,98 @@
|
||||
# Frequently asked questions
|
||||
|
||||
**Please read the [GUIDE](https://github.com/AAndyProgram/SCrawler/wiki/) Before asking a question!**
|
||||
**Join our Discord server**: https://discord.gg/uFNUXvFFmg
|
||||
<br/>*You can get help faster there!*
|
||||
|
||||
**Also read [here](README.md) for basic information.**
|
||||
# Docs
|
||||
- Basic info: https://github.com/AAndyProgram/SCrawler/blob/main/README.md
|
||||
- **GUIDE**: https://github.com/AAndyProgram/SCrawler/wiki/
|
||||
- Settings: https://github.com/AAndyProgram/SCrawler/wiki/Settings
|
||||
- Discord: https://discord.gg/uFNUXvFFmg
|
||||
|
||||
Most of your questions are already answered. All settings, functions, buttons and everything else described in the guide.
|
||||
|
||||
Any other questions I will keep in this file.
|
||||
# Backup
|
||||
I strongly recommend you to **regularly** create backup copies of the settings files. **An [example script](https://github.com/AAndyProgram/SCrawler/blob/main/Tools/ArchiveSCrawlerUsersDataFiles.bat) for this** on GitHub (you **should adapt** it to your environment, and you can use it when [SCrawler is closed](https://github.com/AAndyProgram/SCrawler/wiki/Settings#behavior)).
|
||||
|
||||
----
|
||||
**This way you'll always have the latest backup of your settings files and can restore it if something goes wrong!**
|
||||
|
||||
#### Q: **HOW TO SETUP COOKIES**
|
||||
|
||||
A: https://github.com/AAndyProgram/SCrawler/wiki/Settings#how-to-set-up-cookies
|
||||
|
||||
----
|
||||
|
||||
#### Q: **Does this program have GUI or CLI.**
|
||||
|
||||
A: This is a GUI program.
|
||||
|
||||
----
|
||||
|
||||
#### Q: **Will CLI be added in the future?**
|
||||
|
||||
A: NO.
|
||||
|
||||
----
|
||||
|
||||
#### Q: **I want to add "...." site. How to request.**
|
||||
|
||||
<!---A: How to request a new site you can read [here](CONTRIBUTING.md#how-to-request-a-new-site)--->
|
||||
**I'm currently not accepting requests to develop new sites.**
|
||||
|
||||
----
|
||||
|
||||
#### Q: **Site download failed.**
|
||||
|
||||
A: Check your credentials and **[SITES REQUIREMENTS](https://github.com/AAndyProgram/SCrawler/wiki/Settings#sites-requirements)**. If all settings are set, but nothing works, go to [create a new issue](https://github.com/AAndyProgram/SCrawler/issues). Don't forget to attach the LOG.
|
||||
|
||||
**You also can join our Discord server**: https://discord.gg/uFNUXvFFmg
|
||||
<br/>*You can get help faster there!*
|
||||
# How to report a problem
|
||||
1. **Post your problem [here](https://github.com/AAndyProgram/SCrawler/issues) or in the [help channel](https://discord.com/channels/1124032649682493462/1124281838056259614) on our Discord server**
|
||||
2. Attach the **profile URLs or links** that you cannot download.
|
||||
3. Attach the **LOG** if it exists.
|
||||
4. Attach **the environment information** 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 into the message).
|
||||
5. *Add screenshots to illustrate the problem (**optional**)*
|
||||
|
||||
**ATTENTION! Issues without URLs will be closed without a response!**
|
||||
|
||||
----
|
||||
# Most frequently questions about SCrawler
|
||||
|
||||
#### Q: **I have set credentials but still nothing is downloading**
|
||||
**If something doesn't download, always check the [SITE'S REQUIREMENTS](https://github.com/AAndyProgram/SCrawler/wiki/Settings#sites-requirements) before asking questions!**
|
||||
|
||||
A: Click the `Start downloading` button or press `F5`
|
||||
*How to use: find your problem in the list and read the answer.*
|
||||
|
||||
----
|
||||
## General questions
|
||||
- **PROFILES**
|
||||
- I added a profile but **nothing downloaded** :arrow_forward: check your cookies and [site requirements](https://github.com/AAndyProgram/SCrawler/wiki/Settings#sites-requirements). If there are any optional fields that you don't fill in, do so. Still nothing works - [report it](#how-to-report-a-problem)!
|
||||
- User downloading failed :arrow_forward: check your credentials and **[SITES REQUIREMENTS](https://github.com/AAndyProgram/SCrawler/wiki/Settings#sites-requirements)**. If all settings are set and nothing works, [report it](#how-to-report-a-problem). **Don't forget to attach the LOG.**
|
||||
- [How to redownload user](https://github.com/AAndyProgram/SCrawler/wiki#redownload-user)
|
||||
- How to **add profile** to download :arrow_forward: copy the **[profile URL](https://github.com/AAndyProgram/SCrawler/wiki#add-user)** and press `Insert` or `Ctrl+Insert`. **ALWAYS PASTE THE USER PROFILE URL**. After that select this user and press `F5` or click the `Download selected` button.
|
||||
- How to download **[saved posts](https://github.com/AAndyProgram/SCrawler/wiki#saved-posts)**
|
||||
- **[HOW TO ADD COOKIES](https://github.com/AAndyProgram/SCrawler/wiki/Settings#how-to-set-up-cookies)**
|
||||
- [How to report a problem](#how-to-report-a-problem)
|
||||
- I want you to **add the site** to SCrawler :arrow_forward: **I'm not currently accepting requests to add new sites**, but you can [create a plugin](https://github.com/AAndyProgram/SCrawler/wiki/Plugins) (for your site) for SCrawler.
|
||||
- What language is SCrawler written in :arrow_forward: `vb.net`
|
||||
- I don't know `vb.net` and I can't write a plugin :arrow_forward: you can write a plugin in `C#`
|
||||
- I have a suggestion, will it be added :arrow_forward: maybe if it interested me.
|
||||
- How to name files using a pattern (e.g. `Site_PostID_Name.jpg`) :arrow_forward: **there is no such functionality and there are no such plans**.
|
||||
- **DON'T CHANGE THE DEFAULT SITE SETTINGS UNLESS YOU KNOW EXACTLY WHAT YOU'RE DOING!** SCrawler already has all the default settings to work. You only need to add credentials (where [required](https://github.com/AAndyProgram/SCrawler/wiki/Settings#sites-requirements)).
|
||||
- My computer shut down while SCrawler was running and now **SCrawler won't start or some users are missing** :arrow_forward: restore user settings from [backup](#backup).
|
||||
- Installation, update and configuration
|
||||
- How to install: https://github.com/AAndyProgram/SCrawler#installation
|
||||
- How to update: https://github.com/AAndyProgram/SCrawler#updating
|
||||
- What file executes the program: **`SCrawler.exe`**
|
||||
- Where to find binaries: https://github.com/AAndyProgram/SCrawler/releases/latest
|
||||
- [How to build from source](https://github.com/AAndyProgram/SCrawler/blob/main/CONTRIBUTING.md#how-to-build-from-source)
|
||||
- [Video how to configure](#video-how-to-configure)
|
||||
- **Antivirus**
|
||||
- **Antivirus detects SCrawler as a virus** :arrow_forward: SCrawler doesn't contain any viruses at all. All code is posted on GitHub. You can review it. I have nothing to hide. SCrawler just downloads pictures and videos. That's all. If you trust SCrawler, you should just add it to the antivirus exceptions, as I did. Sometimes antiviruses identify SCawler as a virus. This is usually related to the number of files being edited (users' settings files) and the number of files being downloaded. In this case, the antivirus can also remove these files, which will damage users' settings. **If you don't trust SCrawler, just delete it.**
|
||||
- **Antivirus detects gallery-dl as a virus** :arrow_forward: it's a trustworthy program that is trusted by thousands of people around the world. Antiviruses identify some builds as containing viruses, but this is not true. **If you don't trust gallery-dl, you can simply delete it**. **But if you delete it, you won't be able to download [Twitter & Pinterest](https://github.com/AAndyProgram/SCrawler/wiki/Settings#gallery-dl).** You should decide for yourself.
|
||||
|
||||
#### Q: **Where can I find the release?**
|
||||
## Sites questions
|
||||
|
||||
A: https://github.com/AAndyProgram/SCrawler/releases/latest
|
||||
*How to use: find the site you need in the list and read the answer.*
|
||||
|
||||
----
|
||||
- Reddit: don't use credentials at all or configure [OAuth](https://github.com/AAndyProgram/SCrawler/wiki/Settings#how-to-get-reddit-credentials). **Reddit profiles can be downloaded without any credentials at all. Subreddits require OAuth! If nothing downloads, use OAuth!** Don't use OAuth token to download saved posts (use cookies only).
|
||||
- **META** (**Instagram**, Threads, Facebook): you need **cookies** and fill in **all fields**
|
||||
- **Instagram saved posts**: I don't consider questions like "I have 10k saved posts and only 1000 were downloaded". Download posts, remove them from saved posts, delete the `Saved posts` **settings folder**, repeat.
|
||||
- TikTok: works via yt-dlp. If something doesn't download, we need to wait until yt-dlp fixes it. TikTok doesn't require cookies to download.
|
||||
- Porn sites: **COOKIES**!
|
||||
- ThisVid: https://github.com/AAndyProgram/SCrawler/wiki/Settings#thisvid-faq
|
||||
- **OnlyFans**: cookies + **all fields** + [OF-Scraper (download the correct version that I pointed)](https://github.com/AAndyProgram/SCrawler/wiki/Settings#of-scraper) & [mp4decrypt](https://www.bento4.com/downloads/) to download DRM protected videos. [OF-Scraper support](https://github.com/AAndyProgram/SCrawler/wiki/Settings#of-scraper-support). Also read [this](https://github.com/AAndyProgram/SCrawler/wiki/Settings#onlyfans-faq)
|
||||
- **JustForFans**: **THE VIDEO ISN'T DOWNLOADING AT THE MOMENT** ([Issue](https://discord.com/channels/1124032649682493462/1205547615199039551/1231349555132366870))
|
||||
|
||||
#### Q: **How to run the program?**
|
||||
## Other questions
|
||||
|
||||
A: Double-click `SCrawler.exe`
|
||||
### Does the program remember the last download and check for new posts, downloading only new posts, or does the program download the entire profile every time
|
||||
The program stored posts IDs in users' folders. For the first time, the program downloads the entire profile. All subsequent times the program will check for new posts and download **only new posts**!
|
||||
|
||||
----
|
||||
### Does this program have a GUI or CLI, and will a CLI be added in the future
|
||||
This is a GUI program and **NO**, <u>CLI will not be added</u>
|
||||
|
||||
#### Q: **Where to find binaries?**
|
||||
### How to remove the label
|
||||
There is no functionality to remove an individual label. You can open the `Labels.txt` file in the program settings folder and delete any label you want. You also can delete this file (`Labels.txt`). In this case, when SCrawler is launched, the list of labels will be populated only with existing labels (from the user data files).
|
||||
|
||||
A: https://github.com/AAndyProgram/SCrawler/releases/latest
|
||||
### How to remove a user from the blacklist
|
||||
Just add that user back to the program. In the dialog box that opens, click the `Add and remove from blacklist` button.
|
||||
|
||||
----
|
||||
### You lost me. Your program is too complicated.
|
||||
**I'm fine with that**. If the program is too complicated for you or you can't configure it, I can only suggest you find another (easier) program. I really don't mind! The program is free. I develop SCrawler for myself and publish it on GitHub because people found my program useful. If someone can't use it or doesn't like it, I'm okay with it.
|
||||
|
||||
#### Q: **Does the program remember the last download and check for new posts, downloading only new posts? Or does the program download the entire profile every time?**
|
||||
### Add a step-by-step guide or video on how to use the program
|
||||
**NO!** The guide fully covers all the functionality of SCrawler! If you don't respect my work, I don't waste my time. If you want, you can create a video tutorial and send it to me. Then I'll add it. All options and their purposes are described on the wiki. The wiki also contains a description of all the settings and how to configure them. For complex settings there is a step-by-step guide. Read the [main](README.md) information and [GUIDE](https://github.com/AAndyProgram/SCrawler/wiki/) and you won't have any problems. I've developed a program with an intuitive interface. There is a `Settings` button, download buttons, a context menu that appears when you right-click on a user, and other controls. Anyone can use it.
|
||||
|
||||
A: The program stored posts IDs in users' folders. For the first time, the program downloads the entire profile. All subsequent times the program will check for new posts and download **only new posts**!
|
||||
**There is already a [video](#video-how-to-configure) example of how to configure a site.**
|
||||
|
||||
----
|
||||
|
||||
#### Q: **How to redownload all data**
|
||||
|
||||
A: https://github.com/AAndyProgram/SCrawler/wiki#redownload-user
|
||||
|
||||
----
|
||||
|
||||
#### Q: **How to remove the label**
|
||||
|
||||
A: There is no functionality to remove an individual label. You can open the `Labels.txt` file in the program settings folder and delete any label you want. You also can delete this file (`Labels.txt`). In this case, when the program starts, the list of labels list will be updated with only existing labels (from the user data files).
|
||||
|
||||
----
|
||||
|
||||
#### Q: **How to remove a user from the blacklist**
|
||||
|
||||
A: Just add that user back to the program. In the dialog box that opens, click on the `Add and remove from blacklist` button.
|
||||
|
||||
----
|
||||
|
||||
#### Q: **Why don't you answer how it works**
|
||||
|
||||
A: Because **I don't want to**. I don't want to waste my time explaining things that are already covered in the **[GUIDE](https://github.com/AAndyProgram/SCrawler/wiki)**! If you didn't bother to read the guide, why would I waste my time?! ALL FUNCTIONALITY IS DESCRIBED IN THE GUIDE. Before publishing a new release, I update the guide. If you don't respect my work, I don't waste my time.
|
||||
|
||||
----
|
||||
|
||||
#### Q: **You lost me. Your program is too complicated.**
|
||||
|
||||
A: **I'm fine with that**. If the program is difficult for you or you can't configure it, I can only suggest you find another (easier) program. I really don't mind! The program is free. I am develop SCrawler for myself and publish on GitHub because people found my program useful. If someone can't use it or doesn't like it, I'm fine.
|
||||
|
||||
----
|
||||
|
||||
#### Q: **I can't configure something**
|
||||
|
||||
A: I can only [suggest](#q-you-lost-me-your-program-is-too-complicated) you find another (easier) program.
|
||||
|
||||
----
|
||||
|
||||
#### Q: **Can you add a step-by-step guide or video on how to use the program?**
|
||||
|
||||
A: **NO!** The guide fully covers all the functionality of SCrawler! If you don't respect my work, I don't waste my time. If you want, you can create a video tutorial and send it to me. Then I add it. All options and what each option does described on the wiki. The wiki also contains a description of all settings and how-to configure them. For complex settings, there is a steep-by-steep guide. Read the [main](README.md) information and [GUIDE](https://github.com/AAndyProgram/SCrawler/wiki/) and you won't have any problems. I have developed a program with an intuitive interface. There is a Settings button, download buttons, a context menu that drops down when a user is clicked, and other controls. Anyone can use it.
|
||||
# Video how to configure
|
||||
|
||||
**The following video was recorded by a user who loves SCrawler and demonstrates how to add credentials using Instagram as an example:**
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 46 KiB |
18
README.md
@@ -33,16 +33,16 @@ A program to download photo and video from [any site](#supported-sites) (e.g. Yo
|
||||

|
||||
|
||||
# What can program do:
|
||||
- Download pictures and videos from users' profiles and subreddits:
|
||||
- Download pictures and videos from user profiles:
|
||||
- YouTube videos, shorts, community feeds, users, artists, playlists, music, tracks;
|
||||
- Reddit images, galleries of images, videos, saved posts;
|
||||
- Redgifs videos (https://www.redgifs.com/);
|
||||
- Redgifs images and videos (https://www.redgifs.com/);
|
||||
- Twitter images and videos, saved (bookmarked) posts, likes, communities;
|
||||
- OnlyFans images and videos, saved (bookmarked) posts, stories;
|
||||
- JustForFans images and videos, saved (bookmarked) posts;
|
||||
- Mastodon images and videos, saved (bookmarked) posts;
|
||||
- Instagram images and videos, tagged posts, stories, saved posts;
|
||||
- Threads images and videos;
|
||||
- Threads images and videos, saved posts;
|
||||
- Facebook images and videos, stories, saved posts;
|
||||
- TikTok videos;
|
||||
- Pinterest boards, users, saved posts;
|
||||
@@ -57,7 +57,7 @@ A program to download photo and video from [any site](#supported-sites) (e.g. Yo
|
||||
- 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)
|
||||
- **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 and subscriptions posts)
|
||||
- Multiple accounts support
|
||||
- Labeling users
|
||||
@@ -82,12 +82,12 @@ A program to download photo and video from [any site](#supported-sites) (e.g. Yo
|
||||
- **Instagram**
|
||||
- **Threads**
|
||||
- **Facebook**
|
||||
- JustForFans *(partial support)*[^1]
|
||||
- JustForFans *(partial support) ([video issue](https://discord.com/channels/1124032649682493462/1205547615199039551/1231349555132366870))*[^1]
|
||||
- Mastodon *(out of support)*
|
||||
- TikTok
|
||||
- RedGifs
|
||||
- Pinterest
|
||||
- Imgur
|
||||
- Imgur *(out of support)*
|
||||
- Gfycat
|
||||
- LPSG
|
||||
- **PornHub**
|
||||
@@ -109,7 +109,7 @@ First, the program downloads the full profile. After the program downloads only
|
||||
|
||||
# Requirements
|
||||
|
||||
- Windows 10, 11 with NET Framework 4.6.1 or higher (v4.6.1 must be installed). You can check version compatibility with this [tool](Tools/NET.FrameworkVersion.ps1).
|
||||
- **Windows 10, 11** with NET Framework 4.6.1 or higher (v4.6.1 must be installed). You can check version compatibility with this [tool](Tools/NET.FrameworkVersion.ps1).
|
||||
- **[SITES REQUIREMENTS](https://github.com/AAndyProgram/SCrawler/wiki/Settings#sites-requirements)**
|
||||
|
||||
# Guide
|
||||
@@ -157,7 +157,7 @@ First, the program downloads the full profile. After the program downloads only
|
||||
|
||||
**Just download the [latest release](https://github.com/AAndyProgram/SCrawler/releases/latest), unzip the program archive to any folder and enjoy.** :blush:
|
||||
|
||||
**Don't put program in the ```Program Files``` system folder (this is portable program and program settings are stored in the program folder)**
|
||||
**Don't put program in the `Program Files` system folder (this is portable program and program settings are stored in the program folder)**
|
||||
|
||||
**I highly doubt you can run SCrawler on Linux or Mac. SCrawler is a program that is heavily dependent on Windows.**
|
||||
|
||||
@@ -183,7 +183,7 @@ The program has an intuitive interface.
|
||||
|
||||
[](https://www.youtube.com/watch?v=XDn7zG4I700)
|
||||
|
||||
Just add a user profile and **click the ```Download``` button**.
|
||||
Just add a user profile and **click the `Download` button**.
|
||||
|
||||
```mermaid
|
||||
stateDiagram
|
||||
|
||||
@@ -84,6 +84,11 @@ Namespace API.YouTube.Base
|
||||
Before = 1
|
||||
After = 2
|
||||
End Enum
|
||||
Public Enum M3U8CreationMode As Integer
|
||||
Relative = 0
|
||||
Absolute = 1
|
||||
Both = 2
|
||||
End Enum
|
||||
Public Structure MediaObject : Implements IIndexable, IComparable(Of MediaObject)
|
||||
Public Type As Plugin.UserMediaTypes
|
||||
Public ID As String
|
||||
|
||||
@@ -131,22 +131,28 @@ Namespace API.YouTube.Base
|
||||
<Browsable(True), GridVisible(False), Category("EnvironmentFolder"), DisplayName("Open folders in another program"), DefaultValue(False)>
|
||||
Private Property IDownloaderSettings_OpenFolderInOtherProgram As Boolean Implements IDownloaderSettings.OpenFolderInOtherProgram
|
||||
Get
|
||||
Return OpenFolderInOtherProgram.Use
|
||||
Return OpenFolderInOtherProgram.Attribute.ValueTemp
|
||||
End Get
|
||||
Set(ByVal use As Boolean)
|
||||
OpenFolderInOtherProgram.Use = use
|
||||
OpenFolderInOtherProgram.Attribute.ValueTemp = use
|
||||
End Set
|
||||
End Property
|
||||
Private Function ShouldSerializeIDownloaderSettings_OpenFolderInOtherProgram() As Boolean
|
||||
Return DirectCast(OpenFolderInOtherProgram.Attribute, IGridValue).ShouldSerializeValue
|
||||
End Function
|
||||
<Browsable(True), GridVisible(False), Category("EnvironmentFolder"), DisplayName("Open folders in another program (command)"),
|
||||
Description("The command to open a folder."), DefaultValue("")>
|
||||
Private Property IDownloaderSettings_OpenFolderInOtherProgram_Command As String Implements IDownloaderSettings.OpenFolderInOtherProgram_Command
|
||||
Get
|
||||
Return OpenFolderInOtherProgram
|
||||
Return OpenFolderInOtherProgram.ValueTemp
|
||||
End Get
|
||||
Set(ByVal command As String)
|
||||
OpenFolderInOtherProgram.Value = command
|
||||
OpenFolderInOtherProgram.ValueTemp = command
|
||||
End Set
|
||||
End Property
|
||||
Private Function ShouldSerializeIDownloaderSettings_OpenFolderInOtherProgram_Command() As Boolean
|
||||
Return DirectCast(OpenFolderInOtherProgram, IGridValue).ShouldSerializeValue
|
||||
End Function
|
||||
<Browsable(True), GridVisible(False), XMLVN({"Environment"}, True), Category("Environment"), DisplayName("Check new version at start")>
|
||||
Friend ReadOnly Property CheckUpdatesAtStart As XMLValue(Of Boolean)
|
||||
#End Region
|
||||
@@ -305,6 +311,12 @@ 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"}, True), Category("Defaults Video"), DisplayName("Allow webm formats"),
|
||||
Description("Allow webm formats over http if mp4 formats are not available. Default: true.")>
|
||||
Public ReadOnly Property DefaultVideoAllowWebm As XMLValue(Of Boolean)
|
||||
<Browsable(True), GridVisible, XMLVN({"DefaultsVideo"}), Category("Defaults Video"), DisplayName("Convert non-AVC codecs to AVC"),
|
||||
Description("Convert non-AVC codecs (eg 'VP9') to AVC. Not recommended due to high CPU usage!")>
|
||||
Public ReadOnly Property DefaultVideoConvertNonAVC As XMLValue(Of Boolean)
|
||||
<Browsable(True), GridVisible, XMLVN({"DefaultsVideo"}, False), Category("Defaults Video"), DisplayName("Embed thumbnail (video)"),
|
||||
Description("Embed thumbnail in the video as cover art. Default: true.")>
|
||||
Public ReadOnly Property DefaultVideoEmbedThumbnail As XMLValue(Of Boolean)
|
||||
@@ -407,6 +419,9 @@ Namespace API.YouTube.Base
|
||||
<Browsable(True), GridVisible, XMLVN({"DefaultsAudio"}, True), Category("Defaults Audio"), DisplayName("Embed thumbnail"),
|
||||
Description("Embed thumbnail in the audio as cover art. Default: true.")>
|
||||
Public ReadOnly Property DefaultAudioEmbedThumbnail As XMLValue(Of Boolean)
|
||||
<Browsable(True), GridVisible, XMLVN({"DefaultsAudio"}, True), Category("Defaults Audio"), DisplayName("Embed thumbnail (cover)"),
|
||||
Description("Try embedding the playlist cover (if it exists) as cover art. Default: true.")>
|
||||
Public ReadOnly Property DefaultAudioEmbedThumbnail_Cover As XMLValue(Of Boolean)
|
||||
<Browsable(True), GridVisible, XMLVN({"DefaultsAudio"}, True), Category("Defaults Audio"), DisplayName("Embed thumbnail (extracted files)"),
|
||||
Description("Embed thumbnail in the extracted (additional file ('mp3' only)) audio as cover art. Default: true.")>
|
||||
Public ReadOnly Property DefaultAudioEmbedThumbnail_ExtractedFiles As XMLValue(Of Boolean)
|
||||
@@ -432,6 +447,9 @@ Namespace API.YouTube.Base
|
||||
<Browsable(True), GridVisible, XMLVN({"Playlists"}), Category("Music"), DisplayName("M3U8 Append file number"),
|
||||
Description("Add file number to file name. Default: false.")>
|
||||
Public ReadOnly Property MusicPlaylistCreate_M3U8_AppendNumber As XMLValue(Of Boolean)
|
||||
<Browsable(True), GridVisible, XMLVN({"Playlists"}, M3U8CreationMode.Relative), Category("Music"), DisplayName("Create M3U8: creation mode"),
|
||||
Description("Set the playlist creation mode: absolute links, relative links, or both. If 'Both' is selected, two playlists will be created. Default: 'Relative'.")>
|
||||
Public ReadOnly Property MusicPlaylistCreate_CreationMode As XMLValue(Of M3U8CreationMode)
|
||||
#End Region
|
||||
#End Region
|
||||
#Region "Defaults Subtitles"
|
||||
|
||||
@@ -32,6 +32,7 @@ Namespace API.YouTube.Controls
|
||||
Private Initialization As Boolean = True
|
||||
Private ReadOnly InheritsFromContainer As Boolean
|
||||
Private ReadOnly M3U8Files As List(Of SFile)
|
||||
Friend Property UseCookies As Boolean = False
|
||||
Private ReadOnly Property M3U8FilesFull As List(Of SFile)
|
||||
Get
|
||||
Return ListAddList(Nothing, M3U8Files, LAP.NotContainsOnly).ListAddValue(CMB_PLS.Text, LAP.NotContainsOnly)
|
||||
@@ -65,6 +66,7 @@ Namespace API.YouTube.Controls
|
||||
CNT_PROCESSOR = New TableControlsProcessor(TP_CONTROLS)
|
||||
Me.InheritsFromContainer = InheritsFromContainer
|
||||
MyFieldsChecker = New FieldsChecker
|
||||
UseCookies = MyYouTubeSettings.DefaultUseCookies
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Form handlers"
|
||||
@@ -227,7 +229,7 @@ Namespace API.YouTube.Controls
|
||||
Dim data As IEnumerable(Of Control)
|
||||
|
||||
If .HasElements Then
|
||||
data = .Elements.Select(Function(ee) New MediaItem(ee, True) With {.Dock = DockStyle.Fill, .Checked = ee.Checked})
|
||||
data = .Elements.Select(Function(ee) New MediaItem(ee, True) With {.Dock = DockStyle.Fill, .Checked = ee.Checked, .UseCookies = UseCookies})
|
||||
Else
|
||||
data = (From m As MediaObject In .Self.MediaObjects
|
||||
Where m.Type = __contentType
|
||||
|
||||
@@ -59,6 +59,7 @@ Namespace API.YouTube
|
||||
Public ReadOnly TrueUrlRegEx As RParams = RParams.DM(Base.YouTubeFunctions.TrueUrlPattern, 0, EDP.ReturnValue)
|
||||
Friend ReadOnly MusicUrlApply As RParams = RParams.DMS("https://([w\.]*)youtube.com.+", 1, RegexReturn.Replace, EDP.ReturnValue,
|
||||
CType(Function(input$) "music.", Func(Of String, String)), String.Empty)
|
||||
Friend ReadOnly M3U8ExcludedSymbols As String() = {".", ",", ":", "/", "\", "(", ")", "[", "]"}
|
||||
<Extension> Friend Function ToMusicUrl(ByVal URL As String, ByVal IsMusic As Boolean) As String
|
||||
Try : Return If(IsMusic And Not URL.IsEmptyString, CStr(RegexReplace(URL, MusicUrlApply)).IfNullOrEmpty(URL), URL) : Catch : Return URL : End Try
|
||||
End Function
|
||||
@@ -66,6 +67,7 @@ Namespace API.YouTube
|
||||
If Not f.IsEmptyString And Not f.Name.IsEmptyString Then
|
||||
Dim ff As SFile = f
|
||||
ff.Name = ff.Name.StringRemoveWinForbiddenSymbols.StringTrim
|
||||
ff.Name = ff.Name.StringReplaceSymbols({vbLf, vbCr, vbCrLf}, String.Empty, EDP.ReturnValue)
|
||||
ff.Name = ff.Name.StringTrimEnd(".")
|
||||
If Not ff.Name.IsEmptyString And Not MyYouTubeSettings.FileRemoveCharacters.IsEmptyString Then _
|
||||
ff.Name = ff.Name.StringReplaceSymbols(MyYouTubeSettings.FileRemoveCharacters.Value.AsList.ListCast(Of String).ToArray, String.Empty, EDP.ReturnValue)
|
||||
|
||||
@@ -437,7 +437,7 @@ Namespace DownloadObjects.STDownloader
|
||||
Else
|
||||
RaiseEvent BeforeOpenEditor(Me, MyContainer)
|
||||
End If
|
||||
Using f As New VideoOptionsForm(MyContainer, initProtected Or isFull)
|
||||
Using f As New VideoOptionsForm(MyContainer, initProtected Or isFull) With {.UseCookies = UseCookies}
|
||||
f.ShowDialog()
|
||||
.Protected = IIf(f.DialogResult = DialogResult.OK, True, initProtected)
|
||||
End Using
|
||||
@@ -465,12 +465,12 @@ Namespace DownloadObjects.STDownloader
|
||||
If Not MyContainer Is Nothing Then
|
||||
Dim f As Form = Nothing
|
||||
Select Case MyContainer.ObjectType
|
||||
Case Base.YouTubeMediaType.Single : f = New VideoOptionsForm(MyContainer, True)
|
||||
Case Base.YouTubeMediaType.Single : f = New VideoOptionsForm(MyContainer, True) With {.UseCookies = UseCookies}
|
||||
Case Base.YouTubeMediaType.Channel, Base.YouTubeMediaType.PlayList
|
||||
If MyContainer.IsMusic Then
|
||||
f = New MusicPlaylistsForm(MyContainer)
|
||||
Else
|
||||
f = New VideoOptionsForm(MyContainer, True)
|
||||
f = New VideoOptionsForm(MyContainer, True) With {.UseCookies = UseCookies}
|
||||
End If
|
||||
End Select
|
||||
If Not f Is Nothing Then
|
||||
|
||||
@@ -132,7 +132,8 @@ 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 IsLoading As Boolean = False)
|
||||
Optional ByVal PerformClick As Boolean = True, Optional ByVal IsLoading As Boolean = False,
|
||||
Optional ByVal UseCookies As Boolean = False)
|
||||
ControlInvokeFast(TP_CONTROLS, Sub()
|
||||
With TP_CONTROLS
|
||||
.SuspendLayout()
|
||||
@@ -142,7 +143,7 @@ Namespace DownloadObjects.STDownloader
|
||||
.RowStyles.Insert(0, New RowStyle(SizeType.Absolute, 60))
|
||||
.RowCount = .RowStyles.Count
|
||||
OffsetControls(0, True)
|
||||
Dim cnt As New MediaItem(Container) With {.Dock = DockStyle.Fill, .Margin = New Padding(0)}
|
||||
Dim cnt As New MediaItem(Container) With {.Dock = DockStyle.Fill, .Margin = New Padding(0), .UseCookies = UseCookies}
|
||||
AddHandler cnt.FileDownloaded, AddressOf MediaControl_FileDownloaded
|
||||
AddHandler cnt.Removal, AddressOf MediaControl_Removal
|
||||
AddHandler cnt.DownloadAgain, AddressOf MediaControl_DownloadAgain
|
||||
@@ -333,19 +334,19 @@ Namespace DownloadObjects.STDownloader
|
||||
If Not c Is Nothing Then
|
||||
Dim f As Form
|
||||
Select Case c.ObjectType
|
||||
Case YouTubeMediaType.Single : f = New VideoOptionsForm(c)
|
||||
Case YouTubeMediaType.Single : f = New VideoOptionsForm(c) With {.UseCookies = useCookies}
|
||||
Case YouTubeMediaType.Channel, YouTubeMediaType.PlayList
|
||||
If c.IsMusic Then
|
||||
f = New MusicPlaylistsForm(c)
|
||||
Else
|
||||
f = New VideoOptionsForm(c)
|
||||
f = New VideoOptionsForm(c) With {.UseCookies = useCookies}
|
||||
End If
|
||||
Case Else : c.Dispose() : Throw New ArgumentException($"Object type {c.ObjectType} not implemented", "IYouTubeMediaContainer.ObjectType")
|
||||
End Select
|
||||
If Not f Is Nothing Then
|
||||
If TypeOf f Is IDesignXMLContainer Then DirectCast(f, IDesignXMLContainer).DesignXML = DesignXML
|
||||
f.ShowDialog()
|
||||
If f.DialogResult = DialogResult.OK AndAlso ValidateContainerURL(c) Then ControlCreateAndAdd(c, disableDown)
|
||||
If f.DialogResult = DialogResult.OK AndAlso ValidateContainerURL(c) Then ControlCreateAndAdd(c, disableDown,,, useCookies)
|
||||
f.Dispose()
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2024.6.25.0")>
|
||||
<Assembly: AssemblyFileVersion("2024.6.25.0")>
|
||||
<Assembly: AssemblyVersion("2024.10.24.0")>
|
||||
<Assembly: AssemblyFileVersion("2024.10.24.0")>
|
||||
<Assembly: NeutralResourcesLanguage("en")>
|
||||
|
||||
@@ -175,7 +175,9 @@ Namespace API.YouTube.Objects
|
||||
Protected _ThumbnailUrl As String = String.Empty
|
||||
<XMLEC> Public Overridable Property ThumbnailUrl As String Implements IDownloadableMedia.ThumbnailUrl
|
||||
Get
|
||||
If _ThumbnailUrl.IsEmptyString And Thumbnails.Count > 0 Then
|
||||
If Not CoverURL.IsEmptyString Then
|
||||
Return CoverURL
|
||||
ElseIf _ThumbnailUrl.IsEmptyString And Thumbnails.Count > 0 Then
|
||||
Return Thumbnails.FirstOrDefault.URL
|
||||
Else
|
||||
Return _ThumbnailUrl
|
||||
@@ -899,10 +901,14 @@ Namespace API.YouTube.Objects
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
Private Function GetPlaylistRow(ByVal Element As YouTubeMediaContainerBase, Optional ByVal __file As SFile = Nothing) As String
|
||||
Private Function GetPlaylistRow(ByVal Element As YouTubeMediaContainerBase, Optional ByVal __file As SFile = Nothing,
|
||||
Optional ByVal Mode As M3U8CreationMode = M3U8CreationMode.Absolute) As String
|
||||
Const m3u8DataRow$ = "#EXTINF:{0},{1}" & vbCrLf & "{2}"
|
||||
With Element
|
||||
Dim f As SFile = __file.IfNullOrEmpty(.File)
|
||||
Dim fStr$ = f.ToString.StringReplaceSymbols({"\"}, "/", EDP.ReturnValue)
|
||||
Dim __f$ = SymbolsConverter.ASCII.Extended.EncodeSymbolsOnly(If(Mode = M3U8CreationMode.Absolute, fStr, f.File), M3U8ExcludedSymbols)
|
||||
If Mode = M3U8CreationMode.Absolute Then __f = $"file:///{__f}"
|
||||
Dim fName$ = .Title.IfNullOrEmpty(f.Name)
|
||||
If MyYouTubeSettings.MusicPlaylistCreate_M3U8_AppendNumber And .PlaylistIndex > 0 Then fName = $"{ .PlaylistIndex}. {fName}"
|
||||
If Not .UserTitle.IsEmptyString Then
|
||||
@@ -910,10 +916,7 @@ Namespace API.YouTube.Objects
|
||||
If MyYouTubeSettings.MusicPlaylistCreate_M3U8_AppendArtist Then fName = $"{ .UserTitle} - {fName}"
|
||||
End If
|
||||
If MyYouTubeSettings.MusicPlaylistCreate_M3U8_AppendExt Then fName &= $".{f.Extension}"
|
||||
Return String.Format(m3u8DataRow,
|
||||
CInt(.Duration.TotalSeconds),
|
||||
fName,
|
||||
$"file:///{SymbolsConverter.ASCII.EncodeSymbolsOnly(f)}")
|
||||
Return String.Format(m3u8DataRow, CInt(.Duration.TotalSeconds), fName, __f)
|
||||
End With
|
||||
End Function
|
||||
Private ReadOnly DownloadProgressPattern As RParams = RParams.DMS("\[download\]\s*([\d\.,]+)", 1, EDP.ReturnValue)
|
||||
@@ -954,23 +957,41 @@ Namespace API.YouTube.Objects
|
||||
Dim t As TextSaver = Nothing
|
||||
Try
|
||||
Dim f As SFile
|
||||
If MyYouTubeSettings.MusicPlaylistCreate_M3U8 Then
|
||||
t = New TextSaver
|
||||
t.AppendLine("#EXTM3U")
|
||||
Elements.ForEach(Sub(e) t.AppendLine(GetPlaylistRow(e)))
|
||||
f = $"{Elements(0).File.PathWithSeparator}Playlist.m3u8"
|
||||
t.SaveAs(f, EDP.SendToLog)
|
||||
If f.Exists Then AddFile(f)
|
||||
t.Dispose()
|
||||
End If
|
||||
If MyYouTubeSettings.MusicPlaylistCreate_M3U Then
|
||||
t = New TextSaver
|
||||
Elements.ForEach(Sub(e) t.AppendLine(e.File))
|
||||
f = $"{Elements(0).File.PathWithSeparator}Playlist.m3u"
|
||||
t.SaveAs(f, EDP.SendToLog)
|
||||
If f.Exists Then AddFile(f)
|
||||
t.Dispose()
|
||||
End If
|
||||
Dim arr As M3U8CreationMode() = If(MyYouTubeSettings.MusicPlaylistCreate_CreationMode.Value = M3U8CreationMode.Both,
|
||||
{M3U8CreationMode.Relative, M3U8CreationMode.Absolute},
|
||||
{MyYouTubeSettings.MusicPlaylistCreate_CreationMode.Value})
|
||||
Dim postfix$
|
||||
Dim added As Boolean
|
||||
Dim checkFile As Func(Of IYouTubeMediaContainer, Boolean) = Function(ByVal e As IYouTubeMediaContainer) As Boolean
|
||||
If e.File.Exists Then
|
||||
added = True
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
For Each cm As M3U8CreationMode In arr
|
||||
If arr.Length > 1 AndAlso cm = M3U8CreationMode.Absolute Then postfix = "Abs" Else postfix = String.Empty
|
||||
added = False
|
||||
If MyYouTubeSettings.MusicPlaylistCreate_M3U8 Then
|
||||
t = New TextSaver
|
||||
t.AppendLine("#EXTM3U")
|
||||
Elements.ForEach(Sub(e) If checkFile(e) Then t.AppendLine(GetPlaylistRow(e,, cm)))
|
||||
f = $"{Elements(0).File.PathWithSeparator}Playlist{postfix}.m3u8"
|
||||
If added Then t.SaveAs(f, EDP.SendToLog)
|
||||
If f.Exists Then AddFile(f)
|
||||
t.Dispose()
|
||||
End If
|
||||
added = False
|
||||
If MyYouTubeSettings.MusicPlaylistCreate_M3U Then
|
||||
t = New TextSaver
|
||||
Elements.ForEach(Sub(e) If checkFile(e) Then t.AppendLine(If(cm = M3U8CreationMode.Relative, e.File.File, e.File.ToString)))
|
||||
f = $"{Elements(0).File.PathWithSeparator}Playlist{postfix}.m3u"
|
||||
If added Then t.SaveAs(f, EDP.SendToLog)
|
||||
If f.Exists Then AddFile(f)
|
||||
t.Dispose()
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
ErrorsDescriber.Execute(EDP.SendToLog, ex, "[YouTubeMediaContainerBase.Download.CreatePlaylist]")
|
||||
End Try
|
||||
@@ -1004,12 +1025,19 @@ Namespace API.YouTube.Objects
|
||||
End If
|
||||
|
||||
Dim cDown As Boolean = False
|
||||
Dim fCover As SFile = Nothing
|
||||
Dim cUrl$ = String.Empty
|
||||
For Each elem In Elements
|
||||
With DirectCast(elem, YouTubeMediaContainerBase)
|
||||
If Not .CoverDownloaded Then .CoverDownloaded = cDown
|
||||
'If Not .CoverDownloaded Then .CoverDownloaded = cDown
|
||||
.CoverDownloaded = cDown
|
||||
.CoverFile = fCover
|
||||
.CoverURL = cUrl
|
||||
AddHandler .FileDownloadStarted, fDown
|
||||
.Download(UseCookies, Token)
|
||||
cDown = .CoverDownloaded
|
||||
fCover = .CoverFile
|
||||
cUrl = .CoverURL
|
||||
RemoveHandler .FileDownloadStarted, fDown
|
||||
End With
|
||||
If Token.IsCancellationRequested Or disposedValue Then Exit For
|
||||
@@ -1036,6 +1064,8 @@ Namespace API.YouTube.Objects
|
||||
End Try
|
||||
End Sub
|
||||
Protected CoverDownloaded As Boolean = False
|
||||
Protected CoverFile As SFile = Nothing
|
||||
Protected CoverURL As String = String.Empty
|
||||
Private Sub DownloadPlaylistCover(ByVal PlsId As String, ByVal f As SFile, ByVal UseCookies As Boolean)
|
||||
Try
|
||||
Dim url$ = $"https://{IIf(IsMusic, "music", "www")}.youtube.com/playlist?list={PlsId}"
|
||||
@@ -1071,7 +1101,8 @@ Namespace API.YouTube.Objects
|
||||
url = LinkFormatterSecure(u)
|
||||
f.Name = "cover"
|
||||
f.Extension = "jpg"
|
||||
If resp.DownloadFile(url, f, EDP.ReturnValue) And f.Exists Then CoverDownloaded = True : AddFile(f)
|
||||
If resp.DownloadFile(url, f, EDP.ReturnValue) And f.Exists Then _
|
||||
CoverFile = f : CoverURL = url : CoverDownloaded = True : AddFile(f)
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
@@ -1252,10 +1283,10 @@ Namespace API.YouTube.Objects
|
||||
End Sub
|
||||
Dim embedThumbTo As Action(Of SFile) =
|
||||
Sub(ByVal dFile As SFile)
|
||||
If dFile.Exists And ThumbnailFile.Exists Then
|
||||
If dFile.Exists And CoverFile.IfNullOrEmpty(ThumbnailFile).Exists Then
|
||||
Dim dFileNew As SFile = dFile
|
||||
dFileNew.Name &= "_NEW"
|
||||
.Execute($"ffmpeg -i ""{dFile}"" -i ""{ThumbnailFile}"" -map 0:0 -map 1:0 -c copy -id3v2_version 3 -metadata:s:v title=""Cover"" -metadata:s:v comment=""Cover"" ""{dFileNew}""")
|
||||
.Execute($"ffmpeg -i ""{dFile}"" -i ""{CoverFile.IfNullOrEmpty(ThumbnailFile)}"" -map 0:0 -map 1:0 -c copy -id3v2_version 3 -metadata:s:v title=""Cover"" -metadata:s:v comment=""Cover"" ""{dFileNew}""")
|
||||
If dFileNew.Exists AndAlso dFile.Delete(,, EDP.ReturnValue) Then SFile.Rename(dFileNew, dFile)
|
||||
End If
|
||||
End Sub
|
||||
@@ -1335,6 +1366,10 @@ Namespace API.YouTube.Objects
|
||||
End If
|
||||
End If
|
||||
|
||||
'mp3
|
||||
If IsMusic And ObjectType = YouTubeMediaType.Single And File.Extension = mp3 And
|
||||
Not mp3ThumbEmbedded And CoverFile.Exists And MyYouTubeSettings.DefaultAudioEmbedThumbnail_Cover Then embedThumbTo.Invoke(File)
|
||||
|
||||
'Update video
|
||||
ThrowAny(Token)
|
||||
If SelectedVideoIndex >= 0 AndAlso tempFilesList.Count > 0 AndAlso tempFilesList.Exists(Function(tf) tf.ToReplace) Then
|
||||
@@ -1354,15 +1389,29 @@ Namespace API.YouTube.Objects
|
||||
'Delete unrequsted files
|
||||
If tempFilesList.Count > 0 Then tempFilesList.ForEach(Sub(tfr) If Not tfr.Requested Then tfr.File.Delete(,, EDP.None)) : tempFilesList.Clear()
|
||||
|
||||
'Update video FPS
|
||||
If SelectedVideoIndex >= 0 AndAlso OutputVideoFPS > 0 AndAlso SelectedVideo.Bitrate <> OutputVideoFPS Then
|
||||
f = File
|
||||
f.Name &= "tmp00"
|
||||
.Execute($"ffmpeg -i ""{File}"" -filter:v fps={OutputVideoFPS.ToString.Replace(",", ".")} -c:a copy ""{f}""")
|
||||
If f.Exists Then
|
||||
File.Delete()
|
||||
SFile.Rename(f, File,, EDP.LogMessageValue)
|
||||
End If
|
||||
If SelectedVideoIndex >= 0 Then
|
||||
Dim reencodeFile As Action(Of String) =
|
||||
Sub(ByVal ffmpegCommand As String)
|
||||
f = File
|
||||
f.Name &= "tmp00"
|
||||
.Execute(String.Format(ffmpegCommand, File.ToString, f.ToString))
|
||||
If f.Exists Then
|
||||
If f.Size > 0 Then
|
||||
File.Delete()
|
||||
SFile.Rename(f, File,, EDP.LogMessageValue)
|
||||
Else
|
||||
f.Delete(, SFODelete.DeletePermanently, EDP.None)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
'Change video codec to AVC
|
||||
If MyYouTubeSettings.DefaultVideoConvertNonAVC.Value AndAlso
|
||||
Not SelectedVideo.Codec.IsEmptyString AndAlso Not SelectedVideo.Codec.Trim.ToLower.StartsWith("avc") Then _
|
||||
reencodeFile("ffmpeg -i ""{0}"" -c:a copy -c:v libx264 ""{1}""")
|
||||
|
||||
'Update video FPS
|
||||
If OutputVideoFPS > 0 AndAlso SelectedVideo.Bitrate <> OutputVideoFPS Then _
|
||||
reencodeFile("ffmpeg -i ""{0}"" -filter:v fps=" & OutputVideoFPS.ToString.Replace(", ", ".") & " -c:a copy ""{1}""")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -1693,6 +1742,7 @@ Namespace API.YouTube.Objects
|
||||
Dim obj As MediaObject
|
||||
Dim nValue#
|
||||
Dim sValue$
|
||||
Dim allowWebm As Boolean = MyYouTubeSettings.DefaultVideoAllowWebm
|
||||
Dim validCodecValue As Func(Of String, Boolean) = Function(codec) Not codec.IsEmptyString AndAlso Not codec = "none"
|
||||
|
||||
For Each ee In e({"formats"})
|
||||
@@ -1743,12 +1793,13 @@ Namespace API.YouTube.Objects
|
||||
Dim d As MediaObject = Nothing
|
||||
Dim expWebm As Predicate(Of MediaObject) = Function(mo) mo.Extension = webm
|
||||
Dim expAVC As Predicate(Of MediaObject) = Function(mo) mo.Codec.IfNullOrEmpty("/").ToLower.StartsWith(avc)
|
||||
Dim comp As Func(Of MediaObject, Predicate(Of MediaObject), Boolean, Boolean) =
|
||||
Function(mo, exp, isTrue) mo.Type = t And exp.Invoke(mo) = isTrue And mo.Width = d.Width
|
||||
Dim CountWebm As Func(Of MediaObject, Boolean) = Function(mo) comp.Invoke(mo, expWebm, False)
|
||||
Dim RemoveWebm As Predicate(Of MediaObject) = Function(mo) comp.Invoke(mo, expWebm, True)
|
||||
Dim CountAVC As Func(Of MediaObject, Boolean) = Function(mo) comp.Invoke(mo, expAVC, True)
|
||||
Dim RemoveAVC As Predicate(Of MediaObject) = Function(mo) comp.Invoke(mo, expAVC, False)
|
||||
Dim comp As Func(Of MediaObject, Predicate(Of MediaObject), Boolean, Boolean, Boolean) =
|
||||
Function(mo, exp, isTrue, checkHttp) mo.Type = t And exp.Invoke(mo) = isTrue And mo.Width = d.Width And
|
||||
(Not checkHttp OrElse mo.ProtocolType = Protocols.https)
|
||||
Dim CountWebm As Func(Of MediaObject, Boolean) = Function(mo) comp.Invoke(mo, expWebm, False, allowWebm)
|
||||
Dim RemoveWebm As Predicate(Of MediaObject) = Function(mo) comp.Invoke(mo, expWebm, True, allowWebm)
|
||||
Dim CountAVC As Func(Of MediaObject, Boolean) = Function(mo) comp.Invoke(mo, expAVC, True, False)
|
||||
Dim RemoveAVC As Predicate(Of MediaObject) = Function(mo) comp.Invoke(mo, expAVC, False, False)
|
||||
For Each d In data
|
||||
If MediaObjects.Count = 0 Then Exit For
|
||||
If MediaObjects.LongCount(CountWebm) > 0 Then MediaObjects.RemoveAll(RemoveWebm)
|
||||
|
||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2024.6.25.0")>
|
||||
<Assembly: AssemblyFileVersion("2024.6.25.0")>
|
||||
<Assembly: AssemblyVersion("2024.10.24.0")>
|
||||
<Assembly: AssemblyFileVersion("2024.10.24.0")>
|
||||
<Assembly: NeutralResourcesLanguage("en")>
|
||||
|
||||
@@ -28,6 +28,8 @@ Namespace API.Base
|
||||
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"
|
||||
Friend Const UserNameChangeCaption As String = "UserName"
|
||||
Friend Const UserNameChangeToolTip As String = "If the user has changed their UserName, you can set a new name here. Not required for new users."
|
||||
Private Sub New()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -80,6 +80,8 @@ Namespace API.Base
|
||||
Private _CollectionButtonsExists As Boolean = False
|
||||
Private _CollectionButtonsColorsSet As Boolean = False
|
||||
Friend WithEvents BTT_CONTEXT_DOWN As ToolStripKeyMenuItem
|
||||
Friend WithEvents BTT_CONTEXT_DOWN_LIMIT As ToolStripKeyMenuItem
|
||||
Friend WithEvents BTT_CONTEXT_DOWN_DATE As ToolStripKeyMenuItem
|
||||
Friend WithEvents BTT_CONTEXT_EDIT As ToolStripMenuItem
|
||||
Friend WithEvents BTT_CONTEXT_DELETE As ToolStripMenuItem
|
||||
Friend WithEvents BTT_CONTEXT_ERASE As ToolStripMenuItem
|
||||
@@ -98,6 +100,8 @@ Namespace API.Base
|
||||
End If
|
||||
End With
|
||||
BTT_CONTEXT_DOWN = New ToolStripKeyMenuItem(tn, i) With {.Name = tnn("DOWN"), .Tag = Me}
|
||||
BTT_CONTEXT_DOWN_LIMIT = New ToolStripKeyMenuItem(tn, i) With {.Name = tnn("DOWN_LIMIT"), .Tag = Me}
|
||||
BTT_CONTEXT_DOWN_DATE = New ToolStripKeyMenuItem(tn, i) With {.Name = tnn("DOWN_DATE"), .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}
|
||||
@@ -117,7 +121,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_ERASE,
|
||||
For Each b As ToolStripMenuItem In {BTT_CONTEXT_DOWN, BTT_CONTEXT_DOWN_LIMIT, BTT_CONTEXT_DOWN_DATE,
|
||||
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
|
||||
@@ -410,9 +415,7 @@ Namespace API.Base
|
||||
End Function
|
||||
Friend Overridable Sub SetPicture(ByVal f As SFile) Implements IUserData.SetPicture
|
||||
Try
|
||||
If f.Exists Then
|
||||
Using p As New UserImage(f, MyFile) : p.Save() : End Using
|
||||
End If
|
||||
If f.Exists Then UserImage.NewUserPicture(f, MyFile)
|
||||
Catch
|
||||
End Try
|
||||
End Sub
|
||||
@@ -451,11 +454,7 @@ BlockPictureScan:
|
||||
New ErrorsDescriber(EDP.ReturnValue) With {
|
||||
.ReturnValue = New List(Of SFile),
|
||||
.ReturnValueExists = True}).FirstOrDefault
|
||||
If NewPicFile.Exists Then
|
||||
p = New UserImage(NewPicFile, MyFile)
|
||||
p.Save()
|
||||
GoTo BlockReturn
|
||||
End If
|
||||
If NewPicFile.Exists Then p = UserImage.NewUserPicture(NewPicFile, MyFile,, True) : GoTo BlockReturn
|
||||
BlockDeletePictureFolder:
|
||||
On Error GoTo BlockReturn
|
||||
If DelPath Then
|
||||
@@ -654,6 +653,7 @@ BlockNullPicture:
|
||||
End Sub
|
||||
Protected ReadOnly _TempMediaList As List(Of UserMedia)
|
||||
Protected ReadOnly _TempPostsList As List(Of String)
|
||||
Private ReadOnly _MD5List As List(Of String)
|
||||
Friend Function GetLastImageAddress() As SFile
|
||||
If _ContentList.Count > 0 Then
|
||||
Return _ContentList.LastOrDefault(Function(c) c.Type = UTypes.Picture And Not c.File.IsEmptyString And Not c.File.Extension = "gif").File
|
||||
@@ -679,6 +679,7 @@ BlockNullPicture:
|
||||
Protected MyFileSettings As SFile
|
||||
Protected MyFileData As SFile
|
||||
Protected MyFilePosts As SFile
|
||||
Private MyMD5File As SFile
|
||||
Friend Overridable Property FileExists As Boolean = False Implements IUserData.FileExists
|
||||
Friend Overridable Property DataMerging As Boolean
|
||||
Get
|
||||
@@ -856,6 +857,7 @@ BlockNullPicture:
|
||||
LatestData = New List(Of UserMedia)
|
||||
_TempMediaList = New List(Of UserMedia)
|
||||
_TempPostsList = New List(Of String)
|
||||
_MD5List = New List(Of String)
|
||||
Labels = New List(Of String)
|
||||
UserUpdatedEventHandlers = New List(Of IUserData.UserUpdatedEventHandler)
|
||||
UserDownloadStateChangedEventHandlers = New List(Of UserDownloadStateChangedEventHandler)
|
||||
@@ -950,6 +952,9 @@ BlockNullPicture:
|
||||
LogError(ex, "user information loading error")
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub UpdateUserInformation_Ex()
|
||||
If _ForceSaveUserInfoOnException Then UpdateUserInformation()
|
||||
End Sub
|
||||
Friend Overridable Overloads Sub UpdateUserInformation() Implements IUserData.UpdateUserInformation
|
||||
UpdateUserInformation(False)
|
||||
End Sub
|
||||
@@ -1037,6 +1042,8 @@ BlockNullPicture:
|
||||
If _ContentList.Count > 0 Then x.AddRange(_ContentList)
|
||||
x.Save(MyFileData)
|
||||
End Using
|
||||
If Not MyMD5File.IsEmptyString And _MD5List.Count > 0 Then _
|
||||
TextSaver.SaveTextToFile(_MD5List.ListToString(Environment.NewLine), MyMD5File, True,, EDP.None)
|
||||
Catch ex As Exception
|
||||
LogError(ex, "history saving error")
|
||||
End Try
|
||||
@@ -1118,6 +1125,7 @@ BlockNullPicture:
|
||||
Protected UseClientTokens As Boolean = False
|
||||
Protected _ForceSaveUserData As Boolean = False
|
||||
Protected _ForceSaveUserInfo As Boolean = False
|
||||
Protected _ForceSaveUserInfoOnException As Boolean = False
|
||||
Private _DownloadInProgress As Boolean = False
|
||||
Private _EnvirUserExists As Boolean
|
||||
Private _EnvirUserSuspended As Boolean
|
||||
@@ -1131,11 +1139,13 @@ BlockNullPicture:
|
||||
TokenPersonal = Nothing
|
||||
ProgressPre.Reset()
|
||||
UpdateDataFiles()
|
||||
_MD5Loaded = False
|
||||
_DownloadInProgress = True
|
||||
_DescriptionChecked = False
|
||||
_DescriptionEveryTime = Settings.UpdateUserDescriptionEveryTime
|
||||
_ForceSaveUserData = False
|
||||
_ForceSaveUserInfo = False
|
||||
_ForceSaveUserInfoOnException = False
|
||||
_EnvirUserExists = UserExists
|
||||
_EnvirUserSuspended = UserSuspended
|
||||
_EnvirCreatedByChannel = CreatedByChannel
|
||||
@@ -1212,7 +1222,7 @@ BlockNullPicture:
|
||||
ProgressPre.Done()
|
||||
ThrowAny(Token)
|
||||
|
||||
If UseMD5Comparison And Not IsSubscription Then ValidateMD5(Token) : ProgressPre.Done() : ThrowAny(Token)
|
||||
If RemoveExistingDuplicates And Not IsSubscription Then ValidateMD5(Token) : ProgressPre.Done() : ThrowAny(Token)
|
||||
|
||||
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)
|
||||
@@ -1265,9 +1275,11 @@ BlockNullPicture:
|
||||
ThrowIfDisposed()
|
||||
If Not _PictureExists Or _EnvirInvokeUserUpdated Then OnUserUpdated()
|
||||
Catch oex As OperationCanceledException When Token.IsCancellationRequested Or TokenPersonal.IsCancellationRequested Or TokenQueue.IsCancellationRequested
|
||||
UpdateUserInformation_Ex()
|
||||
MyMainLOG = $"{ToStringForLog()}: downloading canceled"
|
||||
Canceled = True
|
||||
Catch exit_ex As ExitException
|
||||
UpdateUserInformation_Ex()
|
||||
If Not exit_ex.Silent Then
|
||||
If exit_ex.SimpleLogLine Then
|
||||
MyMainLOG = $"{ToStringForLog()}: downloading interrupted (exit) ({exit_ex.Message})"
|
||||
@@ -1275,11 +1287,14 @@ BlockNullPicture:
|
||||
ErrorsDescriber.Execute(EDP.SendToLog, exit_ex, $"{ToStringForLog()}: downloading interrupted (exit)")
|
||||
End If
|
||||
End If
|
||||
If _EnvirInvokeUserUpdated Then OnUserUpdated()
|
||||
Canceled = True
|
||||
Catch dex As ObjectDisposedException When Disposed
|
||||
Canceled = True
|
||||
Catch ex As Exception
|
||||
UpdateUserInformation_Ex()
|
||||
LogError(ex, "downloading data error")
|
||||
If _EnvirInvokeUserUpdated Then OnUserUpdated()
|
||||
HasError = True
|
||||
Finally
|
||||
If Not UserExists Then AddNonExistingUserToLog($"User '{ToStringForLog()}' not found on the site")
|
||||
@@ -1315,6 +1330,11 @@ BlockNullPicture:
|
||||
MyFilePosts = MyFileSettings
|
||||
MyFilePosts.Name &= "_Posts"
|
||||
MyFilePosts.Extension = "txt"
|
||||
If Not IsSavedPosts Then
|
||||
MyMD5File = MyFileSettings
|
||||
MyMD5File.Name &= "_MD5"
|
||||
MyMD5File.Extension = "txt"
|
||||
End If
|
||||
Else
|
||||
Throw New ArgumentNullException("User.File", "User file not detected")
|
||||
End If
|
||||
@@ -1438,81 +1458,94 @@ BlockNullPicture:
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "MD5 support"
|
||||
Protected Const VALIDATE_MD5_ERROR As String = "VALIDATE_MD5_ERROR"
|
||||
Private Const VALIDATE_MD5_ERROR As String = "VALIDATE_MD5_ERROR"
|
||||
Friend Property UseMD5Comparison As Boolean = False
|
||||
Protected Property StartMD5Checked As Boolean = False
|
||||
Friend Property RemoveExistingDuplicates As Boolean = False
|
||||
Protected Overridable Sub ValidateMD5(ByVal Token As CancellationToken)
|
||||
Private ReadOnly ErrMD5 As New ErrorsDescriber(EDP.ReturnValue)
|
||||
Private _MD5Loaded As Boolean = False
|
||||
Private Sub LoadMD5()
|
||||
Try
|
||||
If Not _MD5Loaded Then
|
||||
_MD5Loaded = True
|
||||
_MD5List.Clear()
|
||||
If _ContentList.Count > 0 Then _MD5List.ListAddList(_ContentList.Select(Function(c) c.MD5), LAP.NotContainsOnly, EDP.ReturnValue)
|
||||
If MyMD5File.Exists Then _MD5List.ListAddList(MyMD5File.GetLines, LAP.NotContainsOnly, EDP.ThrowException)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ErrorsDescriber.Execute(EDP.SendToLog, ex, "LoadMD5")
|
||||
End Try
|
||||
End Sub
|
||||
Private Function ValidateMD5_GetMD5(ByVal __data As UserMedia, ByVal IsUrl As Boolean) As String
|
||||
Try
|
||||
Dim ImgFormat As Imaging.ImageFormat = Nothing
|
||||
Dim hash$ = String.Empty
|
||||
Dim __isGif As Boolean = False
|
||||
If __data.Type = UTypes.GIF Then
|
||||
ImgFormat = Imaging.ImageFormat.Gif
|
||||
__isGif = True
|
||||
ElseIf Not __data.File.IsEmptyString Then
|
||||
ImgFormat = GetImageFormat(__data.File)
|
||||
End If
|
||||
If ImgFormat Is Nothing Then ImgFormat = Imaging.ImageFormat.Jpeg
|
||||
If IsUrl And Not __isGif Then
|
||||
hash = ByteArrayToString(GetMD5(SFile.GetBytesFromNet(__data.URL.IfNullOrEmpty(__data.URL_BASE), ErrMD5), ImgFormat, ErrMD5))
|
||||
ElseIf IsUrl And __isGif Then
|
||||
hash = ByteArrayToString(GetMD5FromBytes(SFile.GetBytesFromNet(__data.URL.IfNullOrEmpty(__data.URL_BASE), ErrMD5), ErrMD5))
|
||||
Else
|
||||
hash = ByteArrayToString(GetMD5(SFile.GetBytes(__data.File, ErrMD5), ImgFormat, ErrMD5))
|
||||
End If
|
||||
If hash.IsEmptyString And Not __isGif Then
|
||||
If ImgFormat Is Imaging.ImageFormat.Jpeg Then ImgFormat = Imaging.ImageFormat.Png Else ImgFormat = Imaging.ImageFormat.Jpeg
|
||||
If IsUrl Then
|
||||
hash = ByteArrayToString(GetMD5(SFile.GetBytesFromNet(__data.URL.IfNullOrEmpty(__data.URL_BASE), ErrMD5), ImgFormat, ErrMD5))
|
||||
Else
|
||||
hash = ByteArrayToString(GetMD5(SFile.GetBytes(__data.File, ErrMD5), ImgFormat, ErrMD5))
|
||||
End If
|
||||
End If
|
||||
Return hash
|
||||
Catch
|
||||
Return String.Empty
|
||||
End Try
|
||||
End Function
|
||||
Private Sub ValidateMD5(ByVal Token As CancellationToken)
|
||||
Try
|
||||
Dim missingMD5 As Predicate(Of UserMedia) = Function(d) (d.Type = UTypes.GIF Or d.Type = UTypes.Picture) And d.MD5.IsEmptyString
|
||||
If UseMD5Comparison And _TempMediaList.Exists(missingMD5) Then
|
||||
If RemoveExistingDuplicates Then
|
||||
RemoveExistingDuplicates = False
|
||||
_ForceSaveUserInfo = True
|
||||
LoadMD5()
|
||||
Dim i%
|
||||
Dim itemsCount% = 0
|
||||
Dim limit% = If(DownloadTopCount, 0)
|
||||
Dim data As UserMedia = Nothing
|
||||
Dim hashList As New Dictionary(Of String, SFile)
|
||||
Dim f As SFile
|
||||
Dim ErrMD5 As New ErrorsDescriber(EDP.ReturnValue)
|
||||
Dim __getMD5 As Func(Of UserMedia, Boolean, String) =
|
||||
Function(ByVal __data As UserMedia, ByVal IsUrl As Boolean) As String
|
||||
Try
|
||||
Dim ImgFormat As Imaging.ImageFormat = Nothing
|
||||
Dim hash$ = String.Empty
|
||||
Dim __isGif As Boolean = False
|
||||
If __data.Type = UTypes.GIF Then
|
||||
ImgFormat = Imaging.ImageFormat.Gif
|
||||
__isGif = True
|
||||
ElseIf Not __data.File.IsEmptyString Then
|
||||
ImgFormat = GetImageFormat(__data.File)
|
||||
End If
|
||||
If ImgFormat Is Nothing Then ImgFormat = Imaging.ImageFormat.Jpeg
|
||||
If IsUrl And Not __isGif Then
|
||||
hash = ByteArrayToString(GetMD5(SFile.GetBytesFromNet(__data.URL.IfNullOrEmpty(__data.URL_BASE), ErrMD5), ImgFormat, ErrMD5))
|
||||
ElseIf IsUrl And __isGif Then
|
||||
hash = ByteArrayToString(GetMD5FromBytes(SFile.GetBytesFromNet(__data.URL.IfNullOrEmpty(__data.URL_BASE), ErrMD5), ErrMD5))
|
||||
Else
|
||||
hash = ByteArrayToString(GetMD5(SFile.GetBytes(__data.File, ErrMD5), ImgFormat, ErrMD5))
|
||||
End If
|
||||
If hash.IsEmptyString And Not __isGif Then
|
||||
If ImgFormat Is Imaging.ImageFormat.Jpeg Then ImgFormat = Imaging.ImageFormat.Png Else ImgFormat = Imaging.ImageFormat.Jpeg
|
||||
If IsUrl Then
|
||||
hash = ByteArrayToString(GetMD5(SFile.GetBytesFromNet(__data.URL.IfNullOrEmpty(__data.URL_BASE), ErrMD5), ImgFormat, ErrMD5))
|
||||
Else
|
||||
hash = ByteArrayToString(GetMD5(SFile.GetBytes(__data.File, ErrMD5), ImgFormat, ErrMD5))
|
||||
End If
|
||||
End If
|
||||
Return hash
|
||||
Catch
|
||||
Return String.Empty
|
||||
End Try
|
||||
End Function
|
||||
|
||||
If Not StartMD5Checked Then
|
||||
StartMD5Checked = True
|
||||
If _ContentList.Exists(missingMD5) Then
|
||||
Dim existingFiles As List(Of SFile) = SFile.GetFiles(MyFileSettings.CutPath, "*.jpg|*.jpeg|*.png|*.gif",, EDP.ReturnValue).ListIfNothing
|
||||
Dim eIndx%
|
||||
Dim eFinder As Predicate(Of SFile) = Function(ff) ff.File = data.File.File
|
||||
If RemoveExistingDuplicates Then
|
||||
RemoveExistingDuplicates = False
|
||||
_ForceSaveUserInfo = True
|
||||
If existingFiles.Count > 0 Then
|
||||
Dim h$
|
||||
ProgressPre.ChangeMax(existingFiles.Count)
|
||||
For i = existingFiles.Count - 1 To 0 Step -1
|
||||
ProgressPre.Perform()
|
||||
h = __getMD5(New UserMedia With {.File = existingFiles(i)}, False)
|
||||
If Not h.IsEmptyString Then
|
||||
If hashList.ContainsKey(h) Then
|
||||
MyMainLOG = $"{ToStringForLog()}: Removed image [{existingFiles(i).File}] (duplicate of [{hashList(h).File}])"
|
||||
existingFiles(i).Delete(SFO.File, SFODelete.DeleteToRecycleBin, ErrMD5)
|
||||
existingFiles.RemoveAt(i)
|
||||
Else
|
||||
hashList.Add(h, existingFiles(i))
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Dim existingFiles As List(Of SFile) = SFile.GetFiles(MyFileSettings.CutPath, "*.jpg|*.jpeg|*.png|*.gif",, EDP.ReturnValue).ListIfNothing
|
||||
Dim eIndx%
|
||||
Dim eFinder As Predicate(Of SFile) = Function(ff) ff.File = data.File.File
|
||||
|
||||
If existingFiles.Count > 0 Then
|
||||
Dim h$
|
||||
ProgressPre.ChangeMax(existingFiles.Count)
|
||||
For i = existingFiles.Count - 1 To 0 Step -1
|
||||
ProgressPre.Perform()
|
||||
h = ValidateMD5_GetMD5(New UserMedia With {.File = existingFiles(i)}, False)
|
||||
If Not h.IsEmptyString Then
|
||||
If _MD5List.Contains(h) Then
|
||||
MyMainLOG = $"{ToStringForLog()}: Removed image [{existingFiles(i).File}] (duplicate)"
|
||||
existingFiles(i).Delete(SFO.File, SFODelete.DeleteToRecycleBin, ErrMD5)
|
||||
existingFiles.RemoveAt(i)
|
||||
Else
|
||||
_MD5List.Add(h)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If _ContentList.Count > 0 AndAlso _ContentList.Exists(missingMD5) Then
|
||||
ProgressPre.ChangeMax(_ContentList.Count)
|
||||
For i = 0 To _ContentList.Count - 1
|
||||
data = _ContentList(i)
|
||||
@@ -1522,61 +1555,34 @@ BlockNullPicture:
|
||||
ThrowAny(Token)
|
||||
eIndx = existingFiles.FindIndex(eFinder)
|
||||
If eIndx >= 0 Then
|
||||
data.MD5 = __getMD5(New UserMedia With {.File = existingFiles(eIndx)}, False)
|
||||
data.MD5 = ValidateMD5_GetMD5(New UserMedia With {.File = existingFiles(eIndx)}, False)
|
||||
If Not data.MD5.IsEmptyString Then _ContentList(i) = data : _ForceSaveUserData = True
|
||||
End If
|
||||
End If
|
||||
existingFiles.RemoveAll(eFinder)
|
||||
End If
|
||||
Next
|
||||
If existingFiles.Count > 0 Then
|
||||
ProgressPre.ChangeMax(existingFiles.Count)
|
||||
For i = 0 To existingFiles.Count - 1
|
||||
f = existingFiles(i)
|
||||
ProgressPre.Perform()
|
||||
data = New UserMedia(f.File) With {
|
||||
.State = UStates.Downloaded,
|
||||
.Type = IIf(f.Extension = "gif", UTypes.GIF, UTypes.Picture),
|
||||
.File = f
|
||||
}
|
||||
ThrowAny(Token)
|
||||
data.MD5 = __getMD5(data, False)
|
||||
If Not data.MD5.IsEmptyString Then _ContentList.Add(data) : _ForceSaveUserData = True
|
||||
Next
|
||||
existingFiles.Clear()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If _ContentList.Count > 0 Then
|
||||
With _ContentList.Select(Function(d) d.MD5)
|
||||
If .ListExists Then .ToList.ForEach(Sub(md5value) _
|
||||
If Not md5value.IsEmptyString AndAlso Not hashList.ContainsKey(md5value) Then hashList.Add(md5value, New SFile))
|
||||
End With
|
||||
End If
|
||||
|
||||
ProgressPre.ChangeMax(_TempMediaList.Count)
|
||||
For i = _TempMediaList.Count - 1 To 0 Step -1
|
||||
ProgressPre.Perform()
|
||||
If limit > 0 And itemsCount >= limit Then
|
||||
_TempMediaList.RemoveAt(i)
|
||||
Else
|
||||
data = _TempMediaList(i)
|
||||
If missingMD5(data) Then
|
||||
If existingFiles.Count > 0 Then
|
||||
ProgressPre.ChangeMax(existingFiles.Count)
|
||||
For i = 0 To existingFiles.Count - 1
|
||||
f = existingFiles(i)
|
||||
ProgressPre.Perform()
|
||||
data = New UserMedia(f.File) With {
|
||||
.State = UStates.Downloaded,
|
||||
.Type = IIf(f.Extension = "gif", UTypes.GIF, UTypes.Picture),
|
||||
.File = f
|
||||
}
|
||||
ThrowAny(Token)
|
||||
data.MD5 = __getMD5(data, True)
|
||||
If Not data.MD5.IsEmptyString Then
|
||||
If hashList.ContainsKey(data.MD5) Then
|
||||
_TempMediaList.RemoveAt(i)
|
||||
Else
|
||||
hashList.Add(data.MD5, New SFile)
|
||||
_TempMediaList(i) = data
|
||||
itemsCount += 1
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
data.MD5 = ValidateMD5_GetMD5(data, False)
|
||||
If Not data.MD5.IsEmptyString Then _ContentList.Add(data) : _ForceSaveUserData = True
|
||||
Next
|
||||
existingFiles.Clear()
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If _ContentList.Count > 0 Then _MD5List.ListAddList(_ContentList.Select(Function(d) d.MD5), LAP.NotContainsOnly, EDP.ReturnValue)
|
||||
End If
|
||||
Catch iex As ArgumentOutOfRangeException When Disposed
|
||||
Catch ex As Exception
|
||||
@@ -1614,6 +1620,7 @@ BlockNullPicture:
|
||||
Source.Progress.Done()
|
||||
End Sub
|
||||
End Class
|
||||
Protected Const VideoFolderName As String = "Video"
|
||||
Protected Sub DownloadContentDefault(ByVal Token As CancellationToken)
|
||||
Try
|
||||
Dim i%
|
||||
@@ -1622,6 +1629,7 @@ BlockNullPicture:
|
||||
If _ContentNew.Count > 0 Then
|
||||
_ContentNew.RemoveAll(Function(c) c.URL.IsEmptyString)
|
||||
If _ContentNew.Count > 0 Then
|
||||
If UseMD5Comparison Then LoadMD5()
|
||||
MyFile.Exists(SFO.Path)
|
||||
Dim MissingErrorsAdd As Boolean = Settings.AddMissingErrorsToLog
|
||||
Dim MyDir$ = DownloadContentDefault_GetRootDir()
|
||||
@@ -1630,6 +1638,7 @@ BlockNullPicture:
|
||||
Dim __interrupt As Boolean
|
||||
Dim f As SFile
|
||||
Dim v As UserMedia
|
||||
Dim __fileDeleted As Boolean
|
||||
Dim fileNumProvider As SFileNumbers = SFileNumbers.Default
|
||||
Dim __deleteFile As Action(Of SFile, String) = Sub(ByVal FileToDelete As SFile, ByVal FileUrl As String)
|
||||
Try
|
||||
@@ -1641,9 +1650,21 @@ BlockNullPicture:
|
||||
ErrorsDescriber.Execute(EDP.SendToLog, file_del_ex)
|
||||
End Try
|
||||
End Sub
|
||||
Dim updateDownCount As Action = Sub()
|
||||
Dim __n% = IIf(__fileDeleted, -1, 1)
|
||||
If __isVideo Then
|
||||
v.Type = UTypes.Video
|
||||
DownloadedVideos(False) += __n
|
||||
ElseIf v.Type = UTypes.GIF Then
|
||||
DownloadedPictures(False) += __n
|
||||
Else
|
||||
v.Type = UTypes.Picture
|
||||
DownloadedPictures(False) += __n
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Using w As New OptionalWebClient(Me)
|
||||
If vsf Then CSFileP($"{MyDir}\Video\").Exists(SFO.Path)
|
||||
If vsf Then CSFileP($"{MyDir}\{VideoFolderName}\").Exists(SFO.Path)
|
||||
Progress.Maximum += _ContentNew.Count
|
||||
If IsSingleObjectDownload Then
|
||||
If _ContentNew.Count = 1 And _ContentNew(0).Type = UTypes.Video Then
|
||||
@@ -1671,6 +1692,8 @@ BlockNullPicture:
|
||||
|
||||
If v.URL_BASE.IsEmptyString Then v.URL_BASE = v.URL
|
||||
|
||||
__fileDeleted = False
|
||||
|
||||
If Not f.IsEmptyString And Not v.URL.IsEmptyString Then
|
||||
Try
|
||||
__isVideo = v.Type = UTypes.Video Or f.Extension = "mp4" Or v.Type = UTypes.m3u8
|
||||
@@ -1691,7 +1714,7 @@ BlockNullPicture:
|
||||
End If
|
||||
If __isVideo And vsf Then
|
||||
If v.SpecialFolder.IsEmptyString OrElse Not v.SpecialFolder.EndsWith("*") Then
|
||||
f.Path = $"{f.PathWithSeparator}Video"
|
||||
f.Path = $"{f.PathWithSeparator}{VideoFolderName}"
|
||||
If Not v.SpecialFolder.IsEmptyString Then f.Exists(SFO.Path)
|
||||
End If
|
||||
End If
|
||||
@@ -1715,19 +1738,26 @@ BlockNullPicture:
|
||||
End If
|
||||
End If
|
||||
|
||||
If __isVideo Then
|
||||
v.Type = UTypes.Video
|
||||
DownloadedVideos(False) += 1
|
||||
ElseIf v.Type = UTypes.GIF Then
|
||||
DownloadedPictures(False) += 1
|
||||
Else
|
||||
v.Type = UTypes.Picture
|
||||
DownloadedPictures(False) += 1
|
||||
End If
|
||||
updateDownCount()
|
||||
|
||||
v.File = ChangeFileNameByProvider(f, v)
|
||||
v.State = UStates.Downloaded
|
||||
DownloadContentDefault_PostProcessing(v, f, Token)
|
||||
If UseMD5Comparison And (v.Type = UTypes.GIF Or v.Type = UTypes.Picture) Then
|
||||
If v.File.Exists Then
|
||||
v.MD5 = ValidateMD5_GetMD5(v, False)
|
||||
If Not v.MD5.IsEmptyString Then
|
||||
If _MD5List.Contains(v.MD5) Then
|
||||
__fileDeleted = v.File.Delete(SFO.File, SFODelete.DeletePermanently, EDP.ReturnValue)
|
||||
If __fileDeleted Then dCount -= 1 : updateDownCount()
|
||||
Else
|
||||
_MD5List.Add(v.MD5)
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
dCount -= 1
|
||||
End If
|
||||
End If
|
||||
dCount += 1
|
||||
Catch woex As OperationCanceledException When Token.IsCancellationRequested
|
||||
__deleteFile.Invoke(f, v.URL_BASE)
|
||||
@@ -1745,7 +1775,7 @@ BlockNullPicture:
|
||||
Else
|
||||
v.State = UStates.Skipped
|
||||
End If
|
||||
_ContentNew(i) = v
|
||||
If Not __fileDeleted Then _ContentNew(i) = v
|
||||
If DownloadTopCount.HasValue AndAlso dCount >= DownloadTopCount.Value Then
|
||||
Progress.Perform(_ContentNew.Count - dTotal)
|
||||
Exit Sub
|
||||
@@ -1897,6 +1927,7 @@ BlockNullPicture:
|
||||
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
|
||||
If MyMD5File.Delete(SFO.File, SFODelete.DeleteToRecycleBin, e) Then result = True
|
||||
LastUpdated = Nothing
|
||||
EraseData_AdditionalDataFiles()
|
||||
UpdateUserInformation()
|
||||
@@ -1913,6 +1944,8 @@ BlockNullPicture:
|
||||
_TempMediaList.Clear()
|
||||
_ContentNew.Clear()
|
||||
_ContentList.Clear()
|
||||
_MD5List.Clear()
|
||||
_MD5Loaded = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -2165,6 +2198,12 @@ BlockNullPicture:
|
||||
Private Sub BTT_CONTEXT_DOWN_KeyClick(sender As Object, e As MyKeyEventArgs) Handles BTT_CONTEXT_DOWN.KeyClick
|
||||
Downloader.Add(Me, e.IncludeInTheFeed)
|
||||
End Sub
|
||||
Private Sub BTT_CONTEXT_DOWN_LIMIT_KeyClick(sender As Object, e As MyKeyEventArgs) Handles BTT_CONTEXT_DOWN_LIMIT.KeyClick
|
||||
ControlInvokeFast(MainFrameObj.MF, Sub() MainFrameObj.MF.DownloadSelectedUser(MainFrame.DownUserLimits.Number, e.IncludeInTheFeed, Me), EDP.SendToLog)
|
||||
End Sub
|
||||
Private Sub BTT_CONTEXT_DOWN_DATE_KeyClick(sender As Object, e As MyKeyEventArgs) Handles BTT_CONTEXT_DOWN_DATE.KeyClick
|
||||
ControlInvokeFast(MainFrameObj.MF, Sub() MainFrameObj.MF.DownloadSelectedUser(MainFrame.DownUserLimits.Date, e.IncludeInTheFeed, Me), EDP.SendToLog)
|
||||
End Sub
|
||||
Private Sub BTT_CONTEXT_EDIT_Click(sender As Object, e As EventArgs) Handles BTT_CONTEXT_EDIT.Click
|
||||
Using f As New Editors.UserCreatorForm(Me)
|
||||
f.ShowDialog()
|
||||
@@ -2240,10 +2279,13 @@ BlockNullPicture:
|
||||
LatestData.Clear()
|
||||
_TempMediaList.Clear()
|
||||
_TempPostsList.Clear()
|
||||
_MD5List.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_DOWN_LIMIT Is Nothing Then BTT_CONTEXT_DOWN_LIMIT.Dispose()
|
||||
If Not BTT_CONTEXT_DOWN_DATE Is Nothing Then BTT_CONTEXT_DOWN_DATE.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()
|
||||
|
||||
@@ -7,8 +7,10 @@
|
||||
' This program is distributed in the hope that it will be useful,
|
||||
' but WITHOUT ANY WARRANTY
|
||||
Imports SCrawler.Plugin.Attributes
|
||||
Imports DN = SCrawler.API.Base.DeclaredNames
|
||||
Namespace API.Instagram
|
||||
Friend Class EditorExchangeOptions
|
||||
Friend NotInheritable Class EditorExchangeOptions
|
||||
#Region "Download"
|
||||
<PSetting(Caption:="Get timeline", ToolTip:="Download user timeline")>
|
||||
Friend Property GetTimeline As Boolean
|
||||
<PSetting(Caption:="Get reels", ToolTip:="Download user reels")>
|
||||
@@ -19,6 +21,27 @@ Namespace API.Instagram
|
||||
Friend Property GetStoriesUser As Boolean
|
||||
<PSetting(Caption:="Get tagged posts", ToolTip:="Download user tagged posts")>
|
||||
Friend Property GetTagged As Boolean
|
||||
#End Region
|
||||
#Region "Extract image"
|
||||
<PSetting(Caption:="Extract image from video: timeline")>
|
||||
Friend Property GetTimeline_VideoPic As Boolean
|
||||
<PSetting(Caption:="Extract image from video: reels")>
|
||||
Friend Property GetReels_VideoPic As Boolean
|
||||
<PSetting(Caption:="Extract image from video: stories")>
|
||||
Friend Property GetStories_VideoPic As Boolean
|
||||
<PSetting(Caption:="Extract image from video: stories: user")>
|
||||
Friend Property GetStoriesUser_VideoPic As Boolean
|
||||
<PSetting(Caption:="Extract image from video: tagged posts")>
|
||||
Friend Property GetTagged_VideoPic As Boolean
|
||||
#End Region
|
||||
<PSetting(Caption:="Place the extracted image into the video folder")>
|
||||
Friend Property PutImageVideoFolder As Boolean
|
||||
<PSetting(Address:=SettingAddress.User, Caption:=DN.UserNameChangeCaption, ToolTip:=DN.UserNameChangeToolTip)>
|
||||
Friend Property UserName As String = String.Empty
|
||||
<PSetting(Address:=SettingAddress.User, Caption:="Force update UserName", ToolTip:="Try to force update UserName if it is not found on the site")>
|
||||
Friend Property ForceUpdateUserName As Boolean = False
|
||||
<PSetting(Address:=SettingAddress.User, Caption:="Force update user information")>
|
||||
Friend Property ForceUpdateUserInfo As Boolean = False
|
||||
Friend Sub New(ByVal u As UserData)
|
||||
With u
|
||||
GetTimeline = .GetTimeline
|
||||
@@ -26,6 +49,18 @@ Namespace API.Instagram
|
||||
GetStories = .GetStories
|
||||
GetStoriesUser = .GetStoriesUser
|
||||
GetTagged = .GetTaggedData
|
||||
|
||||
GetTimeline_VideoPic = .GetTimeline_VideoPic
|
||||
GetReels_VideoPic = .GetReels_VideoPic
|
||||
GetStories_VideoPic = .GetStories_VideoPic
|
||||
GetStoriesUser_VideoPic = .GetStoriesUser_VideoPic
|
||||
GetTagged_VideoPic = .GetTaggedData_VideoPic
|
||||
|
||||
PutImageVideoFolder = .PutImageVideoFolder
|
||||
|
||||
UserName = .NameTrue(True)
|
||||
ForceUpdateUserName = .ForceUpdateUserName
|
||||
ForceUpdateUserInfo = .ForceUpdateUserInfo
|
||||
End With
|
||||
End Sub
|
||||
Friend Sub New(ByVal s As SiteSettings)
|
||||
@@ -35,6 +70,14 @@ Namespace API.Instagram
|
||||
GetStories = CBool(.GetStories.Value)
|
||||
GetStoriesUser = CBool(.GetStoriesUser.Value)
|
||||
GetTagged = CBool(.GetTagged.Value)
|
||||
|
||||
GetTimeline_VideoPic = CBool(.GetTimeline_VideoPic.Value)
|
||||
GetReels_VideoPic = CBool(.GetReels_VideoPic.Value)
|
||||
GetStories_VideoPic = CBool(.GetStories_VideoPic.Value)
|
||||
GetStoriesUser_VideoPic = CBool(.GetStoriesUser_VideoPic.Value)
|
||||
GetTagged_VideoPic = CBool(.GetTagged_VideoPic.Value)
|
||||
|
||||
PutImageVideoFolder = CBool(.PutImageVideoFolder.Value)
|
||||
End With
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -57,8 +57,11 @@ Namespace API.Instagram
|
||||
#End Region
|
||||
#Region "Categories"
|
||||
Private Const CAT_DOWN As String = "Download data"
|
||||
Private Const CAT_UserDefs_VIDEO As String = DN.CAT_UserDefs & ": extract image from video"
|
||||
Private Const CAT_ERRORS As String = "Errors"
|
||||
#End Region
|
||||
#Region "Authorization properties"
|
||||
#Region "Properties"
|
||||
#Region "Authorization"
|
||||
Friend Const Header_IG_APP_ID As String = "x-ig-app-id"
|
||||
Friend Const Header_IG_WWW_CLAIM As String = "x-ig-www-claim"
|
||||
Friend Const Header_CSRF_TOKEN As String = "x-csrftoken"
|
||||
@@ -67,18 +70,18 @@ Namespace API.Instagram
|
||||
Friend Const Header_Browser As String = "Sec-Ch-Ua"
|
||||
Friend Const Header_BrowserExt As String = "Sec-Ch-Ua-Full-Version-List"
|
||||
Friend Const Header_Platform_Verion As String = "Sec-Ch-Ua-Platform-Version"
|
||||
<PropertyOption(ControlText:="x-csrftoken", ControlToolTip:="Can be automatically extracted from cookies", IsAuth:=True, AllowNull:=True), ControlNumber(2), PClonable(Clone:=False)>
|
||||
<PropertyOption(ControlText:="x-csrftoken", ControlToolTip:="Can be automatically extracted from cookies", IsAuth:=True, AllowNull:=True), PClonable(Clone:=False)>
|
||||
Friend ReadOnly Property HH_CSRF_TOKEN As PropertyValue
|
||||
<CookieValueExtractor(NameOf(HH_CSRF_TOKEN))>
|
||||
Private Function GetValueFromCookies(ByVal PropName As String, ByVal c As CookieKeeper) As String
|
||||
Return c.GetCookieValue(Header_CSRF_TOKEN_COOKIE, PropName, NameOf(HH_CSRF_TOKEN))
|
||||
End Function
|
||||
<PropertyOption(ControlText:="x-ig-app-id", IsAuth:=True, AllowNull:=False), ControlNumber(3), PClonable(Clone:=False)>
|
||||
<PropertyOption(ControlText:="x-ig-app-id", IsAuth:=True, AllowNull:=False), PClonable(Clone:=False)>
|
||||
Friend ReadOnly Property HH_IG_APP_ID As PropertyValue
|
||||
<PropertyOption(ControlText:="x-asbd-id", IsAuth:=True, AllowNull:=True), ControlNumber(4), PClonable(Clone:=False)>
|
||||
<PropertyOption(ControlText:="x-asbd-id", IsAuth:=True, AllowNull:=True), PClonable(Clone:=False)>
|
||||
Friend ReadOnly Property HH_ASBD_ID As PropertyValue
|
||||
'PropertyOption(ControlText:="x-ig-www-claim", IsAuth:=True, AllowNull:=True)
|
||||
<ControlNumber(5), PClonable(Clone:=False)>
|
||||
<PClonable(Clone:=False)>
|
||||
Friend ReadOnly Property HH_IG_WWW_CLAIM As PropertyValue
|
||||
Private ReadOnly Property HH_IG_WWW_CLAIM_IS_ZERO As Boolean
|
||||
Get
|
||||
@@ -87,16 +90,16 @@ Namespace API.Instagram
|
||||
End Get
|
||||
End Property
|
||||
<PropertyOption(ControlText:="sec-ch-ua", IsAuth:=True, AllowNull:=True,
|
||||
InheritanceName:=SettingsCLS.HEADER_DEF_sec_ch_ua), ControlNumber(6), PClonable, PXML(OnlyForChecked:=True)>
|
||||
InheritanceName:=SettingsCLS.HEADER_DEF_sec_ch_ua), PClonable, PXML(OnlyForChecked:=True)>
|
||||
Private ReadOnly Property HH_BROWSER As PropertyValue
|
||||
<PropertyOption(ControlText:="sec-ch-ua-full", ControlToolTip:="sec-ch-ua-full-version-list", IsAuth:=True, AllowNull:=True,
|
||||
InheritanceName:=SettingsCLS.HEADER_DEF_sec_ch_ua_full_version_list), ControlNumber(7), PClonable, PXML(OnlyForChecked:=True)>
|
||||
InheritanceName:=SettingsCLS.HEADER_DEF_sec_ch_ua_full_version_list), PClonable, PXML(OnlyForChecked:=True)>
|
||||
Private ReadOnly Property HH_BROWSER_EXT As PropertyValue
|
||||
<PropertyOption(ControlText:="sec-ch-ua-platform-ver", ControlToolTip:="sec-ch-ua-platform-version", IsAuth:=True, AllowNull:=True, LeftOffset:=135,
|
||||
InheritanceName:=SettingsCLS.HEADER_DEF_sec_ch_ua_platform_version), ControlNumber(8), PClonable, PXML(OnlyForChecked:=True)>
|
||||
InheritanceName:=SettingsCLS.HEADER_DEF_sec_ch_ua_platform_version), PClonable, PXML(OnlyForChecked:=True)>
|
||||
Private ReadOnly Property HH_PLATFORM As PropertyValue
|
||||
<PropertyOption(ControlText:="UserAgent", IsAuth:=True, AllowNull:=True,
|
||||
InheritanceName:=SettingsCLS.HEADER_DEF_UserAgent), ControlNumber(9), PClonable, PXML(OnlyForChecked:=True)>
|
||||
InheritanceName:=SettingsCLS.HEADER_DEF_UserAgent), PClonable, PXML(OnlyForChecked:=True)>
|
||||
Private ReadOnly Property HH_USER_AGENT As PropertyValue
|
||||
Friend Overrides Function BaseAuthExists() As Boolean
|
||||
Return Responser.CookiesExists And ACheck(HH_IG_APP_ID.Value) And ACheck(HH_CSRF_TOKEN.Value)
|
||||
@@ -125,99 +128,147 @@ Namespace API.Instagram
|
||||
End If
|
||||
End Sub
|
||||
#Region "HH_IG_WWW_CLAIM"
|
||||
<PropertyOption(ControlText:="ig-www-claim update interval", IsAuth:=True, LeftOffset:=150), PXML, ControlNumber(10), PClonable, HiddenControl>
|
||||
<PropertyOption(ControlText:="ig-www-claim update interval", IsAuth:=True, LeftOffset:=150), PXML, PClonable, HiddenControl>
|
||||
Private ReadOnly Property HH_IG_WWW_CLAIM_UPDATE_INTERVAL As PropertyValue
|
||||
<PropertyOption(ControlText:="ig-www-claim: always 0", ControlToolTip:="Keep token value always = 0", IsAuth:=True),
|
||||
PXML, ControlNumber(11), PClonable, HiddenControl>
|
||||
PXML, PClonable, HiddenControl>
|
||||
Friend ReadOnly Property HH_IG_WWW_CLAIM_ALWAYS_ZERO As PropertyValue
|
||||
<PropertyOption(ControlText:="ig-www-claim: reset each session", ControlToolTip:="Set 'x-ig-www-claim' to '0' before each session", IsAuth:=True),
|
||||
PXML, ControlNumber(12), PClonable, HiddenControl>
|
||||
PXML, PClonable, HiddenControl>
|
||||
Friend ReadOnly Property HH_IG_WWW_CLAIM_RESET_EACH_SESSION As PropertyValue
|
||||
<PropertyOption(ControlText:="ig-www-claim: reset each target", ControlToolTip:="Set 'x-ig-www-claim' to '0' before each target", IsAuth:=True),
|
||||
PXML, ControlNumber(13), PClonable, HiddenControl>
|
||||
PXML, PClonable, HiddenControl>
|
||||
Friend ReadOnly Property HH_IG_WWW_CLAIM_RESET_EACH_TARGET As PropertyValue
|
||||
<PropertyOption(ControlText:="ig-www-claim: use in requests", IsAuth:=True), PXML, ControlNumber(14), PClonable, HiddenControl>
|
||||
<PropertyOption(ControlText:="ig-www-claim: use in requests", IsAuth:=True), PXML, PClonable, HiddenControl>
|
||||
Friend ReadOnly Property HH_IG_WWW_CLAIM_USE As PropertyValue
|
||||
<PropertyOption(ControlText:="ig-www-claim: use default algorithm to update", IsAuth:=True), PXML, ControlNumber(15), PClonable, HiddenControl>
|
||||
<PropertyOption(ControlText:="ig-www-claim: use default algorithm to update", IsAuth:=True), PXML, PClonable, HiddenControl>
|
||||
Friend ReadOnly Property HH_IG_WWW_CLAIM_USE_DEFAULT_ALGO As PropertyValue
|
||||
<Provider(NameOf(HH_IG_WWW_CLAIM_UPDATE_INTERVAL), FieldsChecker:=True)>
|
||||
Private ReadOnly Property TokenUpdateIntervalProvider As IFormatProvider
|
||||
#End Region
|
||||
<PropertyOption(ControlText:="Use GraphQL to download", IsAuth:=True), PXML, ControlNumber(16), PClonable>
|
||||
<PropertyOption(ControlText:="Use GraphQL to download", IsAuth:=True), PXML, PClonable>
|
||||
Friend ReadOnly Property USE_GQL As PropertyValue
|
||||
#End Region
|
||||
#Region "Download properties"
|
||||
<PropertyOption(ControlText:="DownDetector",
|
||||
ControlToolTip:="Use 'DownDetector' to determine if the site is accessible. -1 to disable." & vbCr &
|
||||
"The value represents the average number of error reports over the last 4 hours"),
|
||||
PClonable, PXML, ControlNumber(17)>
|
||||
Private ReadOnly Property DownDetectorValue As PropertyValue
|
||||
<Provider(NameOf(DownDetectorValue), FieldsChecker:=True)>
|
||||
Private ReadOnly Property DownDetectorValueProvider As IFormatProvider
|
||||
<PropertyOption(ControlText:="Add 'DownDetector' information to the log."), PClonable, PXML, ControlNumber(18), HiddenControl>
|
||||
Private ReadOnly Property DownDetectorValueAddToLog As PropertyValue
|
||||
#Region "Download data"
|
||||
<PropertyOption(ControlText:="Download timeline", Category:=CAT_DOWN), PXML, PClonable>
|
||||
Friend ReadOnly Property DownloadTimeline As PropertyValue
|
||||
<PXML> Private ReadOnly Property DownloadTimeline_Def As PropertyValue
|
||||
<PropertyOption(ControlText:="Download reels", Category:=CAT_DOWN), PXML, PClonable>
|
||||
Friend ReadOnly Property DownloadReels As PropertyValue
|
||||
<PXML> Private ReadOnly Property DownloadReels_Def As PropertyValue
|
||||
<PropertyOption(ControlText:="Download stories", Category:=CAT_DOWN), PXML, PClonable>
|
||||
Friend ReadOnly Property DownloadStories As PropertyValue
|
||||
<PXML> Private ReadOnly Property DownloadStories_Def As PropertyValue
|
||||
<PropertyOption(ControlText:="Download stories: user", Category:=CAT_DOWN), PXML, PClonable>
|
||||
Friend ReadOnly Property DownloadStoriesUser As PropertyValue
|
||||
<PXML> Private ReadOnly Property DownloadStoriesUser_Def As PropertyValue
|
||||
<PropertyOption(ControlText:="Download tagged posts", Category:=CAT_DOWN), PXML, PClonable>
|
||||
Friend ReadOnly Property DownloadTagged As PropertyValue
|
||||
<PXML> Private ReadOnly Property DownloadTagged_Def As PropertyValue
|
||||
#End Region
|
||||
#Region "Timers"
|
||||
Friend Const TimersUrgentTip As String = vbCr & "It is highly recommended not to change the default value."
|
||||
<PropertyOption(ControlText:="Request timer (any)",
|
||||
ControlToolTip:="The timer (in milliseconds) that SCrawler should wait before executing the next request." &
|
||||
vbCr & "The default value is 1'000." & vbCr & "The minimum value is 0." & TimersUrgentTip, AllowNull:=False, Category:=DN.CAT_Timers),
|
||||
PXML, ControlNumber(19), PClonable>
|
||||
PXML, PClonable>
|
||||
Friend ReadOnly Property RequestsWaitTimer_Any As PropertyValue
|
||||
<Provider(NameOf(RequestsWaitTimer_Any), FieldsChecker:=True)>
|
||||
Private ReadOnly Property RequestsWaitTimer_AnyProvider As IFormatProvider
|
||||
<PropertyOption(ControlText:="Request timer",
|
||||
ControlToolTip:="The time value (in milliseconds) that the program will wait before processing the next 'Request time counter' request." &
|
||||
vbCr & "The default value is 1'000." & vbCr & "The minimum value is 100." & TimersUrgentTip,
|
||||
AllowNull:=False, Category:=DN.CAT_Timers), PXML, ControlNumber(20), PClonable>
|
||||
AllowNull:=False, Category:=DN.CAT_Timers), PXML, PClonable>
|
||||
Friend ReadOnly Property RequestsWaitTimer As PropertyValue
|
||||
<Provider(NameOf(RequestsWaitTimer), FieldsChecker:=True)>
|
||||
Private ReadOnly Property RequestsWaitTimerProvider As IFormatProvider
|
||||
<PropertyOption(ControlText:="Request timer counter",
|
||||
ControlToolTip:="How many requests will be sent to Instagram before the program waits 'Request timer'." &
|
||||
vbCr & "The default value is 1." & vbCr & "The minimum value is 1." & TimersUrgentTip,
|
||||
AllowNull:=False, LeftOffset:=120, Category:=DN.CAT_Timers), PXML, ControlNumber(21), PClonable>
|
||||
AllowNull:=False, LeftOffset:=120, Category:=DN.CAT_Timers), PXML, PClonable>
|
||||
Friend ReadOnly Property RequestsWaitTimerTaskCount As PropertyValue
|
||||
<Provider(NameOf(RequestsWaitTimerTaskCount), FieldsChecker:=True)>
|
||||
Private ReadOnly Property RequestsWaitTimerTaskCountProvider As IFormatProvider
|
||||
<PropertyOption(ControlText:="Posts limit timer",
|
||||
ControlToolTip:="The time value (in milliseconds) the program will wait before processing the next request after 195 requests." &
|
||||
vbCr & "The default value is 60'000." & vbCr & "The minimum value is 10'000." & TimersUrgentTip,
|
||||
AllowNull:=False, Category:=DN.CAT_Timers), PXML, ControlNumber(22), PClonable>
|
||||
AllowNull:=False, Category:=DN.CAT_Timers), PXML, PClonable>
|
||||
Friend ReadOnly Property SleepTimerOnPostsLimit As PropertyValue
|
||||
<Provider(NameOf(SleepTimerOnPostsLimit), FieldsChecker:=True)>
|
||||
Private ReadOnly Property SleepTimerOnPostsLimitProvider As IFormatProvider
|
||||
<PropertyOption(ControlText:="Get timeline", ControlToolTip:="Default value for new users", Category:=DN.CAT_UserDefs), PXML, ControlNumber(23), PClonable>
|
||||
#End Region
|
||||
#Region "New user defaults"
|
||||
<PropertyOption(ControlText:="Get timeline", ControlToolTip:="Default value for new users", Category:=DN.CAT_UserDefs), PXML, PClonable>
|
||||
Friend ReadOnly Property GetTimeline As PropertyValue
|
||||
<PropertyOption(ControlText:="Get reels", ControlToolTip:="Default value for new users", Category:=DN.CAT_UserDefs), PXML, ControlNumber(24), PClonable>
|
||||
<PropertyOption(ControlText:="From timeline", ControlToolTip:="Default value for new users", Category:=CAT_UserDefs_VIDEO), PXML, PClonable>
|
||||
Friend ReadOnly Property GetTimeline_VideoPic As PropertyValue
|
||||
<PropertyOption(ControlText:="Get reels", ControlToolTip:="Default value for new users", Category:=DN.CAT_UserDefs), PXML, PClonable>
|
||||
Friend ReadOnly Property GetReels As PropertyValue
|
||||
<PropertyOption(ControlText:="Get stories", ControlToolTip:="Default value for new users", Category:=DN.CAT_UserDefs), PXML, ControlNumber(25), PClonable>
|
||||
<PropertyOption(ControlText:="From reels", ControlToolTip:="Default value for new users", Category:=CAT_UserDefs_VIDEO), PXML, PClonable>
|
||||
Friend ReadOnly Property GetReels_VideoPic As PropertyValue
|
||||
<PropertyOption(ControlText:="Get stories", ControlToolTip:="Default value for new users", Category:=DN.CAT_UserDefs), PXML, PClonable>
|
||||
Friend ReadOnly Property GetStories As PropertyValue
|
||||
<PropertyOption(ControlText:="Get stories: user", ControlToolTip:="Default value for new users", Category:=DN.CAT_UserDefs), PXML, ControlNumber(26), PClonable>
|
||||
<PropertyOption(ControlText:="From stories", ControlToolTip:="Default value for new users", Category:=CAT_UserDefs_VIDEO), PXML, PClonable>
|
||||
Friend ReadOnly Property GetStories_VideoPic As PropertyValue
|
||||
<PropertyOption(ControlText:="Get stories: user", ControlToolTip:="Default value for new users", Category:=DN.CAT_UserDefs), PXML, PClonable>
|
||||
Friend ReadOnly Property GetStoriesUser As PropertyValue
|
||||
<PropertyOption(ControlText:="Get tagged photos", ControlToolTip:="Default value for new users", Category:=DN.CAT_UserDefs), PXML, ControlNumber(27), PClonable>
|
||||
<PropertyOption(ControlText:="From stories: user", ControlToolTip:="Default value for new users", Category:=CAT_UserDefs_VIDEO), PXML, PClonable>
|
||||
Friend ReadOnly Property GetStoriesUser_VideoPic As PropertyValue
|
||||
<PropertyOption(ControlText:="Get tagged posts", ControlToolTip:="Default value for new users", Category:=DN.CAT_UserDefs), PXML, PClonable>
|
||||
Friend ReadOnly Property GetTagged As PropertyValue
|
||||
<PropertyOption(ControlText:="From tagged posts", ControlToolTip:="Default value for new users", Category:=CAT_UserDefs_VIDEO), PXML, PClonable>
|
||||
Friend ReadOnly Property GetTagged_VideoPic As PropertyValue
|
||||
<PropertyOption(ControlText:="From saved posts", ControlToolTip:="Default value for new users", Category:=CAT_UserDefs_VIDEO), PXML, PClonable>
|
||||
Friend ReadOnly Property GetSavedPosts_VideoPic As PropertyValue
|
||||
<PropertyOption(ControlText:="Place the extracted image into the video folder", ControlToolTip:="Default value for new users", Category:=CAT_UserDefs_VIDEO), PXML, PClonable>
|
||||
Friend ReadOnly Property PutImageVideoFolder As PropertyValue
|
||||
#End Region
|
||||
#Region "Errors"
|
||||
Private Const ErrorsDefault As String = "572"
|
||||
<PropertyOption(ControlText:="Skip errors",
|
||||
ControlToolTip:="Skip the following errors (comma separated)." & vbCr &
|
||||
"Facing these errors will not disable the download, but will add a simple line to the log.", Category:=CAT_ERRORS),
|
||||
PClonable, PXML>
|
||||
Private ReadOnly Property SkipErrors As PropertyValue
|
||||
<PropertyOption(ControlText:="Add skipped errors to the log", Category:=CAT_ERRORS), PClonable, PXML>
|
||||
Private ReadOnly Property SkipErrors_AddToLog As PropertyValue
|
||||
<PropertyOption(ControlText:="Skip errors (exclude)",
|
||||
ControlToolTip:="Exclude the following errors from being added to the log (comma separated)", Category:=CAT_ERRORS), PClonable, PXML>
|
||||
Private ReadOnly Property SkipErrors_AddToLog_Silent As PropertyValue
|
||||
Friend ReadOnly Property ErrorSpecialHandling(ByVal ErrCode As Integer) As Boolean
|
||||
Get
|
||||
With CStr(SkipErrors.Value) : Return Not .IsEmptyString AndAlso .Contains(ErrCode) : End With
|
||||
End Get
|
||||
End Property
|
||||
Friend ReadOnly Property ErrorSpecialHandling_AddToLog(ByVal ErrCode As Integer) As Boolean
|
||||
Get
|
||||
With CStr(SkipErrors_AddToLog_Silent.Value)
|
||||
Return CBool(SkipErrors_AddToLog.Value) AndAlso (.IsEmptyString OrElse Not .Contains(ErrCode))
|
||||
End With
|
||||
End Get
|
||||
End Property
|
||||
<PropertyOption(ControlText:="Ignore stories downloading errors (560)",
|
||||
ControlToolTip:="If checked, error 560 will be skipped and the download will continue. Otherwise, the download will be interrupted.",
|
||||
Category:=CAT_ERRORS), PClonable, PXML>
|
||||
Friend ReadOnly Property IgnoreStoriesDownloadingErrors As PropertyValue
|
||||
#End Region
|
||||
#Region "Other params"
|
||||
<PropertyOption(ControlText:="DownDetector",
|
||||
ControlToolTip:="Use 'DownDetector' to determine if the site is accessible. -1 to disable." & vbCr &
|
||||
"The value represents the average number of error reports over the last 4 hours"),
|
||||
PClonable, PXML>
|
||||
Private ReadOnly Property DownDetectorValue As PropertyValue
|
||||
<Provider(NameOf(DownDetectorValue), FieldsChecker:=True)>
|
||||
Private ReadOnly Property DownDetectorValueProvider As IFormatProvider
|
||||
<PropertyOption(ControlText:="Add 'DownDetector' information to the log."), PClonable, PXML, HiddenControl>
|
||||
Private ReadOnly Property DownDetectorValueAddToLog 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(27), PClonable>
|
||||
"-1 to disable"), PXML, PClonable>
|
||||
Friend ReadOnly Property TaggedNotifyLimit As PropertyValue
|
||||
<Provider(NameOf(TaggedNotifyLimit), FieldsChecker:=True)>
|
||||
Private ReadOnly Property TaggedNotifyLimitProvider As IFormatProvider
|
||||
#End Region
|
||||
#Region "Download ready"
|
||||
<PropertyOption(ControlText:="Download timeline", ControlToolTip:="Download timeline", Category:=CAT_DOWN), PXML, ControlNumber(10), PClonable>
|
||||
Friend ReadOnly Property DownloadTimeline As PropertyValue
|
||||
<PXML> Private ReadOnly Property DownloadTimeline_Def As PropertyValue
|
||||
<PropertyOption(ControlText:="Download reels", ControlToolTip:="Download reels", Category:=CAT_DOWN), PXML, ControlNumber(11), PClonable>
|
||||
Friend ReadOnly Property DownloadReels As PropertyValue
|
||||
<PXML> Private ReadOnly Property DownloadReels_Def As PropertyValue
|
||||
<PropertyOption(ControlText:="Download stories", ControlToolTip:="Download stories", Category:=CAT_DOWN), PXML, ControlNumber(12), PClonable>
|
||||
Friend ReadOnly Property DownloadStories As PropertyValue
|
||||
<PXML> Private ReadOnly Property DownloadStories_Def As PropertyValue
|
||||
<PropertyOption(ControlText:="Download stories: user", ControlToolTip:="Download stories (user)", Category:=CAT_DOWN), PXML, ControlNumber(13), PClonable>
|
||||
Friend ReadOnly Property DownloadStoriesUser As PropertyValue
|
||||
<PXML> Private ReadOnly Property DownloadStoriesUser_Def As PropertyValue
|
||||
<PropertyOption(ControlText:="Download tagged", ControlToolTip:="Download tagged posts", Category:=CAT_DOWN), PXML, ControlNumber(14), PClonable>
|
||||
Friend ReadOnly Property DownloadTagged As PropertyValue
|
||||
<PXML> Private ReadOnly Property DownloadTagged_Def As PropertyValue
|
||||
#End Region
|
||||
#Region "429 bypass"
|
||||
<PXML("InstagramDownloadingErrorDate")>
|
||||
@@ -251,8 +302,40 @@ Namespace API.Instagram
|
||||
End Get
|
||||
End Property
|
||||
Private Const LastDownloadDateResetInterval As Integer = 60
|
||||
Private TooManyRequestsReadyForCatch As Boolean = True
|
||||
Friend Function GetWaitDate() As Date
|
||||
With DownloadingErrorDate
|
||||
If ACheck(Of Date)(.Value) Then
|
||||
Return CDate(.Value).AddMinutes(If(LastApplyingValue, 10))
|
||||
Else
|
||||
Return Now
|
||||
End If
|
||||
End With
|
||||
End Function
|
||||
Friend Sub TooManyRequests(ByVal Catched As Boolean)
|
||||
With DownloadingErrorDate
|
||||
If Catched Then
|
||||
If Not ACheck(Of Date)(.Value) Then
|
||||
.Value = Now
|
||||
If TooManyRequestsReadyForCatch Then
|
||||
LastApplyingValue = If(LastApplyingValue, 0) + 10
|
||||
TooManyRequestsReadyForCatch = False
|
||||
MyMainLOG = $"Instagram downloading error: too many requests. Try again after {If(LastApplyingValue, 10)} minutes..."
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
.Value = Nothing
|
||||
LastApplyingValue = Nothing
|
||||
TooManyRequestsReadyForCatch = True
|
||||
End If
|
||||
End With
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "LastRequestsCount, Label"
|
||||
<PXML> Private ReadOnly Property LastDownloadDate As PropertyValue
|
||||
<PXML> Private ReadOnly Property LastRequestsCount As PropertyValue
|
||||
<PropertyOption(IsInformationLabel:=True)>
|
||||
Private ReadOnly Property LastRequestsCountLabel As PropertyValue
|
||||
Private ReadOnly MyLastRequests As Dictionary(Of Date, Integer)
|
||||
Private ReadOnly Property MyLastRequestsDate As Date
|
||||
Get
|
||||
@@ -306,36 +389,6 @@ Namespace API.Instagram
|
||||
ErrorsDescriber.Execute(EDP.SendToLog, ex, "[SiteSettings.Instagram.RefreshMyLastRequests]")
|
||||
End Try
|
||||
End Sub
|
||||
<PropertyOption(IsInformationLabel:=True), ControlNumber(100)>
|
||||
Private ReadOnly Property LastRequestsCountLabel As PropertyValue
|
||||
Private TooManyRequestsReadyForCatch As Boolean = True
|
||||
Friend Function GetWaitDate() As Date
|
||||
With DownloadingErrorDate
|
||||
If ACheck(Of Date)(.Value) Then
|
||||
Return CDate(.Value).AddMinutes(If(LastApplyingValue, 10))
|
||||
Else
|
||||
Return Now
|
||||
End If
|
||||
End With
|
||||
End Function
|
||||
Friend Sub TooManyRequests(ByVal Catched As Boolean)
|
||||
With DownloadingErrorDate
|
||||
If Catched Then
|
||||
If Not ACheck(Of Date)(.Value) Then
|
||||
.Value = Now
|
||||
If TooManyRequestsReadyForCatch Then
|
||||
LastApplyingValue = If(LastApplyingValue, 0) + 10
|
||||
TooManyRequestsReadyForCatch = False
|
||||
MyMainLOG = $"Instagram downloading error: too many requests. Try again after {If(LastApplyingValue, 10)} minutes..."
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
.Value = Nothing
|
||||
LastApplyingValue = Nothing
|
||||
TooManyRequestsReadyForCatch = True
|
||||
End If
|
||||
End With
|
||||
End Sub
|
||||
#End Region
|
||||
#End Region
|
||||
#Region "Initializer"
|
||||
@@ -412,9 +465,6 @@ Namespace API.Instagram
|
||||
DownloadTagged = New PropertyValue(False)
|
||||
DownloadTagged_Def = New PropertyValue(DownloadTagged.Value, GetType(Boolean))
|
||||
|
||||
DownDetectorValue = New PropertyValue(20)
|
||||
DownDetectorValueProvider = New TimersChecker(-1)
|
||||
DownDetectorValueAddToLog = New PropertyValue(False)
|
||||
RequestsWaitTimer_Any = New PropertyValue(1000)
|
||||
RequestsWaitTimer_AnyProvider = New TimersChecker(0)
|
||||
RequestsWaitTimer = New PropertyValue(1000)
|
||||
@@ -425,10 +475,26 @@ Namespace API.Instagram
|
||||
SleepTimerOnPostsLimitProvider = New TimersChecker(10000)
|
||||
|
||||
GetTimeline = New PropertyValue(True)
|
||||
GetTimeline_VideoPic = New PropertyValue(True)
|
||||
GetReels = New PropertyValue(False)
|
||||
GetReels_VideoPic = New PropertyValue(True)
|
||||
GetStories = New PropertyValue(False)
|
||||
GetStories_VideoPic = New PropertyValue(True)
|
||||
GetStoriesUser = New PropertyValue(False)
|
||||
GetStoriesUser_VideoPic = New PropertyValue(True)
|
||||
GetTagged = New PropertyValue(False)
|
||||
GetTagged_VideoPic = New PropertyValue(True)
|
||||
GetSavedPosts_VideoPic = New PropertyValue(True)
|
||||
PutImageVideoFolder = New PropertyValue(False)
|
||||
|
||||
SkipErrors = New PropertyValue(ErrorsDefault)
|
||||
SkipErrors_AddToLog = New PropertyValue(True)
|
||||
SkipErrors_AddToLog_Silent = New PropertyValue(String.Empty, GetType(String))
|
||||
IgnoreStoriesDownloadingErrors = New PropertyValue(False)
|
||||
|
||||
DownDetectorValue = New PropertyValue(20)
|
||||
DownDetectorValueProvider = New TimersChecker(-1)
|
||||
DownDetectorValueAddToLog = New PropertyValue(False)
|
||||
TaggedNotifyLimit = New PropertyValue(200)
|
||||
TaggedNotifyLimitProvider = New TaggedNotifyLimitChecker
|
||||
|
||||
@@ -443,11 +509,12 @@ Namespace API.Instagram
|
||||
UserRegex = RParams.DMS(String.Format(UserRegexDefaultPattern, "instagram.com/"), 1)
|
||||
ImageVideoContains = "instagram.com"
|
||||
End Sub
|
||||
Private Const SettingsVersionCurrent As Integer = 2
|
||||
Friend Overrides Sub EndInit()
|
||||
Try : MyLastRequests.Add(LastDownloadDate.Value, LastRequestsCount.Value) : Catch : End Try
|
||||
If Not CBool(HH_IG_WWW_CLAIM_USE.Value) Then Responser.Headers.Remove(Header_IG_WWW_CLAIM)
|
||||
If CInt(SettingsVersion.Value) < 2 Then
|
||||
SettingsVersion.Value = 2
|
||||
If CInt(SettingsVersion.Value) < SettingsVersionCurrent Then
|
||||
SettingsVersion.Value = SettingsVersionCurrent
|
||||
HH_IG_WWW_CLAIM_UPDATE_INTERVAL.Value = 120
|
||||
HH_IG_WWW_CLAIM_ALWAYS_ZERO.Value = False
|
||||
HH_IG_WWW_CLAIM_RESET_EACH_SESSION.Value = True
|
||||
|
||||
@@ -194,7 +194,7 @@ Namespace API.Instagram
|
||||
With j({"data", "xdt_api__v1__feed__reels_media__connection", "edges"})
|
||||
If .ListExists Then
|
||||
ProgressPre.ChangeMax(.Count)
|
||||
For Each n As EContainer In .Self : GetStoriesData_ParseSingleHighlight(n("node"), i, False, Token) : Next
|
||||
For Each n As EContainer In .Self : GetStoriesData_ParseSingleHighlight(n("node"), i, False, Token, Sections.Stories) : Next
|
||||
End If
|
||||
End With
|
||||
End If
|
||||
@@ -217,7 +217,7 @@ Namespace API.Instagram
|
||||
Using j As EContainer = JsonDocument.Parse(r)
|
||||
If j.ListExists Then
|
||||
Dim i% = -1
|
||||
GetStoriesData_ParseSingleHighlight(j.ItemF({"data", "xdt_api__v1__feed__reels_media", "reels_media", 0}), i, True, Token)
|
||||
GetStoriesData_ParseSingleHighlight(j.ItemF({"data", "xdt_api__v1__feed__reels_media", "reels_media", 0}), i, True, Token, Sections.UserStories)
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
|
||||
@@ -26,12 +26,20 @@ Namespace API.Instagram
|
||||
Private Const Name_LastCursor As String = "LastCursor"
|
||||
Private Const Name_FirstLoadingDone As String = "FirstLoadingDone"
|
||||
Private Const Name_GetTimeline As String = "GetTimeline"
|
||||
Private Const Name_GetTimeline_VideoPic As String = "GetTimeline_VideoPic"
|
||||
Private Const Name_GetReels As String = "GetReels"
|
||||
Private Const Name_GetReels_VideoPic As String = "GetReels_VideoPic"
|
||||
Private Const Name_GetStories As String = "GetStories"
|
||||
Private Const Name_GetStories_VideoPic As String = "GetStories_VideoPic"
|
||||
Private Const Name_GetStoriesUser As String = "GetStoriesUser"
|
||||
Private Const Name_GetStoriesUser_VideoPic As String = "GetStoriesUser_VideoPic"
|
||||
Private Const Name_GetTagged As String = "GetTaggedData"
|
||||
Private Const Name_GetTagged_VideoPic As String = "GetTaggedData_VideoPic"
|
||||
Private Const Name_PutImageVideoFolder As String = "PutImageVideoFolder"
|
||||
Private Const Name_TaggedChecked As String = "TaggedChecked"
|
||||
Private Const Name_NameTrue As String = "NameTrue"
|
||||
Private Const Name_ForceUpdateUserName As String = "ForceUpdateUserName"
|
||||
Private Const Name_ForceUpdateUserInfo As String = "ForceUpdateUserInfo"
|
||||
#End Region
|
||||
#Region "Declarations"
|
||||
Protected Structure PostKV : Implements IEContainerProvider
|
||||
@@ -79,17 +87,41 @@ Namespace API.Instagram
|
||||
Private LastCursor As String = String.Empty
|
||||
Private FirstLoadingDone As Boolean = False
|
||||
Friend Property GetTimeline As Boolean = True
|
||||
Friend Property GetTimeline_VideoPic As Boolean = True
|
||||
Friend Property GetReels As Boolean = False
|
||||
Friend Property GetReels_VideoPic As Boolean = True
|
||||
Friend Property GetStories As Boolean
|
||||
Friend Property GetStories_VideoPic As Boolean = True
|
||||
Friend Property GetStoriesUser As Boolean
|
||||
Friend Property GetStoriesUser_VideoPic As Boolean = True
|
||||
Friend Property GetTaggedData As Boolean
|
||||
Friend Property GetTaggedData_VideoPic As Boolean = True
|
||||
Friend Property PutImageVideoFolder As Boolean = False
|
||||
Private Function ExtractImageFrom(ByVal Section As Sections) As Boolean
|
||||
Select Case Section
|
||||
Case Sections.Timeline : Return GetTimeline_VideoPic
|
||||
Case Sections.Reels : Return GetReels_VideoPic
|
||||
Case Sections.Tagged : Return GetTaggedData_VideoPic
|
||||
Case Sections.Stories : Return GetStories_VideoPic
|
||||
Case Sections.UserStories : Return GetStoriesUser_VideoPic
|
||||
Case Sections.SavedPosts
|
||||
Try
|
||||
If Not HOST Is Nothing AndAlso HOST.Key = InstagramSiteKey Then Return MySiteSettings.GetSavedPosts_VideoPic.Value
|
||||
Catch
|
||||
End Try
|
||||
Return True
|
||||
Case Else : Return True
|
||||
End Select
|
||||
End Function
|
||||
Protected _NameTrue As String = String.Empty
|
||||
Friend ReadOnly Property NameTrue As String
|
||||
Friend ReadOnly Property NameTrue(Optional ByVal Exact As Boolean = False) As String
|
||||
Get
|
||||
Return _NameTrue.IfNullOrEmpty(Name)
|
||||
Return If(Exact, _NameTrue, _NameTrue.IfNullOrEmpty(Name))
|
||||
End Get
|
||||
End Property
|
||||
Private UserNameRequested As Boolean = False
|
||||
Friend Property ForceUpdateUserName As Boolean = False
|
||||
Friend Property ForceUpdateUserInfo As Boolean = False
|
||||
#End Region
|
||||
#Region "Loader"
|
||||
Protected Overrides Sub LoadUserInformation_OptionalFields(ByRef Container As XmlFile, ByVal Loading As Boolean)
|
||||
@@ -98,22 +130,38 @@ Namespace API.Instagram
|
||||
LastCursor = .Value(Name_LastCursor)
|
||||
FirstLoadingDone = .Value(Name_FirstLoadingDone).FromXML(Of Boolean)(False)
|
||||
GetTimeline = .Value(Name_GetTimeline).FromXML(Of Boolean)(CBool(MySiteSettings.GetTimeline.Value))
|
||||
GetReels = .Value(Name_GetReels).FromXML(Of Boolean)(MySiteSettings.GetReels.Value)
|
||||
GetTimeline_VideoPic = .Value(Name_GetTimeline_VideoPic).FromXML(Of Boolean)(CBool(MySiteSettings.GetTimeline_VideoPic.Value))
|
||||
GetReels = .Value(Name_GetReels).FromXML(Of Boolean)(CBool(MySiteSettings.GetReels.Value))
|
||||
GetReels_VideoPic = .Value(Name_GetReels_VideoPic).FromXML(Of Boolean)(CBool(MySiteSettings.GetReels_VideoPic.Value))
|
||||
GetStories = .Value(Name_GetStories).FromXML(Of Boolean)(CBool(MySiteSettings.GetStories.Value))
|
||||
GetStoriesUser = .Value(Name_GetStoriesUser).FromXML(Of Boolean)(MySiteSettings.GetStoriesUser.Value)
|
||||
GetStories_VideoPic = .Value(Name_GetStories_VideoPic).FromXML(Of Boolean)(CBool(MySiteSettings.GetStories_VideoPic.Value))
|
||||
GetStoriesUser = .Value(Name_GetStoriesUser).FromXML(Of Boolean)(CBool(MySiteSettings.GetStoriesUser.Value))
|
||||
GetStoriesUser_VideoPic = .Value(Name_GetStoriesUser_VideoPic).FromXML(Of Boolean)(CBool(MySiteSettings.GetStoriesUser_VideoPic.Value))
|
||||
PutImageVideoFolder = .Value(Name_PutImageVideoFolder).FromXML(Of Boolean)(CBool(MySiteSettings.PutImageVideoFolder.Value))
|
||||
GetTaggedData = .Value(Name_GetTagged).FromXML(Of Boolean)(CBool(MySiteSettings.GetTagged.Value))
|
||||
GetTaggedData_VideoPic = .Value(Name_GetTagged_VideoPic).FromXML(Of Boolean)(CBool(MySiteSettings.GetTagged_VideoPic.Value))
|
||||
TaggedChecked = .Value(Name_TaggedChecked).FromXML(Of Boolean)(False)
|
||||
_NameTrue = .Value(Name_NameTrue)
|
||||
ForceUpdateUserName = .Value(Name_ForceUpdateUserName).FromXML(Of Boolean)(False)
|
||||
ForceUpdateUserInfo = .Value(Name_ForceUpdateUserInfo).FromXML(Of Boolean)(False)
|
||||
Else
|
||||
.Add(Name_LastCursor, LastCursor)
|
||||
.Add(Name_FirstLoadingDone, FirstLoadingDone.BoolToInteger)
|
||||
.Add(Name_GetTimeline, GetTimeline.BoolToInteger)
|
||||
.Add(Name_GetTimeline_VideoPic, GetTimeline_VideoPic.BoolToInteger)
|
||||
.Add(Name_GetReels, GetReels.BoolToInteger)
|
||||
.Add(Name_GetReels_VideoPic, GetReels_VideoPic.BoolToInteger)
|
||||
.Add(Name_GetStories, GetStories.BoolToInteger)
|
||||
.Add(Name_GetStories_VideoPic, GetStories_VideoPic.BoolToInteger)
|
||||
.Add(Name_GetStoriesUser, GetStoriesUser.BoolToInteger)
|
||||
.Add(Name_GetStoriesUser_VideoPic, GetStoriesUser_VideoPic.BoolToInteger)
|
||||
.Add(Name_GetTagged, GetTaggedData.BoolToInteger)
|
||||
.Add(Name_GetTagged_VideoPic, GetTaggedData_VideoPic.BoolToInteger)
|
||||
.Add(Name_PutImageVideoFolder, PutImageVideoFolder.BoolToInteger)
|
||||
.Add(Name_TaggedChecked, TaggedChecked.BoolToInteger)
|
||||
.Add(Name_NameTrue, _NameTrue)
|
||||
.Add(Name_ForceUpdateUserName, ForceUpdateUserName.BoolToInteger)
|
||||
.Add(Name_ForceUpdateUserInfo, ForceUpdateUserInfo.BoolToInteger)
|
||||
End If
|
||||
End With
|
||||
End Sub
|
||||
@@ -130,6 +178,18 @@ Namespace API.Instagram
|
||||
GetStories = .GetStories
|
||||
GetStoriesUser = .GetStoriesUser
|
||||
GetTaggedData = .GetTagged
|
||||
|
||||
GetTimeline_VideoPic = .GetTimeline_VideoPic
|
||||
GetReels_VideoPic = .GetReels_VideoPic
|
||||
GetStories_VideoPic = .GetStories_VideoPic
|
||||
GetStoriesUser_VideoPic = .GetStoriesUser_VideoPic
|
||||
GetTaggedData_VideoPic = .GetTagged_VideoPic
|
||||
|
||||
PutImageVideoFolder = .PutImageVideoFolder
|
||||
|
||||
_NameTrue = .UserName
|
||||
ForceUpdateUserName = .ForceUpdateUserName
|
||||
ForceUpdateUserInfo = .ForceUpdateUserInfo
|
||||
End With
|
||||
End If
|
||||
End Sub
|
||||
@@ -147,15 +207,32 @@ Namespace API.Instagram
|
||||
Private WwwClaimUse As Boolean = True
|
||||
Private E560Thrown As Boolean = False
|
||||
Friend Err5xx As Integer = -1
|
||||
Private _ErrHandling As Integer = -1
|
||||
Private Property ErrHandling As Integer
|
||||
Get
|
||||
Return _ErrHandling
|
||||
End Get
|
||||
Set(ByVal ErrCode As Integer)
|
||||
_ErrHandling = ErrCode
|
||||
Err5xx = ErrCode
|
||||
End Set
|
||||
End Property
|
||||
Private ErrHandlingLog As Boolean = True
|
||||
Private ErrHandlingSection As Sections = Sections.Timeline
|
||||
Private Const ErrHandlingValue As Integer = 100
|
||||
Private Const ErrHandlingValueStories As Integer = 150
|
||||
Private Class ExitException : Inherits Exception
|
||||
Friend Property Is560 As Boolean = False
|
||||
Friend Property IsTokens As Boolean = False
|
||||
Friend Property TokensData As String = String.Empty
|
||||
Friend Shared Sub Throw560(ByRef Source As UserData)
|
||||
If Not Source.E560Thrown Then
|
||||
MyMainLOG = $"{Source.ToStringForLog}: ({IIf(Source.Err5xx > 0, Source.Err5xx, 560)}) Download skipped until next session"
|
||||
Source.E560Thrown = True
|
||||
End If
|
||||
With Source
|
||||
If Not .E560Thrown Then
|
||||
If .ErrHandling = -1 Or .ErrHandlingLog Then _
|
||||
MyMainLOG = $"{ .ToStringForLog}: ({IIf(.Err5xx > 0, .Err5xx, 560)}) Download skipped {If(.ErrHandling = -1, "until next session", $"({ .ErrHandlingSection})")}"
|
||||
.E560Thrown = True
|
||||
End If
|
||||
End With
|
||||
Throw New ExitException With {.Is560 = True}
|
||||
End Sub
|
||||
Friend Shared Sub ThrowTokens(ByRef Source As UserData, ByVal Data As String)
|
||||
@@ -316,6 +393,9 @@ Namespace API.Instagram
|
||||
Dim errorFound As Boolean = False
|
||||
Try
|
||||
Err5xx = -1
|
||||
ErrHandling = -1
|
||||
ErrHandlingLog = True
|
||||
ErrHandlingSection = Sections.Timeline
|
||||
_Limit = If(DownloadTopCount, -1)
|
||||
_TotalPostsParsed = 0
|
||||
LoadSavePostsKV(True)
|
||||
@@ -583,11 +663,13 @@ Namespace API.Instagram
|
||||
'Check environment
|
||||
If Not IsSavedPosts Then
|
||||
If ID.IsEmptyString Then GetUserData()
|
||||
If ID.IsEmptyString Then Throw New Plugin.ExitException("can't get user ID")
|
||||
If ID.IsEmptyString Then UserExists = False : _ForceSaveUserInfoOnException = True : Throw New Plugin.ExitException("can't get user ID")
|
||||
If _UseGQL And Cursor.IsEmptyString And Not Section = Sections.SavedPosts Then
|
||||
If Not ValidateBaseTokens() Then GetPageTokens()
|
||||
If Not ValidateBaseTokens(TokensErrData) Then ValidateBaseTokens_Error(TokensErrData)
|
||||
End If
|
||||
If ForceUpdateUserName Then GetUserNameById()
|
||||
If ForceUpdateUserInfo Then GetUserData()
|
||||
End If
|
||||
|
||||
'Create query
|
||||
@@ -670,6 +752,14 @@ Namespace API.Instagram
|
||||
Select Case Section
|
||||
Case Sections.Timeline
|
||||
With n
|
||||
If If(n("user")?.Count, 0) = 0 And Cursor.IsEmptyString Then
|
||||
If Not UserNameRequested Then
|
||||
ForceUpdateUserName = True
|
||||
Continue Do
|
||||
Else
|
||||
UserExists = False
|
||||
End If
|
||||
End If
|
||||
HasNextPage = .Value("more_available").FromXML(Of Boolean)(False)
|
||||
EndCursor = .Value("next_max_id")
|
||||
If If(.Item("items")?.Count, 0) > 0 Then
|
||||
@@ -753,6 +843,11 @@ NextPageBlock:
|
||||
Throw eex
|
||||
Catch ex As Exception
|
||||
dValue = ProcessException(ex, Token, $"data downloading error [{URL}]",, Section, False)
|
||||
If dValue = ErrHandlingValue Then
|
||||
ExitException.Throw560(Me)
|
||||
ElseIf dValue = ErrHandlingValueStories Then
|
||||
Exit Sub
|
||||
End If
|
||||
End Try
|
||||
Loop
|
||||
Catch jsonNull2 As JsonDocumentException When jsonNull2.State = WebDocumentEventArgs.States.Error And
|
||||
@@ -809,7 +904,7 @@ NextPageBlock:
|
||||
With j("items")
|
||||
For Each jj In .Self
|
||||
before = _TempMediaList.Count
|
||||
ObtainMedia(jj, PostsToReparse(i).ID, specFolder)
|
||||
ObtainMedia(jj, PostsToReparse(i).ID, specFolder,,,,,,, IIf(IsTagged, Sections.Tagged, Sections.Timeline))
|
||||
If Not before = _TempMediaList.Count Then _TotalPostsParsed += 1
|
||||
If _Limit > 0 And _TotalPostsParsed >= _Limit Then Throw New ExitException
|
||||
Next
|
||||
@@ -911,7 +1006,7 @@ NextPageBlock:
|
||||
End Select
|
||||
End If
|
||||
before = _TempMediaList.Count
|
||||
ObtainMedia(.Self, PostIDKV.ID, SpecFolder, PostDate,, PostOriginUrl, State, Attempts)
|
||||
ObtainMedia(.Self, PostIDKV.ID, SpecFolder, PostDate,, PostOriginUrl, State, Attempts,, Section)
|
||||
If Not before = _TempMediaList.Count Then _TotalPostsParsed += 1
|
||||
If _Limit > 0 And _TotalPostsParsed >= _Limit Then Return False
|
||||
End If
|
||||
@@ -950,6 +1045,7 @@ NextPageBlock:
|
||||
Protected ObtainMedia_SizeFuncVid As Func(Of EContainer, Sizes) = Nothing
|
||||
Protected ObtainMedia_SizeFuncPic As Func(Of EContainer, Sizes) = Nothing
|
||||
Protected ObtainMedia_AllowAbstract As Boolean = False
|
||||
Private Const ObtainMedia_NoSection As Integer = -10
|
||||
Protected Sub ObtainMedia_SetReelsFunc()
|
||||
ObtainMedia_SizeFuncPic = Function(ByVal ss As EContainer) As Sizes
|
||||
If ss.Value("url").IsEmptyString Then
|
||||
@@ -971,7 +1067,8 @@ NextPageBlock:
|
||||
Optional ByVal DateObj As String = Nothing, Optional ByVal InitialType As Integer = -1,
|
||||
Optional ByVal PostOriginUrl As String = Nothing,
|
||||
Optional ByVal State As UStates = UStates.Unknown, Optional ByVal Attempts As Integer = 0,
|
||||
Optional ByVal TryExtractImage As Boolean = False)
|
||||
Optional ByVal TryExtractImage As Boolean = False,
|
||||
Optional ByVal Section As Sections = ObtainMedia_NoSection)
|
||||
Try
|
||||
Dim maxSize As Func(Of EContainer, Integer) = Function(ByVal _ss As EContainer) As Integer
|
||||
Dim w% = AConvert(Of Integer)(_ss.Value("width"), 0)
|
||||
@@ -1018,6 +1115,12 @@ NextPageBlock:
|
||||
If TryExtractImage Then
|
||||
t = 1
|
||||
abstractDecision = True
|
||||
If Not SpecialFolder.IsEmptyString AndAlso PutImageVideoFolder Then
|
||||
Dim endsAbs As Boolean = SpecialFolder.EndsWith("*")
|
||||
If endsAbs Then SpecialFolder = SpecialFolder.TrimEnd("*")
|
||||
If Not SpecialFolder.IsEmptyString Then SpecialFolder = $"{SpecialFolder.TrimEnd("\")}\{VideoFolderName}{IIf(Not endsAbs, "*", String.Empty)}"
|
||||
If endsAbs Then SpecialFolder &= "*"
|
||||
End If
|
||||
ElseIf t = -1 And InitialType = 8 And ObtainMedia_AllowAbstract Then
|
||||
If n.Contains(vid) Then
|
||||
t = 2
|
||||
@@ -1064,7 +1167,8 @@ NextPageBlock:
|
||||
End If
|
||||
End With
|
||||
End If
|
||||
If Not TryExtractImage Then ObtainMedia(n, PostID, SpecialFolder, DateObj, InitialType, PostOriginUrl, State, Attempts, True)
|
||||
If Not TryExtractImage And Not Section = ObtainMedia_NoSection And ExtractImageFrom(Section) Then _
|
||||
ObtainMedia(n, PostID, SpecialFolder, DateObj, InitialType, PostOriginUrl, State, Attempts, True, Section)
|
||||
Case 8 'gallery
|
||||
DateObj = mDate(n)
|
||||
With n("carousel_media").XmlIfNothing
|
||||
@@ -1084,6 +1188,7 @@ NextPageBlock:
|
||||
#Region "GetUserId, GetUserName"
|
||||
Private Sub GetUserData()
|
||||
Dim __idFound As Boolean = False
|
||||
If ForceUpdateUserInfo Then ForceUpdateUserInfo = False : _ForceSaveUserInfo = True
|
||||
Try
|
||||
ChangeResponserMode(False)
|
||||
UpdateRequestNumber()
|
||||
@@ -1102,6 +1207,7 @@ NextPageBlock:
|
||||
If Not eUrl.IsEmptyString AndAlso (descr.IsEmptyString OrElse Not descr.Contains(eUrl)) Then descr.StringAppendLine(eUrl)
|
||||
UserDescriptionUpdate(descr)
|
||||
Dim f As New SFile With {.Path = DownloadContentDefault_GetRootDir(), .Name = "ProfilePicture", .Extension = "jpg"}
|
||||
f = SFile.IndexReindex(f)
|
||||
If Not f.Exists Then
|
||||
Dim profilePicture$ = .Value("profile_pic_url_hd")
|
||||
If profilePicture.IsEmptyString OrElse Not GetWebFile(profilePicture, f, EDP.ReturnValue) Then
|
||||
@@ -1114,6 +1220,7 @@ NextPageBlock:
|
||||
End Using
|
||||
End If
|
||||
Catch ex As Exception
|
||||
UserExists = False
|
||||
If Not __idFound Then
|
||||
If Responser.StatusCode = HttpStatusCode.NotFound Or Responser.StatusCode = HttpStatusCode.BadRequest Then
|
||||
Throw ex
|
||||
@@ -1127,6 +1234,7 @@ NextPageBlock:
|
||||
End Sub
|
||||
Private Function GetUserNameById() As Boolean
|
||||
UserNameRequested = True
|
||||
If ForceUpdateUserName Then ForceUpdateUserName = False : _ForceSaveUserInfo = True
|
||||
Try
|
||||
If Not ID.IsEmptyString Then
|
||||
UpdateRequestNumber()
|
||||
@@ -1143,7 +1251,7 @@ NextPageBlock:
|
||||
Dim descr$ = $"Username changed from '{oldName}' to '{newName}' ({Now.ToStringDate(ADateTime.Formats.BaseDateTime)})!"
|
||||
descr.StringAppendLine(UserDescription)
|
||||
UserDescription = descr
|
||||
_ForceSaveUserData = True
|
||||
_ForceSaveUserInfo = True
|
||||
End If
|
||||
Return True
|
||||
End If
|
||||
@@ -1165,6 +1273,7 @@ NextPageBlock:
|
||||
Dim qStr$, r$
|
||||
Dim i% = -1
|
||||
Dim jj As EContainer
|
||||
Dim section As Sections = IIf(GetUserStory, Sections.UserStories, Sections.Stories)
|
||||
ThrowAny(Token)
|
||||
If StoriesList.ListExists Or GetUserStory Then
|
||||
If Not GetUserStory Then tmpList = StoriesList.Take(5)
|
||||
@@ -1181,7 +1290,7 @@ NextPageBlock:
|
||||
Using j As EContainer = JsonDocument.Parse(r).XmlIfNothing
|
||||
If j.Contains("reels") Then
|
||||
ProgressPre.ChangeMax(j("reels").Count)
|
||||
For Each jj In j("reels") : GetStoriesData_ParseSingleHighlight(jj, i, GetUserStory, Token) : Next
|
||||
For Each jj In j("reels") : GetStoriesData_ParseSingleHighlight(jj, i, GetUserStory, Token, section) : Next
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
@@ -1189,7 +1298,8 @@ NextPageBlock:
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub GetStoriesData_ParseSingleHighlight(ByVal Node As EContainer, ByRef Index As Integer, ByVal GetUserStory As Boolean, ByVal Token As CancellationToken)
|
||||
Private Sub GetStoriesData_ParseSingleHighlight(ByVal Node As EContainer, ByRef Index As Integer, ByVal GetUserStory As Boolean,
|
||||
ByVal Token As CancellationToken, Optional ByVal Section As Sections = Sections.Stories)
|
||||
If Not Node Is Nothing Then
|
||||
With Node
|
||||
ProgressPre.Perform()
|
||||
@@ -1210,7 +1320,7 @@ NextPageBlock:
|
||||
pid = storyID & s.Value("id")
|
||||
If Not _TempPostsList.Contains(pid) Then
|
||||
ThrowAny(Token)
|
||||
ObtainMedia(s, pid, sFolder)
|
||||
ObtainMedia(s, pid, sFolder,,,,,,, Section)
|
||||
_TempPostsList.Add(pid)
|
||||
End If
|
||||
Next
|
||||
@@ -1220,20 +1330,15 @@ NextPageBlock:
|
||||
End If
|
||||
End Sub
|
||||
Private Function GetStoriesList() As List(Of String)
|
||||
Try
|
||||
UpdateRequestNumber()
|
||||
Dim r$ = Responser.GetResponse($"https://i.instagram.com/api/v1/highlights/{ID}/highlights_tray/",, EDP.ThrowException)
|
||||
If Not r.IsEmptyString Then
|
||||
Dim ee As New ErrorsDescriber(EDP.ReturnValue) With {.DeclaredMessage = New MMessage($"{ToStringForLog()}:")}
|
||||
Using j As EContainer = JsonDocument.Parse(r, ee).XmlIfNothing()("tray").XmlIfNothing
|
||||
If j.Count > 0 Then Return j.Select(Function(jj) jj.Value("id").Replace("highlight:", String.Empty)).ListIfNothing
|
||||
End Using
|
||||
End If
|
||||
Return Nothing
|
||||
Catch ex As Exception
|
||||
DownloadingException(ex, "API.Instagram.GetStoriesList", False, Sections.Stories)
|
||||
Return Nothing
|
||||
End Try
|
||||
UpdateRequestNumber()
|
||||
Dim r$ = Responser.GetResponse($"https://i.instagram.com/api/v1/highlights/{ID}/highlights_tray/",, EDP.ThrowException)
|
||||
If Not r.IsEmptyString Then
|
||||
Dim ee As New ErrorsDescriber(EDP.ReturnValue) With {.DeclaredMessage = New MMessage($"{ToStringForLog()}:")}
|
||||
Using j As EContainer = JsonDocument.Parse(r, ee).XmlIfNothing()("tray").XmlIfNothing
|
||||
If j.Count > 0 Then Return j.Select(Function(jj) jj.Value("id").Replace("highlight:", String.Empty)).ListIfNothing
|
||||
End Using
|
||||
End If
|
||||
Return Nothing
|
||||
End Function
|
||||
#End Region
|
||||
#Region "Download content"
|
||||
@@ -1279,11 +1384,26 @@ NextPageBlock:
|
||||
MyMainLOG = $"Number of requests before error 429: {RequestsCount}"
|
||||
Return 1
|
||||
ElseIf Responser.StatusCode = 560 Or Responser.StatusCode = HttpStatusCode.InternalServerError Then '560, 500
|
||||
MySiteSettings.SkipUntilNextSession = True
|
||||
Err5xx = Responser.StatusCode
|
||||
If Responser.StatusCode = 560 And s = Sections.Stories And MySiteSettings.IgnoreStoriesDownloadingErrors Then
|
||||
MyMainLOG = $"{ToStringForLog()}: Stories downloading skipped (560)"
|
||||
Return ErrHandlingValueStories
|
||||
Else
|
||||
MySiteSettings.SkipUntilNextSession = True
|
||||
Err5xx = Responser.StatusCode
|
||||
End If
|
||||
ElseIf Responser.StatusCode = -1 And Responser.Status = -1 Then
|
||||
MySiteSettings.SkipUntilNextSession = True
|
||||
Err5xx = Responser.StatusCode
|
||||
ElseIf MySiteSettings.ErrorSpecialHandling(Responser.StatusCode) Then
|
||||
ErrHandlingLog = MySiteSettings.ErrorSpecialHandling_AddToLog(Responser.StatusCode)
|
||||
ErrHandling = Responser.StatusCode
|
||||
ErrHandlingSection = s
|
||||
Return ErrHandlingValue
|
||||
ElseIf MySiteSettings.ErrorSpecialHandling(Responser.Status) Then
|
||||
ErrHandlingLog = MySiteSettings.ErrorSpecialHandling_AddToLog(Responser.Status)
|
||||
ErrHandling = Responser.Status
|
||||
ErrHandlingSection = s
|
||||
Return ErrHandlingValue
|
||||
Else
|
||||
MyMainLOG = $"Something is wrong. Your credentials may have expired [{CInt(Responser.StatusCode)}/{CInt(Responser.Status)}]: {ToString()} [{s}]"
|
||||
DisableSection(s)
|
||||
|
||||
@@ -15,6 +15,7 @@ Namespace API.Mastodon
|
||||
<PSetting(Address:=SettingAddress.None)> Friend Overrides Property DownloadModelSearch As Boolean
|
||||
<PSetting(Address:=SettingAddress.None)> Friend Overrides Property DownloadModelForceApply As Boolean
|
||||
<PSetting(Address:=SettingAddress.None)> Friend Overrides Property DownloadModelLikes As Boolean
|
||||
<PSetting(Address:=SettingAddress.None)> Friend Overrides Property UserName As String
|
||||
Friend Sub New(ByVal s As SiteSettings)
|
||||
MyBase.New(s)
|
||||
End Sub
|
||||
|
||||
@@ -11,6 +11,11 @@ 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)
|
||||
Friend ReadOnly FilesSources As New List(Of Object()) From {
|
||||
{{"source", "source"}},
|
||||
{{"files", "source", "url"}},
|
||||
{{"files", "full", "url"}}
|
||||
}
|
||||
Friend Property Rules As DynamicRulesEnv
|
||||
End Module
|
||||
End Namespace
|
||||
@@ -3,4 +3,5 @@ https://github.com/riley-access-labs/onlyfans-dynamic-rules-1/blob/main/dynamicR
|
||||
https://github.com/riley-access-labs/onlyfans-dynamic-rules-1/blob/patch-1/dynamicRules.json
|
||||
https://github.com/DATAHOARDERS/dynamic-rules/blob/main/onlyfans.json
|
||||
https://github.com/DIGITALCRIMINAL/dynamic-rules/blob/main/onlyfans.json
|
||||
https://github.com/deviint/onlyfans-dynamic-rules/blob/main/dynamicRules.json
|
||||
https://github.com/deviint/onlyfans-dynamic-rules/blob/main/dynamicRules.json
|
||||
https://github.com/rafa-9/dynamic-rules/blob/main/rules.json
|
||||
@@ -1,9 +1,11 @@
|
||||
https://github.com/datawhores/onlyfans-dynamic-rules/blob/main/dynamicRules.json
|
||||
https://github.com/datawhores/onlyfans-dynamic-rules/blob/main/rules.json
|
||||
https://github.com/riley-access-labs/onlyfans-dynamic-rules-1/blob/main/dynamicRules.json
|
||||
https://github.com/riley-access-labs/onlyfans-dynamic-rules-1/blob/patch-1/dynamicRules.json
|
||||
https://github.com/DATAHOARDERS/dynamic-rules/blob/main/onlyfans.json
|
||||
https://github.com/DIGITALCRIMINAL/dynamic-rules/blob/main/onlyfans.json
|
||||
https://github.com/deviint/onlyfans-dynamic-rules/blob/main/dynamicRules.json
|
||||
https://github.com/rafa-9/dynamic-rules/blob/main/rules.json
|
||||
|
||||
https://github.com/SneakyOvis/onlyfans-dynamic-rules/blob/main/rules.json
|
||||
https://github.com/Growik/onlyfans-dynamic-rules/blob/main/rules.json
|
||||
@@ -353,7 +353,7 @@ Namespace API.OnlyFans
|
||||
#Region "Load, Save"
|
||||
Private Function GetTextLines(ByVal Input As String) As List(Of String)
|
||||
If Not Input.IsEmptyString Then
|
||||
Return ListAddList(Nothing, Input.StringTrim.Split(vbCrLf), LAP.NotContainsOnly, EDP.ReturnValue,
|
||||
Return ListAddList(Nothing, Input.StringTrim.Split(vbLf), LAP.NotContainsOnly, EDP.ReturnValue,
|
||||
CType(Function(inp$) inp.StringTrim, Func(Of Object, Object)))
|
||||
Else
|
||||
Return New List(Of String)
|
||||
@@ -546,6 +546,13 @@ Namespace API.OnlyFans
|
||||
If Not LoadListOnly Then LastUpdateTimeRules = Now : updated = True
|
||||
textLocal = GetTextLines(DynamicRulesFile.GetText(OFError))
|
||||
If textLocal.ListExists Then
|
||||
If Not LoadListOnly And Count > 0 Then
|
||||
For i = 0 To Count - 1
|
||||
rule = Rules(i)
|
||||
rule.Exists = False
|
||||
Rules(i) = rule
|
||||
Next
|
||||
End If
|
||||
For Each url$ In textLocal
|
||||
url = url.StringTrim
|
||||
If Not url.IsEmptyString Then
|
||||
@@ -563,6 +570,7 @@ Namespace API.OnlyFans
|
||||
|
||||
If Not LoadListOnly Then
|
||||
If i >= 0 And rule.Valid And Not rule.UrlLatestCommit.IsEmptyString Then
|
||||
rule.Exists = True
|
||||
r = Responser.GetResponse(rule.UrlLatestCommit)
|
||||
If Not r.IsEmptyString Then
|
||||
e = JsonDocument.Parse(r, OFError)
|
||||
@@ -578,6 +586,7 @@ Namespace API.OnlyFans
|
||||
End If
|
||||
Rules(i) = rule
|
||||
End If
|
||||
If Rules.RemoveAll(Function(rr) Not rr.Exists) > 0 Then updated = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
@@ -19,6 +19,7 @@ Namespace API.OnlyFans
|
||||
#Region "Declarations"
|
||||
#Region "Categories"
|
||||
Private Const CAT_OFS As String = "OF-Scraper support"
|
||||
Private Const CAT_ERRORS As String = "Errors"
|
||||
#End Region
|
||||
#Region "Options"
|
||||
<PropertyOption(ControlText:="Download timeline", ControlToolTip:="Download user timeline", Category:=DN.CAT_UserDefs), PXML, PClonable>
|
||||
@@ -73,6 +74,19 @@ Namespace API.OnlyFans
|
||||
Return String.Empty
|
||||
End Function
|
||||
#End Region
|
||||
#Region "Errors"
|
||||
<PClonable, PXML("UpdateRules401")> Private ReadOnly Property UpdateRules401_XML As PropertyValue
|
||||
<PropertyOption(ControlText:="Try updating rules when you get a 401 error", Category:=CAT_ERRORS), HiddenControl>
|
||||
Friend ReadOnly Property UpdateRules401 As PropertyValue
|
||||
Get
|
||||
If Not DefaultInstance Is Nothing Then
|
||||
Return DirectCast(DefaultInstance, SiteSettings).UpdateRules401_XML
|
||||
Else
|
||||
Return UpdateRules401_XML
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
#Region "OFScraper"
|
||||
<PClonable, PXML("OFScraperPath")> Private ReadOnly Property OFScraperPath_XML As PropertyValue
|
||||
<PropertyOption(ControlText:="OF-Scraper path", ControlToolTip:="The path to the 'ofscraper.exe'", Category:=CAT_OFS)>
|
||||
@@ -178,6 +192,8 @@ Namespace API.OnlyFans
|
||||
KeyModeDefault_XML = New PropertyValue(KeyModeDefault_Default)
|
||||
Keydb_Api_XML = New PropertyValue(String.Empty, GetType(String))
|
||||
|
||||
UpdateRules401_XML = New PropertyValue(False)
|
||||
|
||||
UserRegex = RParams.DMS(String.Format(UserRegexDefaultPattern, "onlyfans.com/"), 1, EDP.ReturnValue)
|
||||
UrlPatternUser = "https://onlyfans.com/{0}"
|
||||
ImageVideoContains = "onlyfans.com"
|
||||
|
||||
@@ -394,6 +394,14 @@ Namespace API.OnlyFans
|
||||
Loop While Not _complete
|
||||
End Sub
|
||||
#End Region
|
||||
Private Function GetMediaURL(ByVal m As EContainer) As String
|
||||
Dim v$
|
||||
For Each node As Object() In FilesSources
|
||||
v = If(m.ItemF(node)?.Value, String.Empty)
|
||||
If Not v.IsEmptyString Then Return v
|
||||
Next
|
||||
Return String.Empty
|
||||
End Function
|
||||
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, Optional ByVal PostUserID As String = Nothing,
|
||||
@@ -405,11 +413,14 @@ Namespace API.OnlyFans
|
||||
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
|
||||
postUrl = GetMediaURL(m)
|
||||
'If IsHL Then
|
||||
' 'postUrl = m.Value({"files", "source"}, "url")
|
||||
' postUrl = GetMediaURL(m)
|
||||
'Else
|
||||
' 'postUrl = m.Value({"source"}, "source").IfNullOrEmpty(m.Value("full"))
|
||||
' postUrl = GetMediaURL(m)
|
||||
'End If
|
||||
postUrlBase = String.Empty
|
||||
Select Case m.Value("type")
|
||||
Case "photo" : t = UTypes.Picture : ext = "jpg"
|
||||
@@ -749,14 +760,20 @@ Namespace API.OnlyFans
|
||||
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 '400
|
||||
If Responser.StatusCode = Net.HttpStatusCode.BadRequest Or
|
||||
(Responser.StatusCode = Net.HttpStatusCode.Unauthorized And CBool(MySettings.UpdateRules401.Value)) Then '400, [401]
|
||||
If Not _DownloadingException_AuthFileUpdate AndAlso Rules.Update(True) Then
|
||||
_DownloadingException_AuthFileUpdate = True
|
||||
Return 2
|
||||
Else
|
||||
MySettings.SessionAborted = True
|
||||
MyMainLOG = $"{ToStringForLog()} [{CInt(Responser.StatusCode)}]: OnlyFans credentials expired"
|
||||
Return 1
|
||||
If Responser.StatusCode = Net.HttpStatusCode.BadRequest Then
|
||||
Return 1
|
||||
Else
|
||||
MyMainLOG = $"{ToStringForLog()}: Rules updated (401)"
|
||||
Return 3
|
||||
End If
|
||||
End If
|
||||
ElseIf Responser.StatusCode = Net.HttpStatusCode.NotFound Then '404
|
||||
UserExists = False
|
||||
|
||||
@@ -21,6 +21,6 @@ Namespace API.Reddit
|
||||
Friend ReadOnly UrlBasePattern As RParams = RParams.DM("(?<=/)([^/]+?\.[\w]{3,4})(?=(\?|\Z))", 0)
|
||||
Friend ReadOnly VideoRegEx As RParams = RParams.DM("http.{0,1}://[^" & Chr(34) & "]+?mp4", 0)
|
||||
Private ReadOnly EUR_PROVIDER As New ANumbers(ANumbers.Cultures.EUR)
|
||||
Friend ReadOnly UnixDate32ProviderReddit As New CustomProvider(Function(v, d, p, n, e) ADateTime.ParseUnix32(AConvert(Of Integer)(v, EUR_PROVIDER, v), n, e))
|
||||
Friend ReadOnly UnixDate32ProviderReddit As New CustomProvider(Function(v, d, p, n, e) ADateTime.ParseUnix32(AConvert(Of Double)(v, EUR_PROVIDER, v), n, e))
|
||||
End Module
|
||||
End Namespace
|
||||
@@ -85,7 +85,7 @@ Namespace API.Reddit
|
||||
ApiClientSecret = New PropertyValue(String.Empty, GetType(String))
|
||||
BearerToken = New PropertyValue(token, GetType(String), Sub(v) Responser.Headers.Add(DeclaredNames.Header_Authorization, v))
|
||||
BearerTokenUseCurl = New PropertyValue(True)
|
||||
TokenUpdateInterval = New PropertyValue(60 * 12)
|
||||
TokenUpdateInterval = New PropertyValue(360)
|
||||
TokenUpdateIntervalProvider = New TokenRefreshIntervalProvider
|
||||
BearerTokenDateUpdate = New PropertyValue(Now.AddYears(-1))
|
||||
UseTokenForTimelines = New PropertyValue(False)
|
||||
@@ -101,6 +101,14 @@ Namespace API.Reddit
|
||||
ImageVideoContains = "reddit.com"
|
||||
UserRegex = RParams.DM("[htps:/]{7,8}.*?reddit.com/([user]{1,4})/([^/\?&]+)", 0, RegexReturn.ListByMatch, EDP.ReturnValue)
|
||||
End Sub
|
||||
Private Const SettingsVersionCurrent As Integer = 1
|
||||
Friend Overrides Sub EndInit()
|
||||
If CInt(SettingsVersion.Value) < SettingsVersionCurrent Then
|
||||
SettingsVersion.Value = SettingsVersionCurrent
|
||||
TokenUpdateInterval.Value = 360
|
||||
End If
|
||||
MyBase.EndInit()
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "GetInstance"
|
||||
Friend Overrides Function GetInstance(ByVal What As Download) As IPluginContentProvider
|
||||
|
||||
@@ -15,7 +15,7 @@ Imports PersonalUtilities.Functions.RegularExpressions
|
||||
Imports IG = SCrawler.API.Instagram.SiteSettings
|
||||
Imports DN = SCrawler.API.Base.DeclaredNames
|
||||
Namespace API.ThreadsNet
|
||||
<Manifest("AndyProgram_ThreadsNet"), SeparatedTasks(1)>
|
||||
<Manifest("AndyProgram_ThreadsNet"), SavedPosts, SeparatedTasks(1)>
|
||||
Friend Class SiteSettings : Inherits SiteSettingsBase
|
||||
#Region "Declarations"
|
||||
#Region "Authorization"
|
||||
|
||||
@@ -101,7 +101,12 @@ Namespace API.ThreadsNet
|
||||
Else
|
||||
DefaultParser_SkipPost = AddressOf SkipPost
|
||||
End If
|
||||
DownloadData(String.Empty, Token)
|
||||
If IsSavedPosts Then
|
||||
DefaultParser_ElemNode = {"node", "thread_items", 0, "post"}
|
||||
DownloadSavedPosts(String.Empty, Token)
|
||||
Else
|
||||
DownloadData(String.Empty, Token)
|
||||
End If
|
||||
If _TempMediaList.Count > 0 Then FirstLoadingDone = True : setMaxPostDate.Invoke(_TempMediaList)
|
||||
Catch ex As Exception
|
||||
errorFound = True
|
||||
@@ -116,11 +121,15 @@ Namespace API.ThreadsNet
|
||||
End Sub
|
||||
Private Function IsPinnedPost(ByVal Items As IEnumerable(Of EContainer), ByVal Index As Integer) As Boolean
|
||||
Try
|
||||
If MaxLastDownDate.HasValue Then
|
||||
Dim d As Date? = AConvert(Of Date)(Items(Index).ItemF(DefaultParser_ElemNode_Default).Value("taken_at"), UnixDate32Provider, Nothing)
|
||||
If d.HasValue Then Return d.Value < MaxLastDownDate.Value
|
||||
If IsSavedPosts Then
|
||||
Return False
|
||||
Else
|
||||
If MaxLastDownDate.HasValue Then
|
||||
Dim d As Date? = AConvert(Of Date)(Items(Index).ItemF(DefaultParser_ElemNode_Default).Value("taken_at"), UnixDate32Provider, Nothing)
|
||||
If d.HasValue Then Return d.Value < MaxLastDownDate.Value
|
||||
End If
|
||||
Return Not FirstLoadingDone
|
||||
End If
|
||||
Return Not FirstLoadingDone
|
||||
Catch ex As Exception
|
||||
LogError(ex, "IsPinnedPost")
|
||||
Return Not FirstLoadingDone
|
||||
@@ -141,22 +150,32 @@ Namespace API.ThreadsNet
|
||||
Responser.Headers.Add(IGS.Header_CSRF_TOKEN, csrf)
|
||||
End If
|
||||
End Sub
|
||||
Private Const GQL_Q As String = "https://www.threads.net/api/graphql?lsd={0}&fb_dtsg={1}&doc_id={2}&fb_api_req_friendly_name={3}&server_timestamps=true&variables={4}"
|
||||
Private Const GQL_P_DOC_ID As String = "6371597506283707"
|
||||
Private Const GQL_P_NAME As String = "BarcelonaProfileThreadsTabRefetchableQuery"
|
||||
Private Const GQL_S_DOC_ID_1 As String = "7758166704280174"
|
||||
Private Const GQL_S_NAME_1 As String = "BarcelonaSavedPageViewerQuery"
|
||||
Private Const GQL_S_DOC_ID_2 As String = "8617275414954442"
|
||||
Private Const GQL_S_NAME_2 As String = "BarcelonaSavedPageRefetchableQuery"
|
||||
Private Sub DownloadCheckCredentials()
|
||||
If Not Valid Then
|
||||
Dim idIsNull As Boolean = ID.IsEmptyString
|
||||
UpdateCredentials()
|
||||
If idIsNull And Not ID.IsEmptyString Then _ForceSaveUserInfo = True
|
||||
End If
|
||||
If Not Valid Then DisableDownload() : Throw New Plugin.ExitException("Some credentials are missing")
|
||||
End Sub
|
||||
Private Overloads Sub DownloadData(ByVal Cursor As String, ByVal Token As CancellationToken)
|
||||
Const urlPattern$ = "https://www.threads.net/api/graphql?lsd={0}&variables={1}&doc_id=6371597506283707&fb_api_req_friendly_name=BarcelonaProfileThreadsTabRefetchableQuery&server_timestamps=true&fb_dtsg={2}"
|
||||
Const var_init$ = """userID"":""{0}"""
|
||||
Const var_cursor$ = """after"":""{1}"",""before"":null,""first"":25,""last"":null,""userID"":""{0}"",""__relay_internal__pv__BarcelonaIsLoggedInrelayprovider"":true,""__relay_internal__pv__BarcelonaIsFeedbackHubEnabledrelayprovider"":false"
|
||||
Dim URL$ = String.Empty
|
||||
Try
|
||||
If Not Valid Then
|
||||
Dim idIsNull As Boolean = ID.IsEmptyString
|
||||
UpdateCredentials()
|
||||
If idIsNull And Not ID.IsEmptyString Then _ForceSaveUserInfo = True
|
||||
End If
|
||||
If Not Valid Then DisableDownload() : Throw New Plugin.ExitException("Some credentials are missing")
|
||||
DownloadCheckCredentials()
|
||||
|
||||
Responser.Method = "POST"
|
||||
Responser.Referer = $"https://www.threads.net/@{NameTrue}"
|
||||
Responser.Headers.Add(GQL_HEADER_FB_LSD, Token_lsd)
|
||||
Responser.Headers.Add(GQL_HEADER_FB_FRINDLY_NAME, GQL_P_NAME)
|
||||
|
||||
Dim nextCursor$ = String.Empty
|
||||
Dim dataFound As Boolean = False
|
||||
@@ -169,7 +188,7 @@ Namespace API.ThreadsNet
|
||||
End If
|
||||
vars = SymbolsConverter.ASCII.EncodeSymbolsOnly("{" & vars & "}")
|
||||
|
||||
URL = String.Format(urlPattern, Token_lsd, vars, Token_dtsg_Var)
|
||||
URL = String.Format(GQL_Q, Token_lsd, Token_dtsg_Var, GQL_P_DOC_ID, GQL_P_NAME, vars)
|
||||
|
||||
Using j As EContainer = GetDocument(URL, Token)
|
||||
If j.ListExists Then
|
||||
@@ -189,6 +208,47 @@ Namespace API.ThreadsNet
|
||||
ProcessException(ex, Token, $"data downloading error [{URL}]")
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub DownloadSavedPosts(ByVal Cursor As String, ByVal Token As CancellationToken)
|
||||
Const var_init$ = """__relay_internal__pv__BarcelonaIsLoggedInrelayprovider"":true,""__relay_internal__pv__BarcelonaIsInlineReelsEnabledrelayprovider"":false,""__relay_internal__pv__BarcelonaUseCometVideoPlaybackEnginerelayprovider"":false,""__relay_internal__pv__BarcelonaOptionalCookiesEnabledrelayprovider"":true,""__relay_internal__pv__BarcelonaIsTextFragmentsEnabledForPostCaptionsrelayprovider"":true,""__relay_internal__pv__BarcelonaShouldShowFediverseM075Featuresrelayprovider"":true"
|
||||
Const var_cursor$ = """after"":""{0}"",""first"":25,""__relay_internal__pv__BarcelonaIsLoggedInrelayprovider"":true,""__relay_internal__pv__BarcelonaIsInlineReelsEnabledrelayprovider"":false,""__relay_internal__pv__BarcelonaUseCometVideoPlaybackEnginerelayprovider"":false,""__relay_internal__pv__BarcelonaOptionalCookiesEnabledrelayprovider"":true,""__relay_internal__pv__BarcelonaIsTextFragmentsEnabledForPostCaptionsrelayprovider"":true,""__relay_internal__pv__BarcelonaShouldShowFediverseM075Featuresrelayprovider"":true"
|
||||
Dim URL$ = String.Empty
|
||||
Try
|
||||
DownloadCheckCredentials()
|
||||
|
||||
Responser.Method = "POST"
|
||||
Responser.Referer = "https://www.threads.net/"
|
||||
Responser.Headers.Add(GQL_HEADER_FB_LSD, Token_lsd)
|
||||
Responser.Headers.Add(GQL_HEADER_FB_FRINDLY_NAME, If(Cursor.IsEmptyString, GQL_S_NAME_1, GQL_S_NAME_2))
|
||||
|
||||
Dim nextCursor$ = String.Empty
|
||||
Dim dataFound As Boolean = False
|
||||
|
||||
Dim vars$ = SymbolsConverter.ASCII.EncodeSymbolsOnly("{" & If(Cursor.IsEmptyString, var_init, String.Format(var_cursor, Cursor)) & "}")
|
||||
|
||||
If Cursor.IsEmptyString Then
|
||||
URL = String.Format(GQL_Q, Token_lsd, Token_dtsg_Var, GQL_S_DOC_ID_1, GQL_S_NAME_1, vars)
|
||||
Else
|
||||
URL = String.Format(GQL_Q, Token_lsd, Token_dtsg_Var, GQL_S_DOC_ID_2, GQL_S_NAME_2, vars)
|
||||
End If
|
||||
|
||||
Using j As EContainer = GetDocument(URL, Token)
|
||||
If j.ListExists Then
|
||||
With j({"data", "xdt_viewer", "text_app_saved_media"})
|
||||
If .ListExists Then
|
||||
nextCursor = .Value({"page_info"}, "end_cursor")
|
||||
With .Item({"edges"})
|
||||
If .ListExists Then dataFound = DefaultParser(.Self, Sections.Timeline, Token)
|
||||
End With
|
||||
End If
|
||||
End With
|
||||
End If
|
||||
End Using
|
||||
|
||||
If dataFound And Not nextCursor.IsEmptyString Then DownloadSavedPosts(nextCursor, Token)
|
||||
Catch ex As Exception
|
||||
ProcessException(ex, Token, $"saved posts downloading error [{URL}]")
|
||||
End Try
|
||||
End Sub
|
||||
Private Function GetDocument(ByVal URL As String, ByVal Token As CancellationToken, Optional ByVal Round As Integer = 0) As EContainer
|
||||
Try
|
||||
ThrowAny(Token)
|
||||
@@ -206,7 +266,7 @@ Namespace API.ThreadsNet
|
||||
End Try
|
||||
End Function
|
||||
Private Function UpdateCredentials(Optional ByVal e As ErrorsDescriber = Nothing) As Boolean
|
||||
Dim URL$ = $"https://www.threads.net/@{NameTrue}"
|
||||
Dim URL$ = If(IsSavedPosts, "https://www.threads.net/", $"https://www.threads.net/@{NameTrue}")
|
||||
ResetBaseTokens()
|
||||
Dim headers As New HttpHeaderCollection
|
||||
headers.AddRange(Responser.Headers)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
' but WITHOUT ANY WARRANTY
|
||||
Imports SCrawler.Plugin.Attributes
|
||||
Imports DModels = SCrawler.API.Twitter.UserData.DownloadModels
|
||||
Imports DN = SCrawler.API.Base.DeclaredNames
|
||||
Namespace API.Twitter
|
||||
Friend Class EditorExchangeOptions
|
||||
Private Const DefaultOffset As Integer = 100
|
||||
@@ -46,6 +47,8 @@ Namespace API.Twitter
|
||||
Caption:="Force apply",
|
||||
ToolTip:="Force overrides the default parameters for the first download." & vbCr & "Applies to first download only.", LeftOffset:=DefaultOffset)>
|
||||
Friend Overridable Property DownloadModelForceApply As Boolean = False
|
||||
<PSetting(Address:=SettingAddress.User, Caption:=DN.UserNameChangeCaption, ToolTip:=DN.UserNameChangeToolTip, LeftOffset:=DefaultOffset)>
|
||||
Friend Overridable Property UserName As String = String.Empty
|
||||
Private ReadOnly Property MySettings As Object
|
||||
Friend Sub New(ByVal s As SiteSettings)
|
||||
GifsDownload = s.GifsDownload.Value
|
||||
@@ -80,6 +83,7 @@ Namespace API.Twitter
|
||||
DownloadModelLikes = dm.Contains(DModels.Likes)
|
||||
End If
|
||||
End If
|
||||
UserName = u.NameTrue(True)
|
||||
MySettings = u.HOST.Source
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -31,9 +31,9 @@ Namespace API.Twitter
|
||||
#Region "Declarations"
|
||||
Private Const Label_Community As String = "Community"
|
||||
Private _NameTrue As String = String.Empty
|
||||
Friend Property NameTrue As String
|
||||
Friend Property NameTrue(Optional ByVal Exact As Boolean = False) As String
|
||||
Get
|
||||
Return _NameTrue.IfNullOrEmpty(Name)
|
||||
Return If(Exact, _NameTrue, _NameTrue.IfNullOrEmpty(Name))
|
||||
End Get
|
||||
Set(ByVal NewName As String)
|
||||
_NameTrue = NewName
|
||||
@@ -90,6 +90,7 @@ Namespace API.Twitter
|
||||
GifsPrefix = .GifsPrefix
|
||||
UseMD5Comparison = .UseMD5Comparison
|
||||
RemoveExistingDuplicates = .RemoveExistingDuplicates
|
||||
If RemoveExistingDuplicates Then StartMD5Checked = False
|
||||
DownloadModel = DownloadModels.Undefined
|
||||
DownloadModelForceApply = .DownloadModelForceApply
|
||||
MediaModelAllowNonUserTweets = .MediaModelAllowNonUserTweets
|
||||
@@ -97,6 +98,7 @@ Namespace API.Twitter
|
||||
If .DownloadModelProfile Then DownloadModel += DownloadModels.Profile
|
||||
If .DownloadModelSearch Then DownloadModel += DownloadModels.Search
|
||||
If .DownloadModelLikes Then DownloadModel += DownloadModels.Likes
|
||||
_NameTrue = .UserName
|
||||
End With
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -299,6 +299,24 @@ Namespace API
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
Friend ReadOnly Property ContextDownLimit As ToolStripMenuItem()
|
||||
Get
|
||||
If Count > 0 Then
|
||||
Return Collections.Select(Function(c) DirectCast(c, UserDataBase).BTT_CONTEXT_DOWN_LIMIT).ToArray
|
||||
Else
|
||||
Return New ToolStripMenuItem() {}
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
Friend ReadOnly Property ContextDownDate As ToolStripMenuItem()
|
||||
Get
|
||||
If Count > 0 Then
|
||||
Return Collections.Select(Function(c) DirectCast(c, UserDataBase).BTT_CONTEXT_DOWN_DATE).ToArray
|
||||
Else
|
||||
Return New ToolStripMenuItem() {}
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
Friend ReadOnly Property ContextEdit As ToolStripMenuItem()
|
||||
Get
|
||||
If Count > 0 Then
|
||||
|
||||
@@ -203,7 +203,7 @@ Namespace API.YouTube
|
||||
If IsMusic Or DownloadYTVideos Then
|
||||
maxDate = Nothing
|
||||
LastDownloadDateVideos = nDate(LastDownloadDateVideos)
|
||||
url = $"https://{IIf(IsMusic, "music", "www")}.youtube.com/{IIf(IsMusic Or IsChannelUser, $"{YouTubeFunctions.UserChannelOption}/", "@")}{ID}"
|
||||
url = $"https://{IIf(IsMusic, "music", "www")}.youtube.com/{IIf(IsMusic Or IsChannelUser, $"{YouTubeFunctions.UserChannelOption}/", "@")}{ID}/videos"
|
||||
container = YouTubeFunctions.Parse(url, YTUseCookies, Token, pr, __getMinDate(LastDownloadDateVideos), __maxDate,, True)
|
||||
applySpecFolder.Invoke(IIf(IsMusic, String.Empty, "Videos"), False)
|
||||
If fillList.Invoke(LastDownloadDateVideos, False) Then LastDownloadDateVideos = If(maxDate, Now)
|
||||
@@ -345,6 +345,8 @@ Namespace API.YouTube
|
||||
If resp.Status = Net.WebExceptionStatus.ConnectFailure And Round < 2 Then
|
||||
Thread.Sleep(1000)
|
||||
DownloadCommunity(Cursor, Token, Round + 1)
|
||||
ElseIf resp.StatusCode = Net.HttpStatusCode.NotFound Then
|
||||
MyMainLOG = $"{ToStringForLog()} {errMsg} (not found)"
|
||||
Else
|
||||
Throw resp.ErrorException
|
||||
End If
|
||||
|
||||
BIN
SCrawler/Content/Pictures/FindPic_16.png
Normal file
|
After Width: | Height: | Size: 264 B |
@@ -230,6 +230,8 @@ Namespace DownloadObjects
|
||||
PlansWaiter.Invoke(PlanDownloading)
|
||||
ElseIf .DownloadReady Then
|
||||
.Download()
|
||||
If Settings.AutomationScript.Use AndAlso Not Settings.AutomationScript.Value.IsEmptyString AndAlso
|
||||
(Not .IsManual Or Not Settings.AutomationScript_ExcludeManual) Then ExecuteCommand(Settings.AutomationScript)
|
||||
End If
|
||||
End With
|
||||
End Sub
|
||||
|
||||
@@ -190,7 +190,6 @@ Namespace DownloadObjects
|
||||
DataList.Clear()
|
||||
End Sub
|
||||
Private Sub DownloadFeedForm_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown
|
||||
'If e.KeyCode = Keys.F5 Then RefillList() : e.Handled = True
|
||||
If Not e.Handled Then
|
||||
Dim b As Boolean = False
|
||||
If e = GoToButton Then
|
||||
@@ -207,6 +206,8 @@ Namespace DownloadObjects
|
||||
Case Keys.Down, Keys.Right, Keys.PageDown : changePage = 1
|
||||
Case Keys.Home : gotoHome = True
|
||||
Case Keys.End : gotoHome = False
|
||||
Case Keys.Escape : If Settings.FeedEscToClose Then Close()
|
||||
Case Else : If e.Control And e.KeyCode = Keys.W Then Close()
|
||||
End Select
|
||||
If changePage.HasValue Then
|
||||
b = True
|
||||
@@ -541,6 +542,7 @@ Namespace DownloadObjects
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Move/Copy"
|
||||
Private Sub BTT_COPY_MOVE_TO_Click(sender As Object, e As EventArgs) Handles BTT_COPY_TO.Click, BTT_MOVE_TO.Click
|
||||
MoveCopyFiles(True, sender, Nothing, Nothing)
|
||||
End Sub
|
||||
@@ -549,7 +551,7 @@ Namespace DownloadObjects
|
||||
End Sub
|
||||
Private Function MoveCopyFiles(ByVal IsInternal As Boolean, ByVal Sender As Object, ByVal MCTOptions As FeedMoveCopyTo,
|
||||
ByVal FeedMediaData As FeedMedia, Optional ByVal GetChecked As Boolean = True) As Boolean
|
||||
Const MsgTitle$ = "Copy/Move checked files"
|
||||
Dim MsgTitle$ = "Copy/Move checked files"
|
||||
Try
|
||||
Dim isCopy As Boolean = Not Sender Is Nothing AndAlso (Sender Is BTT_COPY_TO OrElse Sender Is BTT_COPY_SPEC_TO)
|
||||
Dim moveOptions As FeedMoveCopyTo = Nothing
|
||||
@@ -573,6 +575,7 @@ Namespace DownloadObjects
|
||||
Dim sesFilesReplaced As Boolean = False
|
||||
Dim filesReplace As New List(Of KeyValuePair(Of SFile, SFile))
|
||||
Dim updateFileLocations As Boolean = Settings.FeedMoveCopyUpdateFileLocationOnMove
|
||||
Dim postUrl$
|
||||
Dim result As Boolean = False
|
||||
|
||||
If FeedMediaData Is Nothing Then
|
||||
@@ -589,7 +592,18 @@ Namespace DownloadObjects
|
||||
data = {FeedMediaData.Media}
|
||||
data_files = {FeedMediaData.File}
|
||||
End If
|
||||
|
||||
MsgTitle = $"{IIf(isCopy, "Copy", "Move")} {IIf(Not FeedMediaData Is Nothing Or GetChecked, "checked", "ALL")} files"
|
||||
|
||||
If data.ListExists Then
|
||||
|
||||
If (FeedMediaData Is Nothing And Not GetChecked And Not isCopy) AndAlso
|
||||
MsgBoxE({$"YOU ARE TRYING TO MOVE ALL FEED/SESSION DATA.{vbCr}EVERY FILE WILL BE MOVED, NOT JUST THE SELECTED ONES.", MsgTitle},
|
||||
vbExclamation,,, {"Process", "Cancel"}) = 1 Then
|
||||
ShowOperationCanceledMsg(MsgTitle)
|
||||
Return False
|
||||
End If
|
||||
|
||||
If MCTOptions.Destination.IsEmptyString Then
|
||||
Using f As New FeedCopyToForm(data_files, isCopy)
|
||||
f.ShowDialog()
|
||||
@@ -677,7 +691,11 @@ Namespace DownloadObjects
|
||||
mm_data = mm.Data
|
||||
mm_data.File = df
|
||||
__isSavedPosts = mm.IsSavedPosts And moveOptions.ReplaceUserProfile_Profile Is Nothing
|
||||
mm = New UserMediaD(mm_data, If(moveOptions.ReplaceUserProfile_Profile, mm.User), mm.Session, mm.Date) With {.IsSavedPosts = __isSavedPosts}
|
||||
postUrl = mm.PostUrl(True)
|
||||
mm = New UserMediaD(mm_data, If(moveOptions.ReplaceUserProfile_Profile, mm.User), mm.Session, mm.Date) With {
|
||||
.IsSavedPosts = __isSavedPosts,
|
||||
.PostUrl = postUrl
|
||||
}
|
||||
If __isSavedPosts Then mm.UserInfo = __user
|
||||
Downloader.Files(indx) = mm
|
||||
downloaderFilesUpdated = True
|
||||
@@ -708,7 +726,11 @@ Namespace DownloadObjects
|
||||
mm_data = mm.Data
|
||||
mm_data.File = df
|
||||
__isSavedPosts = mm.IsSavedPosts And moveOptions.ReplaceUserProfile_Profile Is Nothing
|
||||
mm = New UserMediaD(mm_data, If(moveOptions.ReplaceUserProfile_Profile, mm.User), mm.Session, mm.Date) With {.IsSavedPosts = __isSavedPosts}
|
||||
postUrl = mm.PostUrl(True)
|
||||
mm = New UserMediaD(mm_data, If(moveOptions.ReplaceUserProfile_Profile, mm.User), mm.Session, mm.Date) With {
|
||||
.IsSavedPosts = __isSavedPosts,
|
||||
.PostUrl = postUrl
|
||||
}
|
||||
If __isSavedPosts Then mm.UserInfo = __user
|
||||
sessionData(indx) = mm
|
||||
sesFilesReplaced = True
|
||||
@@ -748,6 +770,7 @@ Namespace DownloadObjects
|
||||
Settings.Feeds.UpdateWhereDataReplaced()
|
||||
End Try
|
||||
End Function
|
||||
#End Region
|
||||
#Region "Load fav, spec"
|
||||
Private Sub BTT_LOAD_FAV_Click(sender As Object, e As EventArgs) Handles BTT_LOAD_FAV.Click
|
||||
FeedChangeMode(FeedModes.Special, {FeedSpecial.FavoriteName})
|
||||
@@ -1291,32 +1314,36 @@ Namespace DownloadObjects
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub RefillAfterDelete()
|
||||
With MyRange
|
||||
Dim indx% = .CurrentIndex
|
||||
Dim indxChanged As Boolean = False
|
||||
.HandlersSuspended = True
|
||||
.Update()
|
||||
If .Count > 0 Then
|
||||
If indx.ValueBetween(0, .Count - 1) Then
|
||||
.CurrentIndex = indx
|
||||
ElseIf (indx - 1).ValueBetween(0, .Count - 1) Then
|
||||
.CurrentIndex = indx - 1
|
||||
indxChanged = True
|
||||
Else
|
||||
.CurrentIndex = .Count - 1
|
||||
indxChanged = Not indx = .CurrentIndex
|
||||
Try
|
||||
With MyRange
|
||||
Dim indx% = .CurrentIndex
|
||||
Dim indxChanged As Boolean = False
|
||||
.HandlersSuspended = True
|
||||
.Update()
|
||||
If .Count > 0 Then
|
||||
If indx.ValueBetween(0, .Count - 1) Then
|
||||
.CurrentIndex = indx
|
||||
ElseIf (indx - 1).ValueBetween(0, .Count - 1) Then
|
||||
.CurrentIndex = indx - 1
|
||||
indxChanged = True
|
||||
Else
|
||||
.CurrentIndex = .Count - 1
|
||||
indxChanged = Not indx = .CurrentIndex
|
||||
End If
|
||||
.UpdateControls()
|
||||
.HandlersSuspended = False
|
||||
If Not indxChanged Then LatestScrollValueDisabled = True
|
||||
DirectCast(MyRange.Switcher, RangeSwitcher(Of UserMediaD)).PerformIndexChanged()
|
||||
If Not indxChanged Then
|
||||
LatestScrollValueDisabled = False
|
||||
SetScrollValue(True)
|
||||
End If
|
||||
End If
|
||||
.UpdateControls()
|
||||
.HandlersSuspended = False
|
||||
If Not indxChanged Then LatestScrollValueDisabled = True
|
||||
DirectCast(MyRange.Switcher, RangeSwitcher(Of UserMediaD)).PerformIndexChanged()
|
||||
If Not indxChanged Then
|
||||
LatestScrollValueDisabled = False
|
||||
SetScrollValue(True)
|
||||
End If
|
||||
End If
|
||||
.HandlersSuspended = False
|
||||
End With
|
||||
End With
|
||||
Catch ex As Exception
|
||||
ErrorsDescriber.Execute(EDP.SendToLog, ex, "[DownloadFeedForm.RefillAfterDelete]")
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Range"
|
||||
|
||||
25
SCrawler/Download/Feed/FeedMedia.Designer.vb
generated
@@ -27,7 +27,6 @@ Namespace DownloadObjects
|
||||
Dim TP_LBL As System.Windows.Forms.TableLayoutPanel
|
||||
Dim CONTEXT_SEP_3 As System.Windows.Forms.ToolStripSeparator
|
||||
Dim CONTEXT_SEP_4 As System.Windows.Forms.ToolStripSeparator
|
||||
Me.CONTEXT_SEP_2 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.CH_CHECKED = New System.Windows.Forms.CheckBox()
|
||||
Me.LBL_INFO = New System.Windows.Forms.Label()
|
||||
Me.CONTEXT_DATA = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
@@ -37,6 +36,7 @@ Namespace DownloadObjects
|
||||
Me.BTT_CONTEXT_OPEN_USER = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_CONTEXT_OPEN_USER_URL = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_CONTEXT_OPEN_USER_POST = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.CONTEXT_SEP_2 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.BTT_COPY_TO = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_MOVE_TO = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_FEED_ADD_FAV = New System.Windows.Forms.ToolStripMenuItem()
|
||||
@@ -52,6 +52,7 @@ Namespace DownloadObjects
|
||||
Me.ICON_SITE = New System.Windows.Forms.PictureBox()
|
||||
Me.TP_MAIN = New System.Windows.Forms.TableLayoutPanel()
|
||||
Me.LBL_TITLE = New System.Windows.Forms.Label()
|
||||
Me.BTT_CONTEXT_OPEN_FILE_FOLDER = New System.Windows.Forms.ToolStripMenuItem()
|
||||
CONTEXT_SEP_1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
TP_LBL = New System.Windows.Forms.TableLayoutPanel()
|
||||
CONTEXT_SEP_3 = New System.Windows.Forms.ToolStripSeparator()
|
||||
@@ -67,11 +68,6 @@ Namespace DownloadObjects
|
||||
CONTEXT_SEP_1.Name = "CONTEXT_SEP_1"
|
||||
CONTEXT_SEP_1.Size = New System.Drawing.Size(302, 6)
|
||||
'
|
||||
'CONTEXT_SEP_2
|
||||
'
|
||||
Me.CONTEXT_SEP_2.Name = "CONTEXT_SEP_2"
|
||||
Me.CONTEXT_SEP_2.Size = New System.Drawing.Size(302, 6)
|
||||
'
|
||||
'TP_LBL
|
||||
'
|
||||
TP_LBL.ColumnCount = 3
|
||||
@@ -114,9 +110,9 @@ Namespace DownloadObjects
|
||||
'
|
||||
'CONTEXT_DATA
|
||||
'
|
||||
Me.CONTEXT_DATA.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BTT_CONTEXT_DOWN, Me.CONTEXT_SEP_0, Me.BTT_CONTEXT_OPEN_MEDIA, Me.BTT_CONTEXT_OPEN_USER, CONTEXT_SEP_1, Me.BTT_CONTEXT_OPEN_USER_URL, Me.BTT_CONTEXT_OPEN_USER_POST, Me.CONTEXT_SEP_2, Me.BTT_COPY_TO, Me.BTT_MOVE_TO, CONTEXT_SEP_3, Me.BTT_FEED_ADD_FAV, Me.BTT_FEED_ADD_FAV_REMOVE, Me.BTT_FEED_ADD_SPEC, Me.BTT_FEED_ADD_SPEC_REMOVE, Me.BTT_FEED_REMOVE_FAV, Me.BTT_FEED_REMOVE_SPEC, CONTEXT_SEP_4, Me.BTT_CONTEXT_FIND_USER, Me.BTT_CONTEXT_INFO, Me.CONTEXT_SEP_5, Me.BTT_CONTEXT_DELETE})
|
||||
Me.CONTEXT_DATA.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BTT_CONTEXT_DOWN, Me.CONTEXT_SEP_0, Me.BTT_CONTEXT_OPEN_MEDIA, Me.BTT_CONTEXT_OPEN_USER, Me.BTT_CONTEXT_OPEN_FILE_FOLDER, CONTEXT_SEP_1, Me.BTT_CONTEXT_OPEN_USER_URL, Me.BTT_CONTEXT_OPEN_USER_POST, Me.CONTEXT_SEP_2, Me.BTT_COPY_TO, Me.BTT_MOVE_TO, CONTEXT_SEP_3, Me.BTT_FEED_ADD_FAV, Me.BTT_FEED_ADD_FAV_REMOVE, Me.BTT_FEED_ADD_SPEC, Me.BTT_FEED_ADD_SPEC_REMOVE, Me.BTT_FEED_REMOVE_FAV, Me.BTT_FEED_REMOVE_SPEC, CONTEXT_SEP_4, Me.BTT_CONTEXT_FIND_USER, Me.BTT_CONTEXT_INFO, Me.CONTEXT_SEP_5, Me.BTT_CONTEXT_DELETE})
|
||||
Me.CONTEXT_DATA.Name = "CONTEXT_PIC"
|
||||
Me.CONTEXT_DATA.Size = New System.Drawing.Size(306, 414)
|
||||
Me.CONTEXT_DATA.Size = New System.Drawing.Size(306, 436)
|
||||
'
|
||||
'BTT_CONTEXT_DOWN
|
||||
'
|
||||
@@ -160,6 +156,11 @@ Namespace DownloadObjects
|
||||
Me.BTT_CONTEXT_OPEN_USER_POST.Size = New System.Drawing.Size(305, 22)
|
||||
Me.BTT_CONTEXT_OPEN_USER_POST.Text = "Open post"
|
||||
'
|
||||
'CONTEXT_SEP_2
|
||||
'
|
||||
Me.CONTEXT_SEP_2.Name = "CONTEXT_SEP_2"
|
||||
Me.CONTEXT_SEP_2.Size = New System.Drawing.Size(302, 6)
|
||||
'
|
||||
'BTT_COPY_TO
|
||||
'
|
||||
Me.BTT_COPY_TO.Image = Global.SCrawler.My.Resources.Resources.PastePic_32
|
||||
@@ -289,6 +290,13 @@ Namespace DownloadObjects
|
||||
Me.LBL_TITLE.Size = New System.Drawing.Size(140, 25)
|
||||
Me.LBL_TITLE.TabIndex = 1
|
||||
'
|
||||
'BTT_CONTEXT_OPEN_FILE_FOLDER
|
||||
'
|
||||
Me.BTT_CONTEXT_OPEN_FILE_FOLDER.Image = Global.SCrawler.My.Resources.Resources.FolderPic_32
|
||||
Me.BTT_CONTEXT_OPEN_FILE_FOLDER.Name = "BTT_CONTEXT_OPEN_FILE_FOLDER"
|
||||
Me.BTT_CONTEXT_OPEN_FILE_FOLDER.Size = New System.Drawing.Size(305, 22)
|
||||
Me.BTT_CONTEXT_OPEN_FILE_FOLDER.Text = "Open file folder"
|
||||
'
|
||||
'FeedMedia
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -335,5 +343,6 @@ Namespace DownloadObjects
|
||||
Private WithEvents BTT_MOVE_TO As ToolStripMenuItem
|
||||
Private WithEvents CONTEXT_SEP_5 As ToolStripSeparator
|
||||
Private WithEvents CONTEXT_SEP_2 As ToolStripSeparator
|
||||
Private WithEvents BTT_CONTEXT_OPEN_FILE_FOLDER As ToolStripMenuItem
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -178,6 +178,7 @@ Namespace DownloadObjects
|
||||
BTT_CONTEXT_DOWN.Visible = True
|
||||
CONTEXT_SEP_0.Visible = True
|
||||
BTT_CONTEXT_OPEN_USER.Visible = False
|
||||
BTT_CONTEXT_OPEN_FILE_FOLDER.Visible = False
|
||||
CONTEXT_SEP_5.Visible = False
|
||||
BTT_CONTEXT_DELETE.Visible = False
|
||||
|
||||
@@ -416,8 +417,12 @@ Namespace DownloadObjects
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Open media, folder"
|
||||
Private Sub BTT_CONTEXT_OPEN_MEDIA_Click(sender As Object, e As EventArgs) Handles BTT_CONTEXT_OPEN_MEDIA.Click
|
||||
File.Open()
|
||||
Private Sub BTT_CONTEXT_OPEN_MEDIA_Click(sender As Object, e As EventArgs) Handles BTT_CONTEXT_OPEN_MEDIA.Click, BTT_CONTEXT_OPEN_FILE_FOLDER.Click
|
||||
If Not sender Is Nothing AndAlso sender Is BTT_CONTEXT_OPEN_FILE_FOLDER Then
|
||||
GlobalOpenPath(File)
|
||||
Else
|
||||
File.Open()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub BTT_CONTEXT_OPEN_USER_Click(sender As Object, e As EventArgs) Handles BTT_CONTEXT_OPEN_USER.Click
|
||||
If Not UserKey.IsEmptyString Then
|
||||
@@ -455,6 +460,8 @@ Namespace DownloadObjects
|
||||
Dim url$ = String.Empty
|
||||
If IsSubscription Then
|
||||
url = Post.URL_BASE
|
||||
ElseIf Not Media.PostUrl.IsEmptyString Then
|
||||
url = Media.PostUrl
|
||||
Else
|
||||
If Not UserKey.IsEmptyString And Not Post.Post.ID.IsEmptyString Then
|
||||
Dim u As IUserData
|
||||
|
||||
@@ -195,6 +195,7 @@ Namespace DownloadObjects
|
||||
#Region "Add"
|
||||
Friend Overloads Function Add(ByVal Item As UserMediaD, Optional ByVal AutoSave As Boolean = True) As Boolean
|
||||
If Not Items.Contains(Item) Then
|
||||
Item.PostUrl = Item.PostUrl(True)
|
||||
Items.Add(Item)
|
||||
If AutoSave Then Save()
|
||||
Return True
|
||||
@@ -235,7 +236,65 @@ Namespace DownloadObjects
|
||||
Friend Function RemoveNotExist(ByVal p As Predicate(Of UserMediaD)) As Integer
|
||||
If Count > 0 And Not _NotExistRemoved Then
|
||||
_NotExistRemoved = True
|
||||
Dim ri% = Items.RemoveAll(p)
|
||||
Dim ri% = 0
|
||||
If Settings.FeedSpecialSearchForMissing Then
|
||||
Dim i% = -1
|
||||
Dim d As UserMediaD = Nothing
|
||||
Dim m As UserMedia
|
||||
Dim f As SFile = Nothing
|
||||
Dim ff As SFile
|
||||
Dim postUrl$ = String.Empty
|
||||
Dim user As IUserData
|
||||
Dim processRemove As Boolean
|
||||
Dim userArr As New List(Of IUserData)
|
||||
|
||||
Dim updateUser As Func(Of IUserData, Boolean) =
|
||||
Function(ByVal replaceUser As IUserData) As Boolean
|
||||
If f.Exists(SFO.Path, False) Then
|
||||
ff = SFile.GetFiles(f, d.Data.File.File, IO.SearchOption.AllDirectories, EDP.ReturnValue).FirstOrDefault
|
||||
If Not ff.IsEmptyString Then
|
||||
m = d.Data
|
||||
m.File = ff
|
||||
d = New UserMediaD(m, If(replaceUser, d.User), d.Session, d.Date) With {
|
||||
.IsSavedPosts = If(replaceUser Is Nothing, d.IsSavedPosts, DirectCast(replaceUser, UserDataBase).IsSavedPosts),
|
||||
.PostUrl = postUrl
|
||||
}
|
||||
Items(i) = d
|
||||
ri += 1
|
||||
processRemove = False
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
For i = Count - 1 To 0 Step -1
|
||||
If p.Invoke(Items(i)) Then
|
||||
d = Items(i)
|
||||
postUrl = d.PostUrl(True)
|
||||
f = Nothing
|
||||
ff = Nothing
|
||||
processRemove = True
|
||||
|
||||
f = If(d.User?.File, New SFile).IfNullOrEmpty(d.UserInfo.File).CutPath
|
||||
If updateUser(Nothing) Then Continue For
|
||||
|
||||
If Settings.FeedSpecialSearchForMissing_Deep Then
|
||||
If userArr.Count = 0 Then userArr.ListAddList(Settings.GetUsers(Function(u) True))
|
||||
If userArr.Count > 0 Then
|
||||
For Each user In userArr
|
||||
f = user.File.CutPath
|
||||
If updateUser(user) Then Exit For
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
If processRemove Then Items.RemoveAt(i) : ri += 1
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
ri = Items.RemoveAll(p)
|
||||
End If
|
||||
If ri > 0 Then Save()
|
||||
Return ri
|
||||
Else
|
||||
|
||||
@@ -36,6 +36,7 @@ Namespace DownloadObjects
|
||||
Private Const Name_Session As String = "Session"
|
||||
Private Const Name_File As String = "File"
|
||||
Private Const Name_IsSavedPosts As String = "IsSavedPosts"
|
||||
Private Const Name_PostUrl As String = "PostUrl"
|
||||
#End Region
|
||||
Friend ReadOnly User As IUserData
|
||||
Friend ReadOnly Data As UserMedia
|
||||
@@ -43,6 +44,48 @@ Namespace DownloadObjects
|
||||
Friend ReadOnly [Date] As Date
|
||||
Friend Session As Integer
|
||||
Friend IsSavedPosts As Boolean
|
||||
Private _PostUrl As String
|
||||
Friend Property PostUrl(Optional ByVal Generate As Boolean = False) As String
|
||||
Get
|
||||
Try
|
||||
If Not _PostUrl.IsEmptyString Then
|
||||
Return _PostUrl
|
||||
ElseIf Generate Then
|
||||
Dim url$ = String.Empty
|
||||
With UserInfo
|
||||
If Not .Plugin.IfNullOrEmpty(.Site).IsEmptyString And Not .Name.IsEmptyString And Not Data.Post.ID.IsEmptyString Then
|
||||
Dim u As IUserData
|
||||
If IsSavedPosts Then
|
||||
If Not .Plugin.IsEmptyString Then
|
||||
Dim host As SettingsHostCollection = Settings(.Plugin)
|
||||
If Not host Is Nothing Then
|
||||
u = host.Default.GetInstance(Download.SavedPosts, UserInfo, False, False)
|
||||
If Not u Is Nothing AndAlso Not u.HOST Is Nothing Then
|
||||
With DirectCast(u, UserDataBase)
|
||||
.IsSavedPosts = True
|
||||
.HostStatic = True
|
||||
End With
|
||||
Try : url = u.HOST.Source.GetUserPostUrl(u, Data) : Catch : End Try
|
||||
u.Dispose()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
u = Settings.GetUser(UserInfo)
|
||||
If Not u Is Nothing Then url = UserDataBase.GetPostUrl(u, Data)
|
||||
End If
|
||||
End If
|
||||
End With
|
||||
Return url
|
||||
End If
|
||||
Catch
|
||||
End Try
|
||||
Return String.Empty
|
||||
End Get
|
||||
Set(ByVal _PostUrl As String)
|
||||
Me._PostUrl = _PostUrl
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub New(ByVal Data As UserMedia, ByVal User As IUserData, ByVal Session As Integer)
|
||||
Me.Data = Data
|
||||
Me.User = User
|
||||
@@ -78,6 +121,7 @@ Namespace DownloadObjects
|
||||
Data = New UserMedia(e(Name_Media), User)
|
||||
[Date] = AConvert(Of Date)(e.Value(Name_Date), DateTimeDefaultProvider, Now)
|
||||
Session = e.Value(Name_Session).FromXML(Of Integer)(0)
|
||||
_PostUrl = e.Value(Name_PostUrl)
|
||||
Dim f As SFile = e.Value(Name_File)
|
||||
If f.Exists Then Data.File = f
|
||||
End If
|
||||
@@ -106,7 +150,8 @@ Namespace DownloadObjects
|
||||
New EContainer(Name_Date, AConvert(Of String)([Date], DateTimeDefaultProvider, String.Empty)),
|
||||
New EContainer(Name_Session, Session),
|
||||
New EContainer(Name_File, Data.File),
|
||||
New EContainer(Name_IsSavedPosts, IsSavedPosts.BoolToInteger)},
|
||||
New EContainer(Name_IsSavedPosts, IsSavedPosts.BoolToInteger),
|
||||
New EContainer(Name_PostUrl, _PostUrl)},
|
||||
If(IsSavedPosts, UserInfo.ToEContainer, If(Not User Is Nothing, DirectCast(User, UserDataBase).User.ToEContainer, Nothing)), LAP.IgnoreICopier)
|
||||
End Function
|
||||
End Structure
|
||||
|
||||
203
SCrawler/Editors/GlobalSettingsForm.Designer.vb
generated
@@ -62,6 +62,7 @@ Namespace Editors
|
||||
Dim TP_FEED_SES As System.Windows.Forms.TableLayoutPanel
|
||||
Dim ActionButton13 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim ActionButton14 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim TP_FEED_SPEC_SEARCH As System.Windows.Forms.TableLayoutPanel
|
||||
Dim TAB_NOTIFY As System.Windows.Forms.TabPage
|
||||
Dim TP_NOTIFY_MAIN As System.Windows.Forms.TableLayoutPanel
|
||||
Dim TP_ENVIR As System.Windows.Forms.TableLayoutPanel
|
||||
@@ -150,6 +151,8 @@ Namespace Editors
|
||||
Me.CH_FEED_UP_FILE_LOC_MOVE = New System.Windows.Forms.CheckBox()
|
||||
Me.CH_DOWN_ALL_F6_NOTIFY = New System.Windows.Forms.CheckBox()
|
||||
Me.CH_DOWN_ALL_NOTIFY = New System.Windows.Forms.CheckBox()
|
||||
Me.CH_FEED_SPEC_SEARCH = New System.Windows.Forms.CheckBox()
|
||||
Me.CH_FEED_SPEC_SEARCH_DEEP = New System.Windows.Forms.CheckBox()
|
||||
Me.TXT_CHANNELS_ROWS = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.TXT_CHANNELS_COLUMNS = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.CH_DOWN_IMAGES_NATIVE = New System.Windows.Forms.CheckBox()
|
||||
@@ -163,6 +166,8 @@ Namespace Editors
|
||||
Me.CH_RECYCLE_DEL = New System.Windows.Forms.CheckBox()
|
||||
Me.CH_DOWN_OPEN_PROGRESS = New System.Windows.Forms.CheckBox()
|
||||
Me.CH_DOWN_ALL_F6_USE = New System.Windows.Forms.CheckBox()
|
||||
Me.TXT_SCHEDULER_SCRIPT = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.CH_SCHEDULER_SCRIPT_EX_MANUAL = New System.Windows.Forms.CheckBox()
|
||||
Me.TXT_SCRIPT = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.TXT_DOWN_COMPLETE_SCRIPT = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.CH_UNAME_UP = New System.Windows.Forms.CheckBox()
|
||||
@@ -180,6 +185,8 @@ Namespace Editors
|
||||
Me.NUM_FEED_STORE_SESSION_DATA = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.NUM_FEED_SES_CURR_LOAD_LAST = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.CH_FEED_ADD_SITE = New System.Windows.Forms.CheckBox()
|
||||
Me.CH_FEED_ADD_TYPE = New System.Windows.Forms.CheckBox()
|
||||
Me.CH_FEED_ESC_TO_CLOSE = New System.Windows.Forms.CheckBox()
|
||||
Me.TXT_YTDLP = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.TXT_FFMPEG = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.TXT_CURL = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
@@ -205,7 +212,7 @@ Namespace Editors
|
||||
Me.TAB_MAIN = New System.Windows.Forms.TabControl()
|
||||
Me.TAB_ENVIR = New System.Windows.Forms.TabPage()
|
||||
Me.CONTAINER_MAIN = New System.Windows.Forms.ToolStripContainer()
|
||||
Me.CH_FEED_ADD_TYPE = New System.Windows.Forms.CheckBox()
|
||||
Me.CH_FEED_OPEN_CTRLF = New System.Windows.Forms.CheckBox()
|
||||
TP_BASIS = New System.Windows.Forms.TableLayoutPanel()
|
||||
TP_IMAGES = New System.Windows.Forms.TableLayoutPanel()
|
||||
TP_FILE_NAME = New System.Windows.Forms.TableLayoutPanel()
|
||||
@@ -230,6 +237,7 @@ Namespace Editors
|
||||
TP_FEED = New System.Windows.Forms.TableLayoutPanel()
|
||||
TP_FEED_IMG_COUNT = New System.Windows.Forms.TableLayoutPanel()
|
||||
TP_FEED_SES = New System.Windows.Forms.TableLayoutPanel()
|
||||
TP_FEED_SPEC_SEARCH = New System.Windows.Forms.TableLayoutPanel()
|
||||
TAB_NOTIFY = New System.Windows.Forms.TabPage()
|
||||
TP_NOTIFY_MAIN = New System.Windows.Forms.TableLayoutPanel()
|
||||
TP_ENVIR = New System.Windows.Forms.TableLayoutPanel()
|
||||
@@ -267,6 +275,7 @@ Namespace Editors
|
||||
TP_OPEN_INFO.SuspendLayout()
|
||||
TP_OPEN_PROGRESS.SuspendLayout()
|
||||
TP_BEHAVIOR_F6.SuspendLayout()
|
||||
CType(Me.TXT_SCHEDULER_SCRIPT, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
TAB_DOWN.SuspendLayout()
|
||||
TP_DOWNLOADING.SuspendLayout()
|
||||
CType(Me.TXT_SCRIPT, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
@@ -282,6 +291,7 @@ Namespace Editors
|
||||
TP_FEED_SES.SuspendLayout()
|
||||
CType(Me.NUM_FEED_STORE_SESSION_DATA, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.NUM_FEED_SES_CURR_LOAD_LAST, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
TP_FEED_SPEC_SEARCH.SuspendLayout()
|
||||
TAB_NOTIFY.SuspendLayout()
|
||||
TP_NOTIFY_MAIN.SuspendLayout()
|
||||
TP_ENVIR.SuspendLayout()
|
||||
@@ -340,7 +350,7 @@ Namespace Editors
|
||||
TP_BASIS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
TP_BASIS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
|
||||
TP_BASIS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
|
||||
TP_BASIS.Size = New System.Drawing.Size(615, 393)
|
||||
TP_BASIS.Size = New System.Drawing.Size(615, 418)
|
||||
TP_BASIS.TabIndex = 0
|
||||
'
|
||||
'TXT_GLOBAL_PATH
|
||||
@@ -1096,6 +1106,31 @@ Namespace Editors
|
||||
TT_MAIN.SetToolTip(Me.CH_DOWN_ALL_NOTIFY, "Request confirmation to download all users anyway")
|
||||
Me.CH_DOWN_ALL_NOTIFY.UseVisualStyleBackColor = True
|
||||
'
|
||||
'CH_FEED_SPEC_SEARCH
|
||||
'
|
||||
Me.CH_FEED_SPEC_SEARCH.AutoSize = True
|
||||
Me.CH_FEED_SPEC_SEARCH.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.CH_FEED_SPEC_SEARCH.Location = New System.Drawing.Point(3, 3)
|
||||
Me.CH_FEED_SPEC_SEARCH.Name = "CH_FEED_SPEC_SEARCH"
|
||||
Me.CH_FEED_SPEC_SEARCH.Size = New System.Drawing.Size(303, 19)
|
||||
Me.CH_FEED_SPEC_SEARCH.TabIndex = 0
|
||||
Me.CH_FEED_SPEC_SEARCH.Text = "Search missing files (special feeds)"
|
||||
TT_MAIN.SetToolTip(Me.CH_FEED_SPEC_SEARCH, "Search for missing file in the entire user folder")
|
||||
Me.CH_FEED_SPEC_SEARCH.UseVisualStyleBackColor = True
|
||||
'
|
||||
'CH_FEED_SPEC_SEARCH_DEEP
|
||||
'
|
||||
Me.CH_FEED_SPEC_SEARCH_DEEP.AutoSize = True
|
||||
Me.CH_FEED_SPEC_SEARCH_DEEP.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.CH_FEED_SPEC_SEARCH_DEEP.Location = New System.Drawing.Point(312, 3)
|
||||
Me.CH_FEED_SPEC_SEARCH_DEEP.Name = "CH_FEED_SPEC_SEARCH_DEEP"
|
||||
Me.CH_FEED_SPEC_SEARCH_DEEP.Size = New System.Drawing.Size(304, 19)
|
||||
Me.CH_FEED_SPEC_SEARCH_DEEP.TabIndex = 1
|
||||
Me.CH_FEED_SPEC_SEARCH_DEEP.Text = "Search missing files (special feeds): deep search"
|
||||
TT_MAIN.SetToolTip(Me.CH_FEED_SPEC_SEARCH_DEEP, "Deep search means that the missing file will be searched in other users' location" &
|
||||
"s as well.")
|
||||
Me.CH_FEED_SPEC_SEARCH_DEEP.UseVisualStyleBackColor = True
|
||||
'
|
||||
'TP_CHANNELS_IMGS
|
||||
'
|
||||
TP_CHANNELS_IMGS.ColumnCount = 2
|
||||
@@ -1147,7 +1182,7 @@ Namespace Editors
|
||||
TAB_BASIS.Location = New System.Drawing.Point(4, 22)
|
||||
TAB_BASIS.Name = "TAB_BASIS"
|
||||
TAB_BASIS.Padding = New System.Windows.Forms.Padding(3)
|
||||
TAB_BASIS.Size = New System.Drawing.Size(621, 399)
|
||||
TAB_BASIS.Size = New System.Drawing.Size(621, 424)
|
||||
TAB_BASIS.TabIndex = 0
|
||||
TAB_BASIS.Text = "Basis"
|
||||
'
|
||||
@@ -1157,7 +1192,7 @@ Namespace Editors
|
||||
TAB_DEFAULTS.Location = New System.Drawing.Point(4, 22)
|
||||
TAB_DEFAULTS.Name = "TAB_DEFAULTS"
|
||||
TAB_DEFAULTS.Padding = New System.Windows.Forms.Padding(3)
|
||||
TAB_DEFAULTS.Size = New System.Drawing.Size(621, 399)
|
||||
TAB_DEFAULTS.Size = New System.Drawing.Size(621, 424)
|
||||
TAB_DEFAULTS.TabIndex = 1
|
||||
TAB_DEFAULTS.Text = "Defaults"
|
||||
'
|
||||
@@ -1183,7 +1218,7 @@ Namespace Editors
|
||||
TP_DEFS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
TP_DEFS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
TP_DEFS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
TP_DEFS.Size = New System.Drawing.Size(615, 393)
|
||||
TP_DEFS.Size = New System.Drawing.Size(615, 418)
|
||||
TP_DEFS.TabIndex = 0
|
||||
'
|
||||
'CH_DOWN_IMAGES_NATIVE
|
||||
@@ -1203,7 +1238,7 @@ Namespace Editors
|
||||
TAB_DEFS_CHANNELS.Location = New System.Drawing.Point(4, 22)
|
||||
TAB_DEFS_CHANNELS.Name = "TAB_DEFS_CHANNELS"
|
||||
TAB_DEFS_CHANNELS.Padding = New System.Windows.Forms.Padding(3)
|
||||
TAB_DEFS_CHANNELS.Size = New System.Drawing.Size(621, 399)
|
||||
TAB_DEFS_CHANNELS.Size = New System.Drawing.Size(621, 424)
|
||||
TAB_DEFS_CHANNELS.TabIndex = 4
|
||||
TAB_DEFS_CHANNELS.Text = "Channels"
|
||||
'
|
||||
@@ -1229,7 +1264,7 @@ Namespace Editors
|
||||
TP_CHANNELS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
TP_CHANNELS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
TP_CHANNELS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
TP_CHANNELS.Size = New System.Drawing.Size(615, 393)
|
||||
TP_CHANNELS.Size = New System.Drawing.Size(615, 418)
|
||||
TP_CHANNELS.TabIndex = 0
|
||||
'
|
||||
'TXT_CHANNEL_USER_POST_LIMIT
|
||||
@@ -1268,7 +1303,7 @@ Namespace Editors
|
||||
TAB_BEHAVIOR.Controls.Add(TP_BEHAVIOR)
|
||||
TAB_BEHAVIOR.Location = New System.Drawing.Point(4, 22)
|
||||
TAB_BEHAVIOR.Name = "TAB_BEHAVIOR"
|
||||
TAB_BEHAVIOR.Size = New System.Drawing.Size(621, 399)
|
||||
TAB_BEHAVIOR.Size = New System.Drawing.Size(621, 424)
|
||||
TAB_BEHAVIOR.TabIndex = 5
|
||||
TAB_BEHAVIOR.Text = "Behavior"
|
||||
'
|
||||
@@ -1286,10 +1321,13 @@ Namespace Editors
|
||||
TP_BEHAVIOR.Controls.Add(Me.CH_RECYCLE_DEL, 0, 3)
|
||||
TP_BEHAVIOR.Controls.Add(TP_OPEN_PROGRESS, 0, 5)
|
||||
TP_BEHAVIOR.Controls.Add(TP_BEHAVIOR_F6, 0, 8)
|
||||
TP_BEHAVIOR.Controls.Add(Me.TXT_SCHEDULER_SCRIPT, 0, 9)
|
||||
TP_BEHAVIOR.Controls.Add(Me.CH_SCHEDULER_SCRIPT_EX_MANUAL, 0, 10)
|
||||
TP_BEHAVIOR.Controls.Add(Me.CH_FEED_OPEN_CTRLF, 0, 11)
|
||||
TP_BEHAVIOR.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
TP_BEHAVIOR.Location = New System.Drawing.Point(0, 0)
|
||||
TP_BEHAVIOR.Name = "TP_BEHAVIOR"
|
||||
TP_BEHAVIOR.RowCount = 10
|
||||
TP_BEHAVIOR.RowCount = 13
|
||||
TP_BEHAVIOR.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
TP_BEHAVIOR.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
TP_BEHAVIOR.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
@@ -1299,10 +1337,11 @@ Namespace Editors
|
||||
TP_BEHAVIOR.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
||||
TP_BEHAVIOR.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
||||
TP_BEHAVIOR.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
TP_BEHAVIOR.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
||||
TP_BEHAVIOR.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
TP_BEHAVIOR.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
TP_BEHAVIOR.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
TP_BEHAVIOR.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
|
||||
TP_BEHAVIOR.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
|
||||
TP_BEHAVIOR.Size = New System.Drawing.Size(621, 399)
|
||||
TP_BEHAVIOR.Size = New System.Drawing.Size(621, 424)
|
||||
TP_BEHAVIOR.TabIndex = 0
|
||||
'
|
||||
'TXT_FOLDER_CMD
|
||||
@@ -1468,12 +1507,37 @@ Namespace Editors
|
||||
Me.CH_DOWN_ALL_F6_USE.Text = "Use 'F6' to download all users"
|
||||
Me.CH_DOWN_ALL_F6_USE.UseVisualStyleBackColor = True
|
||||
'
|
||||
'TXT_SCHEDULER_SCRIPT
|
||||
'
|
||||
Me.TXT_SCHEDULER_SCRIPT.CaptionMode = PersonalUtilities.Forms.Controls.Base.ICaptionControl.Modes.CheckBox
|
||||
Me.TXT_SCHEDULER_SCRIPT.CaptionText = "Scheduler script"
|
||||
Me.TXT_SCHEDULER_SCRIPT.CaptionToolTipEnabled = True
|
||||
Me.TXT_SCHEDULER_SCRIPT.CaptionToolTipText = "Execute the following script after the scheduler plan is completed"
|
||||
Me.TXT_SCHEDULER_SCRIPT.CaptionWidth = 115.0R
|
||||
Me.TXT_SCHEDULER_SCRIPT.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TXT_SCHEDULER_SCRIPT.Location = New System.Drawing.Point(4, 244)
|
||||
Me.TXT_SCHEDULER_SCRIPT.Name = "TXT_SCHEDULER_SCRIPT"
|
||||
Me.TXT_SCHEDULER_SCRIPT.Size = New System.Drawing.Size(613, 22)
|
||||
Me.TXT_SCHEDULER_SCRIPT.TabIndex = 9
|
||||
'
|
||||
'CH_SCHEDULER_SCRIPT_EX_MANUAL
|
||||
'
|
||||
Me.CH_SCHEDULER_SCRIPT_EX_MANUAL.AutoSize = True
|
||||
Me.CH_SCHEDULER_SCRIPT_EX_MANUAL.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.CH_SCHEDULER_SCRIPT_EX_MANUAL.Location = New System.Drawing.Point(4, 273)
|
||||
Me.CH_SCHEDULER_SCRIPT_EX_MANUAL.Name = "CH_SCHEDULER_SCRIPT_EX_MANUAL"
|
||||
Me.CH_SCHEDULER_SCRIPT_EX_MANUAL.Size = New System.Drawing.Size(613, 19)
|
||||
Me.CH_SCHEDULER_SCRIPT_EX_MANUAL.TabIndex = 10
|
||||
Me.CH_SCHEDULER_SCRIPT_EX_MANUAL.Text = "Disable execution of 'Scheduler script' after completion of 'Manual' scheduler pl" &
|
||||
"ans"
|
||||
Me.CH_SCHEDULER_SCRIPT_EX_MANUAL.UseVisualStyleBackColor = True
|
||||
'
|
||||
'TAB_DOWN
|
||||
'
|
||||
TAB_DOWN.Controls.Add(TP_DOWNLOADING)
|
||||
TAB_DOWN.Location = New System.Drawing.Point(4, 22)
|
||||
TAB_DOWN.Name = "TAB_DOWN"
|
||||
TAB_DOWN.Size = New System.Drawing.Size(621, 399)
|
||||
TAB_DOWN.Size = New System.Drawing.Size(621, 424)
|
||||
TAB_DOWN.TabIndex = 6
|
||||
TAB_DOWN.Text = "Downloading"
|
||||
'
|
||||
@@ -1509,7 +1573,7 @@ Namespace Editors
|
||||
TP_DOWNLOADING.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
TP_DOWNLOADING.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
||||
TP_DOWNLOADING.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
TP_DOWNLOADING.Size = New System.Drawing.Size(621, 399)
|
||||
TP_DOWNLOADING.Size = New System.Drawing.Size(621, 424)
|
||||
TP_DOWNLOADING.TabIndex = 1
|
||||
'
|
||||
'TXT_SCRIPT
|
||||
@@ -1613,7 +1677,7 @@ Namespace Editors
|
||||
TAB_FEED.Controls.Add(TP_FEED)
|
||||
TAB_FEED.Location = New System.Drawing.Point(4, 22)
|
||||
TAB_FEED.Name = "TAB_FEED"
|
||||
TAB_FEED.Size = New System.Drawing.Size(621, 374)
|
||||
TAB_FEED.Size = New System.Drawing.Size(621, 424)
|
||||
TAB_FEED.TabIndex = 7
|
||||
TAB_FEED.Text = "Feed"
|
||||
'
|
||||
@@ -1635,10 +1699,12 @@ Namespace Editors
|
||||
TP_FEED.Controls.Add(TP_FEED_SES, 0, 8)
|
||||
TP_FEED.Controls.Add(Me.CH_FEED_ADD_SITE, 0, 5)
|
||||
TP_FEED.Controls.Add(Me.CH_FEED_ADD_TYPE, 0, 6)
|
||||
TP_FEED.Controls.Add(Me.CH_FEED_ESC_TO_CLOSE, 0, 13)
|
||||
TP_FEED.Controls.Add(TP_FEED_SPEC_SEARCH, 0, 14)
|
||||
TP_FEED.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
TP_FEED.Location = New System.Drawing.Point(0, 0)
|
||||
TP_FEED.Name = "TP_FEED"
|
||||
TP_FEED.RowCount = 14
|
||||
TP_FEED.RowCount = 16
|
||||
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
||||
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
||||
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
@@ -1652,8 +1718,11 @@ Namespace Editors
|
||||
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
TP_FEED.Size = New System.Drawing.Size(621, 374)
|
||||
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
|
||||
TP_FEED.Size = New System.Drawing.Size(621, 424)
|
||||
TP_FEED.TabIndex = 0
|
||||
'
|
||||
'TP_FEED_IMG_COUNT
|
||||
@@ -1867,12 +1936,51 @@ Namespace Editors
|
||||
Me.CH_FEED_ADD_SITE.Text = "Add the site name to the post title"
|
||||
Me.CH_FEED_ADD_SITE.UseVisualStyleBackColor = True
|
||||
'
|
||||
'CH_FEED_ADD_TYPE
|
||||
'
|
||||
Me.CH_FEED_ADD_TYPE.AutoSize = True
|
||||
Me.CH_FEED_ADD_TYPE.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.CH_FEED_ADD_TYPE.Location = New System.Drawing.Point(4, 166)
|
||||
Me.CH_FEED_ADD_TYPE.Name = "CH_FEED_ADD_TYPE"
|
||||
Me.CH_FEED_ADD_TYPE.Size = New System.Drawing.Size(613, 19)
|
||||
Me.CH_FEED_ADD_TYPE.TabIndex = 6
|
||||
Me.CH_FEED_ADD_TYPE.Text = "Add the file type to the post title"
|
||||
Me.CH_FEED_ADD_TYPE.UseVisualStyleBackColor = True
|
||||
'
|
||||
'CH_FEED_ESC_TO_CLOSE
|
||||
'
|
||||
Me.CH_FEED_ESC_TO_CLOSE.AutoSize = True
|
||||
Me.CH_FEED_ESC_TO_CLOSE.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.CH_FEED_ESC_TO_CLOSE.Location = New System.Drawing.Point(4, 351)
|
||||
Me.CH_FEED_ESC_TO_CLOSE.Name = "CH_FEED_ESC_TO_CLOSE"
|
||||
Me.CH_FEED_ESC_TO_CLOSE.Size = New System.Drawing.Size(613, 19)
|
||||
Me.CH_FEED_ESC_TO_CLOSE.TabIndex = 13
|
||||
Me.CH_FEED_ESC_TO_CLOSE.Text = "Use the 'Esc' key to close the form"
|
||||
Me.CH_FEED_ESC_TO_CLOSE.UseVisualStyleBackColor = True
|
||||
'
|
||||
'TP_FEED_SPEC_SEARCH
|
||||
'
|
||||
TP_FEED_SPEC_SEARCH.ColumnCount = 2
|
||||
TP_FEED_SPEC_SEARCH.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
|
||||
TP_FEED_SPEC_SEARCH.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
|
||||
TP_FEED_SPEC_SEARCH.Controls.Add(Me.CH_FEED_SPEC_SEARCH, 0, 0)
|
||||
TP_FEED_SPEC_SEARCH.Controls.Add(Me.CH_FEED_SPEC_SEARCH_DEEP, 1, 0)
|
||||
TP_FEED_SPEC_SEARCH.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
TP_FEED_SPEC_SEARCH.Location = New System.Drawing.Point(1, 374)
|
||||
TP_FEED_SPEC_SEARCH.Margin = New System.Windows.Forms.Padding(0)
|
||||
TP_FEED_SPEC_SEARCH.Name = "TP_FEED_SPEC_SEARCH"
|
||||
TP_FEED_SPEC_SEARCH.RowCount = 1
|
||||
TP_FEED_SPEC_SEARCH.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
TP_FEED_SPEC_SEARCH.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
TP_FEED_SPEC_SEARCH.Size = New System.Drawing.Size(619, 25)
|
||||
TP_FEED_SPEC_SEARCH.TabIndex = 14
|
||||
'
|
||||
'TAB_NOTIFY
|
||||
'
|
||||
TAB_NOTIFY.Controls.Add(TP_NOTIFY_MAIN)
|
||||
TAB_NOTIFY.Location = New System.Drawing.Point(4, 22)
|
||||
TAB_NOTIFY.Name = "TAB_NOTIFY"
|
||||
TAB_NOTIFY.Size = New System.Drawing.Size(621, 399)
|
||||
TAB_NOTIFY.Size = New System.Drawing.Size(621, 424)
|
||||
TAB_NOTIFY.TabIndex = 8
|
||||
TAB_NOTIFY.Text = "Notifications"
|
||||
'
|
||||
@@ -1904,7 +2012,7 @@ Namespace Editors
|
||||
TP_NOTIFY_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
TP_NOTIFY_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
TP_NOTIFY_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
TP_NOTIFY_MAIN.Size = New System.Drawing.Size(621, 399)
|
||||
TP_NOTIFY_MAIN.Size = New System.Drawing.Size(621, 424)
|
||||
TP_NOTIFY_MAIN.TabIndex = 0
|
||||
'
|
||||
'TP_ENVIR
|
||||
@@ -1927,7 +2035,7 @@ Namespace Editors
|
||||
TP_ENVIR.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
||||
TP_ENVIR.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
||||
TP_ENVIR.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
TP_ENVIR.Size = New System.Drawing.Size(621, 399)
|
||||
TP_ENVIR.Size = New System.Drawing.Size(621, 424)
|
||||
TP_ENVIR.TabIndex = 0
|
||||
'
|
||||
'TXT_YTDLP
|
||||
@@ -2058,7 +2166,7 @@ Namespace Editors
|
||||
TAB_STD.Controls.Add(TP_STD)
|
||||
TAB_STD.Location = New System.Drawing.Point(4, 22)
|
||||
TAB_STD.Name = "TAB_STD"
|
||||
TAB_STD.Size = New System.Drawing.Size(621, 399)
|
||||
TAB_STD.Size = New System.Drawing.Size(621, 424)
|
||||
TAB_STD.TabIndex = 10
|
||||
TAB_STD.Text = "Downloader"
|
||||
'
|
||||
@@ -2100,7 +2208,7 @@ Namespace Editors
|
||||
TP_STD.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
TP_STD.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
||||
TP_STD.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
TP_STD.Size = New System.Drawing.Size(621, 399)
|
||||
TP_STD.Size = New System.Drawing.Size(621, 424)
|
||||
TP_STD.TabIndex = 0
|
||||
'
|
||||
'TXT_STD_MAX_JOBS_COUNT
|
||||
@@ -2199,7 +2307,7 @@ Namespace Editors
|
||||
TAB_DESIGN.Controls.Add(TP_DESIGN)
|
||||
TAB_DESIGN.Location = New System.Drawing.Point(4, 22)
|
||||
TAB_DESIGN.Name = "TAB_DESIGN"
|
||||
TAB_DESIGN.Size = New System.Drawing.Size(621, 399)
|
||||
TAB_DESIGN.Size = New System.Drawing.Size(621, 424)
|
||||
TAB_DESIGN.TabIndex = 11
|
||||
TAB_DESIGN.Text = "Design"
|
||||
'
|
||||
@@ -2225,7 +2333,7 @@ Namespace Editors
|
||||
TP_DESIGN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
TP_DESIGN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
TP_DESIGN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
TP_DESIGN.Size = New System.Drawing.Size(621, 399)
|
||||
TP_DESIGN.Size = New System.Drawing.Size(621, 424)
|
||||
TP_DESIGN.TabIndex = 0
|
||||
'
|
||||
'TXT_PRG_TITLE
|
||||
@@ -2336,7 +2444,7 @@ Namespace Editors
|
||||
TP_HEADERS_DEF.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
||||
TP_HEADERS_DEF.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
TP_HEADERS_DEF.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
|
||||
TP_HEADERS_DEF.Size = New System.Drawing.Size(621, 399)
|
||||
TP_HEADERS_DEF.Size = New System.Drawing.Size(621, 424)
|
||||
TP_HEADERS_DEF.TabIndex = 0
|
||||
'
|
||||
'TXT_H_DEF_UserAgent
|
||||
@@ -2414,7 +2522,7 @@ Namespace Editors
|
||||
TAB_HEADERS.Controls.Add(TP_HEADERS_DEF)
|
||||
TAB_HEADERS.Location = New System.Drawing.Point(4, 22)
|
||||
TAB_HEADERS.Name = "TAB_HEADERS"
|
||||
TAB_HEADERS.Size = New System.Drawing.Size(621, 399)
|
||||
TAB_HEADERS.Size = New System.Drawing.Size(621, 424)
|
||||
TAB_HEADERS.TabIndex = 12
|
||||
TAB_HEADERS.Text = "Headers"
|
||||
'
|
||||
@@ -2435,7 +2543,7 @@ Namespace Editors
|
||||
Me.TAB_MAIN.Location = New System.Drawing.Point(0, 0)
|
||||
Me.TAB_MAIN.Name = "TAB_MAIN"
|
||||
Me.TAB_MAIN.SelectedIndex = 0
|
||||
Me.TAB_MAIN.Size = New System.Drawing.Size(629, 400)
|
||||
Me.TAB_MAIN.Size = New System.Drawing.Size(629, 450)
|
||||
Me.TAB_MAIN.TabIndex = 1
|
||||
'
|
||||
'TAB_ENVIR
|
||||
@@ -2443,7 +2551,7 @@ Namespace Editors
|
||||
Me.TAB_ENVIR.Controls.Add(TP_ENVIR)
|
||||
Me.TAB_ENVIR.Location = New System.Drawing.Point(4, 22)
|
||||
Me.TAB_ENVIR.Name = "TAB_ENVIR"
|
||||
Me.TAB_ENVIR.Size = New System.Drawing.Size(621, 399)
|
||||
Me.TAB_ENVIR.Size = New System.Drawing.Size(621, 424)
|
||||
Me.TAB_ENVIR.TabIndex = 9
|
||||
Me.TAB_ENVIR.Text = "Environment"
|
||||
'
|
||||
@@ -2453,40 +2561,42 @@ Namespace Editors
|
||||
'CONTAINER_MAIN.ContentPanel
|
||||
'
|
||||
Me.CONTAINER_MAIN.ContentPanel.Controls.Add(Me.TAB_MAIN)
|
||||
Me.CONTAINER_MAIN.ContentPanel.Size = New System.Drawing.Size(629, 400)
|
||||
Me.CONTAINER_MAIN.ContentPanel.Size = New System.Drawing.Size(629, 450)
|
||||
Me.CONTAINER_MAIN.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.CONTAINER_MAIN.LeftToolStripPanelVisible = False
|
||||
Me.CONTAINER_MAIN.Location = New System.Drawing.Point(0, 0)
|
||||
Me.CONTAINER_MAIN.Name = "CONTAINER_MAIN"
|
||||
Me.CONTAINER_MAIN.RightToolStripPanelVisible = False
|
||||
Me.CONTAINER_MAIN.Size = New System.Drawing.Size(629, 425)
|
||||
Me.CONTAINER_MAIN.Size = New System.Drawing.Size(629, 450)
|
||||
Me.CONTAINER_MAIN.TabIndex = 0
|
||||
Me.CONTAINER_MAIN.TopToolStripPanelVisible = False
|
||||
'
|
||||
'CH_FEED_ADD_TYPE
|
||||
'CH_FEED_OPEN_CTRLF
|
||||
'
|
||||
Me.CH_FEED_ADD_TYPE.AutoSize = True
|
||||
Me.CH_FEED_ADD_TYPE.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.CH_FEED_ADD_TYPE.Location = New System.Drawing.Point(4, 166)
|
||||
Me.CH_FEED_ADD_TYPE.Name = "CH_FEED_ADD_TYPE"
|
||||
Me.CH_FEED_ADD_TYPE.Size = New System.Drawing.Size(613, 19)
|
||||
Me.CH_FEED_ADD_TYPE.TabIndex = 6
|
||||
Me.CH_FEED_ADD_TYPE.Text = "Add the file type to the post title"
|
||||
Me.CH_FEED_ADD_TYPE.UseVisualStyleBackColor = True
|
||||
Me.CH_FEED_OPEN_CTRLF.AutoSize = True
|
||||
Me.CH_FEED_OPEN_CTRLF.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.CH_FEED_OPEN_CTRLF.Location = New System.Drawing.Point(4, 299)
|
||||
Me.CH_FEED_OPEN_CTRLF.Name = "CH_FEED_OPEN_CTRLF"
|
||||
Me.CH_FEED_OPEN_CTRLF.Size = New System.Drawing.Size(613, 19)
|
||||
Me.CH_FEED_OPEN_CTRLF.TabIndex = 11
|
||||
Me.CH_FEED_OPEN_CTRLF.Text = "Use 'Ctrl+F' to open the Feed"
|
||||
TT_MAIN.SetToolTip(Me.CH_FEED_OPEN_CTRLF, "If checked, 'Ctrl+F' will be used to open the Feed. Otherwise, 'Alt+F' will be us" &
|
||||
"ed.")
|
||||
Me.CH_FEED_OPEN_CTRLF.UseVisualStyleBackColor = True
|
||||
'
|
||||
'GlobalSettingsForm
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(629, 425)
|
||||
Me.ClientSize = New System.Drawing.Size(629, 450)
|
||||
Me.Controls.Add(Me.CONTAINER_MAIN)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
Me.Icon = Global.SCrawler.My.Resources.Resources.SettingsIcon_48
|
||||
Me.KeyPreview = True
|
||||
Me.MaximizeBox = False
|
||||
Me.MaximumSize = New System.Drawing.Size(645, 464)
|
||||
Me.MaximumSize = New System.Drawing.Size(645, 489)
|
||||
Me.MinimizeBox = False
|
||||
Me.MinimumSize = New System.Drawing.Size(645, 464)
|
||||
Me.MinimumSize = New System.Drawing.Size(645, 489)
|
||||
Me.Name = "GlobalSettingsForm"
|
||||
Me.ShowInTaskbar = False
|
||||
Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide
|
||||
@@ -2528,6 +2638,7 @@ Namespace Editors
|
||||
TP_OPEN_PROGRESS.PerformLayout()
|
||||
TP_BEHAVIOR_F6.ResumeLayout(False)
|
||||
TP_BEHAVIOR_F6.PerformLayout()
|
||||
CType(Me.TXT_SCHEDULER_SCRIPT, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
TAB_DOWN.ResumeLayout(False)
|
||||
TP_DOWNLOADING.ResumeLayout(False)
|
||||
TP_DOWNLOADING.PerformLayout()
|
||||
@@ -2546,6 +2657,8 @@ Namespace Editors
|
||||
TP_FEED_SES.ResumeLayout(False)
|
||||
CType(Me.NUM_FEED_STORE_SESSION_DATA, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.NUM_FEED_SES_CURR_LOAD_LAST, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
TP_FEED_SPEC_SEARCH.ResumeLayout(False)
|
||||
TP_FEED_SPEC_SEARCH.PerformLayout()
|
||||
TAB_NOTIFY.ResumeLayout(False)
|
||||
TP_NOTIFY_MAIN.ResumeLayout(False)
|
||||
TP_NOTIFY_MAIN.PerformLayout()
|
||||
@@ -2689,5 +2802,11 @@ Namespace Editors
|
||||
Private WithEvents TXT_AUTO_BRUSH_MIN As PersonalUtilities.Forms.Controls.TextBoxExtended
|
||||
Private WithEvents CH_FEED_ADD_SITE As CheckBox
|
||||
Private WithEvents CH_FEED_ADD_TYPE As CheckBox
|
||||
Private WithEvents CH_FEED_ESC_TO_CLOSE As CheckBox
|
||||
Private WithEvents TXT_SCHEDULER_SCRIPT As PersonalUtilities.Forms.Controls.TextBoxExtended
|
||||
Private WithEvents CH_SCHEDULER_SCRIPT_EX_MANUAL As CheckBox
|
||||
Private WithEvents CH_FEED_SPEC_SEARCH As CheckBox
|
||||
Private WithEvents CH_FEED_SPEC_SEARCH_DEEP As CheckBox
|
||||
Private WithEvents CH_FEED_OPEN_CTRLF As CheckBox
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -364,6 +364,9 @@ You can find more detailed information about the missing posts in the form that
|
||||
0 - only the session of the current day.
|
||||
>0 - the value (in minutes) that must elapse since last file download in a session for that session to be considered current.</value>
|
||||
</data>
|
||||
<metadata name="TP_FEED_SPEC_SEARCH.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="TAB_NOTIFY.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
|
||||
@@ -77,6 +77,10 @@ Namespace Editors
|
||||
CH_DOWN_ALL_F6_USE.Checked = .DownloadAll_UseF6
|
||||
CH_DOWN_ALL_F6_NOTIFY.Checked = .DownloadAll_UseF6_Confirm
|
||||
CH_DOWN_ALL_NOTIFY.Checked = .DownloadAll_Confirm
|
||||
TXT_SCHEDULER_SCRIPT.Text = .AutomationScript
|
||||
TXT_SCHEDULER_SCRIPT.Checked = .AutomationScript.Use
|
||||
CH_SCHEDULER_SCRIPT_EX_MANUAL.Checked = .AutomationScript_ExcludeManual
|
||||
CH_FEED_OPEN_CTRLF.Checked = .FeedOpenCtrlF
|
||||
'Notifications
|
||||
CH_NOTIFY_SILENT.Checked = .NotificationsSilentMode
|
||||
CH_NOTIFY_SHOW_BASE.Checked = .ShowNotifications
|
||||
@@ -161,6 +165,9 @@ Namespace Editors
|
||||
CH_FEED_SHOW_FRIENDLY.Checked = .FeedShowFriendlyNames
|
||||
CH_FEED_SHOW_SPEC_MEDIAITEM.Checked = .FeedShowSpecialFeedsMediaItem
|
||||
CH_FEED_UP_FILE_LOC_MOVE.Checked = .FeedMoveCopyUpdateFileLocationOnMove
|
||||
CH_FEED_ESC_TO_CLOSE.Checked = .FeedEscToClose
|
||||
CH_FEED_SPEC_SEARCH.Checked = .FeedSpecialSearchForMissing
|
||||
CH_FEED_SPEC_SEARCH_DEEP.Checked = .FeedSpecialSearchForMissing_Deep
|
||||
End With
|
||||
.MyFieldsChecker = New FieldsChecker
|
||||
With .MyFieldsCheckerE
|
||||
@@ -291,6 +298,10 @@ Namespace Editors
|
||||
.DownloadAll_UseF6.Value = CH_DOWN_ALL_F6_USE.Checked
|
||||
.DownloadAll_UseF6_Confirm.Value = CH_DOWN_ALL_F6_NOTIFY.Checked
|
||||
.DownloadAll_Confirm.Value = CH_DOWN_ALL_NOTIFY.Checked
|
||||
.AutomationScript.Value = TXT_SCHEDULER_SCRIPT.Text
|
||||
.AutomationScript.Use = TXT_SCHEDULER_SCRIPT.Checked
|
||||
.AutomationScript_ExcludeManual.Value = CH_SCHEDULER_SCRIPT_EX_MANUAL.Checked
|
||||
.FeedOpenCtrlF.Value = CH_FEED_OPEN_CTRLF.Checked
|
||||
'Notifications
|
||||
.NotificationsSilentMode = CH_NOTIFY_SILENT.Checked
|
||||
.ShowNotifications.Value = CH_NOTIFY_SHOW_BASE.Checked
|
||||
@@ -373,6 +384,9 @@ Namespace Editors
|
||||
.FeedShowFriendlyNames.Value = CH_FEED_SHOW_FRIENDLY.Checked
|
||||
.FeedShowSpecialFeedsMediaItem.Value = CH_FEED_SHOW_SPEC_MEDIAITEM.Checked
|
||||
.FeedMoveCopyUpdateFileLocationOnMove.Value = CH_FEED_UP_FILE_LOC_MOVE.Checked
|
||||
.FeedEscToClose.Value = CH_FEED_ESC_TO_CLOSE.Checked
|
||||
.FeedSpecialSearchForMissing.Value = CH_FEED_SPEC_SEARCH.Checked
|
||||
.FeedSpecialSearchForMissing_Deep.Value = CH_FEED_SPEC_SEARCH_DEEP.Checked
|
||||
FeedParametersChanged = { .FeedDataRows, .FeedDataColumns, .FeedEndless, .FeedBackColor,
|
||||
.FeedForeColor, .FeedCenterImage}.Cast(Of IXMLValue).Any(detector)
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ Namespace Editors
|
||||
#End Region
|
||||
#Region "Exchange, Path, Labels"
|
||||
Friend Property MyExchangeOptions As Object = Nothing
|
||||
Private ReadOnly _SpecPathPattern As RParams = RParams.DM("\w:\\.*", 0, EDP.ReturnValue)
|
||||
Private ReadOnly _SpecPathPattern As RParams = RParams.DM("(\w:\\|\\\\).*", 0, EDP.ReturnValue)
|
||||
Private ReadOnly Property SpecialPath(ByVal s As SettingsHost) As SFile
|
||||
Get
|
||||
If TXT_SPEC_FOLDER.IsEmptyString Then
|
||||
|
||||
26
SCrawler/MainFrame.Designer.vb
generated
@@ -40,12 +40,14 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Dim MENU_DOWN_ALL_SEP_3 As System.Windows.Forms.ToolStripSeparator
|
||||
Dim MENU_DOWN_ALL_SEP_4 As System.Windows.Forms.ToolStripSeparator
|
||||
Dim MENU_INFO As System.Windows.Forms.ToolStripDropDownButton
|
||||
Dim MENU_INFO_SEP_1 As System.Windows.Forms.ToolStripSeparator
|
||||
Dim MENU_VIEW_SEP_1 As System.Windows.Forms.ToolStripSeparator
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(MainFrame))
|
||||
Me.MENU_INFO_SHOW_INFO = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.MENU_INFO_SHOW_QUEUE = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.MENU_INFO_SHOW_MISSING = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.MENU_INFO_SHOW_USER_METRICS = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.MENU_INFO_USER_SEARCH = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.MENU_SETTINGS = New System.Windows.Forms.ToolStripDropDownButton()
|
||||
Me.BTT_SETTINGS = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.Toolbar_TOP = New System.Windows.Forms.ToolStrip()
|
||||
@@ -140,6 +142,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
MENU_DOWN_ALL_SEP_3 = New System.Windows.Forms.ToolStripSeparator()
|
||||
MENU_DOWN_ALL_SEP_4 = New System.Windows.Forms.ToolStripSeparator()
|
||||
MENU_INFO = New System.Windows.Forms.ToolStripDropDownButton()
|
||||
MENU_INFO_SEP_1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
MENU_VIEW_SEP_1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.Toolbar_TOP.SuspendLayout()
|
||||
Me.Toolbar_BOTTOM.SuspendLayout()
|
||||
@@ -235,7 +238,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
'MENU_INFO
|
||||
'
|
||||
MENU_INFO.AutoToolTip = False
|
||||
MENU_INFO.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.MENU_INFO_SHOW_INFO, Me.MENU_INFO_SHOW_QUEUE, Me.MENU_INFO_SHOW_MISSING, Me.MENU_INFO_SHOW_USER_METRICS})
|
||||
MENU_INFO.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.MENU_INFO_SHOW_INFO, Me.MENU_INFO_SHOW_QUEUE, Me.MENU_INFO_SHOW_MISSING, MENU_INFO_SEP_1, Me.MENU_INFO_SHOW_USER_METRICS, Me.MENU_INFO_USER_SEARCH})
|
||||
MENU_INFO.Image = Global.SCrawler.My.Resources.Resources.InfoPic_32
|
||||
MENU_INFO.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
MENU_INFO.Name = "MENU_INFO"
|
||||
@@ -268,6 +271,11 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Me.MENU_INFO_SHOW_MISSING.Text = "Missing posts"
|
||||
Me.MENU_INFO_SHOW_MISSING.ToolTipText = "Open the 'Missing' form (show information about missing posts)."
|
||||
'
|
||||
'MENU_INFO_SEP_1
|
||||
'
|
||||
MENU_INFO_SEP_1.Name = "MENU_INFO_SEP_1"
|
||||
MENU_INFO_SEP_1.Size = New System.Drawing.Size(209, 6)
|
||||
'
|
||||
'MENU_INFO_SHOW_USER_METRICS
|
||||
'
|
||||
Me.MENU_INFO_SHOW_USER_METRICS.AutoToolTip = True
|
||||
@@ -277,6 +285,13 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Me.MENU_INFO_SHOW_USER_METRICS.Text = "User metrics"
|
||||
Me.MENU_INFO_SHOW_USER_METRICS.ToolTipText = "Open the ""User metrics' form (show information about the user's metrics (such as " &
|
||||
"size, number of files, etc.))."
|
||||
'
|
||||
'MENU_INFO_USER_SEARCH
|
||||
'
|
||||
Me.MENU_INFO_USER_SEARCH.Image = Global.SCrawler.My.Resources.Resources.FindPic_16
|
||||
Me.MENU_INFO_USER_SEARCH.Name = "MENU_INFO_USER_SEARCH"
|
||||
Me.MENU_INFO_USER_SEARCH.Size = New System.Drawing.Size(212, 22)
|
||||
Me.MENU_INFO_USER_SEARCH.Text = "Find user"
|
||||
'
|
||||
'MENU_VIEW_SEP_1
|
||||
'
|
||||
@@ -353,7 +368,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Me.BTT_FEED.Name = "BTT_FEED"
|
||||
Me.BTT_FEED.Size = New System.Drawing.Size(52, 22)
|
||||
Me.BTT_FEED.Text = "Feed"
|
||||
Me.BTT_FEED.ToolTipText = "Feed of recently downloaded data"
|
||||
Me.BTT_FEED.ToolTipText = "Feed of recently downloaded data (Ctrl+F)"
|
||||
'
|
||||
'BTT_CHANNELS
|
||||
'
|
||||
@@ -664,7 +679,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Me.BTT_CONTEXT_DOWN.Image = Global.SCrawler.My.Resources.Resources.StartPic_Green_16
|
||||
Me.BTT_CONTEXT_DOWN.Name = "BTT_CONTEXT_DOWN"
|
||||
Me.BTT_CONTEXT_DOWN.Size = New System.Drawing.Size(221, 22)
|
||||
Me.BTT_CONTEXT_DOWN.Text = "Download data"
|
||||
Me.BTT_CONTEXT_DOWN.Text = "Download"
|
||||
Me.BTT_CONTEXT_DOWN.ToolTipText = ""
|
||||
'
|
||||
'BTT_CONTEXT_DOWN_LIMITED
|
||||
@@ -673,7 +688,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Me.BTT_CONTEXT_DOWN_LIMITED.Image = Global.SCrawler.My.Resources.Resources.StartPic_Green_16
|
||||
Me.BTT_CONTEXT_DOWN_LIMITED.Name = "BTT_CONTEXT_DOWN_LIMITED"
|
||||
Me.BTT_CONTEXT_DOWN_LIMITED.Size = New System.Drawing.Size(221, 22)
|
||||
Me.BTT_CONTEXT_DOWN_LIMITED.Text = "Download data limited"
|
||||
Me.BTT_CONTEXT_DOWN_LIMITED.Text = "Download (limited)"
|
||||
Me.BTT_CONTEXT_DOWN_LIMITED.ToolTipText = "Download top ... posts"
|
||||
'
|
||||
'BTT_CONTEXT_DOWN_DATE_LIMIT
|
||||
@@ -681,7 +696,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Me.BTT_CONTEXT_DOWN_DATE_LIMIT.Image = Global.SCrawler.My.Resources.Resources.StartPic_Green_16
|
||||
Me.BTT_CONTEXT_DOWN_DATE_LIMIT.Name = "BTT_CONTEXT_DOWN_DATE_LIMIT"
|
||||
Me.BTT_CONTEXT_DOWN_DATE_LIMIT.Size = New System.Drawing.Size(221, 22)
|
||||
Me.BTT_CONTEXT_DOWN_DATE_LIMIT.Text = "Download data to the date"
|
||||
Me.BTT_CONTEXT_DOWN_DATE_LIMIT.Text = "Download (to the date)"
|
||||
Me.BTT_CONTEXT_DOWN_DATE_LIMIT.ToolTipText = ""
|
||||
'
|
||||
'BTT_CONTEXT_EDIT
|
||||
@@ -993,4 +1008,5 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Private WithEvents BTT_VIEW_FILTER_SAVE As ToolStripMenuItem
|
||||
Private WithEvents BTT_VIEW_FILTER_LOAD As ToolStripMenuItem
|
||||
Private WithEvents BTT_VIEW_FILTER_SAVE_AS_GROUP As ToolStripMenuItem
|
||||
Private WithEvents MENU_INFO_USER_SEARCH As ToolStripMenuItem
|
||||
End Class
|
||||
@@ -171,6 +171,9 @@
|
||||
<metadata name="MENU_INFO.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="MENU_INFO_SEP_1.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="MENU_VIEW_SEP_1.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
|
||||
@@ -241,12 +241,14 @@ CloseResume:
|
||||
|
||||
If Not b Then
|
||||
b = True
|
||||
If e.Control And e.KeyCode = Keys.F Then
|
||||
MySearch.FormShow()
|
||||
If Settings.ShortcutOpenFeed = e Then
|
||||
BTT_FEED.PerformClick()
|
||||
ElseIf e.Alt And e.KeyCode = Keys.A Then
|
||||
BTT_DOWN_AUTOMATION.PerformClick()
|
||||
ElseIf e.Alt And e.KeyCode = Keys.P Then
|
||||
BTT_PR_INFO.PerformClick()
|
||||
ElseIf Settings.ShortcutOpenSearch = e Or (e.Alt And e.KeyCode = Keys.U) Or (e.Control And e.KeyCode = Keys.U) Then
|
||||
MySearch.FormShow()
|
||||
Else
|
||||
b = False
|
||||
End If
|
||||
@@ -477,6 +479,9 @@ CloseResume:
|
||||
Private Sub MENU_INFO_SHOW_USER_METRICS_Click(sender As Object, e As EventArgs) Handles MENU_INFO_SHOW_USER_METRICS.Click
|
||||
MyUserMetrics.FormShow(EDP.LogMessageValue)
|
||||
End Sub
|
||||
Private Sub MENU_INFO_USER_SEARCH_Click(sender As Object, e As EventArgs) Handles MENU_INFO_USER_SEARCH.Click
|
||||
MySearch.FormShow()
|
||||
End Sub
|
||||
#End Region
|
||||
Friend Sub ShowFeed() Handles BTT_FEED.Click, BTT_TRAY_FEED_SHOW.Click
|
||||
If MyFeed Is Nothing Then
|
||||
@@ -1515,6 +1520,8 @@ CloseResume:
|
||||
If Not user Is Nothing AndAlso user.IsCollection Then
|
||||
With DirectCast(user, UserDataBind)
|
||||
BTT_CONTEXT_DOWN.DropDownItems.AddRange(.ContextDown)
|
||||
BTT_CONTEXT_DOWN_LIMITED.DropDownItems.AddRange(.ContextDownLimit)
|
||||
BTT_CONTEXT_DOWN_DATE_LIMIT.DropDownItems.AddRange(.ContextDownDate)
|
||||
BTT_CONTEXT_EDIT.DropDownItems.AddRange(.ContextEdit)
|
||||
BTT_CONTEXT_DELETE.DropDownItems.AddRange(.ContextDelete)
|
||||
BTT_CONTEXT_ERASE.DropDownItems.AddRange(.ContextErase)
|
||||
@@ -1524,6 +1531,8 @@ CloseResume:
|
||||
End If
|
||||
Else
|
||||
BTT_CONTEXT_DOWN.DropDownItems.Clear()
|
||||
BTT_CONTEXT_DOWN_LIMITED.DropDownItems.Clear()
|
||||
BTT_CONTEXT_DOWN_DATE_LIMIT.DropDownItems.Clear()
|
||||
BTT_CONTEXT_EDIT.DropDownItems.Clear()
|
||||
BTT_CONTEXT_DELETE.DropDownItems.Clear()
|
||||
BTT_CONTEXT_ERASE.DropDownItems.Clear()
|
||||
@@ -1629,10 +1638,11 @@ CloseResume:
|
||||
Return ErrorsDescriber.Execute(EDP.SendToLog + EDP.ReturnValue, ex, "[MainFrame.GetSelectedUserArray]", New List(Of IUserData))
|
||||
End Try
|
||||
End Function
|
||||
Private Enum DownUserLimits : None : Number : [Date] : End Enum
|
||||
Private Sub DownloadSelectedUser(ByVal UseLimits As DownUserLimits, Optional ByVal IncludeInTheFeed As Boolean = True)
|
||||
Friend Enum DownUserLimits : None : Number : [Date] : End Enum
|
||||
Friend Sub DownloadSelectedUser(ByVal UseLimits As DownUserLimits, Optional ByVal IncludeInTheFeed As Boolean = True,
|
||||
Optional ByVal SUser As IUserData = Nothing)
|
||||
Const MsgTitle$ = "Download limit"
|
||||
Dim users As List(Of IUserData) = GetSelectedUserArray()
|
||||
Dim users As List(Of IUserData) = If(SUser Is Nothing, GetSelectedUserArray(), New List(Of IUserData) From {SUser})
|
||||
If users.ListExists Then
|
||||
Dim limit%? = Nothing
|
||||
Dim _from As Date? = Nothing
|
||||
@@ -1699,7 +1709,7 @@ ResumeDownloadingOperation:
|
||||
$"Do you want to download them all{fStr}?{vbNewLine.StringDup(2)}" &
|
||||
$"Selected users:{vbNewLine}{uStr}", "Multiple users selected"},
|
||||
MsgBoxStyle.Question + MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
users.ForEach(Sub(u)
|
||||
users.ForEach(Sub(ByVal u As IUserData)
|
||||
u.DownloadTopCount = limit
|
||||
u.DownloadDateFrom = _from
|
||||
u.DownloadDateTo = _to
|
||||
|
||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2024.6.25.0")>
|
||||
<Assembly: AssemblyFileVersion("2024.6.25.0")>
|
||||
<Assembly: AssemblyVersion("2024.11.21.0")>
|
||||
<Assembly: AssemblyFileVersion("2024.11.21.0")>
|
||||
<Assembly: NeutralResourcesLanguage("en")>
|
||||
|
||||
10
SCrawler/My Project/Resources.Designer.vb
generated
@@ -150,6 +150,16 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property FindPic_16() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("FindPic_16", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
|
||||
@@ -223,4 +223,7 @@
|
||||
<data name="CutPic_48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Content\Pictures\CutPic_48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="FindPic_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Content\Pictures\FindPic_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -335,7 +335,7 @@ Namespace Plugin.Hosts
|
||||
ByVal ColNameOld As String, ByVal ColNameNew As String) As Boolean
|
||||
Dim p As PauseModes = NoPauseMode
|
||||
Try
|
||||
If UpdateHostPath_CheckDownloader() Then Return False
|
||||
If Not UpdateHostPath_CheckDownloader() Then Return False
|
||||
If Not AEquals(Of String)(PathOld.PathWithSeparator, PathNew.PathWithSeparator) Or Not AEquals(Of String)(ColNameOld, ColNameNew) Then
|
||||
p = Settings.Automation.Pause
|
||||
Settings.Automation.Pause = PauseModes.Unlimited
|
||||
@@ -365,7 +365,7 @@ Namespace Plugin.Hosts
|
||||
Optional ByVal ForceCollections As Boolean = False) As Boolean
|
||||
Dim p As PauseModes = NoPauseMode
|
||||
Try
|
||||
If UpdateHostPath_CheckDownloader() Then Return False
|
||||
If Not UpdateHostPath_CheckDownloader() Then Return False
|
||||
If Not PathNew.IsEmptyString And Settings.UsersList.Count > 0 Then
|
||||
Dim hp As SFile = Host.Path(False, True)
|
||||
Dim diffPaths As Boolean = (Abs And hp.PathWithSeparator = PathOld.PathWithSeparator) Or
|
||||
|
||||
@@ -798,6 +798,7 @@
|
||||
<Content Include="API\OnlyFans\DynamicRulesAll.txt" />
|
||||
<Content Include="API\OnlyFans\OFScraperConfigPatternConstants.txt" />
|
||||
<Content Include="Content\Pictures\CutPic_48.png" />
|
||||
<Content Include="Content\Pictures\FindPic_16.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
|
||||
@@ -10,6 +10,7 @@ Imports PersonalUtilities.Functions.Messaging
|
||||
Imports PersonalUtilities.Functions.XML
|
||||
Imports PersonalUtilities.Functions.XML.Base
|
||||
Imports PersonalUtilities.Functions.XML.Objects
|
||||
Imports PersonalUtilities.Forms
|
||||
Imports PersonalUtilities.Forms.Controls
|
||||
Imports PersonalUtilities.Forms.Controls.Base
|
||||
Imports PersonalUtilities.Tools
|
||||
@@ -179,8 +180,12 @@ Friend Class SettingsCLS : Implements IDownloaderSettings, IDisposable
|
||||
Friend ReadOnly Property LastCollections As List(Of String)
|
||||
Friend ReadOnly Property DownloadLocations As STDownloader.DownloadLocationsCollection
|
||||
Friend ReadOnly Property GlobalLocations As STDownloader.DownloadLocationsCollection
|
||||
#Region "Scheduler"
|
||||
Friend Property Automation As Scheduler
|
||||
Friend ReadOnly Property AutomationFile As XMLValue(Of String)
|
||||
Friend ReadOnly Property AutomationScript As XMLValueUse(Of String)
|
||||
Friend ReadOnly Property AutomationScript_ExcludeManual As XMLValue(Of Boolean)
|
||||
#End Region
|
||||
Friend ReadOnly Property Feeds As FeedSpecialCollection
|
||||
Friend ReadOnly Property BlackList As List(Of UserBan)
|
||||
Friend ReadOnly Property Colors As Editors.DataColorCollection
|
||||
@@ -188,6 +193,18 @@ Friend Class SettingsCLS : Implements IDownloaderSettings, IDisposable
|
||||
Private ReadOnly BlackListFile As SFile = $"{SettingsFolderName}\BlackList.txt"
|
||||
Private ReadOnly UsersSettingsFile As SFile = $"{SettingsFolderName}\Users.xml"
|
||||
Private ReadOnly Property SettingsVersion As XMLValue(Of Integer)
|
||||
Private Const SettingsVersionCurrent As Integer = 1
|
||||
Friend ShortcutOpenFeed As New ButtonKey(Keys.F, True)
|
||||
Friend ShortcutOpenSearch As New ButtonKey(Keys.F,, True)
|
||||
Private Sub ChangeFeedOpenMode()
|
||||
If FeedOpenCtrlF Then
|
||||
ShortcutOpenFeed = New ButtonKey(Keys.F, True)
|
||||
ShortcutOpenSearch = New ButtonKey(Keys.F,, True)
|
||||
Else
|
||||
ShortcutOpenFeed = New ButtonKey(Keys.F,, True)
|
||||
ShortcutOpenSearch = New ButtonKey(Keys.F, True)
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Initializer"
|
||||
Friend Sub New()
|
||||
@@ -210,13 +227,16 @@ Friend Class SettingsCLS : Implements IDownloaderSettings, IDisposable
|
||||
Colors = New Editors.DataColorCollection
|
||||
EnvironmentProgramsList = New List(Of String)
|
||||
|
||||
AutomationFile = New XMLValue(Of String)("AutomationFile",, MyXML)
|
||||
SiteSettingsShowHiddenControls = MyXML.Value("SiteSettingsShowHiddenControls").FromXML(Of Boolean)(False)
|
||||
|
||||
Dim n() As String
|
||||
|
||||
SettingsVersion = New XMLValue(Of Integer)("SettingsVersion", 0, MyXML)
|
||||
|
||||
Dim n() As String = {"Scheduler"}
|
||||
AutomationFile = New XMLValue(Of String)("File",, MyXML, n)
|
||||
If SettingsVersion.Value = 0 AndAlso MyXML.Contains(AutomationFile.Name) Then AutomationFile.Value = MyXML.Value(AutomationFile.Name)
|
||||
AutomationScript = New XMLValueUse(Of String)("Script", String.Empty,, MyXML, n)
|
||||
AutomationScript_ExcludeManual = New XMLValue(Of Boolean)("ScriptExcludeManual", True, MyXML, n)
|
||||
|
||||
SiteSettingsShowHiddenControls = MyXML.Value("SiteSettingsShowHiddenControls").FromXML(Of Boolean)(False)
|
||||
|
||||
#Region "Properties: environment"
|
||||
'Environment
|
||||
n = {"MediaEnvironment"}
|
||||
@@ -291,6 +311,9 @@ Friend Class SettingsCLS : Implements IDownloaderSettings, IDisposable
|
||||
DownloadAll_UseF6 = New XMLValue(Of Boolean)("DownloadAll_UseF6", True, MyXML, n)
|
||||
DownloadAll_UseF6_Confirm = New XMLValue(Of Boolean)("DownloadAll_UseF6_Confirm", False, MyXML, n)
|
||||
DownloadAll_Confirm = New XMLValue(Of Boolean)("DownloadAll_Confirm", False, MyXML, n)
|
||||
FeedOpenCtrlF = New XMLValue(Of Boolean)("FeedOpenCtrlF", True, MyXML, n)
|
||||
AddHandler FeedOpenCtrlF.ValueChanged, AddressOf ChangeFeedOpenMode
|
||||
ChangeFeedOpenMode()
|
||||
|
||||
'Notifications
|
||||
n = {"Notifications"}
|
||||
@@ -393,6 +416,9 @@ Friend Class SettingsCLS : Implements IDownloaderSettings, IDisposable
|
||||
FeedLastModeSubscriptions = New XMLValue(Of Boolean)("LastModeSubscriptions", False, MyXML, n)
|
||||
FeedShowFriendlyNames = New XMLValue(Of Boolean)("ShowFriendlyNames", True, MyXML, n)
|
||||
FeedShowSpecialFeedsMediaItem = New XMLValue(Of Boolean)("ShowSpecialFeedsMediaItem", False, MyXML, n)
|
||||
FeedEscToClose = New XMLValue(Of Boolean)("EscToClose", True, MyXML, n)
|
||||
FeedSpecialSearchForMissing = New XMLValue(Of Boolean)("FeedSpecialSearchForMissing", True, MyXML, n)
|
||||
FeedSpecialSearchForMissing_Deep = New XMLValue(Of Boolean)("FeedSpecialSearchForMissing_Deep", False, MyXML, n)
|
||||
n = {"Feed", "MoveCopy"}
|
||||
FeedMoveCopyLastLocation = New XMLValue(Of SFile)("LastLocation",, MyXML, n)
|
||||
FeedMoveCopyUpdateFileLocationOnMove = New XMLValue(Of Boolean)("UpdateFileLocationOnMove", True, MyXML, n)
|
||||
@@ -463,6 +489,8 @@ Friend Class SettingsCLS : Implements IDownloaderSettings, IDisposable
|
||||
AdvancedFilter.IsViewFilter = True
|
||||
Labels.AddRange({AdvancedFilter}.GetGroupsLabels, False)
|
||||
|
||||
SettingsVersion.Value = SettingsVersionCurrent
|
||||
|
||||
MyXML.EndUpdate()
|
||||
If MyXML.ChangesDetected Then MyXML.Sort() : MyXML.UpdateData()
|
||||
|
||||
@@ -912,6 +940,7 @@ Friend Class SettingsCLS : Implements IDownloaderSettings, IDisposable
|
||||
Friend ReadOnly Property DownloadAll_UseF6 As XMLValue(Of Boolean)
|
||||
Friend ReadOnly Property DownloadAll_UseF6_Confirm As XMLValue(Of Boolean)
|
||||
Friend ReadOnly Property DownloadAll_Confirm As XMLValue(Of Boolean)
|
||||
Friend ReadOnly Property FeedOpenCtrlF As XMLValue(Of Boolean)
|
||||
#End Region
|
||||
#Region "Notifications"
|
||||
Friend Enum NotificationObjects
|
||||
@@ -1098,6 +1127,9 @@ Friend Class SettingsCLS : Implements IDownloaderSettings, IDisposable
|
||||
Friend ReadOnly Property FeedLastModeSubscriptions As XMLValue(Of Boolean)
|
||||
Friend ReadOnly Property FeedShowFriendlyNames As XMLValue(Of Boolean)
|
||||
Friend ReadOnly Property FeedShowSpecialFeedsMediaItem As XMLValue(Of Boolean)
|
||||
Friend ReadOnly Property FeedEscToClose As XMLValue(Of Boolean)
|
||||
Friend ReadOnly Property FeedSpecialSearchForMissing As XMLValue(Of Boolean)
|
||||
Friend ReadOnly Property FeedSpecialSearchForMissing_Deep As XMLValue(Of Boolean)
|
||||
#Region "MoveCopy"
|
||||
Friend ReadOnly Property FeedMoveCopyLastLocation As XMLValue(Of SFile)
|
||||
Friend ReadOnly Property FeedMoveCopyUpdateFileLocationOnMove As XMLValue(Of Boolean)
|
||||
|
||||
@@ -13,6 +13,25 @@ Friend Class UserImage : Inherits ImageRenderer
|
||||
Friend Const ImagePostfix_Small As String = "_Small"
|
||||
Private _LargeAddress As SFile
|
||||
Private _SmallAddress As SFile
|
||||
Private _ForceSaveOrig As Boolean = False
|
||||
Friend Shared Function NewUserPicture(ByVal ImageOrig As SFile, ByVal Destination As SFile,
|
||||
Optional ByVal Save As Boolean = True, Optional ByVal GetInstance As Boolean = False) As UserImage
|
||||
Dim uImg As New UserImage(ImageOrig, Destination)
|
||||
With uImg
|
||||
._ForceSaveOrig = ImageOrig.Extension.IsEmptyString OrElse ImageOrig.Extension.ToLower = "gif" OrElse Not {"jpg", "jpeg", "png"}.Contains(ImageOrig.Extension.ToLower)
|
||||
If Not ._ForceSaveOrig Then
|
||||
If .Address.Exists AndAlso Not .Address.Delete(SFO.File,, EDP.ReturnValue) Then ._ForceSaveOrig = True
|
||||
If Not ._ForceSaveOrig AndAlso Not ImageOrig.Copy(.Address) Then ._ForceSaveOrig = True
|
||||
End If
|
||||
If Not ._ForceSaveOrig Then
|
||||
._SmallAddress.Extension = .Address.Extension
|
||||
._LargeAddress.Extension = .Address.Extension
|
||||
End If
|
||||
If Save Then .Save()
|
||||
End With
|
||||
If Not GetInstance Then uImg.Dispose() : uImg = Nothing
|
||||
Return uImg
|
||||
End Function
|
||||
Friend Sub New(ByVal _ImgOriginal As SFile, ByVal Destination As SFile, Optional ByVal GenerateLargeSmallPictures As Boolean = True)
|
||||
MyBase.New(_ImgOriginal)
|
||||
Dim f As SFile = Destination
|
||||
@@ -71,7 +90,7 @@ Friend Class UserImage : Inherits ImageRenderer
|
||||
End With
|
||||
End Function
|
||||
Public Overrides Sub Save()
|
||||
MyBase.Save()
|
||||
If _ForceSaveOrig Then MyBase.Save()
|
||||
Small.Save(_SmallAddress)
|
||||
Large.Save(_LargeAddress)
|
||||
End Sub
|
||||
|
||||
@@ -4,4 +4,8 @@ REM Replace 'd:\Downloads\SocialNetworks\' with the path to your SCrawler data f
|
||||
REM THIS SCRIPT IS NOT SUITABLE FOR 7ZIP OR OTHER ARCHIVING PROGRAMS.
|
||||
REM But I believe 7Zip also has CLI commands
|
||||
|
||||
"C:\Program Files\WinRAR\WinRAR.exe" a -r -ep1 -o+ -ag_YYYYMMDD_HHMMSS -m5 -tl -n*.txt -n*.xml "d:\Downloads\SocialNetworks\SCrawlerBackup.rar" "d:\Downloads\SocialNetworks\"
|
||||
REM This line archives SCrawler settings files.
|
||||
"C:\Program Files\WinRAR\WinRAR.exe" a -r -ep1 -o+ -ag_YYYYMMDD_HHMMSS -m5 -tl "D:\MyPrograms\SCrawler\Backup\Settings.rar" "D:\MyPrograms\SCrawler\Settings\"
|
||||
|
||||
REM This line archives SCrawler users' settings files.
|
||||
"C:\Program Files\WinRAR\WinRAR.exe" a -r -ep1 -o+ -ag_YYYYMMDD_HHMMSS -m5 -tl -n*.txt -n*.xml "D:\MyPrograms\SCrawler\Backup\SCrawlerBackup.rar" "D:\MyPrograms\SCrawler\Data\"
|
||||