address requests

This commit is contained in:
Cloudburst 2022-09-06 21:31:44 +02:00
parent 8172696d1a
commit 8c6c4939d2
6 changed files with 56 additions and 16 deletions

View file

@ -23,6 +23,7 @@ import com.lagradost.cloudstream3.utils.Coroutines.ioSafe
import com.lagradost.cloudstream3.utils.Coroutines.main import com.lagradost.cloudstream3.utils.Coroutines.main
import com.lagradost.cloudstream3.utils.GlideApp import com.lagradost.cloudstream3.utils.GlideApp
import com.lagradost.cloudstream3.utils.SubtitleHelper.fromTwoLettersToLanguage import com.lagradost.cloudstream3.utils.SubtitleHelper.fromTwoLettersToLanguage
import com.lagradost.cloudstream3.utils.SubtitleHelper.getFlagFromIso
import com.lagradost.cloudstream3.utils.UIHelper.setImage import com.lagradost.cloudstream3.utils.UIHelper.setImage
import com.lagradost.cloudstream3.utils.UIHelper.toPx import com.lagradost.cloudstream3.utils.UIHelper.toPx
import kotlinx.android.synthetic.main.repository_item.view.* import kotlinx.android.synthetic.main.repository_item.view.*
@ -212,17 +213,17 @@ class PluginAdapter(
itemView.lang_icon?.isVisible = false itemView.lang_icon?.isVisible = false
} else { } else {
itemView.lang_icon?.isVisible = true itemView.lang_icon?.isVisible = true
//itemView.lang_icon.text = getFlagFromIso(metadata.language) itemView.lang_icon.text = "${getFlagFromIso(metadata.language)} ${fromTwoLettersToLanguage(metadata.language)}"
itemView.lang_icon.text = fromTwoLettersToLanguage(metadata.language)
} }
if (isLocal) { if (isLocal) {
itemView.ext_votes?.isVisible = false itemView.ext_votes?.isVisible = false
} else { } else {
itemView.ext_votes?.isVisible = true itemView.ext_votes?.isVisible = false
ioSafe { ioSafe {
metadata.getVotes().main { metadata.getVotes().main {
itemView.ext_votes?.setText(txt(R.string.votes_format, prettyCount(it))) itemView.ext_votes?.setText(txt(R.string.extension_rating, prettyCount(it)))
itemView.ext_votes?.isVisible = true
} }
} }
} }

View file

