fix(sites): sync user parsers with MoviePilot v3.2.4
参考:docs/porting/moviepilot-downloader-and-sites.md。按GPLv3公开行为维护TS,补齐UUID身份、专站做种入口与汇总、用户资料回退及刷新边界;不引入上游源码或加密站点数据。
This commit is contained in:
1 parent
c38e7131f1
commit
7e4cdbf5ba
34 files changed
+603
-103
No files matched your search
@@ -1,12 +1,12 @@
|
||||
/**
|
||||
* SPDX-License-Identifier: GPL-3.0-only
|
||||
* 移植自 MoviePilot(https://github.com/jxxghp/MoviePilot,GPLv3),本文件按 GPLv3 条款提供。
|
||||
* @mp-source app/foundation/text.py @ e6820a8
|
||||
* @mp-source app/foundation/temporal.py @ e6820a8
|
||||
* @mp-source app/domain/site.py @ e6820a8
|
||||
* @mp-source app/adapters/network/cloudflare.py @ e6820a8
|
||||
* @mp-source app/foundation/text.py @ 3b156a5
|
||||
* @mp-source app/foundation/temporal.py @ 3b156a5
|
||||
* @mp-source app/domain/site.py @ 3b156a5
|
||||
* @mp-source app/adapters/network/cloudflare.py @ 3b156a5
|
||||
*
|
||||
* 解析器公共工具:MoviePilot e6820a8(GPLv3)
|
||||
* 解析器公共工具:MoviePilot 3b156a5(GPLv3)
|
||||
* - `app/foundation/text.py` `parse_int/parse_float/contains_chinese` → `parseIntMp/parseFloatMp/containsChinese`
|
||||
* - `app/foundation/temporal.py` `normalize_datetime/format_timestamp` → 同名(dateparser 的保守子集)
|
||||
* - `app/domain/site.py` `SiteUtils.is_logged_in` → `isLoggedIn`
|
||||
@@ -192,6 +192,8 @@ export function extractDomain(url: string | null | undefined): string {
|
||||
}
|
||||
}
|
||||
if (!netloc) return "";
|
||||
netloc = netloc.replace(/^\.+/, "");
|
||||
if (!netloc) return "";
|
||||
const labels = netloc.split(".");
|
||||
if (labels.length > 3) return netloc;
|
||||
return labels.slice(-2).join(".");
|
||||
|
||||
Reference in new issue
Block a user