Skip to content

Commit

Permalink
Merge branch 'release/v1.4.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
stantanasi committed Dec 4, 2023
2 parents a11e7d8 + 9c5675a commit f5390ad
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 48 deletions.
14 changes: 7 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -19,26 +12,16 @@ 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
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 {

Expand Down Expand Up @@ -272,8 +255,7 @@ object SflixProvider : Provider {
rating = info.rating,
poster = poster,
)
}
else {
} else {
TvShow(
id = id,
title = title,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/java/com/tanasi/streamflix/utils/JsUnpacker.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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("\\'", "'")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit f5390ad

Please sign in to comment.