Added regex to strip local manga chapter names (#983)
* added regex to strip non-alphanumeric characters in local filenames
Cette révision appartient à :
Parent
0db4fcc27e
révision
ff4a015baa
1 fichiers modifiés avec 1 ajouts et 1 suppressions
|
@ -144,7 +144,7 @@ class LocalSource(private val context: Context) : CatalogueSource {
|
||||||
} else {
|
} else {
|
||||||
chapterFile.nameWithoutExtension
|
chapterFile.nameWithoutExtension
|
||||||
}
|
}
|
||||||
val chapNameCut = chapName.replace(manga.title, "", true).trim()
|
val chapNameCut = chapName.replace(manga.title, "", true).trim(' ', '-', '_')
|
||||||
name = if (chapNameCut.isEmpty()) chapName else chapNameCut
|
name = if (chapNameCut.isEmpty()) chapName else chapNameCut
|
||||||
date_upload = chapterFile.lastModified()
|
date_upload = chapterFile.lastModified()
|
||||||
ChapterRecognition.parseChapterNumber(this, manga)
|
ChapterRecognition.parseChapterNumber(this, manga)
|
||||||
|
|
Référencer dans un nouveau ticket