fix #1419, use the proper cover image at creating shortcuts

This commit is contained in:
tibbi 2019-05-13 10:15:54 +02:00
parent 35bd124b0b
commit dac85245ba

View file

@ -357,7 +357,8 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
val dir = getFirstSelectedItem() ?: return
val path = dir.path
val drawable = resources.getDrawable(R.drawable.shortcut_image).mutate()
activity.getShortcutImage(dir.tmb, drawable) {
val coverThumbnail = config.parseAlbumCovers().firstOrNull { it.tmb == dir.path }?.tmb ?: dir.tmb
activity.getShortcutImage(coverThumbnail, drawable) {
val intent = Intent(activity, MediaActivity::class.java)
intent.action = Intent.ACTION_VIEW
intent.putExtra(DIRECTORY, path)