Skip to content

Commit

Permalink
Beta 0.9.3; Fixed streamable player
Browse files Browse the repository at this point in the history
  • Loading branch information
feelfreelinux committed Jul 5, 2018
1 parent 685dcad commit ec1544c
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class ExternalRepository(val retrofit: Retrofit) : ExternalApi {
override fun getGfycatWebmUrl(gfycatId: String): Single<URL> =
embedApi.getGfycat(gfycatId)
.map {
printout(it.gfyItem.webmUrl)
URL(it.gfyItem.webmUrl) }

override fun getGifUrl(gfycatId: String): Single<URL> =
Expand All @@ -25,7 +24,7 @@ class ExternalRepository(val retrofit: Retrofit) : ExternalApi {

override fun getStreamableUrl(streamableId: String): Single<URL> =
embedApi.getStreamableFile(streamableId)
.map { URL("https:${it.files.mp4Mobile.url}") }
.map { URL("https:${it.files.mp4Mobile?.url ?: it.files.mp4.url}") }

override fun getCoub(coubId: String): Single<Coub> =
embedApi.getCoub(coubId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import io.github.feelfreelinux.wykopmobilny.models.pojo.apiv2.models.SurveyRespo
class SurveyMapper {
companion object : Mapper<SurveyResponse, Survey> {
override fun map(value: SurveyResponse): Survey {
return Survey(value.question,
return Survey(value.question ?: "",
value.answers.map { AnswerMapper.map(it) },
value.userAnswer)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ data class StreamableFiles(
@JsonProperty("mp4")
val mp4 : StreamableFile,
@JsonProperty("mp4-mobile")
val mp4Mobile : StreamableFile
val mp4Mobile : StreamableFile?
)
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackso

data class SurveyResponse(
@JsonProperty("question")
val question : String,
val question : String?,

@JsonProperty("answers")
val answers : List<AnswerResponse>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package io.github.feelfreelinux.wykopmobilny.ui.modules.photoview

import android.content.Context
import android.content.Intent
import android.graphics.Paint
import android.net.Uri
import android.os.Build
import android.os.Bundle
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ allprojects {
project.ext {
versionMajor = 0
versionMinor = 9
versionPatch = 2
versionPatch = 3
versionBuild = 0
}
}
Expand Down

0 comments on commit ec1544c

Please sign in to comment.