Load subtitles files if the name is the same as the video file.
This commit is contained in:
1 file changed
+1
-1
@@ -79,7 +79,7 @@ import MP42Foundation
|
|||||||
let ext = url.pathExtension.lowercased()
|
let ext = url.pathExtension.lowercased()
|
||||||
if ext == "srt" || ext == "ass" || ext == "ssa" {
|
if ext == "srt" || ext == "ass" || ext == "ssa" {
|
||||||
let subtitleFilename = url.deletingPathExtension().lastPathComponent
|
let subtitleFilename = url.deletingPathExtension().lastPathComponent
|
||||||
if movieFilename.count < subtitleFilename.count &&
|
if movieFilename.count <= subtitleFilename.count &&
|
||||||
subtitleFilename.hasPrefix(movieFilename) {
|
subtitleFilename.hasPrefix(movieFilename) {
|
||||||
if let importer = try? MP42FileImporter(url: url) {
|
if let importer = try? MP42FileImporter(url: url) {
|
||||||
importers.append(importer)
|
importers.append(importer)
|
||||||
|
|||||||
Reference in new issue
Block a user