no found media error message
This commit is contained in:
parent
68ccff2259
commit
0cfcfcb9ac
1 changed files with 3 additions and 0 deletions
|
@ -211,6 +211,9 @@ class OfflineAnimeFragment : Fragment(), OfflineAnimeSearchListener {
|
||||||
downloadManager.removeMedia(item.title, type)
|
downloadManager.removeMedia(item.title, type)
|
||||||
val mediaIds = requireContext().getSharedPreferences(getString(R.string.anime_downloads), Context.MODE_PRIVATE)
|
val mediaIds = requireContext().getSharedPreferences(getString(R.string.anime_downloads), Context.MODE_PRIVATE)
|
||||||
?.all?.filter { it.key.contains(item.title) }?.values ?: emptySet()
|
?.all?.filter { it.key.contains(item.title) }?.values ?: emptySet()
|
||||||
|
if (mediaIds.isEmpty()) {
|
||||||
|
snackString("No media found") // if this happens, terrible things have happened
|
||||||
|
}
|
||||||
for (mediaId in mediaIds) {
|
for (mediaId in mediaIds) {
|
||||||
ani.dantotsu.download.video.Helper.downloadManager(requireContext())
|
ani.dantotsu.download.video.Helper.downloadManager(requireContext())
|
||||||
.removeDownload(mediaId.toString())
|
.removeDownload(mediaId.toString())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue