MCPcopy Create free account
hub / github.com/develop202/migu_video / dataList

Function dataList

utils/fetchList.js:115–136  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113
114// 所有数据
115async function dataList() {
116 let cates = await cateList()
117
118 for (let cate in cates) {
119 try {
120 const resp = await fetchUrl("https://program-sc.miguvideo.com/live/v2/tv-data/" + cates[cate].vomsID)
121 cates[cate].dataList = resp && resp.body ? resp.body.dataList : []
122 } catch (error) {
123 cates[cate].dataList = [];
124 }
125 }
126
127 // 去除重复节目
128 cates = uniqueData(cates)
129 // 合并分类
130 if (isMergeEnabled) {
131 cates = mergeCategory(cates)
132 }
133 // console.dir(cates, { depth: null })
134 // console.log(cates)
135 return cates
136}
137
138// 对data的dataList去重
139function uniqueData(liveList) {

Callers 3

fetchURLByzbpro.jsFile · 0.90
fetchURLByAndroid720pFunction · 0.90
updateTVFunction · 0.90

Calls 4

fetchUrlFunction · 0.90
cateListFunction · 0.85
uniqueDataFunction · 0.85
mergeCategoryFunction · 0.85

Tested by

no test coverage detected