Fix windows build

write frames to file
This commit is contained in:
2024-09-22 04:55:23 +00:00
committed by GitHub
parent 08bca6d766
commit 5aa3870f55
2 changed files with 8 additions and 0 deletions

View File

@@ -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(

View File

@@ -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}")