Skip to content

Commit

Permalink
Cleanup codes
Browse files Browse the repository at this point in the history
  • Loading branch information
yujincheng08 committed Nov 15, 2021
1 parent 8e7a3b2 commit 17b14cd
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 156 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/me/iacn/biliroaming/SettingDialog.kt
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ class SettingDialog(context: Context) : AlertDialog.Builder(context) {

private fun onCustomServerClick(): Boolean {
AlertDialog.Builder(activity).run {
val layout = moduleRes.getLayout(R.layout.cutomize_backup_dialog)
val layout = moduleRes.getLayout(R.layout.customize_backup_dialog)
val inflater = LayoutInflater.from(context)
val view = inflater.inflate(layout, null)
val editTexts = arrayOf(
Expand Down Expand Up @@ -428,7 +428,7 @@ class SettingDialog(context: Context) : AlertDialog.Builder(context) {

private fun onCustomizeAccessKeyClick(): Boolean {
AlertDialog.Builder(activity).run {
val layout = moduleRes.getLayout(R.layout.cutomize_backup_dialog)
val layout = moduleRes.getLayout(R.layout.customize_backup_dialog)
val inflater = LayoutInflater.from(context)
val view = inflater.inflate(layout, null)
val editTexts = arrayOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import kotlin.collections.HashMap
* Email [email protected]
*/
class BangumiPlayUrlHook(classLoader: ClassLoader) : BaseHook(classLoader) {
var countDownLatch: CountDownLatch? = null
private var countDownLatch: CountDownLatch? = null

override fun startHook() {
if (!sPrefs.getBoolean("main_func", false)) return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ class BangumiSeasonHook(classLoader: ClassLoader) : BaseHook(classLoader) {
if (data != null) return data
return instance.fastJsonClass?.callStaticMethod(
instance.fastJsonParse(),
"""{"relation":-999,"guest_relation":-999,"default_tab":"video","is_params":true,"setting":{"fav_video":0,"coins_video":0,"likes_video":0,"bangumi":0,"played_game":0,"groups":0,"comic":0,"bbq":0,"dress_up":0,"disable_following":0,"live_playback":1,"close_space_medal":0,"only_show_wearing":0},"tab":{"archive":true,"article":false,"clip":false,"album":false,"favorite":false,"bangumi":false,"coin":false,"like":false,"community":false,"dynamic":true,"audios":false,"shop":false,"mall":false,"ugc_season":false,"comic":false,"cheese":false,"sub_comic":false,"activity":false,"series":false},"card":{"mid":"${"$mid"}","name":"哔哩漫游","approve":false,"sex":"保密","rank":"","face":"https://i0.hdslb.com/bfs/album/887ff772ba48558c82e21772f8a8d81cbf94ea1e.png","DisplayRank":"","regtime":0,"spacesta":0,"birthday":"","place":"","description":"该页面由哔哩漫游修复","article":0,"attentions":null,"fans":114,"friend":0,"attention":514,"sign":"该页面由哔哩漫游修复","level_info":{"current_level":6,"current_min":28800,"current_exp":28801,"next_exp":"--"},"pendant":{"pid":0,"name":"","image":"","expire":0,"image_enhance":"","image_enhance_frame":""},"nameplate":{"nid":0,"name":"","image":"","image_small":"","level":"","condition":""},"official_verify":{"type":1,"desc":"原 ${"$name"} 官方账号","role":3,"title":"${"$name"} 官方账号"},"vip":{"vipType":0,"vipDueDate":0,"dueRemark":"","accessStatus":0,"vipStatus":0,"vipStatusWarn":"","themeType":0,"label":{"path":"","text":"","label_theme":"","text_color":"","bg_style":0,"bg_color":"","border_color":""}},"silence":0,"end_time":0,"silence_url":"","likes":{"like_num":233,"skr_tip":"视频、专栏、动态累计获赞"},"pr_info":{},"relation":{"status":1},"is_deleted":0,"honours":{"colour":{"dark":"#CE8620","normal":"#F0900B"},"tags":null},"profession":{}},"images":{"imgUrl":"https://i0.hdslb.com/bfs/album/16b6731618d911060e26f8fc95684c26bddc897c.jpg","night_imgurl":"https://i0.hdslb.com/bfs/album/ca79ebb2ebeee86c5634234c688b410661ea9623.png","has_garb":true,"goods_available":true},"live":{"roomStatus":0,"roundStatus":0,"liveStatus":0,"url":"","title":"","cover":"","online":0,"roomid":0,"broadcast_type":0,"online_hidden":0,"link":""},"archive":{"order":[{"title":"最新发布","value":"pubdate"},{"title":"最多播放","value":"click"}],"count":9999,"item":[]},"series":{"item":[]},"play_game":{"count":0,"item":[]},"article":{"count":0,"item":[],"lists_count":0,"lists":[]},"season":{"count":0,"item":[]},"coin_archive":{"count":0,"item":[]},"like_archive":{"count":0,"item":[]},"audios":{"count":0,"item":[]},"favourite2":{"count":0,"item":[]},"comic":{"count":0,"item":[]},"ugc_season":{"count":0,"item":[]},"cheese":{"count":0,"item":[]},"fans_effect":{},"tab2":[{"title":"动态","param":"dynamic"},{"title":"投稿","param":"contribute","items":[{"title":"视频","param":"video"}]}]}""",
"""{"relation":-999,"guest_relation":-999,"default_tab":"video","is_params":true,"setting":{"fav_video":0,"coins_video":0,"likes_video":0,"bangumi":0,"played_game":0,"groups":0,"comic":0,"bbq":0,"dress_up":0,"disable_following":0,"live_playback":1,"close_space_medal":0,"only_show_wearing":0},"tab":{"archive":true,"article":false,"clip":false,"album":false,"favorite":false,"bangumi":false,"coin":false,"like":false,"community":false,"dynamic":true,"audios":false,"shop":false,"mall":false,"ugc_season":false,"comic":false,"cheese":false,"sub_comic":false,"activity":false,"series":false},"card":{"mid":"$mid","name":"哔哩漫游","approve":false,"sex":"保密","rank":"","face":"https://i0.hdslb.com/bfs/album/887ff772ba48558c82e21772f8a8d81cbf94ea1e.png","DisplayRank":"","regtime":0,"spacesta":0,"birthday":"","place":"","description":"该页面由哔哩漫游修复","article":0,"attentions":null,"fans":114,"friend":0,"attention":514,"sign":"该页面由哔哩漫游修复","level_info":{"current_level":6,"current_min":28800,"current_exp":28801,"next_exp":"--"},"pendant":{"pid":0,"name":"","image":"","expire":0,"image_enhance":"","image_enhance_frame":""},"nameplate":{"nid":0,"name":"","image":"","image_small":"","level":"","condition":""},"official_verify":{"type":1,"desc":"原 $name 官方账号","role":3,"title":"$name 官方账号"},"vip":{"vipType":0,"vipDueDate":0,"dueRemark":"","accessStatus":0,"vipStatus":0,"vipStatusWarn":"","themeType":0,"label":{"path":"","text":"","label_theme":"","text_color":"","bg_style":0,"bg_color":"","border_color":""}},"silence":0,"end_time":0,"silence_url":"","likes":{"like_num":233,"skr_tip":"视频、专栏、动态累计获赞"},"pr_info":{},"relation":{"status":1},"is_deleted":0,"honours":{"colour":{"dark":"#CE8620","normal":"#F0900B"},"tags":null},"profession":{}},"images":{"imgUrl":"https://i0.hdslb.com/bfs/album/16b6731618d911060e26f8fc95684c26bddc897c.jpg","night_imgurl":"https://i0.hdslb.com/bfs/album/ca79ebb2ebeee86c5634234c688b410661ea9623.png","has_garb":true,"goods_available":true},"live":{"roomStatus":0,"roundStatus":0,"liveStatus":0,"url":"","title":"","cover":"","online":0,"roomid":0,"broadcast_type":0,"online_hidden":0,"link":""},"archive":{"order":[{"title":"最新发布","value":"pubdate"},{"title":"最多播放","value":"click"}],"count":9999,"item":[]},"series":{"item":[]},"play_game":{"count":0,"item":[]},"article":{"count":0,"item":[],"lists_count":0,"lists":[]},"season":{"count":0,"item":[]},"coin_archive":{"count":0,"item":[]},"like_archive":{"count":0,"item":[]},"audios":{"count":0,"item":[]},"favourite2":{"count":0,"item":[]},"comic":{"count":0,"item":[]},"ugc_season":{"count":0,"item":[]},"cheese":{"count":0,"item":[]},"fans_effect":{},"tab2":[{"title":"动态","param":"dynamic"},{"title":"投稿","param":"contribute","items":[{"title":"视频","param":"video"}]}]}""",
instance.biliSpaceClass
) ?: data
}
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/me/iacn/biliroaming/hook/CoverHook.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import android.app.Activity
import android.content.ContentValues
import android.graphics.Bitmap
import android.os.Build
import android.os.Bundle
import android.os.Environment
import android.provider.MediaStore
import android.view.GestureDetector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import java.net.HttpURLConnection
import java.net.URL

class MiniProgramHook(classLoader: ClassLoader) : BaseHook(classLoader) {
val extractUrl = Regex("""(.*)(http\S*)(.*)""")
private val extractUrl = Regex("""(.*)(http\S*)(.*)""")
override fun startHook() {
if (!sPrefs.getBoolean("mini_program", false)) return
Log.d("startHook: MiniProgram")
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/java/me/iacn/biliroaming/utils/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@ fun getStreamContent(input: InputStream) = try {
null
}

val gson by lazy { instance.gsonClass?.newInstance() }

/**
* @param targetDir 目标文件夹
*/
Expand Down
132 changes: 0 additions & 132 deletions app/src/main/res/layout/cutomize_danmaku_config_dialog.xml

This file was deleted.

2 changes: 2 additions & 0 deletions app/src/main/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<item>不替换</item>
<item>cos(腾讯)</item>
<item>cosb(腾讯)</item>
<item>bos(腾讯)</item>
<item>ks3(金山)</item>
<item>ks3b(金山)</item>
<item>ks3c(金山)</item>
Expand All @@ -25,6 +26,7 @@
<item>$1</item>
<item>@string/cos_host</item>
<item>@string/cosb_host</item>
<item>@string/bos_host</item>
<item>@string/ks3_host</item>
<item>@string/ks3b_host</item>
<item>@string/ks3c_host</item>
Expand Down
18 changes: 2 additions & 16 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@
<string name="cdn_category">加速CDN设置</string>
<string name="hidden_title">启用隐藏功能</string>
<string name="hidden_summary">打开后可以使用隐藏功能</string>
<string name="purify_mall_summary">去除底部会员购</string>
<string name="purify_mall_title">净化会员购</string>
<string name="purify_channel_summary">去除底部频道</string>
<string name="purify_channel_title">净化频道</string>
<!-- <string name="purify_channel_summary">去除底部频道</string>-->
<!-- <string name="purify_channel_title">净化频道</string>-->
<string name="purify_game_summary">去除首页右上角游戏中心</string>
<string name="purify_game_title">净化游戏中心</string>
<string name="purify_drawer_summary">净化【我的】页面(一刀切)</string>
Expand Down Expand Up @@ -60,16 +58,12 @@
<string name="custom_splash_summary">替换启动图为自定义图片(仅支持6.6.0及以上版本,不选择图片则隐藏)</string>
<string name="custom_splash_logo_title">替换启动Logo</string>
<string name="custom_splash_logo_summary">替换启动Logo为自定义图片(仅支持6.6.0及以上版本,不选择图片则隐藏,延迟生效)</string>
<string name="beautify_title">美化客户端</string>
<string name="beautify_summary">简单地美化客户端</string>
<string name="beautify_category">美化</string>
<string name="auto_like_summary">进入视频详情页时自动点赞</string>
<string name="auto_like_title">自动点赞视频</string>
<string name="feature_title">功能设置</string>
<string name="feature_summary">打开哔哩哔哩客户端,进入【我的】页面,点击【哔哩漫游设置】;旧版本打开侧边栏,长按【设置】</string>
<string name="feature_dialog">当哔哩漫游被正确激活后,打开哔哩哔哩客户端,进入【我的】页面,就能看到【哔哩漫游设置】;使用旧版本客户端则打开侧边栏,长按【设置】。如果不知道如何激活插件,请直接使用Xpatch版。</string>
<string name="thanks_summary">BiliPlus/Kghost</string>
<string name="thanks_title">赞助服务器提供者</string>
<string name="help_title">帮助</string>
<string name="help_summary">点击查看激活方法、常见问题等</string>
<string name="help_url">https://github.com/yujincheng08/BiliRoaming/wiki</string>
Expand All @@ -92,7 +86,6 @@
<string name="save_log_summary">启用后,将保存日志到文件%s</string>
<string name="fix_download_title">解除版权番剧下载限速</string>
<string name="fix_download_summary">提高版权番剧的下载速度,但是会导致音视频分离</string>
<string name="biliplus_alipay">https://qr.alipay.com/tsx09956vdaapx6rdrfxre3</string>
<string name="customize_home_tab_title">净化首页标签</string>
<string name="customize_home_tab_summary">请勿全部选择,会使用之前的的标签</string>
<string name="follow_dark_title">夜间模式跟随系统</string>
Expand Down Expand Up @@ -134,13 +127,6 @@
<string name="speed">速度</string>
<string name="test_upos_title">UPOS服务器测速</string>
<string name="test_upos_summary">选择最快的UPOS以获得最好体验</string>
<string name="live_title">直播</string>
<string name="promo_title">推荐</string>
<string name="hottopic_title">热门</string>
<string name="bangumi_title">番剧</string>
<string name="movie_title">影视</string>
<string name="activity_title">热点</string>
<string name="other_tabs_title">其它</string>
<string name="search_area_title">开启其它地区番剧搜索</string>
<string name="search_area_summary">在搜索页面添加其它地区番剧搜索结果,需要解析服务器支持</string>
<string name="customize_bottom_bar_title">自定义底栏</string>
Expand Down

0 comments on commit 17b14cd

Please sign in to comment.