Skip to content

Commit

Permalink
delete api deal seaon
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiram committed Apr 26, 2024
1 parent b5f0b3d commit 57208ff
Showing 1 changed file with 2 additions and 30 deletions.
32 changes: 2 additions & 30 deletions src/renderer/src/utils/cms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -795,36 +795,8 @@ const fetchDetail = async(site, id) => {
} else if (site.type === 4) {
videoList = jsondata.data.list;
}

if (!videoList) return;

const videoData = videoList.map((video) => {
// 播放源
const playFrom = video.vod_play_from;
const playSource = playFrom.split("$").filter(Boolean);
// 剧集
const playUrl = video.vod_play_url;
const playUrlDiffPlaySource = playUrl.split("$$$"); // 分离不同播放源
const playEpisodes = playUrlDiffPlaySource.map((item) =>
item
.replace(/\$+/g, '$')
.split('#')
.map((e) => {
if (!e.includes('$')) e = `正片$${e}`;
return e;
}),
);
const fullList = Object.fromEntries(
playSource.map((key, index) => [key, playEpisodes[index]])
);

return {
...video,
fullList: fullList
};
});

return videoData;

return videoList ? videoList : [];
} catch (err) {
throw err;
}
Expand Down

0 comments on commit 57208ff

Please sign in to comment.