diff --git a/README.md b/README.md index df064e0..ca56821 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,10 @@ ### Whats New: +**version 1.5.2:** + +- Fixed an issue that downloads wrong subtitle for selected session in some cases + **version 1.5.1:** - Now supports WWDC 2018 video's links diff --git a/Releases/WWDC.srt.zip b/Releases/WWDC.srt.zip index dc44dea..d5b6942 100644 Binary files a/Releases/WWDC.srt.zip and b/Releases/WWDC.srt.zip differ diff --git a/WWDC.srt.xcodeproj/xcuserdata/SeyedSamad.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/WWDC.srt.xcodeproj/xcuserdata/SeyedSamad.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index c63a867..c892c50 100644 --- a/WWDC.srt.xcodeproj/xcuserdata/SeyedSamad.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/WWDC.srt.xcodeproj/xcuserdata/SeyedSamad.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -282,7 +282,7 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "WWDCSubGetter/MainViewController.swift" - timestampString = "551488201.255013" + timestampString = "552547545.833598" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" startingLineNumber = "492" @@ -298,11 +298,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "WWDCSubGetter/MainViewController.swift" - timestampString = "551488201.255052" + timestampString = "552547545.833994" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "679" - endingLineNumber = "679" + startingLineNumber = "686" + endingLineNumber = "686" landmarkName = "getSubtitlesFromPath(path:)" landmarkType = "7"> @@ -314,11 +314,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "WWDCSubGetter/MainViewController.swift" - timestampString = "551488201.255088" + timestampString = "552547545.83426" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "651" - endingLineNumber = "651" + startingLineNumber = "658" + endingLineNumber = "658" landmarkName = "downloadLinks(for:)" landmarkType = "7"> diff --git a/WWDCSubGetter/MainViewController.swift b/WWDCSubGetter/MainViewController.swift index 859a138..ac8cfbf 100644 --- a/WWDCSubGetter/MainViewController.swift +++ b/WWDCSubGetter/MainViewController.swift @@ -503,7 +503,14 @@ final class MainViewController: NSViewController, TextFileViewDelegate, NSTextFi if FileManager.default.fileExists(atPath: hdVideoURL.path) { let data = try! String(contentsOfFile:hdVideoURL.path, encoding: String.Encoding.utf8) - let hdVideoLinksArray = data.components(separatedBy: "\n").filter { $0.contains(sessionNumber) } + var searchString = "" + if wwdc == .ofFall2017 { + searchString = "/\(sessionNumber)" + } + else { + searchString = "/\(sessionNumber)/\(sessionNumber)" + } + let hdVideoLinksArray = data.components(separatedBy: "\n").filter { $0.contains(searchString) } if let videoLink = hdVideoLinksArray.first { if let subtitle = Subtitle(videoURL: videoLink) { model.update(subtitle)