diff --git a/app/build.gradle b/app/build.gradle index 686e3ed7..5ea28b66 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -13,8 +13,8 @@ android { applicationId "com.tanasi.streamflix" minSdk 23 targetSdk 34 - versionCode 11 - versionName "1.3.6" + versionCode 12 + versionName "1.4.0" } compileOptions { @@ -53,11 +53,11 @@ dependencies { implementation 'androidx.leanback:leanback:1.0.0' implementation 'com.github.bumptech.glide:glide:4.13.1' - implementation 'androidx.media3:media3-exoplayer:1.0.2' - implementation 'androidx.media3:media3-exoplayer-dash:1.0.2' - implementation 'androidx.media3:media3-exoplayer-hls:1.0.2' - implementation "androidx.media3:media3-session:1.0.2" - implementation 'androidx.media3:media3-ui:1.0.2' + implementation 'androidx.media3:media3-exoplayer:1.2.0' + implementation 'androidx.media3:media3-exoplayer-dash:1.2.0' + implementation 'androidx.media3:media3-exoplayer-hls:1.2.0' + implementation "androidx.media3:media3-session:1.2.0" + implementation 'androidx.media3:media3-ui:1.2.0' implementation 'com.squareup.retrofit2:retrofit:2.9.0' implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.9' diff --git a/app/src/main/java/com/tanasi/streamflix/adapters/viewholders/EpisodeViewHolder.kt b/app/src/main/java/com/tanasi/streamflix/adapters/viewholders/EpisodeViewHolder.kt index f3431ace..8009fa19 100644 --- a/app/src/main/java/com/tanasi/streamflix/adapters/viewholders/EpisodeViewHolder.kt +++ b/app/src/main/java/com/tanasi/streamflix/adapters/viewholders/EpisodeViewHolder.kt @@ -23,7 +23,8 @@ import com.tanasi.streamflix.utils.getCurrentFragment import com.tanasi.streamflix.utils.map import com.tanasi.streamflix.utils.toActivity -@UnstableApi @SuppressLint("RestrictedApi") +@UnstableApi +@SuppressLint("RestrictedApi") class EpisodeViewHolder( private val _binding: ViewBinding ) : RecyclerView.ViewHolder( diff --git a/app/src/main/java/com/tanasi/streamflix/adapters/viewholders/MovieViewHolder.kt b/app/src/main/java/com/tanasi/streamflix/adapters/viewholders/MovieViewHolder.kt index 862eb9cf..63c0ca2d 100644 --- a/app/src/main/java/com/tanasi/streamflix/adapters/viewholders/MovieViewHolder.kt +++ b/app/src/main/java/com/tanasi/streamflix/adapters/viewholders/MovieViewHolder.kt @@ -44,7 +44,8 @@ import com.tanasi.streamflix.utils.getCurrentFragment import com.tanasi.streamflix.utils.map import com.tanasi.streamflix.utils.toActivity -@UnstableApi @SuppressLint("RestrictedApi") +@UnstableApi +@SuppressLint("RestrictedApi") class MovieViewHolder( private val _binding: ViewBinding ) : RecyclerView.ViewHolder( diff --git a/app/src/main/java/com/tanasi/streamflix/adapters/viewholders/ProviderViewHolder.kt b/app/src/main/java/com/tanasi/streamflix/adapters/viewholders/ProviderViewHolder.kt index d44b1270..22a86289 100644 --- a/app/src/main/java/com/tanasi/streamflix/adapters/viewholders/ProviderViewHolder.kt +++ b/app/src/main/java/com/tanasi/streamflix/adapters/viewholders/ProviderViewHolder.kt @@ -1,13 +1,11 @@ package com.tanasi.streamflix.adapters.viewholders import android.content.Intent -import androidx.navigation.findNavController import androidx.recyclerview.widget.RecyclerView import androidx.viewbinding.ViewBinding import com.bumptech.glide.Glide import com.tanasi.streamflix.activities.main.MainActivity import com.tanasi.streamflix.databinding.ItemProviderBinding -import com.tanasi.streamflix.fragments.providers.ProvidersFragmentDirections import com.tanasi.streamflix.models.Provider import com.tanasi.streamflix.utils.UserPreferences import com.tanasi.streamflix.utils.toActivity diff --git a/app/src/main/java/com/tanasi/streamflix/fragments/player/PlayerFragment.kt b/app/src/main/java/com/tanasi/streamflix/fragments/player/PlayerFragment.kt index e187d7a8..64a1c7e5 100644 --- a/app/src/main/java/com/tanasi/streamflix/fragments/player/PlayerFragment.kt +++ b/app/src/main/java/com/tanasi/streamflix/fragments/player/PlayerFragment.kt @@ -10,24 +10,23 @@ import android.view.ViewGroup import android.widget.Toast import androidx.core.view.isVisible import androidx.fragment.app.Fragment -import androidx.navigation.fragment.findNavController -import androidx.navigation.fragment.navArgs -import androidx.tvprovider.media.tv.TvContractCompat -import androidx.tvprovider.media.tv.WatchNextProgram +import androidx.media3.common.AudioAttributes import androidx.media3.common.C import androidx.media3.common.MediaItem import androidx.media3.common.MediaItem.SubtitleConfiguration -import androidx.media3.common.Player -import androidx.media3.common.AudioAttributes import androidx.media3.common.MediaMetadata -import androidx.media3.session.MediaSession import androidx.media3.common.MimeTypes +import androidx.media3.common.Player import androidx.media3.common.util.UnstableApi import androidx.media3.exoplayer.ExoPlayer -import androidx.media3.ui.CaptionStyleCompat +import androidx.media3.session.MediaSession import androidx.media3.ui.PlayerControlView import androidx.media3.ui.PlayerView import androidx.media3.ui.SubtitleView +import androidx.navigation.fragment.findNavController +import androidx.navigation.fragment.navArgs +import androidx.tvprovider.media.tv.TvContractCompat +import androidx.tvprovider.media.tv.WatchNextProgram import com.tanasi.streamflix.R import com.tanasi.streamflix.databinding.ContentExoControllerBinding import com.tanasi.streamflix.databinding.FragmentPlayerBinding @@ -42,7 +41,8 @@ import kotlinx.parcelize.Parcelize import kotlin.time.Duration.Companion.minutes import kotlin.time.Duration.Companion.seconds -@UnstableApi @SuppressLint("RestrictedApi") +@UnstableApi +@SuppressLint("RestrictedApi") class PlayerFragment : Fragment() { sealed class VideoType : Parcelable { diff --git a/app/src/main/java/com/tanasi/streamflix/providers/SflixProvider.kt b/app/src/main/java/com/tanasi/streamflix/providers/SflixProvider.kt index c2298048..bab060ed 100644 --- a/app/src/main/java/com/tanasi/streamflix/providers/SflixProvider.kt +++ b/app/src/main/java/com/tanasi/streamflix/providers/SflixProvider.kt @@ -1,12 +1,5 @@ package com.tanasi.streamflix.providers -import android.util.Base64 -import com.google.gson.Gson -import com.google.gson.GsonBuilder -import com.google.gson.JsonDeserializationContext -import com.google.gson.JsonDeserializer -import com.google.gson.JsonElement -import com.google.gson.JsonObject import com.tanasi.retrofit_jsoup.converter.JsoupConverterFactory import com.tanasi.streamflix.adapters.AppAdapter import com.tanasi.streamflix.extractors.Extractor @@ -19,7 +12,6 @@ import com.tanasi.streamflix.models.People import com.tanasi.streamflix.models.Season import com.tanasi.streamflix.models.TvShow import com.tanasi.streamflix.models.Video -import com.tanasi.streamflix.utils.retry import okhttp3.OkHttpClient import org.jsoup.nodes.Document import org.jsoup.nodes.Element @@ -27,18 +19,9 @@ import org.jsoup.select.Elements import retrofit2.Retrofit import retrofit2.converter.gson.GsonConverterFactory import retrofit2.http.GET -import retrofit2.http.Headers import retrofit2.http.Path import retrofit2.http.Query -import retrofit2.http.Url -import java.lang.Integer.min -import java.lang.reflect.Type -import java.nio.charset.StandardCharsets -import java.security.MessageDigest import java.util.concurrent.TimeUnit -import javax.crypto.Cipher -import javax.crypto.spec.IvParameterSpec -import javax.crypto.spec.SecretKeySpec object SflixProvider : Provider { @@ -272,8 +255,7 @@ object SflixProvider : Provider { rating = info.rating, poster = poster, ) - } - else { + } else { TvShow( id = id, title = title, diff --git a/app/src/main/java/com/tanasi/streamflix/ui/PlayerSettingsView.kt b/app/src/main/java/com/tanasi/streamflix/ui/PlayerSettingsView.kt index 94ae2c23..92f9f1bd 100644 --- a/app/src/main/java/com/tanasi/streamflix/ui/PlayerSettingsView.kt +++ b/app/src/main/java/com/tanasi/streamflix/ui/PlayerSettingsView.kt @@ -10,16 +10,16 @@ import android.view.View import android.view.ViewGroup import androidx.constraintlayout.widget.ConstraintLayout import androidx.core.content.ContextCompat -import androidx.recyclerview.widget.RecyclerView import androidx.media3.common.C import androidx.media3.common.Player -import androidx.media3.common.Tracks import androidx.media3.common.TrackSelectionOverride +import androidx.media3.common.Tracks import androidx.media3.common.util.UnstableApi import androidx.media3.exoplayer.ExoPlayer import androidx.media3.ui.CaptionStyleCompat import androidx.media3.ui.DefaultTrackNameProvider import androidx.media3.ui.SubtitleView +import androidx.recyclerview.widget.RecyclerView import com.tanasi.streamflix.R import com.tanasi.streamflix.databinding.ItemSettingBinding import com.tanasi.streamflix.databinding.ViewPlayerSettingsBinding @@ -106,7 +106,7 @@ class PlayerSettingsView @JvmOverloads constructor( Setting.QUALITY, Setting.SUBTITLES, Setting.SPEED, - Setting.SERVERS-> displaySettings(Setting.MAIN) + Setting.SERVERS -> displaySettings(Setting.MAIN) Setting.CAPTION_STYLE -> displaySettings(Setting.SUBTITLES) Setting.CAPTION_STYLE_FONT_COLOR, Setting.CAPTION_STYLE_TEXT_SIZE, diff --git a/app/src/main/java/com/tanasi/streamflix/utils/Extensions.kt b/app/src/main/java/com/tanasi/streamflix/utils/Extensions.kt index 53e22df6..dd97d408 100644 --- a/app/src/main/java/com/tanasi/streamflix/utils/Extensions.kt +++ b/app/src/main/java/com/tanasi/streamflix/utils/Extensions.kt @@ -15,10 +15,10 @@ import androidx.fragment.app.FragmentActivity import androidx.fragment.app.viewModels import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider -import androidx.navigation.fragment.NavHostFragment import androidx.media3.common.Format import androidx.media3.common.MediaMetadata import androidx.media3.common.Tracks +import androidx.navigation.fragment.NavHostFragment import com.tanasi.streamflix.R import com.tanasi.streamflix.activities.main.MainActivity import kotlinx.parcelize.Parcelize diff --git a/app/src/main/java/com/tanasi/streamflix/utils/JsUnpacker.kt b/app/src/main/java/com/tanasi/streamflix/utils/JsUnpacker.kt index 5a5ecabf..a14be41e 100644 --- a/app/src/main/java/com/tanasi/streamflix/utils/JsUnpacker.kt +++ b/app/src/main/java/com/tanasi/streamflix/utils/JsUnpacker.kt @@ -29,7 +29,10 @@ class JsUnpacker(packedJS: String?) { val js = packedJS try { var p = - Pattern.compile("""\}\s*\('(.*)',\s*(.*?),\s*(\d+),\s*'(.*?)'\.split\('\|'\)""", Pattern.DOTALL) + Pattern.compile( + """\}\s*\('(.*)',\s*(.*?),\s*(\d+),\s*'(.*?)'\.split\('\|'\)""", + Pattern.DOTALL + ) var m = p.matcher(js) if (m.find() && m.groupCount() == 4) { val payload = m.group(1).replace("\\'", "'") diff --git a/app/src/main/java/com/tanasi/streamflix/utils/UserPreferences.kt b/app/src/main/java/com/tanasi/streamflix/utils/UserPreferences.kt index ec9d0dcd..da98d70a 100644 --- a/app/src/main/java/com/tanasi/streamflix/utils/UserPreferences.kt +++ b/app/src/main/java/com/tanasi/streamflix/utils/UserPreferences.kt @@ -5,8 +5,8 @@ import android.content.SharedPreferences import androidx.media3.common.util.UnstableApi import androidx.media3.ui.CaptionStyleCompat import com.tanasi.streamflix.BuildConfig -import com.tanasi.streamflix.providers.AnyMovieProvider import com.tanasi.streamflix.providers.AniwatchProvider +import com.tanasi.streamflix.providers.AnyMovieProvider import com.tanasi.streamflix.providers.Provider import com.tanasi.streamflix.providers.SflixProvider import com.tanasi.streamflix.ui.PlayerSettingsView diff --git a/build.gradle b/build.gradle index 03386fa6..b0f8595f 100644 --- a/build.gradle +++ b/build.gradle @@ -12,8 +12,8 @@ buildscript { } plugins { - id 'com.android.application' version '8.1.3' apply false - id 'com.android.library' version '8.1.3' apply false + id 'com.android.application' version '8.2.0' apply false + id 'com.android.library' version '8.2.0' apply false id 'org.jetbrains.kotlin.android' version '1.6.21' apply false } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b679bd1c..7ada55dc 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Sat May 21 18:07:27 CEST 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME