mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
parent
ca7195caba
commit
1d61dec8eb
@ -388,7 +388,7 @@ final class PlayerModel: ObservableObject {
|
|||||||
if !upgrading, !video.isLocal {
|
if !upgrading, !video.isLocal {
|
||||||
resetSegments()
|
resetSegments()
|
||||||
|
|
||||||
DispatchQueue.global(qos: .userInitiated).async { [weak self] in
|
DispatchQueue.main.async { [weak self] in
|
||||||
self?.sponsorBlock.loadSegments(
|
self?.sponsorBlock.loadSegments(
|
||||||
videoID: video.videoID,
|
videoID: video.videoID,
|
||||||
categories: Defaults[.sponsorBlockCategories]
|
categories: Defaults[.sponsorBlockCategories]
|
||||||
@ -408,23 +408,19 @@ final class PlayerModel: ObservableObject {
|
|||||||
resetSegments()
|
resetSegments()
|
||||||
}
|
}
|
||||||
|
|
||||||
DispatchQueue.global(qos: .userInitiated).asyncAfter(deadline: .now() + 0.25) {
|
(withBackend ?? backend).playStream(
|
||||||
(withBackend ?? self.backend).playStream(
|
stream,
|
||||||
stream,
|
of: video,
|
||||||
of: video,
|
preservingTime: preservingTime,
|
||||||
preservingTime: preservingTime,
|
upgrading: upgrading
|
||||||
upgrading: upgrading
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
self.forceBackendOnPlay = nil
|
self.forceBackendOnPlay = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if !upgrading {
|
if !upgrading {
|
||||||
DispatchQueue.global(qos: .userInitiated).asyncAfter(deadline: .now() + 0.5) {
|
updateCurrentArtwork()
|
||||||
self.updateCurrentArtwork()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ final class SponsorBlockAPI: ObservableObject {
|
|||||||
|
|
||||||
self.videoID = videoID
|
self.videoID = videoID
|
||||||
|
|
||||||
DispatchQueue.global(qos: .userInitiated).async { [weak self] in
|
DispatchQueue.main.async { [weak self] in
|
||||||
self?.requestSegments(categories: categories, completionHandler: completionHandler)
|
self?.requestSegments(categories: categories, completionHandler: completionHandler)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user