fix(album_mapping.json): 移除不再使用的相册ID,更新生成CSV的逻辑以读取本地配置

This commit is contained in:
wood chen 2025-05-17 17:01:48 +08:00
parent bd5f86d928
commit 54067cd123
2 changed files with 4 additions and 11 deletions

View File

@ -3,5 +3,5 @@
"pic/ai.csv": ["18"],
"pic/fj.csv": ["16"],
"pic/ecy.csv": ["14"],
"pic/truegirl.csv": ["10","21","22","23","24","25","26","27","28","29"]
"pic/truegirl.csv": ["10"]
}

View File

@ -37,17 +37,10 @@ func main() {
panic("API_TOKEN environment variable is required")
}
// 从远程获取相册映射配置
resp, err := http.Get("https://github-file-2mq.pages.dev/random-api.czl.net/album_mapping.json")
// 读取本地的相册映射配置
mappingFile, err := os.ReadFile("lankong_tools/album_mapping.json")
if err != nil {
panic(fmt.Sprintf("Failed to fetch album mapping: %v", err))
}
defer resp.Body.Close()
// 读取响应内容
mappingFile, err := io.ReadAll(resp.Body)
if err != nil {
panic(fmt.Sprintf("Failed to read album mapping response: %v", err))
panic(fmt.Sprintf("Failed to read album mapping file: %v", err))
}
var albumMapping AlbumMapping