私人影库换源不测试

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