You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, no way for us to config two same downlaoders with different command line for even same pv service.
So in config.downloader, instead of having each pv service listing all available downloaders, lets it be a list of config with name. And the enablement will use the name as the order of downloaders for that pv service.
enablement:
NicoNicoDouga: # enable downloaders from NicoNicoDouga's available downloaders. e.g. nndownload
Youtube:
Bilibili:
downloader:
NicoNicoDouga:
# settings of youtube-dl/ytp-dl for downloading niconico videos
# settings must make sure nothing blocks from downloading the video (e.g. don't put --version on yt-dlp)
# do the same for all other downloaders.
youtube-dl:
launch-cmd:
external-args:
nndownload:
launch-cmd:
external-args:
Youtube:
youtube-dl:
launch-cmd:
external-args:
Bilibili:
youtube-dl:
launch-cmd:
external-args:
Unfortauntely, we decided to not use spring-boot-starter-configuration to handle business logic validation of our various configs. In fact, nor should it be. So the final configuration will be like:
downloader:
NicoNicoDouga:
# settings of youtube-dl/ytp-dl for downloading niconico videos# settings must make sure nothing blocks from downloading the video (e.g. don't put --version on yt-dlp)# do the same for all other downloaders.
- name: using yt-dlp type: youtube-dllaunch-cmd: yt-dlp.exeexternal-args: -v, --username, xxx, --password, yyy
- name: using youtube-dltype: youtube-dllaunch-cmd: yt-dlp.exeexternal-args: -v, --username, xxx, --password, yyy
- name: using nndownloadtype: nndownloadlaunch-cmd: nndownload.exeusername:
password:
session-cookie:
Youtube:
- name: using yt-dlp type: youtube-dloptions:
launch-cmd: yt-dlp.exeexternal-args: -v, --username, xxx, --password, yyyBilibili:
- name: using yt-dlp type: youtube-dllaunch-cmd: yt-dlp.exeexternal-args: -v, --username, xxx, --password, yyy
So pretty much we are just mapping to Map<PVServiceEnum, List<RawDownloaderConfig>> where RawDownloaderConfig contains everything that any download config could declare (in above lists, we will have name, type, launch-cmd, external-args, username, password, session-cookie where only name and type are not null), because a POC has shown that @ConfigurationPropertiesBinding doesn't work with Collection type, only for String which is useless
And then we will have custom logic and validation to build up all downloaders, and use FailureAnalyzer to provide user-friendly error msg upon downloader config error
Currently, no way for us to config two same downlaoders with different command line for even same pv service.
So in
config.downloader
, instead of having each pv service listing all available downloaders, lets it be a list of config with name. And the enablement will use the name as the order of downloaders for that pv service.[vocadb-video-downloader-new] vvd-downloader/src/main/resources/application.yml (Lines 37-65)
Open in IDE · Open on GitHub
Created from JetBrains using CodeStream
The text was updated successfully, but these errors were encountered: