Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ object SubtitleUtils {
cleanDisplay: String
): Boolean {
// Check if the file has a valid subtitle extension
val hasValidExtension = allowedExtensions.any { name.contains(it, ignoreCase = true) }
val hasValidExtension = allowedExtensions.any { name.endsWith(it, ignoreCase = true) }

// We can't have the exact same file as a subtitle
val isNotDisplayName = !name.equals(display, ignoreCase = true)
Expand All @@ -57,4 +57,4 @@ object SubtitleUtils {
fun cleanDisplayName(name: String): String {
return name.substringBeforeLast('.').trim()
}
}
}