Skip to content

Commit

Permalink
Again fix the source data repo URL.
Browse files Browse the repository at this point in the history
  • Loading branch information
ShikiSuen committed Oct 22, 2024
1 parent 05eaaeb commit ffdbfef
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Sources/GachaMetaGeneratorModule/Components/SupportedGame.swift
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,7 @@ extension GachaMetaGenerator.SupportedGame {

/// Only used for dealing with Dimbreath's repos.
func getLangDataURL(for lang: GachaMetaGenerator.GachaDictLang) -> URL {
var urlStr = repoHeader + repoName + "TextMap/\(lang.filename)"
if self == .starRail {
urlStr = urlStr.replacingOccurrences(of: "CHS", with: "CN")
}
return URL(string: urlStr)!
URL(string: repoHeader + repoName + "TextMap/\(lang.filename)")!
}

// MARK: Private
Expand All @@ -189,15 +185,15 @@ extension GachaMetaGenerator.SupportedGame {
private var repoHeader: String {
switch self {
case .genshinImpact: return "https://gitlab.com/"
case .starRail: return "https://raw.githubusercontent.com/"
case .starRail: return "https://gitlab.com/"
}
}

/// Only used for dealing with Dimbreath's repos.
private var repoName: String {
switch self {
case .genshinImpact: return "Dimbreath/AnimeGameData/-/raw/master/"
case .starRail: return "EggLinks/DanhengServer-Resources/main/"
case .starRail: return "Dimbreath/TurnBasedGameData/-/raw/main/"
}
}
}

0 comments on commit ffdbfef

Please sign in to comment.