diff --git a/App/Milkshake.dmg b/App/Milkshake.dmg
index 24cafe4..77b4786 100644
Binary files a/App/Milkshake.dmg and b/App/Milkshake.dmg differ
diff --git a/Milkshake.xcworkspace/xcuserdata/dean.xcuserdatad/UserInterfaceState.xcuserstate b/Milkshake.xcworkspace/xcuserdata/dean.xcuserdatad/UserInterfaceState.xcuserstate
index 8613877..c8029e8 100644
Binary files a/Milkshake.xcworkspace/xcuserdata/dean.xcuserdatad/UserInterfaceState.xcuserstate and b/Milkshake.xcworkspace/xcuserdata/dean.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/Milkshake/Info.plist b/Milkshake/Info.plist
index 59c154d..34115dc 100644
--- a/Milkshake/Info.plist
+++ b/Milkshake/Info.plist
@@ -19,7 +19,7 @@
CFBundleShortVersionString
1.0.5
CFBundleVersion
- 27
+ 28
LSApplicationCategoryType
public.app-category.music
LSMinimumSystemVersion
diff --git a/Milkshake/Music.swift b/Milkshake/Music.swift
index d537f4a..f15989a 100644
--- a/Milkshake/Music.swift
+++ b/Milkshake/Music.swift
@@ -66,7 +66,9 @@ class Music: NSObject {
print("Music - URL: ", url)
item.duration = Int(length)
self.curPlayingItem = item
- self.removeTimeObserver()
+ DispatchQueue.main.sync {
+ self.removeTimeObserver()
+ }
DispatchQueue.main.async {
self._playAudio(playerItem: playerItem)
}
diff --git a/Milkshake/PlayerViewController.swift b/Milkshake/PlayerViewController.swift
index c7d8f51..50bfd5f 100644
--- a/Milkshake/PlayerViewController.swift
+++ b/Milkshake/PlayerViewController.swift
@@ -56,7 +56,7 @@ class PlayerViewController: NSViewController, MusicTimeProtocol {
self.updateSliderTime(duration: duration, totalTime: totalTime)
let timeLeft = totalTime - duration
- if (timeLeft <= 10 && timeLeft > 0 && appDelegate.music?.crossFade == true) {
+ if (timeLeft <= 10 && appDelegate.music?.crossFade == true && appDelegate.music?.timeObserverToken != nil) {
appDelegate.music?.removeTimeObserver()
appDelegate.music?.playNext()
}