mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-05-18 11:47:28 +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,
|
||||
|
||||
@@ -46,10 +46,10 @@ export default async function RootLayout({
|
||||
process.env.ANNOUNCEMENT ||
|
||||
'本网站仅提供影视信息搜索服务,所有内容均来自第三方网站。本站不存储任何视频资源,不对任何内容的准确性、合法性、完整性负责。';
|
||||
let enableRegister = process.env.NEXT_PUBLIC_ENABLE_REGISTER === 'true';
|
||||
let doubanProxyType = process.env.NEXT_PUBLIC_DOUBAN_PROXY_TYPE || 'direct';
|
||||
let doubanProxyType = process.env.NEXT_PUBLIC_DOUBAN_PROXY_TYPE || 'melody-cdn-sharon';
|
||||
let doubanProxy = process.env.NEXT_PUBLIC_DOUBAN_PROXY || '';
|
||||
let doubanImageProxyType =
|
||||
process.env.NEXT_PUBLIC_DOUBAN_IMAGE_PROXY_TYPE || 'direct';
|
||||
process.env.NEXT_PUBLIC_DOUBAN_IMAGE_PROXY_TYPE || 'melody-cdn-sharon';
|
||||
let doubanImageProxy = process.env.NEXT_PUBLIC_DOUBAN_IMAGE_PROXY || '';
|
||||
let disableYellowFilter =
|
||||
process.env.NEXT_PUBLIC_DISABLE_YELLOW_FILTER === 'true';
|
||||
|
||||
Reference in New Issue
Block a user