mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-06-15 14:38:46 +08:00
fix: preserve absolute subtitle asset urls
This commit is contained in:
@@ -678,6 +678,9 @@ class SiteSpider:
|
||||
"""
|
||||
if not link:
|
||||
return None
|
||||
parsed_link = urlparse(link)
|
||||
if parsed_link.scheme:
|
||||
return link
|
||||
if not link.startswith("http"):
|
||||
if link.startswith("//"):
|
||||
return self.domain.split(":")[0] + ":" + link
|
||||
|
||||
@@ -396,6 +396,7 @@ def test_subtitle_site_spider_uses_direct_nexus_row(monkeypatch):
|
||||
|
||||
assert [item["title"] for item in result] == ["The.Capture.S01", "The.Capture.S02"]
|
||||
assert result[0]["language"] == "添加时间"
|
||||
assert result[0]["language_icon"] == "data:image/svg+xml;base64,xxx"
|
||||
assert result[1]["language"] == "English"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user