Skip to content

Commit

Permalink
normName update to new better separator
Browse files Browse the repository at this point in the history
  • Loading branch information
izderadicka committed Mar 7, 2021
1 parent 0c3380e commit 112b956
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/src/main/java/eu/zderadicka/audioserve/data/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,12 @@ fun splitPositionFolder(f: String): Pair<String,Int> {

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 =
Expand Down

0 comments on commit 112b956

Please sign in to comment.