mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 09:53:33 +00:00
feat: added setting to request estimated duration of transcoded file
This commit is contained in:
parent
0fe4636fe1
commit
e762c91ff3
4 changed files with 20 additions and 2 deletions
|
|
@ -50,12 +50,11 @@ public class MusicUtil {
|
|||
uri.append("&maxBitRate=").append(getBitratePreference());
|
||||
if (!Preferences.isServerPrioritized())
|
||||
uri.append("&format=").append(getTranscodingFormatPreference());
|
||||
if (false)
|
||||
if (Preferences.askForEstimateContentLength())
|
||||
uri.append("&estimateContentLength=true");
|
||||
|
||||
uri.append("&id=").append(id);
|
||||
|
||||
|
||||
Log.d(TAG, "getStreamUri: " + uri);
|
||||
|
||||
return Uri.parse(uri.toString());
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ object Preferences {
|
|||
private const val MAX_BITRATE_DOWNLOAD = "max_bitrate_download"
|
||||
private const val AUDIO_TRANSCODE_FORMAT_DOWNLOAD = "audio_transcode_format_download"
|
||||
private const val SHARE = "share"
|
||||
private const val ESTIMATE_CONTENT_LENGTH = "estimate_content_length"
|
||||
|
||||
@JvmStatic
|
||||
fun getServer(): String? {
|
||||
|
|
@ -319,4 +320,9 @@ object Preferences {
|
|||
fun isSharingEnabled(): Boolean {
|
||||
return App.getInstance().preferences.getBoolean(SHARE, false)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun askForEstimateContentLength(): Boolean {
|
||||
return App.getInstance().preferences.getBoolean(ESTIMATE_CONTENT_LENGTH, false)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue