mirror of
https://github.com/zimplexing/OrionTV.git
synced 2026-02-04 03:36:29 +08:00
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import { DeviceUtils } from '@/utils/DeviceUtils';
|
|
|
|
export const UPDATE_CONFIG = {
|
|
// 自动检查更新
|
|
AUTO_CHECK: true,
|
|
|
|
// 检查更新间隔(毫秒)
|
|
CHECK_INTERVAL: 12 * 60 * 60 * 1000, // 12小时
|
|
|
|
// GitHub相关URL
|
|
GITHUB_RAW_URL: 'https://ghfast.top/https://raw.githubusercontent.com/zimplexing/OrionTV/refs/heads/master/package.json',
|
|
|
|
// 获取平台特定的下载URL
|
|
getDownloadUrl(version: string): string {
|
|
const isTV = DeviceUtils.isTV();
|
|
const platform = isTV ? 'tv' : 'mobile';
|
|
return `https://ghfast.top/https://github.com/zimplexing/OrionTV/releases/download/v${version}/orionTV-${platform}.${version}.apk`;
|
|
},
|
|
|
|
// 是否显示更新日志
|
|
SHOW_RELEASE_NOTES: true,
|
|
|
|
// 是否允许跳过版本
|
|
ALLOW_SKIP_VERSION: true,
|
|
|
|
// 下载超时时间(毫秒)
|
|
DOWNLOAD_TIMEOUT: 10 * 60 * 1000, // 10分钟
|
|
|
|
// 是否在WIFI下自动下载
|
|
AUTO_DOWNLOAD_ON_WIFI: false,
|
|
|
|
// 更新通知设置
|
|
NOTIFICATION: {
|
|
ENABLED: true,
|
|
TITLE: 'OrionTV 更新',
|
|
DOWNLOADING_TEXT: '正在下载新版本...',
|
|
DOWNLOAD_COMPLETE_TEXT: '下载完成,点击安装',
|
|
},
|
|
}; |