diff --git a/app/build.gradle b/app/build.gradle index 1eee65b4..5c4a5595 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -76,8 +76,8 @@ dependencies { compile "org.jetbrains.anko:anko-common:$anko_version" compile "org.jetbrains.anko:anko-sqlite:$anko_version" - compile "net.xpece.android:support-preference:1.2.5" - compile "net.xpece.android:support-spinner:1.2.4" + compile "net.xpece.android:support-preference:1.2.7" + compile "net.xpece.android:support-spinner:1.2.7" compile('com.mikepenz:aboutlibraries:5.9.3@aar') { transitive = true @@ -139,12 +139,12 @@ kapt { } } -static def getFromSecrets(String key) { - def Properties result = new Properties() +static getFromSecrets(String key) { + Properties result = new Properties() def isCI = System.getenv('CI') if (isCI != null && isCI.toBoolean()) { - return "dummy"; + return "dummy" } try { @@ -162,8 +162,8 @@ static def getFromSecrets(String key) { return result[key] } -static def shouldSign() { - def Properties result = new Properties() +static shouldSign() { + Properties result = new Properties() try { result.load(new FileInputStream(new File('secrets.properties'))) diff --git a/app/src/main/kotlin/com/proxerme/app/stream/StreamResolver.kt b/app/src/main/kotlin/com/proxerme/app/stream/StreamResolver.kt index df7a7357..0cbe0d2e 100644 --- a/app/src/main/kotlin/com/proxerme/app/stream/StreamResolver.kt +++ b/app/src/main/kotlin/com/proxerme/app/stream/StreamResolver.kt @@ -1,6 +1,7 @@ package com.proxerme.app.stream import com.proxerme.app.task.StreamResolutionTask.StreamResolutionResult +import okhttp3.HttpUrl import okhttp3.Response import java.io.IOException @@ -14,7 +15,7 @@ abstract class StreamResolver { abstract val name: String open fun appliesTo(name: String) = name.contains(this.name, ignoreCase = true) - abstract fun resolve(url: String): StreamResolutionResult + abstract fun resolve(url: HttpUrl): StreamResolutionResult @Throws(IOException::class) protected fun validateAndGetResult(response: Response): String { @@ -29,4 +30,4 @@ abstract class StreamResolver { throw IOException() } } -} \ No newline at end of file +} diff --git a/app/src/main/kotlin/com/proxerme/app/stream/resolver/AkibaPassResolver.kt b/app/src/main/kotlin/com/proxerme/app/stream/resolver/AkibaPassResolver.kt index 6afcfaeb..91854425 100644 --- a/app/src/main/kotlin/com/proxerme/app/stream/resolver/AkibaPassResolver.kt +++ b/app/src/main/kotlin/com/proxerme/app/stream/resolver/AkibaPassResolver.kt @@ -1,8 +1,9 @@ package com.proxerme.app.stream.resolver -import android.net.Uri import com.proxerme.app.stream.StreamResolver import com.proxerme.app.task.StreamResolutionTask.StreamResolutionResult +import com.proxerme.app.util.extension.androidUri +import okhttp3.HttpUrl /** * TODO: Describe class @@ -13,7 +14,7 @@ class AkibaPassResolver : StreamResolver() { override val name = "AkibaPass" - override fun resolve(url: String): StreamResolutionResult { - return StreamResolutionResult(Uri.parse(url), "text/html") + override fun resolve(url: HttpUrl): StreamResolutionResult { + return StreamResolutionResult(url.androidUri(), "text/html") } -} \ No newline at end of file +} diff --git a/app/src/main/kotlin/com/proxerme/app/stream/resolver/AmazonPrimeVideoResolver.kt b/app/src/main/kotlin/com/proxerme/app/stream/resolver/AmazonPrimeVideoResolver.kt index 84a3461d..e7b3dc1b 100644 --- a/app/src/main/kotlin/com/proxerme/app/stream/resolver/AmazonPrimeVideoResolver.kt +++ b/app/src/main/kotlin/com/proxerme/app/stream/resolver/AmazonPrimeVideoResolver.kt @@ -1,8 +1,9 @@ package com.proxerme.app.stream.resolver -import android.net.Uri import com.proxerme.app.stream.StreamResolver import com.proxerme.app.task.StreamResolutionTask.StreamResolutionResult +import com.proxerme.app.util.extension.androidUri +import okhttp3.HttpUrl /** * TODO: Describe class @@ -13,7 +14,7 @@ class AmazonPrimeVideoResolver : StreamResolver() { override val name = "Amazon Prime Video" - override fun resolve(url: String): StreamResolutionResult { - return StreamResolutionResult(Uri.parse(url), "text/html") + override fun resolve(url: HttpUrl): StreamResolutionResult { + return StreamResolutionResult(url.androidUri(), "text/html") } -} \ No newline at end of file +} diff --git a/app/src/main/kotlin/com/proxerme/app/stream/resolver/AnimeOnDemandResolver.kt b/app/src/main/kotlin/com/proxerme/app/stream/resolver/AnimeOnDemandResolver.kt index 2cc15bf6..ba805348 100644 --- a/app/src/main/kotlin/com/proxerme/app/stream/resolver/AnimeOnDemandResolver.kt +++ b/app/src/main/kotlin/com/proxerme/app/stream/resolver/AnimeOnDemandResolver.kt @@ -1,8 +1,9 @@ package com.proxerme.app.stream.resolver -import android.net.Uri import com.proxerme.app.stream.StreamResolver import com.proxerme.app.task.StreamResolutionTask.StreamResolutionResult +import com.proxerme.app.util.extension.androidUri +import okhttp3.HttpUrl /** * TODO: Describe class @@ -13,7 +14,7 @@ class AnimeOnDemandResolver : StreamResolver() { override val name = "Anime on demand" - override fun resolve(url: String): StreamResolutionResult { - return StreamResolutionResult(Uri.parse(url), "text/html") + override fun resolve(url: HttpUrl): StreamResolutionResult { + return StreamResolutionResult(url.androidUri(), "text/html") } -} \ No newline at end of file +} diff --git a/app/src/main/kotlin/com/proxerme/app/stream/resolver/ClipfishResolver.kt b/app/src/main/kotlin/com/proxerme/app/stream/resolver/ClipfishResolver.kt index a9d3869c..9c0c8315 100644 --- a/app/src/main/kotlin/com/proxerme/app/stream/resolver/ClipfishResolver.kt +++ b/app/src/main/kotlin/com/proxerme/app/stream/resolver/ClipfishResolver.kt @@ -6,6 +6,7 @@ import com.proxerme.app.dialog.AppRequiredDialog import com.proxerme.app.stream.StreamResolver import com.proxerme.app.task.StreamResolutionTask.StreamResolutionException import com.proxerme.app.task.StreamResolutionTask.StreamResolutionResult +import okhttp3.HttpUrl /** * TODO: Describe class @@ -18,11 +19,10 @@ class ClipfishResolver : StreamResolver() { private val regex = Regex("video/(\\d+)?") - override fun resolve(url: String): StreamResolutionResult { - val id = regex.find(url)?.groupValues?.get(1) ?: throw StreamResolutionException() + override fun resolve(url: HttpUrl): StreamResolutionResult { + val id = regex.find(url.toString())?.groupValues?.get(1) ?: throw StreamResolutionException() - return StreamResolutionResult(Intent(Intent.ACTION_VIEW, - Uri.parse("clipfish://video/$id?ref=proxer")), { + return StreamResolutionResult(Intent(Intent.ACTION_VIEW, Uri.parse("clipfish://video/$id?ref=proxer")), { AppRequiredDialog.show(it, "Clipfish", "com.rtli.clipfish") }) } diff --git a/app/src/main/kotlin/com/proxerme/app/stream/resolver/CodeResolver.kt b/app/src/main/kotlin/com/proxerme/app/stream/resolver/CodeResolver.kt index 3c6ab903..35fdd11f 100644 --- a/app/src/main/kotlin/com/proxerme/app/stream/resolver/CodeResolver.kt +++ b/app/src/main/kotlin/com/proxerme/app/stream/resolver/CodeResolver.kt @@ -2,6 +2,7 @@ package com.proxerme.app.stream.resolver import com.proxerme.app.stream.StreamResolver import com.proxerme.app.task.StreamResolutionTask.StreamResolutionResult +import okhttp3.HttpUrl /** * TODO: Describe class @@ -17,7 +18,7 @@ class CodeResolver : StreamResolver() { return name.contains(this.name, false) || name.contains(alternativeName, false) } - override fun resolve(url: String): StreamResolutionResult { - return StreamResolutionResult(url.replace(Regex(""), "")) + override fun resolve(url: HttpUrl): StreamResolutionResult { + return StreamResolutionResult(url.toString().replace(Regex(""), "")) } } diff --git a/app/src/main/kotlin/com/proxerme/app/stream/resolver/CrunchyrollResolver.kt b/app/src/main/kotlin/com/proxerme/app/stream/resolver/CrunchyrollResolver.kt index ed088635..40ec9ef5 100644 --- a/app/src/main/kotlin/com/proxerme/app/stream/resolver/CrunchyrollResolver.kt +++ b/app/src/main/kotlin/com/proxerme/app/stream/resolver/CrunchyrollResolver.kt @@ -6,6 +6,7 @@ import com.proxerme.app.dialog.AppRequiredDialog import com.proxerme.app.stream.StreamResolver import com.proxerme.app.task.StreamResolutionTask.StreamResolutionException import com.proxerme.app.task.StreamResolutionTask.StreamResolutionResult +import okhttp3.HttpUrl /** * TODO: Describe class @@ -18,8 +19,8 @@ class CrunchyrollResolver : StreamResolver() { private val regex = Regex("media_id=(\\d+)") - override fun resolve(url: String): StreamResolutionResult { - val id = regex.find(url)?.groupValues?.get(1) ?: throw StreamResolutionException() + override fun resolve(url: HttpUrl): StreamResolutionResult { + val id = regex.find(url.toString())?.groupValues?.get(1) ?: throw StreamResolutionException() return StreamResolutionResult(Intent(Intent.ACTION_VIEW, Uri.parse("crunchyroll://media/$id")), { diff --git a/app/src/main/kotlin/com/proxerme/app/stream/resolver/DailyMotionStreamResolver.kt b/app/src/main/kotlin/com/proxerme/app/stream/resolver/DailyMotionStreamResolver.kt index 117db590..8096a007 100644 --- a/app/src/main/kotlin/com/proxerme/app/stream/resolver/DailyMotionStreamResolver.kt +++ b/app/src/main/kotlin/com/proxerme/app/stream/resolver/DailyMotionStreamResolver.kt @@ -5,6 +5,7 @@ import com.proxerme.app.stream.StreamResolver import com.proxerme.app.task.StreamResolutionTask.StreamResolutionException import com.proxerme.app.task.StreamResolutionTask.StreamResolutionResult import com.proxerme.app.util.ProxerConnectionWrapper +import okhttp3.HttpUrl import okhttp3.Request /** @@ -14,11 +15,11 @@ import okhttp3.Request */ class DailyMotionStreamResolver : StreamResolver() { - override val name = "Daily Motion" + override val name = "Dailymotion" private val regex = Regex("\"qualities\":(\\{.+\\}\\]\\}),") - override fun resolve(url: String): StreamResolutionResult { + override fun resolve(url: HttpUrl): StreamResolutionResult { val response = validateAndGetResult(ProxerConnectionWrapper.httpClient .newCall(Request.Builder() .get() diff --git a/app/src/main/kotlin/com/proxerme/app/stream/resolver/DaisukiResolver.kt b/app/src/main/kotlin/com/proxerme/app/stream/resolver/DaisukiResolver.kt index 84b079c1..ac012db5 100644 --- a/app/src/main/kotlin/com/proxerme/app/stream/resolver/DaisukiResolver.kt +++ b/app/src/main/kotlin/com/proxerme/app/stream/resolver/DaisukiResolver.kt @@ -3,6 +3,7 @@ package com.proxerme.app.stream.resolver import android.net.Uri import com.proxerme.app.stream.StreamResolver import com.proxerme.app.task.StreamResolutionTask.StreamResolutionResult +import okhttp3.HttpUrl /** * Resolver for the Daisuki hoster. Currently it only redirects to the homepage as the app does not @@ -14,7 +15,7 @@ class DaisukiResolver : StreamResolver() { override val name = "Daisuki" - override fun resolve(url: String): StreamResolutionResult { + override fun resolve(url: HttpUrl): StreamResolutionResult { return StreamResolutionResult(Uri.parse("http://daisuki.net"), "text/html") } -} \ No newline at end of file +} diff --git a/app/src/main/kotlin/com/proxerme/app/stream/resolver/Mp4UploadResolver.kt b/app/src/main/kotlin/com/proxerme/app/stream/resolver/Mp4UploadResolver.kt index 8ab2c79f..b522b78a 100644 --- a/app/src/main/kotlin/com/proxerme/app/stream/resolver/Mp4UploadResolver.kt +++ b/app/src/main/kotlin/com/proxerme/app/stream/resolver/Mp4UploadResolver.kt @@ -5,6 +5,7 @@ import com.proxerme.app.stream.StreamResolver import com.proxerme.app.task.StreamResolutionTask.StreamResolutionException import com.proxerme.app.task.StreamResolutionTask.StreamResolutionResult import com.proxerme.app.util.ProxerConnectionWrapper +import okhttp3.HttpUrl import okhttp3.Request import java.io.IOException @@ -20,7 +21,7 @@ class Mp4UploadResolver : StreamResolver() { private val regex = Regex("\"file\": \"(.+)\"") @Throws(IOException::class) - override fun resolve(url: String): StreamResolutionResult { + override fun resolve(url: HttpUrl): StreamResolutionResult { val response = ProxerConnectionWrapper.httpClient.newCall(Request.Builder() .get() .url(url) diff --git a/app/src/main/kotlin/com/proxerme/app/stream/resolver/MyviResolver.kt b/app/src/main/kotlin/com/proxerme/app/stream/resolver/MyviResolver.kt index 74793ffa..166c1926 100644 --- a/app/src/main/kotlin/com/proxerme/app/stream/resolver/MyviResolver.kt +++ b/app/src/main/kotlin/com/proxerme/app/stream/resolver/MyviResolver.kt @@ -18,10 +18,10 @@ class MyviResolver : StreamResolver() { override val name = "Myvi" - override fun resolve(url: String): StreamResolutionResult { + override fun resolve(url: HttpUrl): StreamResolutionResult { val response = ProxerConnectionWrapper.httpClient.newCall(Request.Builder() .get() - .url("http://myvi.ru/player/api/Video/Get/${HttpUrl.parse(url).pathSegments().last()}?sig") + .url("http://myvi.ru/player/api/Video/Get/${url.pathSegments().last()}?sig") .build()).execute() val resultUrl = ProxerConnectionWrapper.moshi.adapter(SprutoResult::class.java) diff --git a/app/src/main/kotlin/com/proxerme/app/stream/resolver/NovamovStreamResolver.kt b/app/src/main/kotlin/com/proxerme/app/stream/resolver/NovamovStreamResolver.kt index e5766841..17176d9c 100644 --- a/app/src/main/kotlin/com/proxerme/app/stream/resolver/NovamovStreamResolver.kt +++ b/app/src/main/kotlin/com/proxerme/app/stream/resolver/NovamovStreamResolver.kt @@ -5,6 +5,7 @@ import com.proxerme.app.stream.StreamResolver import com.proxerme.app.task.StreamResolutionTask.StreamResolutionException import com.proxerme.app.task.StreamResolutionTask.StreamResolutionResult import com.proxerme.app.util.ProxerConnectionWrapper +import okhttp3.HttpUrl import okhttp3.Request /** @@ -19,7 +20,7 @@ class NovamovStreamResolver : StreamResolver() { private val keyRegex = Regex("file=\"(.*?)\".*filekey=\"(.*?)\"", RegexOption.DOT_MATCHES_ALL) private val urlRegex = Regex("url=(.*?)&title") - override fun resolve(url: String): StreamResolutionResult { + override fun resolve(url: HttpUrl): StreamResolutionResult { val response = ProxerConnectionWrapper.httpClient.newCall(Request.Builder() .header("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64)") .get() diff --git a/app/src/main/kotlin/com/proxerme/app/stream/resolver/ProsiebenMAXXResolver.kt b/app/src/main/kotlin/com/proxerme/app/stream/resolver/ProsiebenMAXXResolver.kt index 5914fc7d..21dd8b55 100644 --- a/app/src/main/kotlin/com/proxerme/app/stream/resolver/ProsiebenMAXXResolver.kt +++ b/app/src/main/kotlin/com/proxerme/app/stream/resolver/ProsiebenMAXXResolver.kt @@ -1,8 +1,9 @@ package com.proxerme.app.stream.resolver -import android.net.Uri import com.proxerme.app.stream.StreamResolver import com.proxerme.app.task.StreamResolutionTask.StreamResolutionResult +import com.proxerme.app.util.extension.androidUri +import okhttp3.HttpUrl /** * TODO: Describe class @@ -13,7 +14,7 @@ class ProsiebenMAXXResolver : StreamResolver() { override val name = "ProSieben MAXX" - override fun resolve(url: String): StreamResolutionResult { - return StreamResolutionResult(Uri.parse(url), "text/html") + override fun resolve(url: HttpUrl): StreamResolutionResult { + return StreamResolutionResult(url.androidUri(), "text/html") } -} \ No newline at end of file +} diff --git a/app/src/main/kotlin/com/proxerme/app/stream/resolver/ProxerStreamResolver.kt b/app/src/main/kotlin/com/proxerme/app/stream/resolver/ProxerStreamResolver.kt index 6acd7d56..0b3c408d 100644 --- a/app/src/main/kotlin/com/proxerme/app/stream/resolver/ProxerStreamResolver.kt +++ b/app/src/main/kotlin/com/proxerme/app/stream/resolver/ProxerStreamResolver.kt @@ -5,6 +5,7 @@ import com.proxerme.app.stream.StreamResolver import com.proxerme.app.task.StreamResolutionTask.StreamResolutionException import com.proxerme.app.task.StreamResolutionTask.StreamResolutionResult import com.proxerme.app.util.ProxerConnectionWrapper +import okhttp3.HttpUrl import okhttp3.Request /** @@ -18,7 +19,7 @@ class ProxerStreamResolver : StreamResolver() { private val regex = Regex("") - override fun resolve(url: String): StreamResolutionResult { + override fun resolve(url: HttpUrl): StreamResolutionResult { val response = ProxerConnectionWrapper.httpClient.newCall(Request.Builder() .get() .url(url) diff --git a/app/src/main/kotlin/com/proxerme/app/stream/resolver/StreamcloudResolver.kt b/app/src/main/kotlin/com/proxerme/app/stream/resolver/StreamcloudResolver.kt index 4082bb8d..e145986c 100644 --- a/app/src/main/kotlin/com/proxerme/app/stream/resolver/StreamcloudResolver.kt +++ b/app/src/main/kotlin/com/proxerme/app/stream/resolver/StreamcloudResolver.kt @@ -6,6 +6,7 @@ import com.proxerme.app.task.StreamResolutionTask.StreamResolutionException import com.proxerme.app.task.StreamResolutionTask.StreamResolutionResult import com.proxerme.app.util.ProxerConnectionWrapper import okhttp3.FormBody +import okhttp3.HttpUrl import okhttp3.Request /** @@ -20,7 +21,7 @@ class StreamcloudResolver : StreamResolver() { private val fromRegex = Regex("") private val fileRegex = Regex("file: \"(.+?)\",") - override fun resolve(url: String): StreamResolutionResult { + override fun resolve(url: HttpUrl): StreamResolutionResult { var response = ProxerConnectionWrapper.httpClient.newCall(Request.Builder() .get() .url(url) diff --git a/app/src/main/kotlin/com/proxerme/app/stream/resolver/VideoWeedStreamResolver.kt b/app/src/main/kotlin/com/proxerme/app/stream/resolver/VideoWeedStreamResolver.kt index 7934383f..6639b9a1 100644 --- a/app/src/main/kotlin/com/proxerme/app/stream/resolver/VideoWeedStreamResolver.kt +++ b/app/src/main/kotlin/com/proxerme/app/stream/resolver/VideoWeedStreamResolver.kt @@ -5,6 +5,7 @@ import com.proxerme.app.stream.StreamResolver import com.proxerme.app.task.StreamResolutionTask.StreamResolutionException import com.proxerme.app.task.StreamResolutionTask.StreamResolutionResult import com.proxerme.app.util.ProxerConnectionWrapper +import okhttp3.HttpUrl import okhttp3.Request /** @@ -19,7 +20,7 @@ class VideoWeedStreamResolver : StreamResolver() { private val keyRegex = Regex("fkz=\"(.*?)\".*file=\"(.*?)\"", RegexOption.DOT_MATCHES_ALL) private val urlRegex = Regex("url=(.*?)&title") - override fun resolve(url: String): StreamResolutionResult { + override fun resolve(url: HttpUrl): StreamResolutionResult { val response = ProxerConnectionWrapper.httpClient.newCall(Request.Builder() .header("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64)") .get() diff --git a/app/src/main/kotlin/com/proxerme/app/stream/resolver/ViewsterResolver.kt b/app/src/main/kotlin/com/proxerme/app/stream/resolver/ViewsterResolver.kt index 856e9df4..5f0ae139 100644 --- a/app/src/main/kotlin/com/proxerme/app/stream/resolver/ViewsterResolver.kt +++ b/app/src/main/kotlin/com/proxerme/app/stream/resolver/ViewsterResolver.kt @@ -1,8 +1,9 @@ package com.proxerme.app.stream.resolver -import android.net.Uri import com.proxerme.app.stream.StreamResolver import com.proxerme.app.task.StreamResolutionTask.StreamResolutionResult +import com.proxerme.app.util.extension.androidUri +import okhttp3.HttpUrl /** * TODO: Describe class @@ -13,7 +14,7 @@ class ViewsterResolver : StreamResolver() { override val name = "Viewster" - override fun resolve(url: String): StreamResolutionResult { - return StreamResolutionResult(Uri.parse(url), "text/html") + override fun resolve(url: HttpUrl): StreamResolutionResult { + return StreamResolutionResult(url.androidUri(), "text/html") } -} \ No newline at end of file +} diff --git a/app/src/main/kotlin/com/proxerme/app/stream/resolver/YourUploadResolver.kt b/app/src/main/kotlin/com/proxerme/app/stream/resolver/YourUploadResolver.kt index 240ac761..5ba0e612 100644 --- a/app/src/main/kotlin/com/proxerme/app/stream/resolver/YourUploadResolver.kt +++ b/app/src/main/kotlin/com/proxerme/app/stream/resolver/YourUploadResolver.kt @@ -21,7 +21,7 @@ class YourUploadResolver : StreamResolver() { private val regex = Regex("file: '(.*?)'") - override fun resolve(url: String): StreamResolutionResult { + override fun resolve(url: HttpUrl): StreamResolutionResult { val response = ProxerConnectionWrapper.httpClient.newCall(Request.Builder() .get() .url(url) @@ -35,7 +35,7 @@ class YourUploadResolver : StreamResolver() { } val apiResponse = ProxerConnectionWrapper.httpClient.newCall(Request.Builder() - .header("Referer", url) + .header("Referer", url.toString()) .head() .url(HttpUrl.parse("http://yourupload.com$file")) .build()).execute() diff --git a/app/src/main/kotlin/com/proxerme/app/stream/resolver/YoutubeResolver.kt b/app/src/main/kotlin/com/proxerme/app/stream/resolver/YoutubeResolver.kt index fef86d1b..f7eb96f5 100644 --- a/app/src/main/kotlin/com/proxerme/app/stream/resolver/YoutubeResolver.kt +++ b/app/src/main/kotlin/com/proxerme/app/stream/resolver/YoutubeResolver.kt @@ -1,8 +1,9 @@ package com.proxerme.app.stream.resolver -import android.net.Uri import com.proxerme.app.stream.StreamResolver import com.proxerme.app.task.StreamResolutionTask.StreamResolutionResult +import com.proxerme.app.util.extension.androidUri +import okhttp3.HttpUrl /** * TODO: Describe class @@ -13,7 +14,7 @@ class YoutubeResolver : StreamResolver() { override val name = "YouTube" - override fun resolve(url: String): StreamResolutionResult { - return StreamResolutionResult(Uri.parse(url), "text/html") + override fun resolve(url: HttpUrl): StreamResolutionResult { + return StreamResolutionResult(url.androidUri(), "text/html") } -} \ No newline at end of file +} diff --git a/app/src/main/kotlin/com/proxerme/app/task/StreamResolutionTask.kt b/app/src/main/kotlin/com/proxerme/app/task/StreamResolutionTask.kt index 3b589e7e..26decd9c 100644 --- a/app/src/main/kotlin/com/proxerme/app/task/StreamResolutionTask.kt +++ b/app/src/main/kotlin/com/proxerme/app/task/StreamResolutionTask.kt @@ -10,6 +10,7 @@ import com.proxerme.app.fragment.anime.AnimeFragment.StreamResolverInput import com.proxerme.app.stream.StreamResolverFactory import com.proxerme.app.task.StreamResolutionTask.StreamResolutionResult import com.proxerme.app.task.framework.BaseTask +import com.proxerme.app.util.Utils import com.proxerme.app.util.extension.snackbar import org.jetbrains.anko.doAsync import org.jetbrains.anko.find @@ -36,7 +37,7 @@ class StreamResolutionTask(successCallback: ((StreamResolutionResult) -> Unit)? future = doAsync { try { val result = StreamResolverFactory.getResolverFor(input.first.name) - ?.resolve(input.second) ?: throw NoResolverException() + ?.resolve(Utils.parseAndFixUrl(input.second)) ?: throw NoResolverException() handler.post { cancel() diff --git a/build.gradle b/build.gradle index 8562e4fc..9c22e08e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ buildscript { - ext.kotlin_version = '1.1.0' - ext.support_version = '25.2.0' + ext.kotlin_version = '1.1.1' + ext.support_version = '25.3.1' ext.anko_version = '0.9.1a' ext.leak_canary_version = '1.5' ext.build_tools_version = '25.0.2'