mirror of
https://github.com/lifegpc/pixiv_downloader.git
synced 2026-06-06 05:49:01 +08:00
Fix windows build
write frames to file
This commit is contained in:
@@ -16,6 +16,7 @@ use crate::downloader::DownloaderResult;
|
||||
use crate::downloader::LocalFile;
|
||||
use crate::error::PixivDownloaderError;
|
||||
use crate::ext::try_err::TryErr;
|
||||
use crate::ext::try_err::TryErr4;
|
||||
use crate::fanbox::article::block::FanboxArticleBlock;
|
||||
use crate::fanbox::article::url_embed::FanboxArticleUrlEmbed;
|
||||
use crate::fanbox::check::CheckUnknown;
|
||||
@@ -341,6 +342,12 @@ pub async fn download_artwork_ugoira(
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
let frames_file_name = base.join(format!("{}_frames.json", id));
|
||||
std::fs::write(
|
||||
&frames_file_name,
|
||||
json::stringify((&ugoira_data["frames"]).clone()),
|
||||
)
|
||||
.try_err4(gettext("Failed to write frames info to file:"))?;
|
||||
let frames = UgoiraFrames::from_json(&ugoira_data["frames"])?;
|
||||
let output_file_name = base.join(format!("{}.mp4", id));
|
||||
convert_ugoira_to_mp4(
|
||||
|
||||
@@ -60,6 +60,7 @@ CHECK_INCLUDE_FILES(getopt.h HAVE_GETOPT_H)
|
||||
if (NOT HAVE_GETOPT_H)
|
||||
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../getopt" "${CMAKE_CURRENT_BINARY_DIR}/getopt")
|
||||
target_include_directories(ugoira_cli PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../getopt")
|
||||
target_link_libraries(ugoira_cli getopt)
|
||||
endif()
|
||||
target_link_libraries(ugoira_cli ugoira RapidJSON)
|
||||
target_include_directories(ugoira_cli PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
Reference in New Issue
Block a user