@ -19,6 +19,9 @@ import com.lagradost.cloudstream3.utils.Coroutines.ioSafe
import com.lagradost.cloudstream3.utils.Coroutines.main import com.lagradost.cloudstream3.utils.Coroutines.main
import com.lagradost.cloudstream3.utils.UIHelper.colorFromAttribute import com.lagradost.cloudstream3.utils.UIHelper.colorFromAttribute
import com.lagradost.cloudstream3.AcraApplication.Companion.openBrowser import com.lagradost.cloudstream3.AcraApplication.Companion.openBrowser
import com.lagradost.cloudstream3.utils.SubtitleHelper
import com.lagradost.cloudstream3.utils.SubtitleHelper.fromTwoLettersToLanguage
import com.lagradost.cloudstream3.utils.SubtitleHelper.getFlagFromIso
class PluginDetailsFragment(val data: PluginViewData) : BottomSheetDialogFragment() { class PluginDetailsFragment(val data: PluginViewData) : BottomSheetDialogFragment() {
@ -68,6 +71,10 @@ class PluginDetailsFragment(val data: PluginViewData) : BottomSheetDialogFragmen
plugin_author?.text = if (metadata.authors.isEmpty()) getString(R.string.no_data) else metadata.authors.joinToString(", ") plugin_author?.text = if (metadata.authors.isEmpty()) getString(R.string.no_data) else metadata.authors.joinToString(", ")
plugin_status?.text = resources.getStringArray(R.array.extension_statuses)[metadata.status] plugin_status?.text = resources.getStringArray(R.array.extension_statuses)[metadata.status]
plugin_types?.text = if ((metadata.tvTypes == null) || metadata.tvTypes.isEmpty()) getString(R.string.no_data) else metadata.tvTypes.joinToString(", ") plugin_types?.text = if ((metadata.tvTypes == null) || metadata.tvTypes.isEmpty()) getString(R.string.no_data) else metadata.tvTypes.joinToString(", ")
plugin_lang?.text = if (metadata.language == null)
getString(R.string.no_data)
else
"${getFlagFromIso(metadata.language)} ${fromTwoLettersToLanguage(metadata.language)}"
github_btn.setOnClickListener { github_btn.setOnClickListener {
if (metadata.repositoryUrl != null) { if (metadata.repositoryUrl != null) {

View file

@ -233,6 +233,36 @@
tools:text="Lolem ipsum kek" /> tools:text="Lolem ipsum kek" />
</LinearLayout> </LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:foreground="?android:attr/selectableItemBackgroundBorderless"
android:padding="8dp">
<!--marquee_forever-->
<com.google.android.material.button.MaterialButton
style="@style/SmallBlackButton"
android:layout_gravity="center"
android:layout_marginStart="10dp"
android:text="@string/extension_language" />
<TextView
android:id="@+id/plugin_lang"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="10dp"
android:ellipsize="marquee"
android:gravity="center_vertical"
android:singleLine="false"
android:textColor="?attr/textColor"
tools:text="Lolem ipsum kek" />
</LinearLayout>
</LinearLayout> </LinearLayout>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout

View file

@ -79,8 +79,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
android:text="10K"
android:textColor="?attr/grayTextColor" android:textColor="?attr/grayTextColor"
tools:text="Votes: 10K"
android:visibility="gone" android:visibility="gone"
tools:visibility="visible" /> tools:visibility="visible" />

View file

@ -408,23 +408,23 @@
<string name="repository_url_hint">Adres url repozytorium</string> <string name="repository_url_hint">Adres url repozytorium</string>
<string name="plugin_loaded">Rozszerzenie załadowane</string> <string name="plugin_loaded">Rozszerzenie załadowane</string>
<string name="plugin_deleted">Rozszerzenie usunięte</string> <string name="plugin_deleted">Rozszerzenie usunięte</string>
<string name="plugin_load_fail">Błąd ładowania %s</string> <string name="plugin_load_fail" formatted="true">Błąd ładowania %s</string>
<string name="is_adult">+18</string> <string name="is_adult">+18</string>
<string name="batch_download_start_format">Zaczęto pobieranie %d %s</string> <string name="batch_download_start_format" formatted="true">Zaczęto pobieranie %d %s</string>
<string name="batch_download_finish_format">Pobrano %d %s</string> <string name="batch_download_finish_format" formatted="true">Pobrano %d %s</string>
<string name="batch_download_nothing_to_download_format">Wszystkie %s już pobrane</string> <string name="batch_download_nothing_to_download_format" formatted="true">Wszystkie %s już pobrane</string>
<string name="batch_download">Pobierz wszystko</string> <string name="batch_download">Pobierz wszystko</string>
<string name="plugin_singular">rozszerzenie</string> <string name="plugin_singular">rozszerzenie</string>
<string name="plugin">rozszerzenia</string> <string name="plugin">rozszerzenia</string>
<string name="delete_repository_plugins">Ta akcja usunie także wszystkie rozszerzenia z repozytorium</string> <string name="delete_repository_plugins">Ta akcja usunie także wszystkie rozszerzenia z repozytorium</string>
<string name="delete_repository">Usuń repozytorium</string> <string name="delete_repository">Usuń repozytorium</string>
<string name="setup_extensions_subtext">Pobierz strony które Cię interesują</string> <string name="setup_extensions_subtext">Pobierz strony które Cię interesują</string>
<string name="plugins_downloaded">Pobrano: %d</string> <string name="plugins_downloaded" formatted="true">Pobrano: %d</string>
<string name="plugins_disabled">Wyłączono: %d</string> <string name="plugins_disabled" formatted="true">Wyłączono: %d</string>
<string name="plugins_not_downloaded">Nie pobrano: %d</string> <string name="plugins_not_downloaded" formatted="true">Nie pobrano: %d</string>
<string name="blank_repo_message">Dodaj repozytorium aby zainstalować rozszerzenia</string> <string name="blank_repo_message">Dodaj repozytorium aby zainstalować rozszerzenia</string>
<string name="sync_score">Ocenione</string> <string name="sync_score">Ocenione</string>
<string name="sync_score_format">%d na 10</string> <string name="sync_score_format" formatted="true">%d na 10</string>
<string name="others">Inne</string> <string name="others">Inne</string>
<string name="other_singular">Wideo</string> <string name="other_singular">Wideo</string>
<string name="view_public_repositories_button">Zobacz repozytoria społeczności</string> <string name="view_public_repositories_button">Zobacz repozytoria społeczności</string>
@ -433,7 +433,7 @@
<string name="subtitles_filter_lang">Filtrowanie wg preferowanego języka mediów</string> <string name="subtitles_filter_lang">Filtrowanie wg preferowanego języka mediów</string>
<string name="uppercase_all_subtitles">Wszystkie napisy wielką literą</string> <string name="uppercase_all_subtitles">Wszystkie napisy wielką literą</string>
<string name="download_all_plugins_from_repo">Pobrać wszystkie rozszerzenia z tego repozytorium?</string> <string name="download_all_plugins_from_repo">Pobrać wszystkie rozszerzenia z tego repozytorium?</string>
<string name="single_plugin_disabled">%s (Wyłączone)</string> <string name="single_plugin_disabled" formatted="true">%s (Wyłączone)</string>
<string name="pref_filter_search_quality">Ukryj wybraną jakość wideo w wynikach wyszukiwania</string> <string name="pref_filter_search_quality">Ukryj wybraną jakość wideo w wynikach wyszukiwania</string>
<string name="enable_nsfw_on_providers">Włącz NSFW u obsługiwanych dostawców</string> <string name="enable_nsfw_on_providers">Włącz NSFW u obsługiwanych dostawców</string>
<string name="category_providers">Dostawcy</string> <string name="category_providers">Dostawcy</string>
@ -446,11 +446,12 @@
<string name="apply_on_restart">Zastosuj po ponownym uruchomieniu</string> <string name="apply_on_restart">Zastosuj po ponownym uruchomieniu</string>
<string name="autoplay_next_settings_des">Rozpocznij następny odcinek po zakończeniu bieżącego</string> <string name="autoplay_next_settings_des">Rozpocznij następny odcinek po zakończeniu bieżącego</string>
<string name="autoplay_next_settings">Autoodtwarzanie następnego odcinka</string> <string name="autoplay_next_settings">Autoodtwarzanie następnego odcinka</string>
<string name="votes_format">Głosy: %s</string> <string name="extension_rating" formatted="true">Ocena: %s</string>
<string name="extension_description">Opis</string> <string name="extension_description">Opis</string>
<string name="extension_version">Versja</string> <string name="extension_version">Versja</string>
<string name="extension_status">Status</string> <string name="extension_status">Status</string>
<string name="extension_size">Rozmiar</string> <string name="extension_size">Rozmiar</string>
<string name="extension_authors">Autorzy</string> <string name="extension_authors">Autorzy</string>
<string name="extension_types">Wspierane</string> <string name="extension_types">Wspierane</string>
<string name="extension_language">Język</string>
</resources> </resources>

View file

@ -616,11 +616,12 @@
<string name="safe_mode_description">An unrecoverable crash occurred and we\'ve automatically disabled all extensions, so you can find and remove the extension which is causing trouble.</string> <string name="safe_mode_description">An unrecoverable crash occurred and we\'ve automatically disabled all extensions, so you can find and remove the extension which is causing trouble.</string>
<string name="safe_mode_crash_info">View crash info</string> <string name="safe_mode_crash_info">View crash info</string>
<string name="votes_format" formatted="true">Votes: %s</string> <string name="extension_rating" formatted="true">Rating: %s</string>
<string name="extension_description">Description</string> <string name="extension_description">Description</string>
<string name="extension_version">Version</string> <string name="extension_version">Version</string>
<string name="extension_status">Status</string> <string name="extension_status">Status</string>
<string name="extension_size">Size</string> <string name="extension_size">Size</string>
<string name="extension_authors">Authors</string> <string name="extension_authors">Authors</string>
<string name="extension_types">Supported</string> <string name="extension_types">Supported</string>
<string name="extension_language">Language</string>
</resources> </resources>