music: move cover impl to image
This commit is contained in:
parent
c6e83d1e18
commit
ff6d2fe228
8 changed files with 12 additions and 12 deletions
|
@ -124,7 +124,7 @@ object IntegerTable {
|
||||||
/** CoverMode.Off */
|
/** CoverMode.Off */
|
||||||
const val COVER_MODE_OFF = 0xA11C
|
const val COVER_MODE_OFF = 0xA11C
|
||||||
/** CoverMode.MediaStore */
|
/** CoverMode.MediaStore */
|
||||||
const val COVER_MODE_MEDIA_STORE = 0xA11D
|
const val COVER_MODE_FAST = 0xA11D
|
||||||
/** CoverMode.Quality */
|
/** CoverMode.Quality */
|
||||||
const val COVER_MODE_QUALITY = 0xA11E
|
const val COVER_MODE_QUALITY = 0xA11E
|
||||||
/** PlaySong.FromAll */
|
/** PlaySong.FromAll */
|
||||||
|
|
|
@ -29,7 +29,7 @@ enum class CoverMode {
|
||||||
/** Do not load album covers ("Off"). */
|
/** Do not load album covers ("Off"). */
|
||||||
OFF,
|
OFF,
|
||||||
/** Load covers from the fast, but lower-quality media store database ("Fast"). */
|
/** Load covers from the fast, but lower-quality media store database ("Fast"). */
|
||||||
MEDIA_STORE,
|
FAST,
|
||||||
/** Load high-quality covers directly from music files ("Quality"). */
|
/** Load high-quality covers directly from music files ("Quality"). */
|
||||||
QUALITY;
|
QUALITY;
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ enum class CoverMode {
|
||||||
get() =
|
get() =
|
||||||
when (this) {
|
when (this) {
|
||||||
OFF -> IntegerTable.COVER_MODE_OFF
|
OFF -> IntegerTable.COVER_MODE_OFF
|
||||||
MEDIA_STORE -> IntegerTable.COVER_MODE_MEDIA_STORE
|
FAST -> IntegerTable.COVER_MODE_FAST
|
||||||
QUALITY -> IntegerTable.COVER_MODE_QUALITY
|
QUALITY -> IntegerTable.COVER_MODE_QUALITY
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ enum class CoverMode {
|
||||||
fun fromIntCode(intCode: Int) =
|
fun fromIntCode(intCode: Int) =
|
||||||
when (intCode) {
|
when (intCode) {
|
||||||
IntegerTable.COVER_MODE_OFF -> OFF
|
IntegerTable.COVER_MODE_OFF -> OFF
|
||||||
IntegerTable.COVER_MODE_MEDIA_STORE -> MEDIA_STORE
|
IntegerTable.COVER_MODE_FAST -> FAST
|
||||||
IntegerTable.COVER_MODE_QUALITY -> QUALITY
|
IntegerTable.COVER_MODE_QUALITY -> QUALITY
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ class ImageSettingsImpl @Inject constructor(@ApplicationContext context: Context
|
||||||
get() =
|
get() =
|
||||||
CoverMode.fromIntCode(
|
CoverMode.fromIntCode(
|
||||||
sharedPreferences.getInt(getString(R.string.set_key_cover_mode), Int.MIN_VALUE))
|
sharedPreferences.getInt(getString(R.string.set_key_cover_mode), Int.MIN_VALUE))
|
||||||
?: CoverMode.MEDIA_STORE
|
?: CoverMode.FAST
|
||||||
|
|
||||||
override val forceSquareCovers: Boolean
|
override val forceSquareCovers: Boolean
|
||||||
get() = sharedPreferences.getBoolean(getString(R.string.set_key_square_covers), false)
|
get() = sharedPreferences.getBoolean(getString(R.string.set_key_square_covers), false)
|
||||||
|
@ -64,7 +64,7 @@ class ImageSettingsImpl @Inject constructor(@ApplicationContext context: Context
|
||||||
when {
|
when {
|
||||||
!sharedPreferences.getBoolean(OLD_KEY_SHOW_COVERS, true) -> CoverMode.OFF
|
!sharedPreferences.getBoolean(OLD_KEY_SHOW_COVERS, true) -> CoverMode.OFF
|
||||||
!sharedPreferences.getBoolean(OLD_KEY_QUALITY_COVERS, true) ->
|
!sharedPreferences.getBoolean(OLD_KEY_QUALITY_COVERS, true) ->
|
||||||
CoverMode.MEDIA_STORE
|
CoverMode.FAST
|
||||||
else -> CoverMode.QUALITY
|
else -> CoverMode.QUALITY
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.oxycblt.auxio.music.covers
|
package org.oxycblt.auxio.image.covers
|
||||||
|
|
||||||
import java.util.UUID
|
import java.util.UUID
|
||||||
import org.oxycblt.musikr.cover.CoverParams
|
import org.oxycblt.musikr.cover.CoverParams
|
|
@ -1,4 +1,4 @@
|
||||||
package org.oxycblt.auxio.music.covers
|
package org.oxycblt.auxio.image.covers
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
|
@ -1,4 +1,4 @@
|
||||||
package org.oxycblt.auxio.music.covers
|
package org.oxycblt.auxio.image.covers
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import org.oxycblt.musikr.cover.Cover
|
import org.oxycblt.musikr.cover.Cover
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.oxycblt.auxio.music.covers
|
package org.oxycblt.auxio.image.covers
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import java.io.File
|
import java.io.File
|
|
@ -28,8 +28,8 @@ import kotlinx.coroutines.Job
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import kotlinx.coroutines.yield
|
import kotlinx.coroutines.yield
|
||||||
import org.oxycblt.auxio.music.MusicRepository.IndexingWorker
|
import org.oxycblt.auxio.music.MusicRepository.IndexingWorker
|
||||||
import org.oxycblt.auxio.music.covers.CoverSilo
|
import org.oxycblt.auxio.image.covers.CoverSilo
|
||||||
import org.oxycblt.auxio.music.covers.SiloedCovers
|
import org.oxycblt.auxio.image.covers.SiloedCovers
|
||||||
import org.oxycblt.musikr.IndexingProgress
|
import org.oxycblt.musikr.IndexingProgress
|
||||||
import org.oxycblt.musikr.Interpretation
|
import org.oxycblt.musikr.Interpretation
|
||||||
import org.oxycblt.musikr.Library
|
import org.oxycblt.musikr.Library
|
||||||
|
|
Loading…
Reference in a new issue