Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/first_launch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,6 @@ export default async function runFirstLaunch() {

console.log("\nIf you have an osu! API (v2) key, you can add it to the keys.json file to receive jobs that require a scoreboard. You can request an API key for free on the osu! website.")
console.log("If you have a powerful PC, you can also enable motion blur or 4K (UHD) capability in the config.json file to receive jobs that require these features.")
console.log('If your upload speed to the o!rdr server is slow, you can try using a relay. Your client will upload generated videos to the relay instead. Check the "relay" setting in the client config.')
console.log("\nAvailable relays:")
console.log('- "us": United States, near New York')
console.log('You can switch back to direct upload by setting "direct" instead.')
}

async function validateIbAccount(input: string): Promise<string | boolean> {
Expand Down
5 changes: 1 addition & 4 deletions src/renderers/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,8 @@ export async function prepareRenderAssets(jobData: IJobData): Promise<{ success:
if (fs.existsSync(`data/skins/${jobData.skin}`)) {
console.log(`The skin ${jobData.skin} is present.`)
} else {
let urlServer = ""
if (config.relay === "us") urlServer = "-us"

let skinFilename = `${jobData.skin}.osk`
const url = `https://dl${urlServer}.issou.best/ordr/skins/${skinFilename}`
const url = `https://dl.issou.best/ordr/skins/${skinFilename}`
let downloadedSkin = await downloadFile({ url, to: localSkinPath, exitOnFail: false })
if (!downloadedSkin) return { success: false, error: "DOWNLOAD_SKIN" }
await extractFile({ input: `${localSkinPath}/${skinFilename}`, output: `data/skins/${jobData.skin}` })
Expand Down
2 changes: 0 additions & 2 deletions src/util/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import chokidar from "chokidar"

const EMPTY_CONFIG = {
"encoder": "cpu",
"relay": "direct",
"discord_presence": false,
"debug": false,
"log_timestamps": false,
Expand All @@ -26,7 +25,6 @@ const EMPTY_CONFIG = {

const ConfigSchema = z.object({
encoder: z.enum(["cpu", "nvenc", "qsv"]),
relay: z.enum(["direct", "us"]),
discord_presence: z.boolean(),
debug: z.boolean(),
log_timestamps: z.boolean().optional(),
Expand Down
21 changes: 0 additions & 21 deletions src/util/speedtest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,6 @@ export async function runSpeedtest(): Promise<ISpeedtestResult> {
ulURL: "empty.php",
pingURL: "empty.php",
getIpURL: "getIP.php"
},
{
id: 2,
name: "US Server",
server: "http://st2.issou.best/",
dlURL: "garbage.php",
ulURL: "empty.php",
pingURL: "empty.php",
getIpURL: "getIP.php"
}
]),
{ encoding: "utf-8" }
Expand All @@ -111,18 +102,6 @@ export async function runSpeedtest(): Promise<ISpeedtestResult> {
console.log(`Server: ${result.server}`)
console.log(`Result link: ${result.resultUrl}`)

const serverUsed = parsedData[0].server.name
// if the server we used to speedtest isn't central we'll make the other a relay
if (serverUsed !== "Central") {
// relay location will be the last 2 letters of the server name (country)
let relay
if (serverUsed === "US Server") {
relay = "us"
}

await writeConfig({ ...config, relay })
}

// cache the result to avoid making another speedtest in a short time span, this will overwrite any other "cache.json" file
fs.writeFileSync("bins/librespeed-cli/cache.json", JSON.stringify({ ...result, date: new Date().toISOString() }), { encoding: "utf-8" })

Expand Down
2 changes: 1 addition & 1 deletion src/util/upload_video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default async function uploadVideo(jobData: IJobData): Promise<{ success:
if (config.dev) {
uploadUrl = config.dev.server.api + "/upload"
} else {
uploadUrl = config.relay === "direct" ? "https://apis.issou.best/ordr/upload" : `https://ordr-relay-${config.relay}.issou.best/upload`
uploadUrl = "https://apis.issou.best/ordr/upload"
}

let keys = await getKeys()
Expand Down