Skip to content

Commit

Permalink
add support for overseas streaming services on Sony TVs
Browse files Browse the repository at this point in the history
  • Loading branch information
wukongdaily committed Feb 24, 2024
1 parent 50423a3 commit fac9873
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 12 deletions.
10 changes: 8 additions & 2 deletions shells/box.sh
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,12 @@ install_tvbox(){
install_apk "https://github.com/wukongdaily/tvhelper/raw/master/apks/TVBox.apk" "com.github.tvbox.osc.wk"
}

sponsor(){
echo
echo -e "${GREEN}访问赞助页面和悟空百科⬇${BLUE}"
echo -e "${BLUE} https://bit.ly/3woDZE7 ${NC}"
echo
}


# 菜单
Expand All @@ -256,15 +262,15 @@ menu_options=(
"连接ADB"
"断开ADB"
"安装TVBox(基于takagen99/Box源码打包)"

#"获取apk地址"
"赞助|打赏"
)

commands=(
["安装ADB"]="install_adb"
["连接ADB"]="connect_adb"
["断开ADB"]="disconnect_adb"
["安装TVBox(基于takagen99/Box源码打包)"]="install_tvbox"
["赞助|打赏"]="sponsor"

)

Expand Down
13 changes: 8 additions & 5 deletions shells/kodi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,12 @@ install_kodi(){
install_apk "https://mirror.karneval.cz/pub/xbmc/releases/android/arm/kodi-20.4-Nexus-armeabi-v7a.apk" "org.xbmc.kodi"
}


sponsor(){
echo
echo -e "${GREEN}访问赞助页面和悟空百科⬇${BLUE}"
echo -e "${BLUE} https://bit.ly/3woDZE7 ${NC}"
echo
}

# 菜单
menu_options=(
Expand All @@ -330,8 +335,7 @@ menu_options=(
"断开ADB"
"安装KODI 20.4"
"设置KODI的语言为简体中文"

#"获取apk地址"
"赞助|打赏"
)

commands=(
Expand All @@ -340,8 +344,7 @@ commands=(
["断开ADB"]="disconnect_adb"
["安装KODI 20.4"]="install_kodi"
["设置KODI的语言为简体中文"]="set_kodi_to_chinese"

#["获取apk地址"]="get_apk_url 'https://github.com/lizongying/my-tv/releases/latest'"
["赞助|打赏"]="sponsor"
)

# 处理菜单
Expand Down
53 changes: 51 additions & 2 deletions shells/sony.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# wget -O son y https://raw.githubusercontent.com/wukongdaily/tvhelper/master/shells/sony.sh && chmod +x sony.sh && ./sony.sh
# wget -O sony.sh https://raw.githubusercontent.com/wukongdaily/tvhelper/master/shells/sony.sh && chmod +x sony.sh && ./sony.sh

#判断是否为x86软路由
is_x86_64_router() {
Expand Down Expand Up @@ -219,7 +219,7 @@ install_disney(){

# 安装Fire TV版本Youtube
install_youtube(){
echo "waiting..."
install_apk "https://github.com/wukongdaily/tvhelper/raw/master/apks/youtube.apk"
}

# 安装HBO GO
Expand Down Expand Up @@ -288,15 +288,62 @@ install_app_bundle() {
fi
}

# 安装apk
install_apk() {
local apk_download_url=$1
local filename=$(basename "$apk_download_url")
# 下载APK文件到临时目录
wget -O /tmp/$filename "$apk_download_url"
if check_adb_connected; then
echo -e "${GREEN}正在推送和安装apk,请耐心等待...${NC}"

# 模拟安装进度
echo -ne "${BLUE}"
while true; do
echo -n ".."
sleep 1
done &

# 保存进度指示进程的PID
PROGRESS_PID=$!
install_result=$(adb install -r /tmp/$filename 2>&1)

# 安装完成后,终止进度指示进程
kill $PROGRESS_PID
wait $PROGRESS_PID 2>/dev/null
echo -e "${NC}\n"

# 检查安装结果
if [[ $install_result == *"Success"* ]]; then
echo -e "${GREEN}APK安装成功!请在盒子上查看${NC}"
else
echo -e "${RED}APK安装失败:$install_result${NC}"
fi
rm -rf /tmp/"$filename"
echo -e "${YELLOW}临时文件/tmp/${filename}已清理${NC}"
else
connect_adb
fi
}

sponsor(){
echo
echo -e "${GREEN}访问赞助页面和悟空百科⬇${BLUE}"
echo -e "${BLUE} https://bit.ly/3woDZE7 ${NC}"
echo
}

# 菜单
menu_options=(
"安装ADB"
"连接ADB"
"断开ADB"
"安装Netflix最新版"
"安装Apple TV+最新版"
"安装Disney+最新版"
"安装HBO GO最新版"
"安装Youtube-FireTV版"
"赞助|打赏"
)

commands=(
Expand All @@ -307,6 +354,8 @@ commands=(
["安装Disney+最新版"]="install_disney"
["安装Youtube-FireTV版"]="install_youtube"
["安装HBO GO最新版"]="install_hbogo"
["安装Apple TV+最新版"]="install_appletv"
["赞助|打赏"]="sponsor"
)


Expand Down
13 changes: 10 additions & 3 deletions shells/tv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,12 @@ install_youtube_firetv() {
enter_tvbox_helper(){
wget -O box.sh https://raw.githubusercontent.com/wukongdaily/tvhelper/master/shells/box.sh && chmod +x box.sh && ./box.sh
}

# 进入sony电视助手
enter_sonytv(){
wget -O sony.sh https://raw.githubusercontent.com/wukongdaily/tvhelper/master/shells/sony.sh && chmod +x sony.sh && ./sony.sh
}

# 赞助
sponsor(){
echo
Expand Down Expand Up @@ -668,7 +674,8 @@ menu_options=(
"进入KODI助手"
"安装Fire TV版Youtube(免谷歌框架)"
"进入TVBox安装助手"
"赞助(Support)"
"进入Sony电视助手"
"赞助|打赏"
)

commands=(
Expand All @@ -694,8 +701,8 @@ commands=(
["进入KODI助手"]="kodi_helper"
["安装Fire TV版Youtube(免谷歌框架)"]="install_youtube_firetv"
["进入TVBox安装助手"]="enter_tvbox_helper"
["赞助(Support)"]="sponsor"

["赞助|打赏"]="sponsor"
["进入Sony电视助手"]="enter_sonytv"
)

# 处理菜单
Expand Down

0 comments on commit fac9873

Please sign in to comment.