mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
feat: added options in settings to define codec and bitrate for downloaded tracks
This commit is contained in:
parent
3a1ced65d5
commit
b160274859
1 changed files with 24 additions and 0 deletions
|
|
@ -35,6 +35,10 @@ object Preferences {
|
|||
private const val AUDIO_TRANSCODE_PRIORITY = "audio_transcode_priority"
|
||||
private const val DOWNLOAD_STORAGE = "download_storage"
|
||||
private const val DEFAULT_DOWNLOAD_VIEW_TYPE = "default_download_view_type"
|
||||
private const val AUDIO_TRANSCODE_DOWNLOAD = "audio_transcode_download"
|
||||
private const val AUDIO_TRANSCODE_DOWNLOAD_PRIORITY = "audio_transcode_download_priority"
|
||||
private const val MAX_BITRATE_DOWNLOAD = "max_bitrate_download"
|
||||
private const val AUDIO_TRANSCODE_FORMAT_DOWNLOAD = "audio_transcode_format_download"
|
||||
|
||||
@JvmStatic
|
||||
fun getServer(): String? {
|
||||
|
|
@ -289,4 +293,24 @@ object Preferences {
|
|||
viewType
|
||||
).apply()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun preferTranscodedDownload(): Boolean {
|
||||
return App.getInstance().preferences.getBoolean(AUDIO_TRANSCODE_DOWNLOAD, false)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun isServerPrioritizedInTranscodedDownload(): Boolean {
|
||||
return App.getInstance().preferences.getBoolean(AUDIO_TRANSCODE_DOWNLOAD_PRIORITY, false)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getBitrateTranscodedDownload(): String {
|
||||
return App.getInstance().preferences.getString(MAX_BITRATE_DOWNLOAD, "0")!!
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getAudioTranscodeFormatTranscodedDownload(): String {
|
||||
return App.getInstance().preferences.getString(AUDIO_TRANSCODE_FORMAT_DOWNLOAD, "raw")!!
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue