mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-02-15 12:24:41 +08:00
feat: add melody-cdn-sharon and make it default
This commit is contained in:
@@ -1512,9 +1512,9 @@ const SiteConfigComponent = ({ config, refreshConfig }: { config: AdminConfig |
|
||||
Announcement: '',
|
||||
SearchDownstreamMaxPage: 1,
|
||||
SiteInterfaceCacheTime: 7200,
|
||||
DoubanProxyType: 'direct',
|
||||
DoubanProxyType: 'melody-cdn-sharon',
|
||||
DoubanProxy: '',
|
||||
DoubanImageProxyType: 'direct',
|
||||
DoubanImageProxyType: 'melody-cdn-sharon',
|
||||
DoubanImageProxy: '',
|
||||
DisableYellowFilter: false,
|
||||
FluidSearch: true,
|
||||
@@ -1530,13 +1530,13 @@ const SiteConfigComponent = ({ config, refreshConfig }: { config: AdminConfig |
|
||||
// 豆瓣数据源选项
|
||||
const doubanDataSourceOptions = [
|
||||
{ value: 'direct', label: '直连(服务器直接请求豆瓣)' },
|
||||
{ value: 'melody-cdn-sharon', label: '豆瓣 CDN By 旋律(Sharon CDN)' },
|
||||
{ value: 'cors-proxy-zwei', label: 'Cors Proxy By Zwei' },
|
||||
{
|
||||
value: 'cmliussss-cdn-tencent',
|
||||
label: '豆瓣 CDN By CMLiussss(腾讯云)',
|
||||
},
|
||||
{ value: 'cmliussss-cdn-ali', label: '豆瓣 CDN By CMLiussss(阿里云)' },
|
||||
{ value: 'cors-anywhere', label: 'Cors Anywhere(20 qpm)' },
|
||||
{ value: 'custom', label: '自定义代理' },
|
||||
];
|
||||
|
||||
@@ -1545,6 +1545,7 @@ const SiteConfigComponent = ({ config, refreshConfig }: { config: AdminConfig |
|
||||
{ value: 'direct', label: '直连(浏览器直接请求豆瓣)' },
|
||||
{ value: 'server', label: '服务器代理(由服务器代理请求豆瓣)' },
|
||||
{ value: 'img3', label: '豆瓣官方精品 CDN(阿里云)' },
|
||||
{ value: 'melody-cdn-sharon', label: '豆瓣 CDN By 旋律(Sharon CDN)' },
|
||||
{
|
||||
value: 'cmliussss-cdn-tencent',
|
||||
label: '豆瓣 CDN By CMLiussss(腾讯云)',
|
||||
@@ -1556,6 +1557,11 @@ const SiteConfigComponent = ({ config, refreshConfig }: { config: AdminConfig |
|
||||
// 获取感谢信息
|
||||
const getThanksInfo = (dataSource: string) => {
|
||||
switch (dataSource) {
|
||||
case 'melody-cdn-sharon':
|
||||
return {
|
||||
text: 'Thanks to @JohnsonRan',
|
||||
url: 'https://github.com/JohnsonRan',
|
||||
};
|
||||
case 'cors-proxy-zwei':
|
||||
return {
|
||||
text: 'Thanks to @Zwei',
|
||||
@@ -1576,10 +1582,10 @@ const SiteConfigComponent = ({ config, refreshConfig }: { config: AdminConfig |
|
||||
if (config?.SiteConfig) {
|
||||
setSiteSettings({
|
||||
...config.SiteConfig,
|
||||
DoubanProxyType: config.SiteConfig.DoubanProxyType || 'direct',
|
||||
DoubanProxyType: config.SiteConfig.DoubanProxyType || 'melody-cdn-sharon',
|
||||
DoubanProxy: config.SiteConfig.DoubanProxy || '',
|
||||
DoubanImageProxyType:
|
||||
config.SiteConfig.DoubanImageProxyType || 'direct',
|
||||
config.SiteConfig.DoubanImageProxyType || 'melody-cdn-sharon',
|
||||
DoubanImageProxy: config.SiteConfig.DoubanImageProxy || '',
|
||||
DisableYellowFilter: config.SiteConfig.DisableYellowFilter || false,
|
||||
FluidSearch: config.SiteConfig.FluidSearch || true,
|
||||
|
||||
Reference in New Issue
Block a user