Skip to content

Commit

Permalink
fix: Prevent guess url failed from missing edge cdn
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Jul 7, 2022
1 parent d9f4e3d commit e445541
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xmcl-runtime/lib/util/curseforge.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export function guessCurseforgeFileUrl(id: number, name: string) {
const fileId = id.toString()
return `https://mediafiles.forgecdn.net/files/${fileId.slice(0, 4)}/${fileId.slice(4)}/${name}`
return [`https://edge.forgecdn.net/files/${fileId.slice(0, 4)}/${fileId.slice(4)}/${name}`, `https://mediafiles.forgecdn.net/files/${fileId.slice(0, 4)}/${fileId.slice(4)}/${name}`]
}

0 comments on commit e445541

Please sign in to comment.