Fix trailing slash in baseUrl not loading images (#114)
This commit is contained in:
parent
84bb1ac073
commit
c6385caf0f
2 changed files with 4 additions and 2 deletions
|
@ -106,7 +106,7 @@ fun bindSeasonPoster(imageView: ImageView, seasonId: UUID) {
|
|||
private fun ImageView.loadImage(url: String, @DrawableRes errorPlaceHolderId: Int? = null): View {
|
||||
val api = JellyfinApi.getInstance(context.applicationContext)
|
||||
|
||||
return Glide
|
||||
Glide
|
||||
.with(context)
|
||||
.load("${api.api.baseUrl}$url")
|
||||
.transition(DrawableTransitionOptions.withCrossFade())
|
||||
|
@ -114,6 +114,8 @@ private fun ImageView.loadImage(url: String, @DrawableRes errorPlaceHolderId: In
|
|||
.error(errorPlaceHolderId)
|
||||
.into(this)
|
||||
.view
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
private fun View.posterDescription(name: String?) {
|
||||
|
|
|
@ -82,7 +82,7 @@ class AddServerFragment : Fragment() {
|
|||
|
||||
private fun connectToServer() {
|
||||
val serverAddress = binding.editTextServerAddress.text.toString()
|
||||
viewModel.checkServer(serverAddress)
|
||||
viewModel.checkServer(serverAddress.removeSuffix("/"))
|
||||
}
|
||||
|
||||
private fun navigateToLoginFragment() {
|
||||
|
|
Loading…
Reference in a new issue