Skip to content

Commit

Permalink
Updated for wwdc2022 and wwdc2023
Browse files Browse the repository at this point in the history
  • Loading branch information
ssamadgh committed Jun 19, 2023
1 parent eade04c commit 156d64b
Show file tree
Hide file tree
Showing 7 changed files with 114 additions and 58 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@

### Whats New:

**version 1.6.5:**

- Supports WWDC 2022 and WWDC 2023

**version 1.6.4:**

- Supports WWDC 2020
Expand Down
Binary file modified Releases/WWDC.srt.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
timestampString = "581915108.003467"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "189"
endingLineNumber = "189"
startingLineNumber = "191"
endingLineNumber = "191"
landmarkName = "viewDidLoad()"
landmarkType = "7">
<Actions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@
timestampString = "581915108.0030839"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "663"
endingLineNumber = "663"
startingLineNumber = "665"
endingLineNumber = "665"
landmarkName = "getSubtitlesFromPath(path:)"
landmarkType = "7">
</BreakpointContent>
Expand All @@ -236,8 +236,8 @@
timestampString = "581915108.003134"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "634"
endingLineNumber = "634"
startingLineNumber = "636"
endingLineNumber = "636"
landmarkName = "downloadLinks(for:)"
landmarkType = "7">
</BreakpointContent>
Expand Down Expand Up @@ -447,8 +447,8 @@
timestampString = "581915108.003287"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "188"
endingLineNumber = "188"
startingLineNumber = "190"
endingLineNumber = "190"
landmarkName = "viewDidLoad()"
landmarkType = "7">
<Actions>
Expand Down Expand Up @@ -523,8 +523,8 @@
timestampString = "581915108.003341"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "765"
endingLineNumber = "765"
startingLineNumber = "768"
endingLineNumber = "768"
landmarkName = "getSessionsListForSelecteWWDC()"
landmarkType = "7">
<Actions>
Expand All @@ -537,7 +537,7 @@
</Actions>
<Locations>
<Location
uuid = "E7C5DE7B-818C-4338-8FDE-2308DC24D829 - 1e5680f9678e245a"
uuid = "E7C5DE7B-818C-4338-8FDE-2308DC24D829 - 1e5680f9678e2533"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
Expand All @@ -547,12 +547,12 @@
urlString = "file:///Users/SeyedSamad/Documents/My_Datas/PublishedProjects/WWDCSubGetter_Backup/WWDCsrt/WWDCSubGetter/MainViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "761"
endingLineNumber = "761"
offsetFromSymbolStart = "1892">
startingLineNumber = "768"
endingLineNumber = "768"
offsetFromSymbolStart = "2028">
</Location>
<Location
uuid = "E7C5DE7B-818C-4338-8FDE-2308DC24D829 - 1e5680f9678e25de"
uuid = "E7C5DE7B-818C-4338-8FDE-2308DC24D829 - 1e5680f9678e2533"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
Expand All @@ -562,10 +562,25 @@
urlString = "file:///Users/SeyedSamad/Documents/My_Datas/PublishedProjects/WWDCSubGetter_Backup/WWDCsrt/WWDCSubGetter/MainViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "765"
endingLineNumber = "765"
startingLineNumber = "768"
endingLineNumber = "768"
offsetFromSymbolStart = "1892">
</Location>
<Location
uuid = "E7C5DE7B-818C-4338-8FDE-2308DC24D829 - 1e5680f9678e2533"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "WWDC_srt.MainViewController.getSessionsListForSelecteWWDC() -&gt; ()"
moduleName = "WWDC.srt"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/SeyedSamad/Documents/My_Datas/PublishedProjects/WWDCSubGetter_Backup/WWDCsrt/WWDCSubGetter/MainViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "768"
endingLineNumber = "768"
offsetFromSymbolStart = "1780">
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
Expand Down Expand Up @@ -732,42 +747,10 @@
filePath = "WWDCSubGetter/MainViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "650"
endingLineNumber = "650"
startingLineNumber = "652"
endingLineNumber = "652"
landmarkName = "MainViewController"
landmarkType = "3">
<Locations>
<Location
uuid = "5ADC1C9C-AF40-435C-8A1E-45AC7879515E - 6ff5bb47b6e4be24"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "WWDC_srt.MainViewController.getSubtitlesFromPath(path: Swift.String) -&gt; Swift.Array&lt;WWDC_srt.Subtitle&gt;"
moduleName = "WWDC.srt"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/SeyedSamad/Documents/My_Datas/PublishedProjects/WWDCSubGetter_Backup/WWDCsrt/WWDCSubGetter/MainViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "648"
endingLineNumber = "648"
offsetFromSymbolStart = "212">
</Location>
<Location
uuid = "5ADC1C9C-AF40-435C-8A1E-45AC7879515E - 6ff5bb47b6e4bea0"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "WWDC_srt.MainViewController.getSubtitlesFromPath(path: Swift.String) -&gt; Swift.Array&lt;WWDC_srt.Subtitle&gt;"
moduleName = "WWDC.srt"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/SeyedSamad/Documents/My_Datas/PublishedProjects/WWDCSubGetter_Backup/WWDCsrt/WWDCSubGetter/MainViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "652"
endingLineNumber = "652"
offsetFromSymbolStart = "212">
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
Expand Down
33 changes: 32 additions & 1 deletion WWDCSubGetter/LinksModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,39 @@

