mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-11 07:29:14 +01:00
drop unnecessary null checks flagged by the compiler
This commit is contained in:
@@ -140,9 +140,9 @@ class SourceRepository(
|
|||||||
// quality rather than the original that would then have to be transcoded on every play.
|
// quality rather than the original that would then have to be transcoded on every play.
|
||||||
val quality = downloadQuality
|
val quality = downloadQuality
|
||||||
return if (quality.transcodes) {
|
return if (quality.transcodes) {
|
||||||
source.streamUri(songId, quality.maxBitrate, quality.format)?.toString()
|
source.streamUri(songId, quality.maxBitrate, quality.format).toString()
|
||||||
} else {
|
} else {
|
||||||
source.downloadUri(songId)?.toString()
|
source.downloadUri(songId).toString()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ class SourceRepositoryTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
assertTrue(transcoded!!.contains("maxBitRate=128"))
|
assertTrue(transcoded!!.contains("maxBitRate=128"))
|
||||||
assertTrue(transcoded!!.contains("format=opus"))
|
assertTrue(transcoded.contains("format=opus"))
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user