mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-11 03:28:56 +01:00
Add .nomedia file in each chapter download folder (#2199)
* Move .nomedia creation to directory fetch * Add .nomedia file to all chapter download directories
This commit is contained in:
@@ -28,7 +28,9 @@ class DownloadProvider(private val context: Context) {
|
||||
* The root directory for downloads.
|
||||
*/
|
||||
private var downloadsDir = preferences.downloadsDirectory().getOrDefault().let {
|
||||
UniFile.fromUri(context, Uri.parse(it))
|
||||
val dir = UniFile.fromUri(context, Uri.parse(it))
|
||||
DiskUtil.createNoMediaFile(dir, context)
|
||||
dir
|
||||
}
|
||||
|
||||
init {
|
||||
|
||||
@@ -407,6 +407,8 @@ class Downloader(
|
||||
if (download.status == Download.DOWNLOADED) {
|
||||
tmpDir.renameTo(dirname)
|
||||
cache.addChapter(dirname, mangaDir, download.manga)
|
||||
|
||||
DiskUtil.createNoMediaFile(tmpDir, context)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user