diff --git a/app/src/main/java/top/rootu/lampa/AndroidJS.kt b/app/src/main/java/top/rootu/lampa/AndroidJS.kt index 19bdfb8..48eefcf 100644 --- a/app/src/main/java/top/rootu/lampa/AndroidJS.kt +++ b/app/src/main/java/top/rootu/lampa/AndroidJS.kt @@ -185,8 +185,8 @@ class AndroidJS(private val mainActivity: MainActivity, private val browser: Bro try { mainActivity.startActivity(intent) } catch (e: Exception) { - Log.d(TAG, e.message, e) - App.toast(R.string.no_activity_found, true) + if (BuildConfig.DEBUG) Log.d(TAG, e.message, e) + App.toast(R.string.no_torrent_activity_found, true) } } // update Recs to filter viewed @@ -210,8 +210,8 @@ class AndroidJS(private val mainActivity: MainActivity, private val browser: Bro try { mainActivity.startActivity(intent) } catch (e: Exception) { - Log.d(TAG, e.message, e) - App.toast(R.string.no_activity_found, true) + if (BuildConfig.DEBUG) Log.d(TAG, e.message, e) + App.toast(R.string.no_youtube_activity_found, true) } } } @@ -229,7 +229,7 @@ class AndroidJS(private val mainActivity: MainActivity, private val browser: Bro @JavascriptInterface @org.xwalk.core.JavascriptInterface fun httpReq(str: String?, returnI: Int) { - Log.d("JS", str!!) + if (BuildConfig.DEBUG) Log.d("JS", str!!) val jSONObject: JSONObject? try { jSONObject = JSONObject(str) @@ -343,7 +343,7 @@ class AndroidJS(private val mainActivity: MainActivity, private val browser: Bro @JavascriptInterface @org.xwalk.core.JavascriptInterface fun openPlayer(link: String, jsonStr: String) { - Log.d(TAG, "openPlayer: $link json:$jsonStr") + if (BuildConfig.DEBUG) Log.d(TAG, "openPlayer: $link json:$jsonStr") val jsonObject: JSONObject = try { JSONObject(jsonStr.ifEmpty { "{}" }) } catch (e: Exception) { @@ -398,7 +398,7 @@ class AndroidJS(private val mainActivity: MainActivity, private val browser: Bro fun updateChannel(where: String?) { // https://github.com/yumata/lampa-source/blob/e5505b0e9cf5f95f8ec49bddbbb04086fccf26c8/src/app.js#L203 if (where != null && isAndroidTV) { - Log.d(TAG, "***** updateChannel [$where]") + if (BuildConfig.DEBUG) Log.d(TAG, "***** updateChannel [$where]") when (where) { LampaProvider.HIST, LampaProvider.BOOK, diff --git a/app/src/main/java/top/rootu/lampa/MainActivity.kt b/app/src/main/java/top/rootu/lampa/MainActivity.kt index 6d80da1..02240d2 100644 --- a/app/src/main/java/top/rootu/lampa/MainActivity.kt +++ b/app/src/main/java/top/rootu/lampa/MainActivity.kt @@ -1259,6 +1259,7 @@ class MainActivity : AppCompatActivity(), "com.ghisler.android.totalcommander", "com.instantbits.cast.webvideo", "com.lonelycatgames.xplore", + "com.mitv.videoplayer", "com.mixplorer.silver", "com.opera.browser", "org.droidtv.contentexplorer", @@ -1273,7 +1274,7 @@ class MainActivity : AppCompatActivity(), filteredList.add(info) } if (filteredList.isEmpty()) { - App.toast(R.string.no_activity_found, true) + App.toast(R.string.no_player_activity_found, true) return } var playerPackageExist = false diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 2b84206..586f380 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -1,5 +1,8 @@ - Lampa: Нет приложения для открытия ссылки данного типа + Нет приложения, позволяющего открыть ссылку этого типа. + Подходящего мультимедиа-плеера не найдено. Пожалуйста, установите плеер из Google Play Store или любого другого источника. Мы рекомендуем Just Player, Vimu Media Player, VLC. + Нет приложения для открытия торрент-ссылок. Пожалуйста, установите TorrServe или любое другое приложение, работающее с торрентами. + Нет приложения для открытия ссылок YouTube. Пожалуйста, установите приложение YouTube. Lampa: Выбранный плеер не поддерживает воспроизведение этого видео Введите корректный адрес сайта, например:\nhttp://lampa.mx Отмена diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml index 8efab58..854e5a3 100644 --- a/app/src/main/res/values-zh/strings.xml +++ b/app/src/main/res/values-zh/strings.xml @@ -1,6 +1,9 @@ - ​​Lampa:没有应用程序可以打开此类链接 - Lampa:所选播放器不支持该视频 + ​​没有应用程序可以打开此类链接。 + ​​未找到匹配的播放器。请从 Google Play 商店或任何其他来源安装播放器。我们推荐 Just Player、Vimu Media Player、VLC。 + ​​没有应用程序可以打开 torrent 链接。请安装 TorrServe 或任何其他支持 torrent 的应用程序。 + ​​没有应用程序可以打开 YouTube 链接。请安装 YouTube 应用。 + 所选播放器不支持该视频 请输入一个有效的网址,例如:\nhttp://lampa.mx 取消 保存 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 7f2159e..938588d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,8 +1,11 @@ LAMPA top.rootu.lampa - Lampa: There is no application to open this type of link - Lampa: The selected player does not support playing this video + There is no application to open this type of link. + No matching multimedia player found. Please, install player from Google Play Store or any other source. We recommend Just Player, Vimu Media Player, VLC. + There is no application to open torrent links. Please, install TorrServe or any other App working with torrents. + There is no application to open YouTube links. Please, install YouTube App. + The selected player does not support playing this video Enter the correct website address, for example:\nhttp://lampa.mx Cancel Save