Skip to content

Commit

Permalink
Fix windows build
Browse files Browse the repository at this point in the history
write frames to file
  • Loading branch information
lifegpc authored Sep 22, 2024
1 parent 08bca6d commit 5aa3870
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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(
Expand Down
1 change: 1 addition & 0 deletions ugoira/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit 5aa3870

Please sign in to comment.