macos related changes

This commit is contained in:
Mikhail Filimonov 2024-06-28 13:38:44 -03:00
parent 9d3cc5996b
commit 136e0fa370
2 changed files with 9 additions and 5 deletions

View File

@ -4,13 +4,13 @@
import PackageDescription
let package = Package(
name: "MediaPlayer",
name: "TelegramMediaPlayer",
platforms: [.macOS(.v10_13)],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "MediaPlayer",
targets: ["MediaPlayer"]),
name: "TelegramMediaPlayer",
targets: ["TelegramMediaPlayer"]),
],
dependencies: [
.package(name: "TelegramCore", path: "../TelegramCore"),
@ -27,7 +27,7 @@ let package = Package(
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "MediaPlayer",
name: "TelegramMediaPlayer",
dependencies: [.product(name: "TelegramCore", package: "TelegramCore", condition: nil),
.product(name: "Postbox", package: "Postbox", condition: nil),
.product(name: "FFMpegBinding", package: "FFMpegBinding", condition: nil),

View File

@ -929,7 +929,11 @@ public final class Network: NSObject, MTRequestMessageServiceDelegate {
datacenterId = id
isCdn = true
}
return strongSelf.makeWorker(datacenterId: datacenterId, isCdn: isCdn, isMedia: isMedia, tag: tag, continueInBackground: continueInBackground)
if datacenterId != 0 {
return strongSelf.makeWorker(datacenterId: datacenterId, isCdn: isCdn, isMedia: isMedia, tag: tag, continueInBackground: continueInBackground)
} else {
return nil
}
}
return nil
})