Skip to content

Commit

Permalink
fix(WebSiteGenerator): 更新今日图片生成逻辑
Browse files Browse the repository at this point in the history
更新今日图片生成逻辑,增加文件名格式化并正确传递给写入方法。
  • Loading branch information
niumoo committed Jan 7, 2025
1 parent cea3922 commit 21eee11
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/wdbyte/bing/html/WebSiteGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ public void htmlGenerator() throws IOException {
}

private void htmlGeneratorToday(List<Images> bingImages) throws IOException {
HtmlFileUtils.writeToday(bingImages.get(0).getUrl());
String url = bingImages.get(0).getUrl();
String fileName = String.format("%s-%s.jpg", Wallpaper.CURRENT_REGION, bingImages.get(0).getDate());
HtmlFileUtils.writeToday(fileName + ":" + url);
}

public void htmlGeneratorIndex(List<Images> bingImages, Map<String, List<Images>> monthMap) throws IOException {
Expand Down

0 comments on commit 21eee11

Please sign in to comment.