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