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

Function getddCalcuURL

utils/ddCalcuURL.js:175–198  ·  view source on GitHub ↗

* 加密链接 * @param {string} puDataURL - 加密前链接 * @param {string} programId - 节目ID * @param {string} clientType - 客户端类型 h5 android * @param {string} rateType - 清晰度 2:标清 3:高清 4:蓝光 * @returns {string} - 加密链接

(puDataURL, programId, clientType, rateType, urlUserId)

Source from the content-addressed store, hash-verified

173 * @returns {string} - 加密链接
174 */
175function getddCalcuURL(puDataURL, programId, clientType, rateType, urlUserId) {
176
177 if (puDataURL == null || puDataURL == undefined) {
178 return ""
179 }
180
181 if (programId == null || programId == undefined) {
182 return ""
183 }
184
185 if (clientType != "android" && clientType != "h5") {
186 return ""
187 }
188
189 if (rateType == null || rateType == undefined) {
190 return ""
191 }
192
193 const puData = puDataURL.split("&puData=")[1]
194 const ddCalcu = getddCalcu(puData, programId, clientType, rateType, urlUserId)
195 const suffix = list[clientType].suffix
196
197 return `${puDataURL}&ddCalcu=${ddCalcu}${suffix}`
198}
199
200
201/**

Callers 1

getAndroidURLFunction · 0.90

Calls 1

getddCalcuFunction · 0.85

Tested by

no test coverage detected