私人影库换源不测试

This commit is contained in:
mtvpls
2025-12-24 11:53:32 +08:00
parent 21baa51fe7
commit 9e6c98a8ff

View File

@@ -266,7 +266,8 @@ const EpisodeSelector: React.FC<EpisodeSelectorProps> = ({
if (
!optimizationEnabled || // 若关闭测速则直接退出
activeTab !== 'sources' ||
availableSources.length === 0
availableSources.length === 0 ||
currentSource === 'openlist' // 私人影库不进行测速
)
return;
@@ -293,7 +294,7 @@ const EpisodeSelector: React.FC<EpisodeSelectorProps> = ({
fetchVideoInfosInBatches();
// 依赖项保持与之前一致
}, [activeTab, availableSources, getVideoInfo, optimizationEnabled, initialTestingCompleted]);
}, [activeTab, availableSources, getVideoInfo, optimizationEnabled, initialTestingCompleted, currentSource]);
// 升序分页标签
const categoriesAsc = useMemo(() => {
@@ -848,6 +849,11 @@ const EpisodeSelector: React.FC<EpisodeSelectorProps> = ({
</div>
{/* 重新测试按钮 */}
{(() => {
// 私人影库不显示重新测试按钮
if (source.source === 'openlist') {
return null;
}
const sourceKey = `${source.source}-${source.id}`;
const isTesting = retestingSources.has(sourceKey);
const videoInfo = videoInfoMap.get(sourceKey);