mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Comments
This commit is contained in:
parent
3141c9baf8
commit
284b7df4d7
1 changed files with 6 additions and 1 deletions
|
@ -28,6 +28,11 @@ object SubtitleUtils {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name the file name of the subtitle
|
||||
* @param display the file name of the video
|
||||
* @param cleanDisplay the cleanDisplayName of the video file name
|
||||
*/
|
||||
fun isMatchingSubtitle(
|
||||
name: String,
|
||||
display: String,
|
||||
|
@ -36,7 +41,7 @@ object SubtitleUtils {
|
|||
// Check if the file has a valid subtitle extension
|
||||
val hasValidExtension = allowedExtensions.any { name.contains(it, ignoreCase = true) }
|
||||
|
||||
// Ensure the file name is not exactly the same as the display name
|
||||
// We can't have the exact same file as a subtitle
|
||||
val isNotDisplayName = !name.equals(display, ignoreCase = true)
|
||||
|
||||
// Check if the file name starts with a cleaned version of the display name
|
||||
|
|
Loading…
Reference in a new issue