Merge branch 'dev' of https://github.com/mtvpls/moontvplus-dev into dev
This commit is contained in:
@@ -10,6 +10,33 @@ export interface ChangelogEntry {
|
||||
}
|
||||
|
||||
export const changelog: ChangelogEntry[] = [
|
||||
{
|
||||
version: "215.0.0",
|
||||
date: "2026-03-20",
|
||||
added: [
|
||||
"增加主动恢复进度按钮",
|
||||
"新增播放记录面板",
|
||||
"弹幕搜索面板标题增加tooltip",
|
||||
"影视搜索新增列表视图",
|
||||
"pansou增加重试按钮",
|
||||
"新增ai评论生成",
|
||||
"增加一键render部署",
|
||||
"电视直播增加三种代理模式"
|
||||
],
|
||||
changed: [
|
||||
"优化直链播放m3u8体验",
|
||||
"搜索页面海量数据下使用虚拟滚动提高性能",
|
||||
"优化emby代理内存泄漏问题",
|
||||
"电视直播代理控制权从用户端改为管理端",
|
||||
"获取视频源详情不再依赖title"
|
||||
],
|
||||
fixed: [
|
||||
"修复search页面僵尸历史记录tag",
|
||||
"修复弹幕搜索框挤压",
|
||||
"修复搜索页面加载条显示顺序错误",
|
||||
"修复继续观看渐进式加载的一些问题"
|
||||
]
|
||||
},
|
||||
{
|
||||
version: "214.1.0",
|
||||
date: "2026-03-10",
|
||||
|
||||
@@ -716,6 +716,42 @@ export async function getAllPlayRecords(): Promise<Record<string, PlayRecord>> {
|
||||
}
|
||||
}
|
||||
|
||||
export function getCachedPlayRecordsSnapshot(): Record<string, PlayRecord> {
|
||||
if (typeof window === 'undefined') {
|
||||
return {};
|
||||
}
|
||||
|
||||
if (STORAGE_TYPE !== 'localstorage') {
|
||||
const cachedRecords = cacheManager.getCachedPlayRecords();
|
||||
if (cachedRecords) {
|
||||
return cachedRecords;
|
||||
}
|
||||
|
||||
try {
|
||||
const username = getAuthInfoFromBrowserCookie()?.username;
|
||||
if (!username) return {};
|
||||
|
||||
const raw = localStorage.getItem(`${CACHE_PREFIX}${username}`);
|
||||
if (!raw) return {};
|
||||
|
||||
const userCache = JSON.parse(raw) as UserCacheStore;
|
||||
return userCache.playRecords?.data || {};
|
||||
} catch (err) {
|
||||
console.error('读取用户播放记录快照失败:', err);
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
const raw = localStorage.getItem(PLAY_RECORDS_KEY);
|
||||
if (!raw) return {};
|
||||
return JSON.parse(raw) as Record<string, PlayRecord>;
|
||||
} catch (err) {
|
||||
console.error('读取本地播放记录快照失败:', err);
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存播放记录。
|
||||
* 数据库存储模式下使用乐观更新:先更新缓存(立即生效),再异步同步到数据库。
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable no-console */
|
||||
|
||||
const CURRENT_VERSION = '214.1.0';
|
||||
const CURRENT_VERSION = '215.0.0';
|
||||
|
||||
// 导出当前版本号供其他地方使用
|
||||
export { CURRENT_VERSION };
|
||||
|
||||
Reference in New Issue
Block a user