mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🐞 fix: 修正配置选项
This commit is contained in:
parent
a5028f9c71
commit
cf2d501c51
@ -1,4 +1,5 @@
|
|||||||
import { useState, useEffect } from 'react';
|
import { useState, useEffect } from 'react';
|
||||||
|
import { BILI_CDN_SELECT_LIST, BILI_DOWNLOAD_METHOD, BILI_RESOLUTION_LIST } from "../../../constants/constant.js";
|
||||||
import { readYamlConfig, updateYamlConfig } from '../../utils/yamlHelper';
|
import { readYamlConfig, updateYamlConfig } from '../../utils/yamlHelper';
|
||||||
|
|
||||||
export default function Bili() {
|
export default function Bili() {
|
||||||
@ -235,9 +236,13 @@ export default function Bili() {
|
|||||||
className="select select-bordered"
|
className="select select-bordered"
|
||||||
value={config.biliCDN}
|
value={config.biliCDN}
|
||||||
onChange={(e) => setConfig({ ...config, biliCDN: parseInt(e.target.value) })}>
|
onChange={(e) => setConfig({ ...config, biliCDN: parseInt(e.target.value) })}>
|
||||||
<option value={0}>不使用CDN</option>
|
{
|
||||||
<option value={1}>CDN 1</option>
|
BILI_CDN_SELECT_LIST.map(item => {
|
||||||
<option value={2}>CDN 2</option>
|
return (
|
||||||
|
<option value={ item.value }>{ item.label }</option>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div className="form-control">
|
<div className="form-control">
|
||||||
@ -248,10 +253,13 @@ export default function Bili() {
|
|||||||
className="select select-bordered"
|
className="select select-bordered"
|
||||||
value={config.biliDownloadMethod}
|
value={config.biliDownloadMethod}
|
||||||
onChange={(e) => setConfig({ ...config, biliDownloadMethod: parseInt(e.target.value) })}>
|
onChange={(e) => setConfig({ ...config, biliDownloadMethod: parseInt(e.target.value) })}>
|
||||||
<option value={0}>原生下载</option>
|
{
|
||||||
<option value={1}>wget</option>
|
BILI_DOWNLOAD_METHOD.map(item => {
|
||||||
<option value={2}>axel</option>
|
return (
|
||||||
<option value={3}>Aria2</option>
|
<option value={ item.value }>{ item.label }</option>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div className="form-control">
|
<div className="form-control">
|
||||||
@ -262,12 +270,13 @@ export default function Bili() {
|
|||||||
className="select select-bordered"
|
className="select select-bordered"
|
||||||
value={config.biliResolution}
|
value={config.biliResolution}
|
||||||
onChange={(e) => setConfig({ ...config, biliResolution: parseInt(e.target.value) })}>
|
onChange={(e) => setConfig({ ...config, biliResolution: parseInt(e.target.value) })}>
|
||||||
<option value={5}>480P</option>
|
{
|
||||||
<option value={16}>360P</option>
|
BILI_RESOLUTION_LIST.map(item => {
|
||||||
<option value={32}>720P</option>
|
return (
|
||||||
<option value={64}>1080P</option>
|
<option value={ item.value }>{ item.label }</option>
|
||||||
<option value={74}>720P60</option>
|
)
|
||||||
<option value={80}>1080P+</option>
|
})
|
||||||
|
}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { useState, useEffect } from 'react';
|
import { useState, useEffect } from 'react';
|
||||||
|
import { NETEASECLOUD_QUALITY_LIST } from "../../../constants/constant.js";
|
||||||
import { readYamlConfig, updateYamlConfig } from '../../utils/yamlHelper';
|
import { readYamlConfig, updateYamlConfig } from '../../utils/yamlHelper';
|
||||||
|
|
||||||
export default function Ncm() {
|
export default function Ncm() {
|
||||||
@ -81,18 +82,6 @@ export default function Ncm() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const audioQualityOptions = [
|
|
||||||
{ value: 'standard', label: '标准' },
|
|
||||||
{ value: 'higher', label: '较高' },
|
|
||||||
{ value: 'exhigh', label: '极高' },
|
|
||||||
{ value: 'lossless', label: '无损' },
|
|
||||||
{ value: 'hires', label: 'Hi-Res' },
|
|
||||||
{ value: 'jyeffect', label: '高清环绕声' },
|
|
||||||
{ value: 'sky', label: '沉浸环绕声' },
|
|
||||||
{ value: 'dolby', label: '杜比全景声' },
|
|
||||||
{ value: 'jymaster', label: '超清母带' }
|
|
||||||
];
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="p-6 mx-auto container">
|
<div className="p-6 mx-auto container">
|
||||||
{/* 成功提示 */}
|
{/* 成功提示 */}
|
||||||
@ -208,7 +197,7 @@ export default function Ncm() {
|
|||||||
className="select select-bordered"
|
className="select select-bordered"
|
||||||
value={config.neteaseCloudAudioQuality}
|
value={config.neteaseCloudAudioQuality}
|
||||||
onChange={(e) => setConfig({ ...config, neteaseCloudAudioQuality: e.target.value })}>
|
onChange={(e) => setConfig({ ...config, neteaseCloudAudioQuality: e.target.value })}>
|
||||||
{audioQualityOptions.map(option => (
|
{NETEASECLOUD_QUALITY_LIST.map(option => (
|
||||||
<option key={option.value} value={option.value}>
|
<option key={option.value} value={option.value}>
|
||||||
{option.label}
|
{option.label}
|
||||||
</option>
|
</option>
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { useState, useEffect } from 'react';
|
import { useState, useEffect } from 'react';
|
||||||
|
import { BILI_CDN_SELECT_LIST, YOUTUBE_GRAPHICS_LIST } from "../../../constants/constant.js";
|
||||||
import { readYamlConfig, updateYamlConfig } from '../../utils/yamlHelper';
|
import { readYamlConfig, updateYamlConfig } from '../../utils/yamlHelper';
|
||||||
|
|
||||||
export default function Youtube() {
|
export default function Youtube() {
|
||||||
@ -107,10 +108,13 @@ export default function Youtube() {
|
|||||||
className="select select-bordered"
|
className="select select-bordered"
|
||||||
value={config.youtubeGraphicsOptions}
|
value={config.youtubeGraphicsOptions}
|
||||||
onChange={(e) => setConfig({ ...config, youtubeGraphicsOptions: parseInt(e.target.value) })}>
|
onChange={(e) => setConfig({ ...config, youtubeGraphicsOptions: parseInt(e.target.value) })}>
|
||||||
<option value={0}>原画</option>
|
{
|
||||||
<option value={1080}>1080P</option>
|
YOUTUBE_GRAPHICS_LIST.map(item => {
|
||||||
<option value={720}>720P</option>
|
return (
|
||||||
<option value={480}>480P</option>
|
<option value={ item.value }>{ item.label }</option>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div className="form-control">
|
<div className="form-control">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user