Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
DenDmitriev committed Apr 4, 2024
2 parents c996863 + 78c786d commit fba6bf9
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
8 changes: 4 additions & 4 deletions GrabShot.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2143,7 +2143,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 41;
CURRENT_PROJECT_VERSION = 42;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "GrabShot/Preview\\ Content";
DEVELOPMENT_TEAM = TNTX3799P3;
Expand All @@ -2166,7 +2166,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 13.3;
MARKETING_VERSION = 2.0;
MARKETING_VERSION = 2.1;
PRODUCT_BUNDLE_IDENTIFIER = DenisDmitriev.GrabShot;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -2190,7 +2190,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 41;
CURRENT_PROJECT_VERSION = 42;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "GrabShot/Preview\\ Content";
DEVELOPMENT_TEAM = TNTX3799P3;
Expand All @@ -2213,7 +2213,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 13.3;
MARKETING_VERSION = 2.0;
MARKETING_VERSION = 2.1;
PRODUCT_BUNDLE_IDENTIFIER = DenisDmitriev.GrabShot;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
5 changes: 4 additions & 1 deletion GrabShot/Commands/GrabShotCommands.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ struct GrabShotCommands: Commands {
) { result in
switch result {
case .success(let success):
imageStore.insertImages(success)
let urls = success.compactMap { url in
url.startAccessingSecurityScopedResource() ? url : nil
}
imageStore.insertImages(urls)
case .failure(let failure):
if let failure = failure as? LocalizedError {
videoStore.presentError(error: failure)
Expand Down
4 changes: 2 additions & 2 deletions GrabShot/Flow/LinkGrab/Model/YoutubeParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public class YoutubeParser: NSObject {
request.setValue(userAgent, forHTTPHeaderField: "User-Agent")
request.httpMethod = "GET"

let (data, response) = try await URLSession.shared.data(for: request)
let (data, _) = try await URLSession.shared.data(for: request)
guard let responseString = String(data: data, encoding: .utf8) else { throw NSError() }

let parts = responseString.dictionaryFromQueryStringComponents()
Expand All @@ -106,7 +106,7 @@ public class YoutubeParser: NSObject {
}
if let fmtStreamMap = parts["url_encoded_fmt_stream_map"] as? String {
// Live Stream
if let isLivePlayback: AnyObject = parts["live_playback"]{
if let isLivePlayback: AnyObject = parts["live_playback"] {
if let hlsvp = parts["hlsvp"] as? String {
var videoDictionary: [String: AnyObject] = [:]
videoDictionary["url"] = "\(hlsvp)" as AnyObject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct ImageStripMethodDefaultSettingsView: View {
Spacer()
Picker("", selection: $method) {
ForEach(ColorExtractMethod.allCases, id: \.self) { method in
Text(method.name)
Text(NSLocalizedString(method.name, comment: "Settings"))
}
}
.frame(maxWidth: AppGrid.pt192)
Expand Down
2 changes: 1 addition & 1 deletion GrabShot/Flow/VideoGrab/Model/VideoGrabSidebarModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import Foundation

class VideoGrabSidebarModel: ObservableObject {
weak var dropDelegate: VideoDropDelegate?
var dropDelegate: VideoDropDelegate?
weak var coordinator: GrabCoordinator?
@Published var error: GrabError?
@Published var hasError: Bool = false
Expand Down

0 comments on commit fba6bf9

Please sign in to comment.