♻️ 书源 id 去掉 ext. 前缀,沿用旧内置源数据

Co-authored-by: Copilot <[email protected]>
This commit is contained in:
GarfieldandCopilot committed 2026-11-16 14:07:45 +08:00
1 parent bea9eee670
commit 9e45e29d83
9 files changed
+21 -21

No files matched your search

@@ -11,7 +11,7 @@
local _ = require("l10n").get("moonsource_netease")
return {
id = "ext.netease",
id = "netease",
name = _("网易云阅读"),
type = "chapter",
description = _("网易云阅读在线阅读"),
@@ -76,10 +76,10 @@ function Login:confirm(cb)
return
end
local settings = require("utils.settings")
local cfg = settings.getSource("ext.netease")
local cfg = settings.getSource("netease")
cfg.cookie, cfg.logged_in, cfg.csrf = self:cookie(), true, nil
settings.saveSource("ext.netease")
require("source.auth").ok("ext.netease")
settings.saveSource("netease")
require("source.auth").ok("netease")
cb(true)
end)
end
@@ -15,7 +15,7 @@ local Client = {}
local ORIGIN = "https://yuedu.163.com"
local SHELF_ORIGIN = "https://guofeng.yuedu.163.com"
local PUBLIC = "https://yuedu.3g.163.com"
local SOURCE_ID = "ext.netease"
local SOURCE_ID = "netease"
function Client.loggedIn()
local cfg = require("utils.settings").getSource(SOURCE_ID)
@@ -17,7 +17,7 @@ local _ = require("l10n").get("moonsource_netease")
local Mapper = {}
Mapper.TOC_VERSION = 2
local SOURCE_ID = "ext.netease"
local SOURCE_ID = "netease"
function Mapper.authorized(html)
return type(html) == "string" and html:find("<title[^>]*>个人资料[^<]*</title>") ~= nil
@@ -7,7 +7,7 @@
local _ = require("l10n").get("moonsource_netease")
local CookieLogin = require("source.cookie_login")
local SOURCE_ID = "ext.netease"
local SOURCE_ID = "netease"
local Setting = {}
local LOGIN_URL = "https://yuedu.163.com/loginForm.do?targetUrl=https%3A%2F%2Fyuedu.163.com%2Fmyinfor.do"
@@ -164,7 +164,7 @@ local function fetcher(open)
return function(identity, chapter, done)
local function finish(html, err)
if html then
if chapter.vip then Toc.markPaid("ext.netease", identity.stable_id, chapter.uid, true) end
if chapter.vip then Toc.markPaid("netease", identity.stable_id, chapter.uid, true) end
done({ title = chapter.title, html = html })
return
end