all: reformat
This commit is contained in:
parent
ac1fec74da
commit
70b26dfb63
4 changed files with 5 additions and 17 deletions
|
@ -20,7 +20,6 @@ package org.oxycblt.auxio.image.covers
|
|||
|
||||
import java.util.UUID
|
||||
import org.oxycblt.musikr.cover.CoverParams
|
||||
import timber.log.Timber
|
||||
|
||||
data class CoverSilo(val revision: UUID, val params: CoverParams?) {
|
||||
override fun toString() =
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.oxycblt.musikr.fs.device
|
|||
|
||||
import android.net.Uri
|
||||
import kotlinx.coroutines.Deferred
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import org.oxycblt.musikr.fs.Path
|
||||
|
||||
sealed interface DeviceNode {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
package org.oxycblt.musikr.fs.device
|
||||
|
||||
import android.content.ContentResolver
|
||||
|
@ -28,7 +28,6 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
|
|||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.asFlow
|
||||
import kotlinx.coroutines.flow.emitAll
|
||||
import kotlinx.coroutines.flow.emptyFlow
|
||||
import kotlinx.coroutines.flow.flatMapMerge
|
||||
import kotlinx.coroutines.flow.flattenMerge
|
||||
import kotlinx.coroutines.flow.flow
|
||||
|
@ -56,8 +55,7 @@ private class DeviceFilesImpl(
|
|||
location.uri,
|
||||
DocumentsContract.getTreeDocumentId(location.uri),
|
||||
location.path,
|
||||
null
|
||||
)
|
||||
null)
|
||||
}
|
||||
|
||||
private fun exploreDirectoryImpl(
|
||||
|
@ -67,14 +65,11 @@ private class DeviceFilesImpl(
|
|||
parent: Deferred<DeviceDirectory>?
|
||||
): Flow<DeviceFile> = flow {
|
||||
// Make a kotlin future
|
||||
val uri =
|
||||
DocumentsContract.buildChildDocumentsUriUsingTree(rootUri, treeDocumentId)
|
||||
val uri = DocumentsContract.buildChildDocumentsUriUsingTree(rootUri, treeDocumentId)
|
||||
val directoryDeferred = CompletableDeferred<DeviceDirectory>()
|
||||
val recursive = mutableListOf<Flow<DeviceFile>>()
|
||||
val children = mutableListOf<DeviceNode>()
|
||||
contentResolver.useQuery(
|
||||
uri, PROJECTION
|
||||
) { cursor ->
|
||||
contentResolver.useQuery(uri, PROJECTION) { cursor ->
|
||||
val childUriIndex =
|
||||
cursor.getColumnIndexOrThrow(DocumentsContract.Document.COLUMN_DOCUMENT_ID)
|
||||
val displayNameIndex =
|
||||
|
@ -128,7 +123,6 @@ private class DeviceFilesImpl(
|
|||
DocumentsContract.Document.COLUMN_DISPLAY_NAME,
|
||||
DocumentsContract.Document.COLUMN_MIME_TYPE,
|
||||
DocumentsContract.Document.COLUMN_SIZE,
|
||||
DocumentsContract.Document.COLUMN_LAST_MODIFIED
|
||||
)
|
||||
DocumentsContract.Document.COLUMN_LAST_MODIFIED)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,13 +20,11 @@ package org.oxycblt.musikr.pipeline
|
|||
|
||||
import android.content.Context
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.asFlow
|
||||
import kotlinx.coroutines.flow.buffer
|
||||
import kotlinx.coroutines.flow.emitAll
|
||||
import kotlinx.coroutines.flow.filter
|
||||
import kotlinx.coroutines.flow.flattenMerge
|
||||
import kotlinx.coroutines.flow.flow
|
||||
import kotlinx.coroutines.flow.flowOn
|
||||
import kotlinx.coroutines.flow.map
|
||||
|
@ -34,10 +32,8 @@ import kotlinx.coroutines.flow.merge
|
|||
import org.oxycblt.musikr.Interpretation
|
||||
import org.oxycblt.musikr.Storage
|
||||
import org.oxycblt.musikr.fs.MusicLocation
|
||||
import org.oxycblt.musikr.fs.device.DeviceDirectory
|
||||
import org.oxycblt.musikr.fs.device.DeviceFile
|
||||
import org.oxycblt.musikr.fs.device.DeviceFiles
|
||||
import org.oxycblt.musikr.fs.device.DeviceNode
|
||||
import org.oxycblt.musikr.playlist.PlaylistFile
|
||||
import org.oxycblt.musikr.playlist.db.StoredPlaylists
|
||||
import org.oxycblt.musikr.playlist.m3u.M3U
|
||||
|
|
Loading…
Reference in a new issue