diff --git a/app/src/main/java/eu/zderadicka/audioserve/data/Utils.kt b/app/src/main/java/eu/zderadicka/audioserve/data/Utils.kt index 810f16f..9dc1452 100644 --- a/app/src/main/java/eu/zderadicka/audioserve/data/Utils.kt +++ b/app/src/main/java/eu/zderadicka/audioserve/data/Utils.kt @@ -284,12 +284,12 @@ fun splitPositionFolder(f: String): Pair { private val CHAPTER_RE = Regex("""\$\$[\d\-]+\$\$""") fun normTitle(t:String): String { - var res = t - val idx = res.indexOf(">>") + var res = CHAPTER_RE.replace(t, "") + val idx = res.indexOf("$$") if (idx >= 0) { res = res.substring(idx+2) } - return CHAPTER_RE.replace(res, "") + return res } fun MediaBrowserCompat.MediaItem.isNotablyDifferentFrom(other: MediaBrowserCompat.MediaItem): Boolean =