Load subtitles files if the name is the same as the video file.

This commit is contained in:
Damiano Galassi committed 2018-08-16 14:57:06 +02:00
1 parent be122c0b47
commit ac51609e18
1 file changed
+1 -1
+1 -1
View File
@@ -79,7 +79,7 @@ import MP42Foundation
let ext = url.pathExtension.lowercased()
if ext == "srt" || ext == "ass" || ext == "ssa" {
let subtitleFilename = url.deletingPathExtension().lastPathComponent
if movieFilename.count < subtitleFilename.count &&
if movieFilename.count <= subtitleFilename.count &&
subtitleFilename.hasPrefix(movieFilename) {
if let importer = try? MP42FileImporter(url: url) {
importers.append(importer)