From b6789fcd3f279332757054d2921bd97d65e9da28 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Thu, 19 Nov 2026 02:05:29 +0800 Subject: [PATCH] fix(mediaserver): resolve CI integration checks --- app/locales/en-US.json | 2 ++ skills/mediaserver-operation/SKILL.md | 8 +++++--- tests/test_mediaserver_native_streams.py | 2 +- tests/test_subscription_cross_source.py | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/locales/en-US.json b/app/locales/en-US.json index ea67bc496..368a0660a 100644 --- a/app/locales/en-US.json +++ b/app/locales/en-US.json @@ -279,9 +279,11 @@ "未找到已入库电视剧": "Library TV episode was not found", "未找到外挂字幕": "External subtitle was not found", "未找到音乐歌词": "Music lyrics were not found", + "未找到同名字幕": "No matching subtitle was found", "媒体文件不可读取": "Media file is not readable", "媒体文件路径无效": "Media file path is invalid", "媒体服务器未提供文件路径": "The media server did not provide a file path", + "媒体服务器不支持文件流且本地文件不可读取": "The media server does not support direct file streaming and this instance cannot read the local file", "当前实例无法访问媒体文件": "This instance cannot access the media file", "STRM 播放地址不受支持": "The STRM playback URL is not supported", "STRM 播放地址无法解析": "The STRM playback URL could not be resolved", diff --git a/skills/mediaserver-operation/SKILL.md b/skills/mediaserver-operation/SKILL.md index 90af0623b..f99228bac 100644 --- a/skills/mediaserver-operation/SKILL.md +++ b/skills/mediaserver-operation/SKILL.md @@ -45,9 +45,11 @@ required Python version. library browsing, scans, and metadata refreshes. - A provider result is not automatically a MoviePilot transfer, subscription, or history fact. Use the appropriate MoviePilot API for those workflows. -- App 原生播放的流清单由 MoviePilot REST 接口按来源选择:媒体服务器条目优先代理原始流, - 不支持时回退可读取的本地文件;文件管理和媒体整理的单文件票据只读取本地文件。 - 此行为不改变本 Skill 的播放会话操作;不要把网页跳转链接、凭据或上游 URL 交给 App 桥。 +- Native App playback manifests select a stream source in the MoviePilot REST API: + media-server items prefer the server's original stream and fall back to a readable + local file when unsupported; single-file tickets from file management and media + organization always read locally. This does not change this skill's playback + session actions; never pass web links, credentials, or upstream URLs through the App bridge. ## Instance And Provider Discovery diff --git a/tests/test_mediaserver_native_streams.py b/tests/test_mediaserver_native_streams.py index a2a609e24..3521aca39 100644 --- a/tests/test_mediaserver_native_streams.py +++ b/tests/test_mediaserver_native_streams.py @@ -5,8 +5,8 @@ from contextlib import nullcontext from pathlib import Path from types import SimpleNamespace -from urllib.parse import parse_qs, urlsplit from unittest.mock import Mock +from urllib.parse import parse_qs, urlsplit import pytest from fastapi import FastAPI diff --git a/tests/test_subscription_cross_source.py b/tests/test_subscription_cross_source.py index ab1ce35b1..d2f8da747 100644 --- a/tests/test_subscription_cross_source.py +++ b/tests/test_subscription_cross_source.py @@ -304,7 +304,7 @@ async def test_detail_and_card_status_use_projection_before_title_fallback(proje assert result.id == 73 statuses = await media_status([ MediaStatusQuery(media_source=MediaSource.TMDB, media_id="259140", season=2, mtype=MediaType.TV), - ], SimpleNamespace(find_item_id=AsyncMock(return_value=None)), query, actor) + ], SimpleNamespace(find_item=AsyncMock(return_value=None)), query, actor) assert statuses[0].subscribed is True and statuses[0].seasons == {2: "normal"} repository.async_list_by_title.assert_not_awaited() repository.async_list.assert_awaited_once()