From 06801ba6ab4b97fc43726b478537e6b158e9ea4f Mon Sep 17 00:00:00 2001 From: LagradOst Date: Sat, 29 Jan 2022 19:57:19 +0100 Subject: [PATCH] minor refactor --- .../animeproviders/AllAnimeProvider.kt | 37 +- .../animeproviders/AnimeflvProvider.kt | 60 +-- .../animeproviders/MonoschinosProvider.kt | 99 ++-- .../movieproviders/CinecalidadProvider.kt | 6 +- .../movieproviders/DoramasYTProvider.kt | 6 +- .../movieproviders/PeliSmartProvider.kt | 6 +- .../movieproviders/PelisplusHDProvider.kt | 6 +- app/src/main/res/layout/account_managment.xml | 29 +- app/src/main/res/layout/account_single.xml | 16 +- app/src/main/res/layout/account_switch.xml | 11 +- app/src/main/res/layout/activity_main.xml | 17 +- app/src/main/res/layout/activity_main_tv.xml | 14 +- .../res/layout/bottom_selection_dialog.xml | 18 +- app/src/main/res/layout/dialog_loading.xml | 13 +- .../res/layout/download_child_episode.xml | 34 +- .../res/layout/download_header_episode.xml | 34 +- app/src/main/res/layout/empty_layout.xml | 8 +- .../res/layout/fragment_child_downloads.xml | 16 +- .../main/res/layout/fragment_downloads.xml | 66 ++- app/src/main/res/layout/fragment_player.xml | 2 +- app/src/main/res/layout/fragment_result.xml | 15 +- app/src/main/res/layout/fragment_search.xml | 26 +- .../res/layout/home_episodes_expanded.xml | 18 +- .../main/res/layout/home_result_big_grid.xml | 11 +- app/src/main/res/layout/home_result_grid.xml | 36 +- .../main/res/layout/home_select_mainpage.xml | 33 +- app/src/main/res/layout/homepage_parent.xml | 14 +- app/src/main/res/layout/loading_downloads.xml | 14 +- app/src/main/res/layout/loading_episode.xml | 56 +- app/src/main/res/layout/loading_line.xml | 9 +- .../main/res/layout/loading_line_short.xml | 9 +- .../res/layout/loading_line_short_center.xml | 9 +- app/src/main/res/layout/loading_list.xml | 71 ++- app/src/main/res/layout/loading_poster.xml | 9 +- .../main/res/layout/player_custom_layout.xml | 1 + .../res/layout/player_custom_layout_tv.xml | 482 +++++++++--------- app/src/main/res/layout/provider_list.xml | 25 +- app/src/main/res/layout/quick_search.xml | 27 +- .../main/res/layout/result_episode_large.xml | 45 +- app/src/main/res/layout/result_tag.xml | 12 +- .../main/res/layout/search_result_compact.xml | 25 +- .../main/res/layout/search_result_grid.xml | 66 +-- .../layout/search_result_super_compact.xml | 25 +- app/src/main/res/layout/sort_bottom_sheet.xml | 20 +- .../res/layout/sort_bottom_single_choice.xml | 3 +- app/src/main/res/layout/subtitle_settings.xml | 72 +-- app/src/main/res/layout/toast.xml | 5 +- 47 files changed, 862 insertions(+), 774 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/animeproviders/AllAnimeProvider.kt b/app/src/main/java/com/lagradost/cloudstream3/animeproviders/AllAnimeProvider.kt index d3f19298..046477c3 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/animeproviders/AllAnimeProvider.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/animeproviders/AllAnimeProvider.kt @@ -223,19 +223,24 @@ class AllAnimeProvider : MainAPI() { @JsonProperty("episodeIframeHead") val episodeIframeHead: String ) - private fun getM3u8Qualities(m3u8Link: String, referer: String, qualityName: String): ArrayList { - return ArrayList(hlsHelper.m3u8Generation(M3u8Helper.M3u8Stream(m3u8Link, null), true).map { stream -> - val qualityString = if ((stream.quality ?: 0) == 0) "" else "${stream.quality}p" - ExtractorLink( - this.name, - "${this.name} - $qualityName $qualityString", - stream.streamUrl, - referer, - getQualityFromName(stream.quality.toString()), - true, - stream.headers - ) - }) + private fun getM3u8Qualities( + m3u8Link: String, + referer: String, + qualityName: String + ): ArrayList { + return ArrayList( + hlsHelper.m3u8Generation(M3u8Helper.M3u8Stream(m3u8Link, null), true).map { stream -> + val qualityString = if ((stream.quality ?: 0) == 0) "" else "${stream.quality}p" + ExtractorLink( + this.name, + "${this.name} - $qualityName $qualityString", + stream.streamUrl, + referer, + getQualityFromName(stream.quality.toString()), + true, + stream.headers + ) + }) } override suspend fun loadLinks( @@ -244,8 +249,10 @@ class AllAnimeProvider : MainAPI() { subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit ): Boolean { - var apiEndPoint = mapper.readValue(app.get("$mainUrl/getVersion").text).episodeIframeHead - if (apiEndPoint.endsWith("/")) apiEndPoint = apiEndPoint.slice(0 until apiEndPoint.length - 1) + var apiEndPoint = + mapper.readValue(app.get("$mainUrl/getVersion").text).episodeIframeHead + if (apiEndPoint.endsWith("/")) apiEndPoint = + apiEndPoint.slice(0 until apiEndPoint.length - 1) val html = app.get(data).text diff --git a/app/src/main/java/com/lagradost/cloudstream3/animeproviders/AnimeflvProvider.kt b/app/src/main/java/com/lagradost/cloudstream3/animeproviders/AnimeflvProvider.kt index 3cbd0040..0b3b2d95 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/animeproviders/AnimeflvProvider.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/animeproviders/AnimeflvProvider.kt @@ -1,11 +1,12 @@ package com.lagradost.cloudstream3.animeproviders import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.utils.ExtractorLink +import com.lagradost.cloudstream3.utils.loadExtractor import java.util.* import kotlin.collections.ArrayList -class AnimeflvnetProvider:MainAPI() { +class AnimeflvnetProvider : MainAPI() { companion object { fun getType(t: String): TvType { return if (t.contains("OVA") || t.contains("Especial")) TvType.ONA @@ -13,10 +14,9 @@ class AnimeflvnetProvider:MainAPI() { else TvType.Anime } } - override val mainUrl: String - get() = "https://m.animeflv.net" - override val name: String - get() = "AnimeFLV" + + override val mainUrl = "https://m.animeflv.net" + override val name = "AnimeFLV" override val lang = "es" override val hasMainPage = true override val hasChromecastSupport = true @@ -27,8 +27,6 @@ class AnimeflvnetProvider:MainAPI() { TvType.Anime, ) - - override suspend fun getMainPage(): HomePageResponse { val urls = listOf( Pair("$mainUrl/browse?type[]=movie&order=updated", "Peliculas actualizadas"), @@ -50,7 +48,9 @@ class AnimeflvnetProvider:MainAPI() { TvType.Anime, fixUrl(poster), null, - if (title.contains("Latino") || title.contains("Castellano")) EnumSet.of(DubStatus.Dubbed) else EnumSet.of(DubStatus.Subbed), + if (title.contains("Latino") || title.contains("Castellano")) EnumSet.of( + DubStatus.Dubbed + ) else EnumSet.of(DubStatus.Subbed), ) } @@ -78,7 +78,9 @@ class AnimeflvnetProvider:MainAPI() { TvType.Anime, fixUrl(image), null, - if (title.contains("Latino") || title.contains("Castellano")) EnumSet.of(DubStatus.Dubbed) else EnumSet.of(DubStatus.Subbed), + if (title.contains("Latino") || title.contains("Castellano")) EnumSet.of(DubStatus.Dubbed) else EnumSet.of( + DubStatus.Subbed + ), ) } return ArrayList(episodes) @@ -87,23 +89,25 @@ class AnimeflvnetProvider:MainAPI() { override suspend fun load(url: String): LoadResponse { val doc = app.get(url).document val title = doc.selectFirst("h1.Title").text() - val description = doc.selectFirst(".Anime > header:nth-child(1) > p:nth-child(3)").text().replace("Sinopsis: ","") + val description = doc.selectFirst(".Anime > header:nth-child(1) > p:nth-child(3)").text() + .replace("Sinopsis: ", "") val poster = doc.selectFirst(".Image img").attr("src") val episodes = doc.select("li.Episode").map { li -> val href = fixUrl(li.selectFirst("a").attr("href")) AnimeEpisode( - fixUrl(href), "Episodio" + li.selectFirst("a").text().replace(title,"") + fixUrl(href), "Episodio" + li.selectFirst("a").text().replace(title, "") ) } val type = doc.selectFirst("span.Type.A").text() val genre = doc.select("a.Tag") .map { it?.text()?.trim().toString() } - val status = when (doc.selectFirst("article.Anime.Single.Bglg header p strong.Anm-On")?.text()) { - "En emisión" -> ShowStatus.Ongoing - "Finalizado" -> ShowStatus.Completed - else -> null - } + val status = + when (doc.selectFirst("article.Anime.Single.Bglg header p strong.Anm-On")?.text()) { + "En emisión" -> ShowStatus.Ongoing + "Finalizado" -> ShowStatus.Completed + else -> null + } return newAnimeLoadResponse(title, url, getType(type)) { posterUrl = fixUrl(poster) addEpisodes(DubStatus.Subbed, episodes) @@ -112,6 +116,7 @@ class AnimeflvnetProvider:MainAPI() { tags = genre } } + override suspend fun loadLinks( data: String, isCasting: Boolean, @@ -121,24 +126,19 @@ class AnimeflvnetProvider:MainAPI() { //There might be a better way to do this, but this one works val html = app.get(data).text val linkRegex = Regex("""(https:.*?\.html.*)""") + val videos = linkRegex.findAll(html).map { it.value.replace("\\/", "/") }.toList() - val serversRegex = Regex("(https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&\\/\\/=]*))") - val links = serversRegex.findAll(videos.toString()).map { - it.value.replace("https://embedsb.com","https://watchsb.com") - }.toList() - for (link in links) { - for (extractor in extractorApis) { - if (link.startsWith(extractor.mainUrl)) { - extractor.getSafeUrl(link, data)?.forEach { - callback(it) - } - } - } + val serversRegex = + Regex("(https?://(www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_+.~#?&/=]*))") + + serversRegex.findAll(videos.toString()).map { + it.value.replace("https://embedsb.com", "https://watchsb.com") + }.forEach { link -> + loadExtractor(link, data, callback) } return true } - } \ No newline at end of file diff --git a/app/src/main/java/com/lagradost/cloudstream3/animeproviders/MonoschinosProvider.kt b/app/src/main/java/com/lagradost/cloudstream3/animeproviders/MonoschinosProvider.kt index e07f8d8b..29a01971 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/animeproviders/MonoschinosProvider.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/animeproviders/MonoschinosProvider.kt @@ -2,16 +2,13 @@ package com.lagradost.cloudstream3.animeproviders import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.extractors.FEmbed -import java.util.* import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.extractorApis import com.lagradost.cloudstream3.utils.loadExtractor +import java.util.* import kotlin.collections.ArrayList - -class MonoschinosProvider:MainAPI() { - +class MonoschinosProvider : MainAPI() { companion object { fun getType(t: String): TvType { return if (t.contains("OVA") || t.contains("Especial")) TvType.ONA @@ -20,10 +17,8 @@ class MonoschinosProvider:MainAPI() { } } - override val mainUrl: String - get() = "https://monoschinos2.com" - override val name: String - get() = "Monoschinos" + override val mainUrl = "https://monoschinos2.com" + override val name = "Monoschinos" override val lang = "es" override val hasMainPage = true override val hasChromecastSupport = true @@ -37,30 +32,40 @@ class MonoschinosProvider:MainAPI() { override suspend fun getMainPage(): HomePageResponse { val urls = listOf( Pair("$mainUrl/emision", "En emisión"), - Pair("$mainUrl/animes?categoria=pelicula&genero=false&fecha=false&letra=false", "Peliculas"), + Pair( + "$mainUrl/animes?categoria=pelicula&genero=false&fecha=false&letra=false", + "Peliculas" + ), Pair("$mainUrl/animes", "Animes"), ) val items = ArrayList() - items.add(HomePageList("Capítulos actualizados", app.get(mainUrl, timeout = 120).document.select(".col-6").map{ - val title = it.selectFirst("p.animetitles").text() - val poster = it.selectFirst(".animeimghv").attr("data-src") - val epRegex = Regex("episodio-(\\d+)") - val url = it.selectFirst("a").attr("href").replace("ver/","anime/").replace(epRegex,"sub-espanol") - val epNum = it.selectFirst(".positioning h5").text().toIntOrNull() - AnimeSearchResponse( - title, - url, - this.name, - TvType.Anime, - poster, - null, - if (title.contains("Latino") || title.contains("Castellano")) EnumSet.of(DubStatus.Dubbed) else EnumSet.of(DubStatus.Subbed), - subEpisodes = epNum, - dubEpisodes = epNum, - ) - })) + items.add( + HomePageList( + "Capítulos actualizados", + app.get(mainUrl, timeout = 120).document.select(".col-6").map { + val title = it.selectFirst("p.animetitles").text() + val poster = it.selectFirst(".animeimghv").attr("data-src") + val epRegex = Regex("episodio-(\\d+)") + val url = it.selectFirst("a").attr("href").replace("ver/", "anime/") + .replace(epRegex, "sub-espanol") + val epNum = it.selectFirst(".positioning h5").text().toIntOrNull() + AnimeSearchResponse( + title, + url, + this.name, + TvType.Anime, + poster, + null, + if (title.contains("Latino") || title.contains("Castellano")) EnumSet.of( + DubStatus.Dubbed + ) else EnumSet.of(DubStatus.Subbed), + subEpisodes = epNum, + dubEpisodes = epNum, + ) + }) + ) for (i in urls) { try { @@ -74,7 +79,9 @@ class MonoschinosProvider:MainAPI() { TvType.Anime, fixUrl(poster), null, - if (title.contains("Latino") || title.contains("Castellano")) EnumSet.of(DubStatus.Dubbed) else EnumSet.of(DubStatus.Subbed), + if (title.contains("Latino") || title.contains("Castellano")) EnumSet.of( + DubStatus.Dubbed + ) else EnumSet.of(DubStatus.Subbed), ) } @@ -89,28 +96,32 @@ class MonoschinosProvider:MainAPI() { } override suspend fun search(query: String): ArrayList { - val search = app.get("$mainUrl/buscar?q=$query", timeout = 120).document.select(".col-6").map { - val title = it.selectFirst(".seristitles").text() - val href = fixUrl(it.selectFirst("a").attr("href")) - val image = it.selectFirst("img.animemainimg").attr("src") - AnimeSearchResponse( - title, - href, - this.name, - TvType.Anime, - fixUrl(image), - null, - if (title.contains("Latino") || title.contains("Castellano")) EnumSet.of(DubStatus.Dubbed) else EnumSet.of(DubStatus.Subbed), - ) - } + val search = + app.get("$mainUrl/buscar?q=$query", timeout = 120).document.select(".col-6").map { + val title = it.selectFirst(".seristitles").text() + val href = fixUrl(it.selectFirst("a").attr("href")) + val image = it.selectFirst("img.animemainimg").attr("src") + AnimeSearchResponse( + title, + href, + this.name, + TvType.Anime, + fixUrl(image), + null, + if (title.contains("Latino") || title.contains("Castellano")) EnumSet.of( + DubStatus.Dubbed + ) else EnumSet.of(DubStatus.Subbed), + ) + } return ArrayList(search) } + override suspend fun load(url: String): LoadResponse { val doc = app.get(url, timeout = 120).document val poster = doc.selectFirst(".chapterpic img").attr("src") val title = doc.selectFirst(".chapterdetails h1").text() val type = doc.selectFirst("div.chapterdetls2").text() - val description = doc.selectFirst("p.textComplete").text().replace("Ver menos","") + val description = doc.selectFirst("p.textComplete").text().replace("Ver menos", "") val genres = doc.select(".breadcrumb-item a").map { it.text() } val status = when (doc.selectFirst("button.btn1")?.text()) { "Estreno" -> ShowStatus.Ongoing diff --git a/app/src/main/java/com/lagradost/cloudstream3/movieproviders/CinecalidadProvider.kt b/app/src/main/java/com/lagradost/cloudstream3/movieproviders/CinecalidadProvider.kt index e5a998a1..1a1afc65 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/movieproviders/CinecalidadProvider.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/movieproviders/CinecalidadProvider.kt @@ -5,10 +5,8 @@ import com.lagradost.cloudstream3.utils.* import java.util.* class CinecalidadProvider:MainAPI() { - override val mainUrl: String - get() = "https://cinecalidad.lol" - override val name: String - get() = "Cinecalidad" + override val mainUrl = "https://cinecalidad.lol" + override val name = "Cinecalidad" override val lang = "es" override val hasMainPage = true override val hasChromecastSupport = true diff --git a/app/src/main/java/com/lagradost/cloudstream3/movieproviders/DoramasYTProvider.kt b/app/src/main/java/com/lagradost/cloudstream3/movieproviders/DoramasYTProvider.kt index ec3994aa..4f17ced0 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/movieproviders/DoramasYTProvider.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/movieproviders/DoramasYTProvider.kt @@ -19,10 +19,8 @@ class DoramasYTProvider:MainAPI() { } } - override val mainUrl: String - get() = "https://doramasyt.com" - override val name: String - get() = "DoramasYT" + override val mainUrl = "https://doramasyt.com" + override val name = "DoramasYT" override val lang = "es" override val hasMainPage = true override val hasChromecastSupport = true diff --git a/app/src/main/java/com/lagradost/cloudstream3/movieproviders/PeliSmartProvider.kt b/app/src/main/java/com/lagradost/cloudstream3/movieproviders/PeliSmartProvider.kt index 9a96f8cf..2c327303 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/movieproviders/PeliSmartProvider.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/movieproviders/PeliSmartProvider.kt @@ -6,10 +6,8 @@ import com.lagradost.cloudstream3.utils.extractorApis import java.util.ArrayList class PeliSmartProvider: MainAPI() { - override val mainUrl: String - get() = "https://pelismart.com" - override val name: String - get() = "PeliSmart" + override val mainUrl = "https://pelismart.com" + override val name = "PeliSmart" override val lang = "es" override val hasMainPage = true override val hasChromecastSupport = true diff --git a/app/src/main/java/com/lagradost/cloudstream3/movieproviders/PelisplusHDProvider.kt b/app/src/main/java/com/lagradost/cloudstream3/movieproviders/PelisplusHDProvider.kt index 1aea6c1b..eaa8149f 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/movieproviders/PelisplusHDProvider.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/movieproviders/PelisplusHDProvider.kt @@ -5,10 +5,8 @@ import com.lagradost.cloudstream3.utils.* import java.util.* class PelisplusHDProvider:MainAPI() { - override val mainUrl: String - get() = "https://pelisplushd.net" - override val name: String - get() = "PelisplusHD" + override val mainUrl = "https://pelisplushd.net" + override val name = "PelisplusHD" override val lang = "es" override val hasMainPage = true override val hasChromecastSupport = true diff --git a/app/src/main/res/layout/account_managment.xml b/app/src/main/res/layout/account_managment.xml index f163a8e2..18d1d986 100644 --- a/app/src/main/res/layout/account_managment.xml +++ b/app/src/main/res/layout/account_managment.xml @@ -1,6 +1,6 @@ - + + - + tools:ignore="ContentDescription" /> + + android:layout_width="match_parent" + android:layout_height="wrap_content"> + - + android:layout_height="wrap_content" /> + - + android:layout_height="wrap_content" /> + - + style="@style/SettingsItem" /> + - + + \ No newline at end of file diff --git a/app/src/main/res/layout/account_single.xml b/app/src/main/res/layout/account_single.xml index 7bc67f74..1e74b299 100644 --- a/app/src/main/res/layout/account_single.xml +++ b/app/src/main/res/layout/account_single.xml @@ -1,9 +1,10 @@ - + android:layout_height="wrap_content" + android:layout_width="match_parent"> + - + tools:ignore="ContentDescription" /> - + style="@style/SettingsItem" /> diff --git a/app/src/main/res/layout/account_switch.xml b/app/src/main/res/layout/account_switch.xml index 11a75b1e..659ad840 100644 --- a/app/src/main/res/layout/account_switch.xml +++ b/app/src/main/res/layout/account_switch.xml @@ -1,6 +1,6 @@ - - + android:layout_height="wrap_content" /> + - + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index f577b1d5..358ef281 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,6 +1,5 @@ - + + + app:layout_constraintBottom_toBottomOf="parent" /> + + app:layout_constraintEnd_toEndOf="parent" /> + + android:id="@+id/cast_mini_controller_holder"> - + tools:ignore="FragmentTagUsage" /> \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main_tv.xml b/app/src/main/res/layout/activity_main_tv.xml index 59fd05e9..509267cb 100644 --- a/app/src/main/res/layout/activity_main_tv.xml +++ b/app/src/main/res/layout/activity_main_tv.xml @@ -1,6 +1,5 @@ - + + + app:layout_constraintEnd_toEndOf="parent" /> + + android:id="@+id/cast_mini_controller_holder"> - + tools:ignore="FragmentTagUsage" /> \ No newline at end of file diff --git a/app/src/main/res/layout/bottom_selection_dialog.xml b/app/src/main/res/layout/bottom_selection_dialog.xml index c23cf7f2..0532f250 100644 --- a/app/src/main/res/layout/bottom_selection_dialog.xml +++ b/app/src/main/res/layout/bottom_selection_dialog.xml @@ -1,6 +1,5 @@ - - + android:layout_height="wrap_content" /> + + android:layout_rowWeight="1" /> + + android:layout_width="wrap_content" /> + + android:layout_width="wrap_content" /> diff --git a/app/src/main/res/layout/dialog_loading.xml b/app/src/main/res/layout/dialog_loading.xml index 69fe443d..5640b880 100644 --- a/app/src/main/res/layout/dialog_loading.xml +++ b/app/src/main/res/layout/dialog_loading.xml @@ -1,7 +1,8 @@ - + + android:layout_height="104dp"> + - + android:contentDescription="@string/episode_poster_img_des" /> + + - + android:layout_height="wrap_content" /> + - + android:layout_height="wrap_content" /> + android:contentDescription="@string/download" /> + + android:visibility="visible" /> + + android:layout_height="match_parent"> + + app:layout_constraintTop_toBottomOf="parent" /> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_child_downloads.xml b/app/src/main/res/layout/fragment_child_downloads.xml index fcbeb708..a3cc8ce8 100644 --- a/app/src/main/res/layout/fragment_child_downloads.xml +++ b/app/src/main/res/layout/fragment_child_downloads.xml @@ -1,18 +1,19 @@ - + + - + android:layout_width="match_parent" + android:layout_height="wrap_content" /> - + android:layout_height="match_parent" /> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_downloads.xml b/app/src/main/res/layout/fragment_downloads.xml index 1091177f..9d268a20 100644 --- a/app/src/main/res/layout/fragment_downloads.xml +++ b/app/src/main/res/layout/fragment_downloads.xml @@ -1,10 +1,9 @@ - + - + android:layout_height="wrap_content" /> + + + android:layout_height="match_parent" /> + + android:layout_height="match_parent" /> + + android:layout_height="match_parent" /> + + + android:layout_height="10dp" /> + + android:layout_height="wrap_content" /> + android:layout_height="10dp" /> + + android:layout_height="wrap_content" /> + + android:layout_height="10dp" /> + + android:layout_height="wrap_content" /> - + - + android:layout_height="match_parent" /> + + app:layout_constraintBottom_toBottomOf="parent" /> + - + android:contentDescription="@string/change_providers_img_des" /> + android:orientation="vertical" /> + + tools:listitem="@layout/homepage_parent" /> \ No newline at end of file diff --git a/app/src/main/res/layout/home_episodes_expanded.xml b/app/src/main/res/layout/home_episodes_expanded.xml index bc69e743..d016b9a1 100644 --- a/app/src/main/res/layout/home_episodes_expanded.xml +++ b/app/src/main/res/layout/home_episodes_expanded.xml @@ -1,6 +1,5 @@ - - + + + + tools:text="Trending" /> + - + android:contentDescription="@string/home_expanded_hide" /> + + tools:listitem="@layout/search_result_grid" /> \ No newline at end of file diff --git a/app/src/main/res/layout/home_result_big_grid.xml b/app/src/main/res/layout/home_result_big_grid.xml index a23c0966..710257c0 100644 --- a/app/src/main/res/layout/home_result_big_grid.xml +++ b/app/src/main/res/layout/home_result_big_grid.xml @@ -2,7 +2,9 @@ - + app:cardBackgroundColor="?attr/primaryGrayBackground"> + + android:contentDescription="@string/search_poster_img_des" /> - + app:cardBackgroundColor="?attr/primaryGrayBackground"> + + android:contentDescription="@string/search_poster_img_des" /> + - + android:layout_gravity="bottom" + tools:ignore="ContentDescription" /> + + android:ellipsize="end" /> + - + android:layout_height="60dp" /> - + android:layout_height="5dp" /> + + - - - - - - - + + + + - - + + + + + diff --git a/app/src/main/res/layout/loading_line.xml b/app/src/main/res/layout/loading_line.xml index 9d43b4e6..d2f7d9c9 100644 --- a/app/src/main/res/layout/loading_line.xml +++ b/app/src/main/res/layout/loading_line.xml @@ -1,11 +1,10 @@ - \ No newline at end of file + tools:ignore="ContentDescription" /> \ No newline at end of file diff --git a/app/src/main/res/layout/loading_line_short.xml b/app/src/main/res/layout/loading_line_short.xml index 620cf84f..50ef52ca 100644 --- a/app/src/main/res/layout/loading_line_short.xml +++ b/app/src/main/res/layout/loading_line_short.xml @@ -1,11 +1,10 @@ - \ No newline at end of file + tools:ignore="ContentDescription" /> \ No newline at end of file diff --git a/app/src/main/res/layout/loading_line_short_center.xml b/app/src/main/res/layout/loading_line_short_center.xml index 49340ab9..650dd0cf 100644 --- a/app/src/main/res/layout/loading_line_short_center.xml +++ b/app/src/main/res/layout/loading_line_short_center.xml @@ -1,12 +1,11 @@ - \ No newline at end of file + tools:ignore="ContentDescription" /> \ No newline at end of file diff --git a/app/src/main/res/layout/loading_list.xml b/app/src/main/res/layout/loading_list.xml index 29478930..ccd4a8d6 100644 --- a/app/src/main/res/layout/loading_list.xml +++ b/app/src/main/res/layout/loading_list.xml @@ -1,30 +1,61 @@ - - + android:layout_height="200dp" + android:layout_width="match_parent"> + + + - - - - - - - - - - - - - - - + android:layout_height="wrap_content"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/loading_poster.xml b/app/src/main/res/layout/loading_poster.xml index 1248eddc..27e4bfeb 100644 --- a/app/src/main/res/layout/loading_poster.xml +++ b/app/src/main/res/layout/loading_poster.xml @@ -1,10 +1,9 @@ - \ No newline at end of file + tools:ignore="ContentDescription" /> \ No newline at end of file diff --git a/app/src/main/res/layout/player_custom_layout.xml b/app/src/main/res/layout/player_custom_layout.xml index 770b8b1e..35ba7421 100644 --- a/app/src/main/res/layout/player_custom_layout.xml +++ b/app/src/main/res/layout/player_custom_layout.xml @@ -211,6 +211,7 @@ android:id="@+id/player_pause_play_holder" android:layout_width="match_parent" android:layout_height="match_parent"> + + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/player_holder" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical" + android:screenOrientation="landscape" + tools:orientation="vertical" + android:tag="television"> + android:id="@+id/subtitle_holder" + android:layout_width="match_parent" + android:layout_height="match_parent"> + android:id="@+id/shadow_overlay" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@drawable/player_gradient_tv" /> + android:id="@+id/player_video_holder" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:padding="16dp"> + android:id="@+id/player_top_holder" + android:layout_width="match_parent" + android:layout_height="match_parent"> + android:id="@+id/player_video_title" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginStart="80dp" + android:layout_marginTop="20dp" + android:layout_marginEnd="32dp" + android:gravity="end" + android:textColor="@color/white" + android:textSize="16sp" + android:textStyle="bold" + tools:text="Hello world" /> + android:id="@+id/player_video_title_rez" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginStart="80dp" + android:layout_marginTop="40dp" + android:layout_marginEnd="32dp" + android:gravity="end" + android:textColor="@color/white" + android:textSize="16sp" + tools:text="1920x1080" /> + android:id="@+id/player_go_back_holder" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="5dp" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> + android:layout_width="30dp" + android:layout_height="30dp" + android:layout_gravity="center" + android:src="@drawable/ic_baseline_arrow_back_24" + app:tint="@android:color/white" + android:contentDescription="@string/go_back_img_des" /> + android:id="@+id/player_go_back" + android:layout_width="70dp" + android:layout_height="70dp" + android:layout_gravity="center" + android:background="@drawable/video_tap_button_always_white" + android:clickable="true" + android:contentDescription="@string/go_back_img_des" + android:focusable="true" /> + android:indeterminate="true" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toTopOf="parent" + tools:visibility="visible" /> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="bottom" + android:layout_marginBottom="20dp" + android:gravity="center" + android:orientation="horizontal" + android:paddingTop="4dp" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent"> + android:id="@id/exo_prev" + style="@style/ExoMediaButton.Previous" + android:tintMode="src_in" + app:tint="?attr/colorPrimaryDark" + tools:ignore="ContentDescription" /> + android:id="@id/exo_repeat_toggle" + style="@style/ExoMediaButton" + android:tintMode="src_in" + app:tint="?attr/colorPrimaryDark" + tools:ignore="ContentDescription" /> + android:id="@id/exo_next" + style="@style/ExoMediaButton.Next" + android:tintMode="src_in" + app:tint="?attr/colorPrimaryDark" + tools:ignore="ContentDescription" /> + android:id="@id/exo_vr" + style="@style/ExoMediaButton.VR" + android:tintMode="src_in" + app:tint="?attr/colorPrimaryDark" + tools:ignore="ContentDescription" /> + android:id="@id/exo_play" + android:layout_width="0dp" + android:layout_height="0dp" + android:tintMode="src_in" + app:tint="?attr/colorPrimaryDark" + tools:ignore="ContentDescription" /> + android:id="@id/exo_pause" + android:layout_width="0dp" + android:layout_height="0dp" + android:tintMode="src_in" + app:tint="?attr/colorPrimaryDark" + tools:ignore="ContentDescription" /> - - + android:layout_marginStart="64dp" + android:layout_marginEnd="64dp" + android:layout_marginBottom="10dp" + android:gravity="center_vertical" + android:orientation="vertical" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent"> + + + android:src="@drawable/netflix_pause" + app:tint="@color/player_button_tv" + tools:ignore="ContentDescription" /> + android:id="@id/exo_position" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:gravity="end" + android:includeFontPadding="false" + android:minWidth="50dp" + android:paddingLeft="4dp" + android:paddingRight="4dp" + android:textColor="@android:color/white" + android:textSize="14sp" + android:textStyle="normal" + tools:text="15:30" /> + android:id="@id/exo_progress" + android:layout_width="0dp" + android:layout_height="30dp" + android:layout_gravity="center" + android:layout_weight="1" + android:focusable="false" + android:focusableInTouchMode="false" + app:bar_height="2dp" + app:played_color="?attr/colorPrimary" + app:scrubber_color="?attr/colorPrimary" + app:scrubber_dragged_size="26dp" + app:scrubber_enabled_size="24dp" + app:unplayed_color="@color/videoProgress" /> + android:id="@id/exo_duration" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_marginEnd="20dp" + android:includeFontPadding="false" + android:minWidth="50dp" + android:paddingLeft="4dp" + android:paddingRight="4dp" + android:textColor="@android:color/white" + android:textSize="14sp" + android:textStyle="normal" + tools:text="23:20" /> - - + android:layout_gravity="center"> + + + android:id="@+id/player_lock" + style="@style/VideoButtonTV" + android:nextFocusLeft="@id/player_skip_episode" + android:nextFocusRight="@id/player_resize_btt" + android:nextFocusUp="@id/player_pause_play" + android:text="@string/video_lock" + app:icon="@drawable/video_locked" /> + android:id="@+id/player_lock_holder" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:orientation="horizontal"> + android:id="@+id/player_resize_btt" + style="@style/VideoButtonTV" + android:nextFocusLeft="@id/player_lock" + android:nextFocusRight="@id/player_speed_btt" + android:nextFocusUp="@id/player_pause_play" + android:text="@string/video_aspect_ratio_resize" + app:icon="@drawable/ic_baseline_aspect_ratio_24" /> + android:id="@+id/player_speed_btt" + style="@style/VideoButtonTV" + android:nextFocusLeft="@id/player_resize_btt" + android:nextFocusRight="@id/player_sources_btt" + android:nextFocusUp="@id/player_pause_play" + app:icon="@drawable/ic_baseline_speed_24" + tools:text="Speed" /> + android:id="@+id/player_sources_btt" + style="@style/VideoButtonTV" + android:nextFocusLeft="@id/player_speed_btt" + android:nextFocusRight="@id/player_skip_op" + android:nextFocusUp="@id/player_pause_play" + android:text="@string/video_source" + app:icon="@drawable/ic_baseline_playlist_play_24" /> + android:id="@+id/player_skip_op" + style="@style/VideoButtonTV" + android:nextFocusLeft="@id/player_sources_btt" + android:nextFocusRight="@id/player_skip_episode" + android:nextFocusUp="@id/player_pause_play" + android:text="@string/video_skip_op" + app:icon="@drawable/ic_baseline_fast_forward_24" /> + android:nextFocusLeft="@id/player_skip_op" + android:nextFocusRight="@id/player_lock" + android:nextFocusUp="@id/player_pause_play" + android:text="@string/next_episode" + app:icon="@drawable/ic_baseline_skip_next_24" /> diff --git a/app/src/main/res/layout/provider_list.xml b/app/src/main/res/layout/provider_list.xml index 07c2978d..5b5c5aae 100644 --- a/app/src/main/res/layout/provider_list.xml +++ b/app/src/main/res/layout/provider_list.xml @@ -1,7 +1,7 @@ - - + + + + android:layout_rowWeight="1" /> + + android:layout_rowWeight="1" /> + + android:layout_width="wrap_content" /> + + android:layout_width="wrap_content" /> diff --git a/app/src/main/res/layout/quick_search.xml b/app/src/main/res/layout/quick_search.xml index fe4b845a..a262b164 100644 --- a/app/src/main/res/layout/quick_search.xml +++ b/app/src/main/res/layout/quick_search.xml @@ -1,19 +1,20 @@ - + android:layout_height="match_parent" + android:orientation="vertical"> + android:layout_height="wrap_content"> + - + + + + + + tools:listitem="@layout/homepage_parent" /> \ No newline at end of file diff --git a/app/src/main/res/layout/result_episode_large.xml b/app/src/main/res/layout/result_episode_large.xml index f1298f94..c7f6e277 100644 --- a/app/src/main/res/layout/result_episode_large.xml +++ b/app/src/main/res/layout/result_episode_large.xml @@ -1,6 +1,5 @@ - + android:layout_marginBottom="10dp"> + + + android:foreground="@drawable/outline_drawable"> + - + android:contentDescription="@string/episode_poster_img_des" /> + - + android:contentDescription="@string/play_episode" /> + - + android:layout_height="5dp" /> + + + - + android:layout_height="wrap_content" /> - + android:layout_height="wrap_content" /> + + + android:visibility="visible" /> + + - + android:layout_width="match_parent" + android:layout_height="wrap_content" /> \ No newline at end of file diff --git a/app/src/main/res/layout/result_tag.xml b/app/src/main/res/layout/result_tag.xml index 4809a753..b83a800c 100644 --- a/app/src/main/res/layout/result_tag.xml +++ b/app/src/main/res/layout/result_tag.xml @@ -1,14 +1,14 @@ - + android:layout_marginBottom="-4dp"> - + android:layoutDirection="ltr"> + android:focusable="true"> + + + tools:ignore="RtlHardcoded" /> + + android:maxLines="3" /> + + android:maxLines="3" /> + + android:maxLines="1" /> diff --git a/app/src/main/res/layout/search_result_grid.xml b/app/src/main/res/layout/search_result_grid.xml index 56bb0d12..55276504 100644 --- a/app/src/main/res/layout/search_result_grid.xml +++ b/app/src/main/res/layout/search_result_grid.xml @@ -1,16 +1,16 @@ - + android:id="@+id/search_result_root"> + + app:cardBackgroundColor="?attr/primaryGrayBackground"> + android:contentDescription="@string/search_poster_img_des" /> + - + android:layout_gravity="bottom" + tools:ignore="ContentDescription" /> + + android:ellipsize="end" /> + + + android:contentDescription="@string/search_poster_img_des" /> + + android:maxLines="3" /> + + android:maxLines="3" /> + + android:maxLines="1" /> \ No newline at end of file diff --git a/app/src/main/res/layout/sort_bottom_sheet.xml b/app/src/main/res/layout/sort_bottom_sheet.xml index 38cf7f7b..de7f9533 100644 --- a/app/src/main/res/layout/sort_bottom_sheet.xml +++ b/app/src/main/res/layout/sort_bottom_sheet.xml @@ -1,6 +1,5 @@ - + - + android:layout_height="wrap_content" /> + + android:layout_rowWeight="1" /> + + - + android:layout_height="wrap_content" /> + - + android:layout_height="match_parent" /> diff --git a/app/src/main/res/layout/sort_bottom_single_choice.xml b/app/src/main/res/layout/sort_bottom_single_choice.xml index 3b52cd7a..a3291d77 100644 --- a/app/src/main/res/layout/sort_bottom_single_choice.xml +++ b/app/src/main/res/layout/sort_bottom_single_choice.xml @@ -13,8 +13,7 @@ android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"/> --> - - + android:background="?attr/primaryBlackBackground"> + + - + android:layout_height="wrap_content" /> + + - - + android:contentDescription="@string/preview_background_img_des" /> + - + android:layout_height="match_parent" /> - + style="@style/SettingsItem" /> + + style="@style/SettingsItem" /> + + style="@style/SettingsItem" /> + + style="@style/SettingsItem" /> + + style="@style/SettingsItem" /> + + style="@style/SettingsItem" /> + + style="@style/SettingsItem" /> + + style="@style/SettingsItem" /> + + style="@style/SettingsItem" /> + + style="@style/SettingsItem" /> + - + android:layout_height="wrap_content" /> - + + + android:layout_width="wrap_content" /> \ No newline at end of file diff --git a/app/src/main/res/layout/toast.xml b/app/src/main/res/layout/toast.xml index 1ace2e8e..ff6c1c7b 100644 --- a/app/src/main/res/layout/toast.xml +++ b/app/src/main/res/layout/toast.xml @@ -1,5 +1,4 @@ - + android:textColor="?attr/textColor" />