Fixed default for cache directory selector
This commit is contained in:
parent
17e49ff49e
commit
34e232a43a
|
@ -38,7 +38,6 @@ import org.moire.ultrasonic.service.MediaPlayerController
|
||||||
import org.moire.ultrasonic.service.RxBus
|
import org.moire.ultrasonic.service.RxBus
|
||||||
import org.moire.ultrasonic.util.Constants
|
import org.moire.ultrasonic.util.Constants
|
||||||
import org.moire.ultrasonic.util.ErrorDialog
|
import org.moire.ultrasonic.util.ErrorDialog
|
||||||
import org.moire.ultrasonic.util.FileUtil.defaultMusicDirectory
|
|
||||||
import org.moire.ultrasonic.util.FileUtil.ultrasonicDirectory
|
import org.moire.ultrasonic.util.FileUtil.ultrasonicDirectory
|
||||||
import org.moire.ultrasonic.util.InfoDialog
|
import org.moire.ultrasonic.util.InfoDialog
|
||||||
import org.moire.ultrasonic.util.MediaSessionHandler
|
import org.moire.ultrasonic.util.MediaSessionHandler
|
||||||
|
@ -287,7 +286,7 @@ class SettingsFragment :
|
||||||
val intent = Intent(Intent.ACTION_OPEN_DOCUMENT_TREE)
|
val intent = Intent(Intent.ACTION_OPEN_DOCUMENT_TREE)
|
||||||
|
|
||||||
if (Settings.cacheLocationUri != "" && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Settings.cacheLocationUri != "" && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
intent.putExtra(DocumentsContract.EXTRA_INITIAL_URI, defaultMusicDirectory.path)
|
intent.putExtra(DocumentsContract.EXTRA_INITIAL_URI, Settings.cacheLocationUri)
|
||||||
}
|
}
|
||||||
|
|
||||||
intent.addFlags(RW_FLAG)
|
intent.addFlags(RW_FLAG)
|
||||||
|
|
|
@ -44,7 +44,7 @@ class Downloader(
|
||||||
|
|
||||||
private val jukeboxMediaPlayer: JukeboxMediaPlayer by inject()
|
private val jukeboxMediaPlayer: JukeboxMediaPlayer by inject()
|
||||||
|
|
||||||
// TODO is this cache necessary?
|
// This cache helps us to avoid creating duplicate DownloadFile instances when showing Entries
|
||||||
private val downloadFileCache = LRUCache<MusicDirectory.Entry, DownloadFile>(100)
|
private val downloadFileCache = LRUCache<MusicDirectory.Entry, DownloadFile>(100)
|
||||||
|
|
||||||
private var executorService: ScheduledExecutorService? = null
|
private var executorService: ScheduledExecutorService? = null
|
||||||
|
|
Loading…
Reference in New Issue