mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 09:53:33 +00:00
feat: added server-side track transcoding settings option
This commit is contained in:
parent
b73a1c532b
commit
84db4060e6
7 changed files with 60 additions and 8 deletions
|
|
@ -41,8 +41,11 @@ public class MusicUtil {
|
|||
if (params.containsKey("c") && params.get("c") != null)
|
||||
uri.append("&c=").append(params.get("c"));
|
||||
|
||||
uri.append("&maxBitRate=").append(getBitratePreference());
|
||||
uri.append("&format=").append(getTranscodingFormatPreference());
|
||||
if (!Preferences.isServerPrioritized())
|
||||
uri.append("&maxBitRate=").append(getBitratePreference());
|
||||
if (!Preferences.isServerPrioritized())
|
||||
uri.append("&format=").append(getTranscodingFormatPreference());
|
||||
|
||||
uri.append("&id=").append(id);
|
||||
|
||||
Log.d(TAG, "getStreamUri: " + uri);
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ object Preferences {
|
|||
private const val RADIO_SECTION_VISIBILITY = "radio_section_visibility"
|
||||
private const val MUSIC_DIRECTORY_SECTION_VISIBILITY = "music_directory_section_visibility"
|
||||
private const val REPLAY_GAIN_MODE = "replay_gain_mode"
|
||||
private const val AUDIO_TRANSCODE_PRIORITY = "audio_transcode_priority"
|
||||
|
||||
@JvmStatic
|
||||
fun getServer(): String? {
|
||||
|
|
@ -252,4 +253,9 @@ object Preferences {
|
|||
fun getReplayGainMode(): String? {
|
||||
return App.getInstance().preferences.getString(REPLAY_GAIN_MODE, "disabled")
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun isServerPrioritized(): Boolean {
|
||||
return App.getInstance().preferences.getBoolean(AUDIO_TRANSCODE_PRIORITY, false)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue