Giter Site home page Giter Site logo

game-integrations's Introduction

Anime Games Launcher integrations scripts index

Index of games integrations scripts for the anime games launcher. Documentation can be found in here.

game-integrations's People

Contributors

krypt0nn avatar mkrsym1 avatar

Stargazers

 avatar Yuisu_ avatar Caliel Alves avatar

Watchers

 avatar Yuisu_ avatar

game-integrations's Issues

jadeite metadata not checking second link

Isn't this suppose to check both links and not just error on first one?

for _, uri in pairs(uris) do
if jadeite_metadata ~= nil then
break
end
local response = v1_network_fetch(uri)
if not response["ok"] then
error("Failed to request jadeite metadata (code " .. response["status"] .. "): " .. response["statusText"])
end
jadeite_metadata = response.json()
end

Rip codeberg

local uris = {
"https://codeberg.org/mkrsym1/jadeite/raw/branch/master/metadata.json",
"https://notabug.org/mkrsym1/jadeite-mirror/raw/master/metadata.json"
}

I come up with this
local function get_jadeite_metadata()
  local uris = {
    "https://codeberg.org/mkrsym1/jadeite/raw/branch/master/metadata.json",
    "https://notabug.org/mkrsym1/jadeite-mirror/raw/master/metadata.json"
  }

  local requests = {}
  for _, uri in pairs(uris) do
    local response = v1_network_fetch(uri)
    table.insert(requests, response)

    if response["ok"] then
      jadeite_metadata = response.json()
      break
    end
  end

  if not jadeite_metadata then
    local msg = "Jadeite metadata requests failed:\n"
    for i, r in ipairs(requests) do
      msg = string.format("%s\n%s (code %s): %s" msg, uris[i], r["status"], r["statusText"])
    end

    error(msg)
  end

  return jadeite_metadata
end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.