import Foundation

class SafeLinksModel {

var queue = DispatchQueue(label: "LinkModel_Thread_Safe_Queue")

private var _linksModel = LinksModel()

var linksModel = LinksModel()

var linksModel: LinksModel {
get {
queue.sync {
return self._linksModel
}
}

set {
queue.async {
self._linksModel = newValue
}
}
}

}

fileprivate var safeLinksModel = SafeLinksModel()
var linksModel: LinksModel {
get {
return safeLinksModel.linksModel
}

set {
safeLinksModel.linksModel = newValue
}
}

struct LinksModel {
var titles: [String] = []
Expand Down
13 changes: 8 additions & 5 deletions WWDCSubGetter/MainViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ import Cocoa

/// An enum for wwdc selection `popUpButton`

let lastWWDC = WWDC.of2018
var lastWWDC: WWDC {
WWDC.allCases.last ?? .of2013
}

enum WWDC: String, CaseIterable {

enum WWDC: String {
//tech-talks
case of2013 = "2013", of2014 = "2014", of2015 = "2015", of2016 = "2016", of2017 = "2017", techTalks = "Tech Talks",
case of2013 = "2013", of2014 = "2014", of2015 = "2015", of2016 = "2016", of2017 = "2017", techTalks = "Tech Talks",
of2018 = "2018", of2019 = "2019", of2020 = "2020", of2021 = "2021", of2022 = "2022", of2023 = "2023"

var stringValue: String {
Expand Down Expand Up @@ -752,7 +754,8 @@ final class MainViewController: NSViewController, TextFileViewDelegate, NSTextFi

func configureSessionList() {
DispatchQueue.global().async {
let data = try! String(contentsOfFile:titleURL.path, encoding: String.Encoding.utf8)
guard let data = try? String(contentsOfFile:titleURL.path, encoding: String.Encoding.utf8)
else { return }
let sessionsListArray = data.components(separatedBy: "\n")
self.sessionsListArray = sessionsListArray
DispatchQueue.main.async {
Expand Down
37 changes: 36 additions & 1 deletion WWDCSubGetter/Model.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,42 @@ typealias ID = Int
We created a global instance of `Model`, thus we can manage our subtitles easily
in every class and struct.
*/
var model = Model()

class SafeModel {

var queue = DispatchQueue(label: "Model_Thread_Safe_Queue")

private var _model = Model()


var model: Model {
get {
queue.sync {
return self._model
}
}

set {
queue.async {
self._model = newValue
}
}
}

}

fileprivate var safeModel = SafeModel()

var model: Model {
get {
return safeModel.model
}

set {
safeModel.model = newValue
}
}



struct Model {
Expand Down

0 comments on commit 156d64b

Please sign in to comment.