Skip to content
Merged
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
2 changes: 1 addition & 1 deletion anilist/plugin.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id = "cleboost/anilist"
name = "AniList (UNOFFICIAL)"
version = "1.1.1"
version = "1.1.2"
plugin_api = 15
author = "Cleboost"
license = "MIT"
Expand Down
13 changes: 8 additions & 5 deletions anilist/service.luau
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ local oauthStartedAt = 0

local libraryFetch = nil
local finalizeQueue = nil
local flushCoverSnapshot
local legacyCachePurged = false
local pendingLegacyPurge = false

Expand Down Expand Up @@ -317,10 +318,11 @@ local function writeCoverMeta(mediaId, url)
if not metaPath then
return
end
noctalia.writeFile(metaPath, noctalia.json.encode({
local payload = noctalia.json.encode({
url = url,
version = COVER_CACHE_VERSION,
}))
})
noctalia.writeFile(metaPath, payload)
end

local function removeCoverCache(mediaId)
Expand Down Expand Up @@ -411,7 +413,7 @@ local function requestCoverSnapshot()
pendingCoverSnapshot = true
end

local function flushCoverSnapshot()
function flushCoverSnapshot()
if pendingCoverSnapshot then
pendingCoverSnapshot = false
publishSnapshot()
Expand Down Expand Up @@ -1289,10 +1291,11 @@ local function startOAuthLogin()
local resultPath = dataDir .. "/" .. OAUTH_RESULT_FILE
noctalia.removeFile(resultPath)

local credOk = noctalia.writeFile(credPath, noctalia.json.encode({
local credPayload = noctalia.json.encode({
client_id = clientId,
client_secret = clientSecret,
}))
})
local credOk = noctalia.writeFile(credPath, credPayload)
if not credOk then
setError(tr("oauth_unavailable"))
return
Expand Down
Loading