修复夸克直链播放重复转存相同文件

This commit is contained in:
mtvpls
2026-05-17 14:04:24 +08:00
parent 91850caf99
commit 6d489812a2
6 changed files with 52 additions and 9 deletions
+2 -2
View File
@@ -3936,7 +3936,7 @@ const NetDiskConfigComponent = ({
const [enabled, setEnabled] = useState(false);
const [cookie, setCookie] = useState('');
const [savePath, setSavePath] = useState('/');
const [quarkPlayMode, setQuarkPlayMode] = useState<'direct_first' | 'transcode_first'>('direct_first');
const [quarkPlayMode, setQuarkPlayMode] = useState<'direct_first' | 'transcode_first'>('transcode_first');
const [mobileEnabled, setMobileEnabled] = useState(false);
const [mobileAuthorization, setMobileAuthorization] = useState('');
const [baiduEnabled, setBaiduEnabled] = useState(false);
@@ -3960,7 +3960,7 @@ const NetDiskConfigComponent = ({
setEnabled(quark?.Enabled || false);
setCookie(quark?.Cookie || '');
setSavePath(quark?.SavePath || '/');
setQuarkPlayMode(quark?.PlayMode === 'transcode_first' ? 'transcode_first' : 'direct_first');
setQuarkPlayMode(quark?.PlayMode === 'direct_first' ? 'direct_first' : 'transcode_first');
setMobileEnabled(mobile?.Enabled || false);
setMobileAuthorization(mobile?.Authorization || '');
setBaiduEnabled(config?.NetDiskConfig?.Baidu?.Enabled || false);
+1 -1
View File
@@ -79,7 +79,7 @@ export async function POST(request: NextRequest) {
Enabled: Boolean(Quark?.Enabled),
Cookie: normalizedCookie,
SavePath: Quark?.SavePath || '/',
PlayMode: Quark?.PlayMode === 'transcode_first' ? 'transcode_first' : 'direct_first',
PlayMode: Quark?.PlayMode === 'direct_first' ? 'direct_first' : 'transcode_first',
};
adminConfig.NetDiskConfig.Mobile = {
Enabled: Boolean(Mobile?.Enabled),
+2
View File
@@ -45,6 +45,8 @@ export async function GET(request: NextRequest) {
shareId: session.shareId,
shareToken: session.shareToken,
fileId: file.fid,
fileName: file.name,
size: file.size,
shareFileToken: file.shareFidToken,
playFolderFid: session.playFolderFid,
});