summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2023-08-09tree-wide: pass pointer-to-pointer to correctly free pointersMole Shang8-49/+53
2023-08-09extractors/bilibili: fix page in filenameMole Shang1-4/+16
2023-08-09process_url: copy only if p_cookie is validMole Shang1-2/+4
2023-08-09Revert "process_url: always match substrings instead of comparing"Mole Shang2-2/+3
Target video files can also be under the domain, revert the commit for now. Needs further implemention. This reverts commit 9c2b0b39d73da02bb9d255e9dc7f81db200930b1.
2023-08-09process_url: set referer in the separate functionMole Shang5-17/+12
2023-08-09process_url: only get content length when requestedMole Shang1-4/+6
2023-08-09process_url: expose some new functions to be control cookies and refererMole Shang3-7/+34
2023-08-09utils/types: support resizing an array to 0Mole Shang1-4/+15
2023-08-09process_url: always match substrings instead of comparingMole Shang2-3/+2
2023-08-09extractors/haokan: catch get errorsMole Shang1-29/+30
2023-08-09extractors/bilibili: fix get page queryMole Shang1-1/+1
Since cee1e6c, the first match should be always in result.str[0]
2023-08-08extractors: support haokan videosMole Shang4-4/+64
2023-08-08utils: expose mimeType2ext in utilsMole Shang3-19/+21
2023-08-08utils: add a method to substitute string using PCREMole Shang2-1/+61
2023-08-08process_url: expose get_info with a new param `p_content_type`Mole Shang2-7/+14
2023-08-08utils: fix multi-patterns matchingMole Shang1-7/+5
2023-08-08process_url: copy full URLMole Shang1-2/+2
2023-08-08process_url: change strings to be dynamic allocatedMole Shang2-6/+7
2023-08-08ui: add about menuMole Shang1-1/+33
2023-08-08ui: match size measures with corresponding unitsMole Shang3-4/+47
Calculate the size in UI to align with suitable units.
2023-08-08process_url: do not block ui thread on callbackMole Shang3-6/+9
2023-08-08utils/ffmpeg: close all inputs during cleanupMole Shang1-0/+1
... so that we can safely remove the file later.
2023-08-07hinata: support specifying cookies in curl_easyMole Shang3-3/+36
We use tomlc99 to parse strings. To use cookies for higher resolution video downloading, add a config.toml in the executable path. e.g. ```filename: config.toml cookie="SESSDATA=xxx; some_more_cookie=xxx" ```
2023-08-07process_url: use goto to simplify error processingMole Shang1-8/+5
2023-08-07process_url: add retries while downloadingMole Shang2-3/+11
2023-08-07extractors/bilibili: append page info in filename (if possible)Mole Shang1-3/+8
Also fixes an malloc size error. Previously we allocated too small memory for callback_struct.filename, which in turn leads to unexpected memory corruption.
2023-08-07process_url: free malloc'd dataMole Shang1-3/+4
2023-08-07extractors/extractor: add missing headerMole Shang1-0/+1
2023-08-07ui: correct stat types' print formatMole Shang1-2/+3
- Use libcurl's builtin macro CURL_FORMAT_CURL_OFF_T to correctly print status. - Cast pct to unsigned char as it should always <= 100
2023-08-07utils: split type definition code into utils/typesMole Shang7-167/+182
2023-08-07utils: move to a separate folderMole Shang6-5/+5
2023-08-07extractors/bilibili: format logsMole Shang1-5/+5
2023-08-07extractors/bilibili: use ffmpeg to merge files once downloadedMole Shang5-38/+277
2023-08-06process_url: initial callback supportMole Shang4-17/+63
2023-08-06process_url: move constant macros to constants.hMole Shang3-4/+4
2023-08-06process_url: strip illegal characters in filenameMole Shang3-0/+22
There are edge cases when a retrived title contains illegal characters (e.g. '/'). Replace it with a space to ensure a valid filename. Reproducible case: https://www.bilibili.com/video/av20827366/ (title="【2K/60fps】这可能是我做过最美的miku了【boomclap布料解算版】")
2023-08-06bilibili: fix page matchingMole Shang1-1/+1
Always use the second result.
2023-08-06hinata: set locale to UTF-8 by defaultMole Shang1-0/+4
Enable UTF-8 mode on Windows to avoid filename encoding issues. Ref: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/setlocale-wsetlocale?view=msvc-170#utf-8-support
2023-08-06xmake: migrate from NFD to tinyfiledialogsMole Shang2-14/+5
nativefiledialog-extended works great on Linux w/ portal support, but somehow is too complex to build on Windows. [1] Switch to tinyfd for simplicity. [1]: Visual Studio CL.exe would fail with MSB6001. ``` Error MSB6001: Invalid command line switch for "CL.exe". Item has already been added. Key in dictionary: 'VCInstallDir' Key being added: 'VCINSTALLDIR' ``` For further information, see below: https://social.msdn.microsoft.com/Forums/vstudio/en-US/5de6d7e3-7a38-4712-ba59-be179808bf9e/error-msb6001-invalid-command-line-switch-for-clexe https://github.com/dotnet/msbuild/issues/5726 It's been over 10 years, and Microsoft still claims that case sensitivity thing is a FEATURE. Holy M$, Thank you.
2023-08-05hinata: initial commitMole Shang16-0/+1973