issue #13 #12 #11 Support Coupang play, Wavve, TVING ott service.

This commit is contained in:
paul kim
2025-06-16 17:29:25 +09:00
parent c00aac016b
commit 39f3fa4b87
3 changed files with 148 additions and 34 deletions

View File

@@ -794,17 +794,50 @@ HotelTV.LoadAppFull = async function() {
//STEP#03: INIT HCAP for HotelTV FullAPP
let tmrAppAuth = setInterval(async function() {
let _list_install_appIDs = [];
let _NeedToDeleteTimer = false;
let _foundNetflix = false;
let _hcapAppInfo = await HotelTV.hal.PreAppGetInfo(false);
HotelTV.state['hcap_app'] = _hcapAppInfo.applist;
for (_i = 0; _i < HotelTV.state['hcap_app'].length; _i++) {
if (HotelTV.state['hcap_app'][_i].title == "Netflix") {
let _hcapPreloadAppInfo = await HotelTV.hal.PreAppGetInfo(false);
let _hcapGeneralAppInfo = await HotelTV.hal.AppGetInfo(false);
HotelTV.state['hcap_app_preload'] = _hcapPreloadAppInfo.applist;
HotelTV.state['hcap_app_general'] = _hcapGeneralAppInfo.applist;
for (_i = 0; _i < HotelTV.state['hcap_app_preload'].length; _i++) {
if (HotelTV.state['hcap_app_preload'][_i].title == "Netflix") {
console.log("Found out netflix among of pre hcap app-list.")
clearInterval(tmrAppAuth);
_foundNetflix = true;
_NeedToDeleteTimer = true;
}
}
if (_foundNetflix == false) {
for (_i = 0; _i < HotelTV.state['hcap_app_general'].length; _i++) {
if (HotelTV.state['hcap_app_general'][_i].title == "TVING") {
if ( HotelTV.state['hcap_app_general'][_i].valid == false ){
console.warn("Found out TVING but not installed...");
_list_install_appIDs.push(HotelTV.state['hcap_app_general'][_i].appId);
}
} else if (HotelTV.state['hcap_app_general'][_i].title == "Coupang Play") {
if ( HotelTV.state['hcap_app_general'][_i].valid == false ){
console.warn("Found out Coupang Play but not installed...");
_list_install_appIDs.push(HotelTV.state['hcap_app_general'][_i].appId);
}
} else if (HotelTV.state['hcap_app_general'][_i].title == "wavve") {
if ( HotelTV.state['hcap_app_general'][_i].valid == false ){
console.warn("Found out wavve but not installed...");
_list_install_appIDs.push(HotelTV.state['hcap_app_general'][_i].appId);
}
}
}
if ( _list_install_appIDs.length>0 ){
await HotelTV.hal.AppInstall(_list_install_appIDs, false);
}
if ( _foundNetflix == true && _list_install_appIDs.length==0 ){
console.info("Preparing APP Done...");
clearInterval(tmrAppAuth);
}
if ( _foundNetflix == false ) {
try {
let siAppToken = null;
let siAppName = null;