diff --git a/app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt b/app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt index b5ab4769..bcc71f3c 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt @@ -555,6 +555,7 @@ enum class TvType { Documentary, AsianDrama, Live, + NSFW, Others } diff --git a/app/src/main/java/com/lagradost/cloudstream3/plugins/PluginManager.kt b/app/src/main/java/com/lagradost/cloudstream3/plugins/PluginManager.kt index fa05f0ab..99df22ad 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/plugins/PluginManager.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/plugins/PluginManager.kt @@ -56,7 +56,6 @@ data class PluginData( null, null, null, - null, null ) } diff --git a/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt b/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt index 8a6e4743..8266ebc7 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt @@ -60,8 +60,6 @@ data class SitePlugin( @JsonProperty("tvTypes") val tvTypes: List?, @JsonProperty("language") val language: String?, @JsonProperty("iconUrl") val iconUrl: String?, - // Set to true to get an 18+ symbol next to the plugin - @JsonProperty("adult") val adult: Boolean?, ) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeFragment.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeFragment.kt index 3a5d99da..cf5f0484 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeFragment.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeFragment.kt @@ -252,6 +252,7 @@ class HomeFragment : Fragment() { movies: MaterialButton?, asian: MaterialButton?, livestream: MaterialButton?, + nsfw: MaterialButton?, others: MaterialButton?, ): List>> { return listOf( @@ -262,6 +263,7 @@ class HomeFragment : Fragment() { Pair(movies, listOf(TvType.Movie, TvType.Torrent)), Pair(asian, listOf(TvType.AsianDrama)), Pair(livestream, listOf(TvType.Live)), + Pair(nsfw, listOf(TvType.NSFW)), Pair(others, listOf(TvType.Others)), ) } @@ -297,11 +299,12 @@ class HomeFragment : Fragment() { val movies = dialog.findViewById(R.id.home_select_movies) val asian = dialog.findViewById(R.id.home_select_asian) val livestream = dialog.findViewById(R.id.home_select_livestreams) + val nsfw = dialog.findViewById(R.id.home_select_nsfw) val others = dialog.findViewById(R.id.home_select_others) val cancelBtt = dialog.findViewById(R.id.cancel_btt) val applyBtt = dialog.findViewById(R.id.apply_btt) - val pairList = getPairList(anime, cartoons, tvs, docs, movies, asian, livestream, others) + val pairList = getPairList(anime, cartoons, tvs, docs, movies, asian, livestream, nsfw, others) cancelBtt?.setOnClickListener { dialog.dismissSafe() diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultViewModel2.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultViewModel2.kt index eed7a65c..6327ffe0 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultViewModel2.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultViewModel2.kt @@ -198,6 +198,7 @@ fun LoadResponse.toResultData(repo: APIRepository): ResultData { TvType.AsianDrama -> R.string.asian_drama_singular TvType.Live -> R.string.live_singular TvType.Others -> R.string.other_singular + TvType.NSFW -> R.string.nsfw_singular } ), yearText = txt(year?.toString()), @@ -550,6 +551,7 @@ class ResultViewModel2 : ViewModel() { TvType.Documentary -> "Documentaries" TvType.AsianDrama -> "AsianDrama" TvType.Live -> "LiveStreams" + TvType.NSFW -> "NSFW" TvType.Others -> "Others" } } diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchFragment.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchFragment.kt index 7616cb97..0786c1fa 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchFragment.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchFragment.kt @@ -167,8 +167,8 @@ class SearchFragment : Fragment() { val docs = dialog.findViewById(R.id.home_select_documentaries) val movies = dialog.findViewById(R.id.home_select_movies) val asian = dialog.findViewById(R.id.home_select_asian) - val livestream = - dialog.findViewById(R.id.home_select_livestreams) + val livestream = dialog.findViewById(R.id.home_select_livestreams) + val nsfw = dialog.findViewById(R.id.home_select_nsfw) val other = dialog.findViewById(R.id.home_select_others) val cancelBtt = dialog.findViewById(R.id.cancel_btt) val applyBtt = dialog.findViewById(R.id.apply_btt) @@ -182,6 +182,7 @@ class SearchFragment : Fragment() { movies, asian, livestream, + nsfw, other ) @@ -300,6 +301,7 @@ class SearchFragment : Fragment() { search_select_movies, search_select_asian, search_select_livestreams, + search_select_nsfw, search_select_others ) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/settings/extensions/PluginAdapter.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/settings/extensions/PluginAdapter.kt index 3503146e..8c192818 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/settings/extensions/PluginAdapter.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/settings/extensions/PluginAdapter.kt @@ -85,7 +85,7 @@ class PluginAdapter( R.drawable.ic_baseline_delete_outline_24 else R.drawable.netflix_download - itemView.nsfw_marker?.isVisible = metadata.adult == true + itemView.nsfw_marker?.isVisible = metadata.tvTypes?.contains("NSFW") ?: false itemView.action_button?.setImageResource(drawableInt) itemView.action_button?.setOnClickListener { diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/settings/extensions/PluginsFragment.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/settings/extensions/PluginsFragment.kt index 8bc980ed..5894f0bc 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/settings/extensions/PluginsFragment.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/settings/extensions/PluginsFragment.kt @@ -113,6 +113,7 @@ class PluginsFragment : Fragment() { home_select_movies, home_select_asian, home_select_livestreams, + home_select_nsfw, home_select_others ) diff --git a/app/src/main/res/layout/fragment_plugins.xml b/app/src/main/res/layout/fragment_plugins.xml index 45255d6d..11f8390f 100644 --- a/app/src/main/res/layout/fragment_plugins.xml +++ b/app/src/main/res/layout/fragment_plugins.xml @@ -111,9 +111,15 @@ android:text="@string/livestreams" /> + + diff --git a/app/src/main/res/layout/fragment_search.xml b/app/src/main/res/layout/fragment_search.xml index cb816083..a6177a29 100644 --- a/app/src/main/res/layout/fragment_search.xml +++ b/app/src/main/res/layout/fragment_search.xml @@ -148,9 +148,15 @@ android:text="@string/livestreams" /> + + diff --git a/app/src/main/res/layout/home_select_mainpage.xml b/app/src/main/res/layout/home_select_mainpage.xml index d03234c1..51d218fe 100644 --- a/app/src/main/res/layout/home_select_mainpage.xml +++ b/app/src/main/res/layout/home_select_mainpage.xml @@ -105,9 +105,15 @@ android:text="@string/livestreams" /> + + diff --git a/app/src/main/res/values-bp/strings.xml b/app/src/main/res/values-bp/strings.xml index c35fa2c4..97b01cd9 100644 --- a/app/src/main/res/values-bp/strings.xml +++ b/app/src/main/res/values-bp/strings.xml @@ -1,55 +1,7 @@ - search_providers_list - app_locale - search_type_list - auto_update - skip_update_key - prerelease_update - manual_check_update - fast_forward_button_time - benene_count - subtitle_settings_key - subtitle_settings_chromecast_key - quality_pref_key - prefer_limit_title_key - prefer_limit_title_rez_key - video_buffer_size_key - video_buffer_length_key - video_buffer_clear_key - video_buffer_disk_key - unknown_prerelease - use_system_brightness_key - swipe_enabled_key - playback_speed_enabled_key - player_resize_enabled_key - pip_enabled_key - double_tap_enabled_key - double_tap_pause_enabled_key - double_tap_seek_time_key - swipe_vertical_enabled_key - display_sub_key - show_fillers_key - show_trailers_key - show_kitsu_posters_key - random_button_key - provider_lang_key - dns_key - download_path_key - Cloudstream - app_layout_key - primary_color_key - restore_key - backup_key - prefer_media_type_key - app_theme_key - episode_sync_enabled_key - log_enabled_key - show_logcat_key bottom_title_key - poster_ui_key - subtitles_encoding_key override_site_key diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 8ff3e860..6243962b 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -1,53 +1,6 @@ - search_providers_list - app_locale - search_type_list - auto_update - skip_update_key - prerelease_update - manual_check_update - fast_forward_button_time - benene_count - subtitle_settings_key - subtitle_settings_chromecast_key - quality_pref_key - prefer_limit_title_key - prefer_limit_title_rez_key - video_buffer_size_key - video_buffer_length_key - video_buffer_clear_key - video_buffer_disk_key - unknown_prerelease - use_system_brightness_key - swipe_enabled_key - playback_speed_enabled_key - player_resize_enabled_key - pip_enabled_key - double_tap_enabled_key - double_tap_pause_enabled_key - double_tap_seek_time_key - swipe_vertical_enabled_key - display_sub_key - show_fillers_key - random_button_key - provider_lang_key - dns_key - download_path_key - Cloudstream - app_layout_key - primary_color_key - restore_key - backup_key - prefer_media_type_key - app_theme_key - episode_sync_enabled_key - log_enabled_key - show_logcat_key - bottom_title_key - poster_ui_key - subtitles_encoding_key %d %s | %sMB diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index 83950a70..67033cb0 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -1,56 +1,6 @@ - search_providers_list - app_locale - search_type_list - auto_update - skip_update_key - prerelease_update - manual_check_update - fast_forward_button_time - benene_count - subtitle_settings_key - subtitle_settings_chromecast_key - quality_pref_key - prefer_limit_title_key - prefer_limit_title_rez_key - video_buffer_size_key - video_buffer_length_key - video_buffer_clear_key - video_buffer_disk_key - unknown_prerelease - use_system_brightness_key - swipe_enabled_key - playback_speed_enabled_key - player_resize_enabled_key - pip_enabled_key - double_tap_enabled_key - double_tap_pause_enabled_key - double_tap_seek_time_key - swipe_vertical_enabled_key - display_sub_key - show_fillers_key - show_trailers_key - show_kitsu_posters_key - random_button_key - provider_lang_key - dns_key - download_path_key - Cloudstream - app_layout_key - primary_color_key - restore_key - backup_key - prefer_media_type_key - app_theme_key - episode_sync_enabled_key - log_enabled_key - show_logcat_key - bottom_title_key - poster_ui_key - subtitles_encoding_key - override_site_key %d %s | %sMB diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 3e739e69..5732ea94 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -333,6 +333,7 @@ OVA Asian Dramas Livestreams + NSFW Others @@ -345,6 +346,7 @@ Documentary Asian Drama Livestream + NSFW Video Source error