mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-30 22:07:57 +01:00 
			
		
		
		
	Don't remove queued downloads when deleting manga after chapter deletion
This commit is contained in:
		| @@ -243,7 +243,7 @@ class DownloadManager( | ||||
|  | ||||
|                 // Delete manga directory if empty | ||||
|                 if (mangaDir?.listFiles()?.isEmpty() == true) { | ||||
|                     deleteManga(manga, source) | ||||
|                     deleteManga(manga, source, removeQueued = false) | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
| @@ -254,10 +254,13 @@ class DownloadManager( | ||||
|      * | ||||
|      * @param manga the manga to delete. | ||||
|      * @param source the source of the manga. | ||||
|      * @param removeQueued whether to also remove queued downloads. | ||||
|      */ | ||||
|     fun deleteManga(manga: Manga, source: Source) { | ||||
|     fun deleteManga(manga: Manga, source: Source, removeQueued: Boolean = true) { | ||||
|         launchIO { | ||||
|             queue.remove(manga) | ||||
|             if (removeQueued) { | ||||
|                 queue.remove(manga) | ||||
|             } | ||||
|             provider.findMangaDir(manga.title, source)?.delete() | ||||
|             cache.removeManga(manga) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user